×

Notice

The forum is in read only mode.

Reading data from the Raspberry Pi in a PC over local network

2 years 11 months ago #1699 by jobbruggen
Howdy all,

I am trying to read the output from dump1090 over my own local network from my Windows PC (running Python).
How can I achieve that?

Greetings,
Job
 
2 years 11 months ago #1700 by jluebbe
This depends on how much effort you would like to spend.
Solution 1 (recommended):
I am just feeding my data to OpenSky from a Raspberry Pi and consume this on my other computers via the OpenSky Python-API.
Solution 2:
The dump1090 or dump1090-fa usually provides output data on port 30005 in the Beast format. It may take some time to find out how to consume it.
Solution 3:
Open the web interface of the dump1090 in your web browser and use the developer tools of the browser to analyse data access. There might be calls like "http://your-raspi:8080/data/aircraft.json?_=1639944660718" which provide JSON output.
This could easily be interpreted by python using "requests":
response = requests.get("http://...").json()
2 years 11 months ago #1701 by jobbruggen
Solution 2 was used and it worked quite easily.

These two simple lines was all it took:
url="http://192.168.1.168:8080/data/aircraft.json"
with closing(urlopen(url, None, 5.0)) as aircraft_file:
block = json.load(aircraft_file)
Powered by Kunena Forum