No, it’s not. I am still running the exact same configuration and it’s working perfectly fine.
Please note that this is working with Flightradar24 (not FlightAware). I am running version 1.0.24-7 of their software on Raspbian.
I stand corrected. Thanks for letting me know the difference exxamalte! Looks like a similar project as FlightAware, I thought we were talking about the same thing…
Yours must be this… nearly identical to my setup just different software
Cheers!
No worries. Apart from the (simple) configuration above, I have been experimenting with using the real-time data I get from the software and somehow use that in HA. At the time there had been two data access points - one Flightradar24-specific, and one that uses the Dump1090 data which I believe is also used by the FlightAware software (that’s the /data/aircraft.json
end-point).
I haven’t found the time to work on this any further, and the library itself isn’t async yet. Here is the current state:
This is my “Aircraft Tracked” graph:
Great info.
I’m running PI24 on a Pi2 and Home Assistant on a server.
Got the tracking working, with the use of monitor.json.
Only aircraft.json isn’t accessible (yet) it says 'FORBIDDEN :> ’
Want the names of the last 5 tracked airplanes on screen.
This can be usefull in an automation to trigger a light when a specific string is equal. For when you want to know when a specific airplane is near.
Try using http://[raspberry pi]:8754/flights.json. I have no idea how to make HA read it, but will try to learn!
So here’s the output of my flights.json file:
{
“xabe579”: [
“ABE579”,
0,
0,
56,
5650,
271,
“3215”,
0,
“”,
“”,
1596308215,
“”,
“”,
“”,
0,
3072,
“”
],
“xa5287a”: [
“A5287A”,
37.6133,
-122.4295,
141,
8550,
256,
“3372”,
0,
“”,
“”,
1596308276,
“”,
“”,
“”,
0,
832,
“SKW5291”
]
}>
Or, more generically, there’s one json object for each tracked aircraft, with a key name of “+[modeS].” Then the value is an array of:
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Mode S
Latitude
Longitude
Heading (maybe)
Altitude
Airspeed (maybe)
Squawk code
0
“”
“”
Some kind of unique ID
“”
“”
“”
0
Don’t know
Callsign
Now I just need to figure out how to iterate through it.
Found this post about running a for…each loop through a JSON object when the key name is unknown, but haven’t figured out how to make it work.
Did you ever get this completed?
To be honest, I completely forgot! Has anybody else been working on this, by chance?
yes got it working under docker. Will try to write detailed guide.
Awesome! I sort of dropped the ball on this, so glad it was picked up!
Here is my detailed guide. please feel free to contact me for any issue.
Thanks, but I think this is different from what the OP was looking for, which was to have HA read the flights.json file for use in automations.
I wrapped the awesome docker image from Thom-x as Home Assistant Add-On. Any feedback is appreciated
This is not a Home Assistant add-on, but just a Python library. If you are a developer then you can use this to build a Home Assistant integration.
I was able to install it. Where to add the configuration you posted for custom sensor?
In customomize.yaml file?
Ah, that one. The configuration I shared has nothing to do with the Python library I shared separately, but solely relies on the rest
sensor. I have this in a package file (included via configuration.yaml
), not in customomize.yaml
.
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:
...