We live in the vicinity of Schiphol Airport. I want to use domoticz to register the planes that fly over our house. At opensky-network.org you can obtain flight info of commercial airlines with JSON. The response from the server looks like this:
Code: Select all
{"time":1608762620,"states":
[["4b1809","SWR1059 ","Switzerland",1608762607,1608762607,8.5565,47.4536,null,true,0,5.62,null,null,null,null,false,0],
["4b1802","SWR979 ","Switzerland",1608762616,1608762616,8.56,47.4541,null,true,0,185.62,null,null,null,"1000",false,0],
["4b180b","SWR78J ","Switzerland",1608762611,1608762616,8.5557,47.4544,null,true,0,185.62,null,null,null,null,false,0]]}I tried this without success:
Code: Select all
rt = triggerObject.json
-- some checks left away
local textLines = ""
for j = 1,#rt.states do
textLines = textLines .."\n" .. rt.states[j]
endPeter