FlightRadar24 as an Add-On?

I tried adding the following code to my configuration.yaml file

  - sensor.fr24_feeder:
    hidden: true
  - sensor.fr24_feeder_aircraft_tracked:
    icon: mdi:airplane
  - sensor.fr24_feeder_aircraft_uploaded:
    icon: mdi:airplane
  - sensor.fr24_feeder_radar_code:
    icon: mdi:radar

binary_sensor 24:
  - platform: template
    sensors:
      fr24_feeder_receiver_connected:
        friendly_name: Receiver Connected
        value_template: '{{ is_state_attr("sensor.fr24_feeder", "rx_connected", "1") }}'
        device_class: connectivity
      fr24_feeder_link_connected:
        friendly_name: Link Connected
        value_template: '{{ is_state_attr("sensor.fr24_feeder", "feed_status", "connected") }}'
        device_class: connectivity

sensor 24:
  - platform: rest
    name: FR24 Feeder
    resource: http://f1c878cb-adsb-multi-portal-feeder:8754/monitor.json
    value_template: '{{ value_json.feed_alias }}'
    method: GET
    scan_interval: 60
    json_attributes:
      - rx_connected
      - feed_status
      - d11_map_size
      - feed_num_ac_tracked
      - build_version
      - feed_alias
  - platform: template
    sensors:
      fr24_feeder_radar_code:
        friendly_name: Radar Code
        value_template: '{{ states.sensor.fr24_feeder.attributes["feed_alias"] }}'
      fr24_feeder_aircraft_tracked:
        friendly_name: Aircraft Tracked
        value_template: '{{ states.sensor.fr24_feeder.attributes["d11_map_size"] | round(0) }}'
        unit_of_measurement: 'aircrafts'
      fr24_feeder_aircraft_uploaded:
        friendly_name: Aircraft Uploaded
        value_template: '{{ states.sensor.fr24_feeder.attributes["feed_num_ac_tracked"] | round(0) }}'
        unit_of_measurement: 'aircrafts'
      fr24_feeder_version:
        friendly_name: Version
        value_template: '{{ states.sensor.fr24_feeder.attributes["build_version"] }}'    

but got this error when I checked the configration

Invalid config for [sensor]: required key not provided @ data['platform']. Got None. (See /config/configuration.yaml, line 194).
Invalid config for [sensor]: required key not provided @ data['platform']. Got None. (See /config/configuration.yaml, line 194).
Invalid config for [sensor]: required key not provided @ data['platform']. Got None. (See /config/configuration.yaml, line 194).
Invalid config for [sensor]: required key not provided @ data['platform']. Got None. (See /config/configuration.yaml, line 194).

which is strange bcz this code start at line 256 .

while I have this on line 194

Your forgot a few lines at the beginning:

homeassistant:
  customize:
...

those are already added at the beginning of the configuration file?

Yeah, but followed by lots of unrelated stuff.

new error

expected a dictionary for dictionary value @ data['customize']

Then there is still something wrong with how you set up your configuration file.

The configuration I shared in the second post works as-is in a package file.

I am using @MaxW’s add-on, the only change I made from your code instead of raspberry IP I am using the add-on address as described by him

finally got it working

1 Like

Decided to do something a bit different using Node Red and had a lot of inspiration from this thread. If anyone here is a NR user and wants a plug + play way to get planes overhead data from their FR24 setup, I posted about it here.

Thanks for this scraper, is there anyway we can grab the distance from the plane that’s the furthest from my station… this is becoming a game with antenna battles ! lol and personally would love to just track the distance image

That information you use to display the sensors does not contain details about individual flights tracked.

To get the distance you would need to look at every single tracked flight’s lat/lon values, calculate the distance to your current location and then find the maximum. The data is available from http://<hostname>:8754/flights.json - the JSON returned is an array and each entry of the array represents a flight. The second value is latitude, the third value is longitude. You could iterate over that array, extract lat/lon and use the distance function.

awesome, thanks for the insight “xadea8d”:[“ADEA8D”,42.3572,-82.9719,336,10075,287,“7024”,0,"","",1638138769,"","","",0,0,“N996SR”] so now i just have to figure out the other side of that now… thanks ! wish someone had a blueprint of this …anyone ?

Here’s what most of the fields mean: FlightRadar24 as an Add-On? - #9 by ChrisMD123

I didn’t know what I was doing with templating at the time so I couldn’t take it any further.

Hi!

Installed ADS-B Multi-Portal Feeder that @MaxW linked to. I have installed it in HA,

But then??

How should configuration.yaml look like?

Need any key?

And is it possible with this addon to get information from planes departure and destination.???

Edit: Do i need a adr usb???

//Kind regards
//Noob :slight_smile:

You need to be running a Flightradar24 setup in your network with an antenna and USB SDR.

Ok, but why?

All the data is reachable with flightradar24 app/web !?

Why need of USB SDR?

Well, this add-on was created specifically for people who actually do run a local setup with their own antenna.

Maybe what you are looking for is more something like the OpenSky Network integration?

Thx @exxamalte !! But I tried that Opensky before, but I dont think you can get “info” from departure and arrival with that.

Only IF there are a plane above.

OK, I see. If that’s an important feature, then I believe there is currently no integration that can do that for you.

As mentioned this Flightradar24 integration is just using the data that a local installation has and that is really just whatever the airplane itself transmits via ADS-B, and does not include departure or arrival times.

Hi…
Just installed this add on and trying to connect it to my rpi running pi24 (Flight Radar 24 rpi image).
However, having a hard time to read from my pi to my HA addon.
The rpi24 is running and tracking is good…

What values do I have to change in order to let the add-on read from the rpi?