The balena ADS-B Thread

Hi everyone,

I’m Ketil, the maintainer of the balena ADS-B project. This thread can be used as a starting point if you are stuck, find bugs or experience other issues with the project.

If you want to get started quickly with this project, click the button below:

Deploy with balena

Here are some other relevant links:

Newsletter
Roadmap
Open issues
balena Happy Hour Video

If you need assistance, don’t hesitate to post a reply to this thread. Happy plane spotting! :airplane: :eyes:

1 Like

Hi! I’m having issues getting PlaneFinder and OpenSky to work.
I’ve gone all the way through the Readme, and verified everything else is working.
(I can go to :8080, :8754 and see services running, etc)

The PlaneFinder site shows my sharecode, but says inactive, and the sharecode has been added to my device variables under “PLANEFINDER_SHARECODE”.

In the OpenSky dashboard, I just don’t see any devices at all, even though I’ve added both the OPENSKY_SERIAL and OPENSKY_USERNAME device variables.

I’ve been trying to get these last two services connected/working for hours now, and I’m not sure where to go from here.

Any help is greatly appreciated!
-Kaden

Hi @Kishaihd,

Thanks for reaching out. I’m sorry to hear that you are experiencing problems. What device have you installed balena-ads-b on?

To further debug the issue, it would be great if you can have a look at the PlaneFinder and OpenSky Network services’ log files. You can do so by

  1. Heading back to the balena dashboard and your device’s page.
  2. On the Summary page, scroll down to the section named Services.
  3. Locate the service named opensky-network.
  4. Click the “Show logs” icon on the lefthand side of the opensky-network line.
  5. Restart the service using the “Restart” icon.
  6. Scroll up and locate the log for the service on the upper right side of the screen.
  7. Wait for log output to appear, look for any error messages or issues. Feel free to paste log segments here.
  8. Repeat this procedure for the planefinder service.

Let us know how it goes, and share anything relevant you find in the logs. Best of luck!

Kind regards,
Ketil

1 Like

I’m using a Raspberry Pi 3 (non 64-bit OS).

Below are the logs from both services. The parts that might be interesting are in Bold.

This is my opensky-network log:

(I’ve redacted the username, serial, and LAT/LON values here)
I did notice that the Sending Serial Number serial number is different from the other serial numbers.

