Preference for handling MQTT sensor attributes for ADS-B flight tracking?

Hi all - Posting this here instead of Share Your Projects since it is not yet a completed project.

I am working on what I plan as (probably) a custom component that takes data from a self-run ADS-B flight tracking set up (for example like this one) and enriches it with extra data sources, ailrine logo images and national flags images. It then makes all of that available to Home Assistant via MQTT with discovery and as a REST endpoint for consumption and display in Home Assistant.

Two questions for you:

Firstly, not all possible data point (which will be MQTT subtopics and then sensor attributes in Home Assistant) will be available for each tracked aircraft, and what will or won’t be there is unpredictable.

With that in mind, is it more useful to publish an MQTT payload like none or to publish an empty string to server (thus removing the topic) for any data points that aren’t available?

Examples:

If the answer is to publish an actual payload instead of an empty string, is there a preference or a convention for:

  • none
  • None
  • false
  • False
  • unknown
  • unavailable

Or omething else?

Secondly, how would you like or expect the PNGs of airline logos and flags to be made availble?

  1. Publish via MQTT as a byte array
  2. Publish via MQTT as a URL for download

Both? Something else?

Thanks.

Really interested in this. I’ve been experimenting with pushing data to mqtt via a bash script to monitor my feeders and then displaying the results.
I know you can fetch the json into a sensor for display and was likely to have gone that route - will only want the data in an array rather than individual sensors as the data sets would be too much.
Any values I think should be unavailable to match what happens on other sensors.

Very happy to help with testing when you get it to a state to do so.

1 Like