02.05.21 14:35:22 (-0600) opensky-network OpenSky Network Username is set: [myUname]
02.05.21 14:35:22 (-0600) opensky-network Receiver latitude is set: [myLat]
02.05.21 14:35:22 (-0600) opensky-network Receiver longitude is set: [myLon]
02.05.21 14:35:22 (-0600) opensky-network Receiver altitude is set: [myAlt]
02.05.21 14:35:22 (-0600) opensky-network Receiver host is set: dump1090-fa
02.05.21 14:35:22 (-0600) opensky-network Receiver port is set: 30005
02.05.21 14:35:22 (-0600) opensky-network
02.05.21 14:35:22 (-0600) opensky-network Settings verified, proceeding with startup.
02.05.21 14:35:22 (-0600) opensky-network
02.05.21 14:35:22 (-0600) opensky-network Looking for OpenSky Network Serial…
02.05.21 14:35:22 (-0600) opensky-network
02.05.21 14:35:22 (-0600) opensky-network OpenSky Network Username is set: [myUname]
02.05.21 14:35:22 (-0600) opensky-network Receiver latitude is set: [myLat]
02.05.21 14:35:22 (-0600) opensky-network Receiver longitude is set: [myLon]
02.05.21 14:35:22 (-0600) opensky-network Receiver altitude is set: [myAlt]
02.05.21 14:35:22 (-0600) opensky-network Receiver host is set: dump1090-fa
02.05.21 14:35:22 (-0600) opensky-network Receiver port is set: 30005
02.05.21 14:35:22 (-0600) opensky-network
02.05.21 14:35:22 (-0600) opensky-network Settings verified, proceeding with startup.
02.05.21 14:35:22 (-0600) opensky-network
02.05.21 14:35:22 (-0600) opensky-network Looking for OpenSky Network Serial…
02.05.21 14:35:22 (-0600) opensky-network
02.05.21 14:35:24 (-0600) opensky-network OpenSky Network Serial is set: [mySerial]
02.05.21 14:35:24 (-0600) opensky-network
02.05.21 14:35:24 (-0600) opensky-network Settings verified, proceeding with startup.
02.05.21 14:35:24 (-0600) opensky-network
02.05.21 14:35:24 (-0600) opensky-network [INFO] [COMP] Initialize STAT
02.05.21 14:35:24 (-0600) opensky-network [INFO] [COMP] Initialize POS
02.05.21 14:35:24 (-0600) opensky-network [INFO] [COMP] Initialize DEVTYPE
02.05.21 14:35:24 (-0600) opensky-network [INFO] [COMP] Initialize NET
02.05.21 14:35:24 (-0600) opensky-network [INFO] [COMP] Initialize TB
02.05.21 14:35:24 (-0600) opensky-network [INFO] [COMP] Initialize SERIAL
02.05.21 14:35:24 (-0600) opensky-network [INFO] [COMP] Initialize BUF
02.05.21 14:35:24 (-0600) opensky-network [INFO] [COMP] Initialize RELAY
02.05.21 14:35:24 (-0600) opensky-network [INFO] [COMP] Initialize RC
02.05.21 14:35:24 (-0600) opensky-network [INFO] [COMP] Initialize FILTER
02.05.21 14:35:24 (-0600) opensky-network [INFO] [COMP] Initialize RECV
02.05.21 14:35:24 (-0600) opensky-network [INFO] [COMP] Start STAT
02.05.21 14:35:24 (-0600) opensky-network [INFO] [COMP] Start POS
02.05.21 14:35:24 (-0600) opensky-network [INFO] [COMP] Start DEVTYPE
02.05.21 14:35:24 (-0600) opensky-network [INFO] [COMP] Start NET
02.05.21 14:35:24 (-0600) opensky-network [INFO] [COMP] Start TB
02.05.21 14:35:24 (-0600) opensky-network [INFO] [COMP] Start SERIAL
02.05.21 14:35:24 (-0600) opensky-network [INFO] [COMP] Start RELAY
02.05.21 14:35:24 (-0600) opensky-network [INFO] [COMP] Start RC
02.05.21 14:35:24 (-0600) opensky-network [INFO] [COMP] Start FILTER
02.05.21 14:35:24 (-0600) opensky-network [INFO] [COMP] Start RECV
02.05.21 14:35:24 (-0600) opensky-network [INFO] [INPUT] Trying to connect to ‘dump1090-fa’: [172.17.0.2]:30005
02.05.21 14:35:24 (-0600) opensky-network [INFO] [INPUT] connected to ‘dump1090-fa’
02.05.21 14:35:24 (-0600) opensky-network [INFO] [NET] Trying to connect to ‘collector.opensky-network.org’: [194.209.200.3]:10004
02.05.21 14:35:24 (-0600) opensky-network [INFO] [NET] connected to ‘collector.opensky-network.org
02.05.21 14:35:24 (-0600) opensky-network [INFO] [LOGIN] Sending Device ID 5, Version 2.1.7
02.05.21 14:35:24 (-0600) opensky-network [INFO] [LOGIN] Sending Serial Number [a different serial number?]
02.05.21 14:35:24 (-0600) opensky-network [INFO] [GPS] Sending position [myLat]°, [myLon]°, [myAlt]m
02.05.21 14:35:24 (-0600) opensky-network [INFO] [LOGIN] Sending Username ‘[myUname]’
02.05.21 14:35:24 (-0600) opensky-network [INFO] [TB] Setting sync filter: 0
02.05.21 14:35:24 (-0600) opensky-network [INFO] [TB] Setting ext squitter only filter: 0

Here is my log for PlaneFinder

also with PII redacted:

02.05.21 14:42:55 (-0600) planefinder Verifying settings…
02.05.21 14:42:55 (-0600) planefinder
02.05.21 14:42:57 (-0600) planefinder Plane Finder Sharecode is set: [mySharecode]
02.05.21 14:42:57 (-0600) planefinder Receiver latitude is set: [myLat]
02.05.21 14:42:57 (-0600) planefinder Receiver longitude is set: [myLon]
02.05.21 14:42:57 (-0600) planefinder Receiver host is set: dump1090-fa
02.05.21 14:42:57 (-0600) planefinder Receiver port is set: 30005
02.05.21 14:42:57 (-0600) planefinder
02.05.21 14:42:57 (-0600) planefinder Settings verified, proceeding with startup.
02.05.21 14:42:57 (-0600) planefinder
02.05.21 14:42:57 (-0600) planefinder 2021-05-02 20:42:57.321842 [-] We were unable to locate a configuration file and have entered configuration mode by default. Please visit: http://[myIP]:30053 to complete configuration.
02.05.21 14:42:57 (-0600) planefinder 2021-05-02 20:42:57.324078 [-] Echo port is now listening on: [myIP]:30054
02.05.21 14:42:57 (-0600) planefinder 2021-05-02 20:42:57.325047 [-] Web server is now listening on: http://[myIP]:30053
02.05.21 14:42:57 (-0600) planefinder 2021-05-02 20:42:57.325256 [V] Performing NTP sync (3.planefinder.pool.ntp.org)…
02.05.21 14:42:57 (-0600) planefinder 2021-05-02 20:42:57.538335 [V] NTP sync succeeded with settings:
02.05.21 14:42:57 (-0600) planefinder 2021-05-02 20:42:57.538476 [V] Stratum: 1
02.05.21 14:42:57 (-0600) planefinder 2021-05-02 20:42:57.539475 [V] System clock time: 1619988177.5383
02.05.21 14:42:57 (-0600) planefinder 2021-05-02 20:42:57.540190 [V] Corrected clock time: 1619988177.5378
02.05.21 14:42:57 (-0600) planefinder 2021-05-02 20:42:57.541177 [V] NTP offset: -0.0005s

If I go to [local IP]:30053 it shows the PlaneFinder config screen. From there, I choose “Use an existing sharecode”, enter the sharecode, LAT, and LON, the click “Assign Sharecode” but there’s no indication that anything has happened.
Oh the PlaneFinder website, my sharecode does show up under “receivers”, but it says the receiver is inactive and that no data has been received.

Thank you!
-Kaden

Thanks for providing an elaborate answer, @Kishaihd!

This is strange behavior indeed. Did you deploy using the balena button or using the git-based method? Did you use the main branch or any of the forks? Is the SD card relatively new, or has it been used for a while? It could be worthwhile to attempt a redeploy of the code. If you overwrite your current instance, all your entered settings will be saved.

Starting with Planefinder, it looks like the config file is missing or invalid. Can you try opening the terminal to the Planefinder service and then issue the command cat /etc/pfclient-config.json? Then do a cat /etc/pfclient-config.json.tpl. (This is to figure out if the config and config template files present on the file system, or missing.)

For OpenSky Network, it’s correct that the submitted serial number is different from the serial that’s displayed in the console (which is a negative number). Is the number you entered in the variable positive and on a similar for to this? 2775123522

Kind regards,
Ketil

1 Like

Just wanted to say thanks @Ketil for helping out! :slight_smile:

1 Like

That’s only a pleasure, @dtischler! :slightly_smiling_face: Thanks for your feedback.

1 Like

Hi Ketil,

I did not use the balena button, I went through each step from your github instructions. :slight_smile:

For Planefinder,
Both files exist, but I do see that in /etc/pfclient-config.json the sharekey has 8 blank spaces in front of it, is that normal? I would try to remove the spaces, but it looks like the container doesn’t have vim, emacs, nano, or even vi installed.
The ‘key’ fields in both the json and json.tpl files also match up, and aside from the extra spacing in the sharecode, everything else looks like it should be valid.

For OpenSky, that is the same format as my key, it’s fairly similar.
When I go the OpenSky website and look at manually entering a device, it talks about needing to open a port on my firewall. Maybe something on their end has changed with the way devices are connected?

Thank you,
-Kaden

Hi @Kishaihd,

Very interesting. Good catch on the white space. The key should not have any blank spaces preceding it. Can you have a look at your environment variables in the balena dashboard and see if any white space might have sneaked in on the PlaneFinder key? You would need click the “edit variable” button to check this – trailing white spaces is not visible in the variable overview screen.

For the OpenSky Network issues, I might have to consult with their developers directly. But let’s first figure out the PlaneFinder problems.

Kind regards,
Ketil

1 Like

Hi @Ketil ,

It looks like the extra spaces were present in the device variable, and now that they’re gone PlaneFinder is working! Like you said, the spaces could only be seen if you clicked on “edit variable”.

I checked the OpenSky Network variables for extra spaces too, but it looks like I entered those ones correctly.

Thanks!
-Kaden

Hi @Kishaihd,

I’m delighted to hear that you were able to get Planefinder working. Good job!

For OpenSky Network, I will reach out to the lead developer and see if he can see traces of your devices on the server-side. I will contact you directly about how to proceed with this.

Regards,
Ketil

1 Like

@Ketil Hi, Thanks for this excellent platform with many rich features. As I live close to a very busy airport and Covid19 travel restrictions relaxing the amount of flights passing by is enormous. As such I wonder if it’s possible to add two features/filter being:

altitude below 600m (that one exists)

range (from my location) within 1km.
capture those flights so I can report them.

too often I have flight passing by at 1/2 of the minimum altitude and having an filter allows my report them to the authorities automatictly.

Hi @rjwelling,

Thanks for reaching out! The local PlaneFinder UI allows you to specify altitude filters. Just open the PlaneFinder local view as explained here. Then locate the cogwheel on the upper right-hand side of the screen – it allows you to filter for minimum and maximum altitude. You can also specify range rings here.

Would this work for you?

Kind regards,
Ketil

Hi again @rjwelling,

I just made some changes to the ADSB Exchange integration. The changes will let you monitor your raw data feed through ADSB Exchange’s tar1090 web interface, which has some options for advanced filtering. You’ll find this by upgrading to the latest version of balena-ads-b. Ensure that you have configured the ADSB Exchange integration as explained in part 8 of the ReadMe.

Next, head over to ADSB Exchange’s Feeder Status page. Finally, click on the link to your personal ADSBexchange Anywhere Map.

Kind regards,
Ketil

1 Like

Hi Keti, thanks for the reply, much appreciated. I’m aware of this functionality and such I wonder if it’s possible to retain this filter and each plain within the treshold set is exported to a file (or even better, to a twitter feed to alert the authorities that flights are too low).

Hi @rjwelling,

Understood! It should be possible to solve through some scripting. You can view the received data in json format by going to this URL: YOURDEVICEURL/skyaware/data/aircraft.json.

When it comes to automatic tweeting, have a look at this project for some inspiration: GitHub - kevinabrandon/AboveTustin: ADS-B Twitter Bot. Uses dump1090-mutability to track airplanes and then tweets whenever an airplane flies overhead.

Kind regards,
Ketil

supercool! thank you very much!

/rw

1 Like

Any time, @rjwelling! Let us know how it turns out. :slightly_smiling_face: And don’t hesitate to reach out if you have questions.

Kind regards,
Ketil

1 Like

:flight_departure:

1 Like

@Ketil I noticed that the SkyAware v5 (part of the Balena build) is pretty much out of date with the public version v6 and I guess the same for the other elements as well. Is this due to me or part of the Balena lifecycle?