Skip to content

Latest commit

 

History

History
36 lines (23 loc) · 23.2 KB

OpenSkyAPI.md

File metadata and controls

36 lines (23 loc) · 23.2 KB

Three flows to search for aircraft movements, airport arrivals and departures.

Navigation: home

Jume 2024. Ignore this page

tbg has no idea if this API code still works after open-sky broke it around Jan 2024.

If you are feeding OpenSky, you will have a user/pass. You will need to add these to the following flows.

Aircraft movements

This flow looks for an ICAO 24 number and automatically takes the time now and goes back 30 days. Those three parameters are put into a URL, fed to the OpenSky API and the returned data is put into a table on a dashboard table.

[{"id":"1b9655c0.0172ea","type":"debug","z":"7177b2be.2ec43c","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1610,"y":140,"wires":[]},{"id":"7351741f.dbcd4c","type":"http request","z":"7177b2be.2ec43c","name":"","method":"GET","ret":"obj","paytoqs":"ignore","url":"","tls":"","persist":false,"proxy":"","authType":"","x":1070,"y":200,"wires":[["6a1cca82.8fb834"]]},{"id":"951fbcab.a1cb1","type":"function","z":"7177b2be.2ec43c","name":"build URL","func":"msg.url = \"https://yourusername:yourpassword@opensky-network.org/api/flights/aircraft?icao24=\"+msg.payload+\"&begin=\"+msg.past+\"&end=\"+msg.start\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":880,"y":200,"wires":[["d23735b6.ec35c8","7351741f.dbcd4c"]]},{"id":"92a34e1e.cb4eb","type":"ui_text_input","z":"7177b2be.2ec43c","name":"","label":"ICAO","tooltip":"","group":"bd140338.ef17c","order":1,"width":1,"height":1,"passthru":true,"mode":"text","delay":"0","topic":"topic","topicType":"msg","x":150,"y":200,"wires":[["de3038ac.865a08"]]},{"id":"de3038ac.865a08","type":"function","z":"7177b2be.2ec43c","name":"icao","func":"msg.payload = msg.payload.toLowerCase();\nflow.set(\"icao\", msg.payload);\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":290,"y":200,"wires":[["be8bcfd7.e90be8"]]},{"id":"6a1cca82.8fb834","type":"function","z":"7177b2be.2ec43c","name":"OpenSky","func":"var m = [];\nfor (var i in msg.payload)\n{\n\n        // gather flight data in one object\n        flight = {};\n        flight.icao = (msg.payload[i].icao24);\n        flight.callsign = (msg.payload[i].callsign);\n        flight.firstseen = (new Date(msg.payload[i].firstSeen*1000).toUTCString());\n        flight.lastseen = (new Date(msg.payload[i].lastSeen*1000).toUTCString());\n        flight.departap = (msg.payload[i].estDepartureAirport);\n        flight.arriveap = (msg.payload[i].estArrivalAirport);\n        flight.abxurl = (\"https://globe.adsbexchange.com/?icao=\"+msg.payload[i].icao24);\n        m.push(flight);\n        \n    \n}\nif(m.length > 0) return { \"payload\" : m };\n\nelse return null; // no matches found. end of line.\n\n","outputs":"1","noerr":0,"initialize":"","finalize":"","x":1240,"y":200,"wires":[["c0a9a5ed.882a68","eee41ebc.58c57"]]},{"id":"c0a9a5ed.882a68","type":"function","z":"7177b2be.2ec43c","name":"array to JSON","func":"var data = []; //create an empty array.\nvar loop = msg.payload.length;  // Loop over the entire array.\nfor (i = 0; i < loop; i++) { //Loop through and get all the arrays to build each JSON object.\n\n    //data.push({\"Date\" : msg.payload[i].tstring, \"Registration\" : msg.payload[i].rego, \"Call Sign\" : msg.payload[i].calls, \"Type\" : msg.payload[i].actype, \"Opperator\" : msg.payload[i].oppr, \"Squawk Code\" : msg.payload[i].sqk, \"Aircraft icao\" : msg.payload[i].icao, \"ADSBEx\" : msg.payload[i].abxurl, \"yours VRS\" : msg.payload[i].yoururl});\n    data.push({\"icao\" : msg.payload[i].icao, \"callsign\" : msg.payload[i].callsign, \"firstseen\" : msg.payload[i].firstseen, \"lastseen\" : msg.payload[i].lastseen, \"departap\" : msg.payload[i].departap,\"arriveap\" : msg.payload[i].arriveap, \"ADSBEx\" : msg.payload[i].abxurl});\n\n}   \nreturn { payload : data };","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1420,"y":200,"wires":[["727bcfb2.2b6f9","1b9655c0.0172ea"]]},{"id":"727bcfb2.2b6f9","type":"ui_table","z":"7177b2be.2ec43c","group":"bd140338.ef17c","name":"Last 30 days","order":8,"width":15,"height":45,"columns":[{"field":"icao","title":"ICAO","width":"100","align":"left","formatter":"plaintext","formatterParams":{"target":"_blank"}},{"field":"callsign","title":"Call sign","width":"100","align":"left","formatter":"plaintext","formatterParams":{"target":"_blank"}},{"field":"firstseen","title":"Time first seen","width":"250","align":"left","formatter":"plaintext","formatterParams":{"target":"_blank"}},{"field":"lastseen","title":"Time last seen","width":"250","align":"left","formatter":"plaintext","formatterParams":{"target":"_blank"}},{"field":"departap","title":"Depature Airport","width":"110","align":"left","formatter":"plaintext","formatterParams":{"target":"_blank"}},{"field":"arriveap","title":"Arrival Airport","width":"110","align":"left","formatter":"plaintext","formatterParams":{"target":"_blank"}},{"field":"ADSBEx","title":"ADSBEx - No history! Current location only.","width":"350","align":"left","formatter":"link","formatterParams":{"target":"_blank"}}],"outputs":0,"cts":false,"x":1630,"y":200,"wires":[]},{"id":"eee41ebc.58c57","type":"debug","z":"7177b2be.2ec43c","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1390,"y":140,"wires":[]},{"id":"d23735b6.ec35c8","type":"debug","z":"7177b2be.2ec43c","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1030,"y":140,"wires":[]},{"id":"42a8f428.78fe2c","type":"function","z":"7177b2be.2ec43c","name":"test data","func":"msg.payload = return msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1100,"y":280,"wires":[["c9b74f47.6fb3d","6a1cca82.8fb834"]]},{"id":"4f7d0fb6.7954d","type":"inject","z":"7177b2be.2ec43c","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":920,"y":280,"wires":[["42a8f428.78fe2c"]]},{"id":"c9b74f47.6fb3d","type":"debug","z":"7177b2be.2ec43c","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1290,"y":280,"wires":[]},{"id":"ef858602.6f7018","type":"debug","z":"7177b2be.2ec43c","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":890,"y":360,"wires":[]},{"id":"62132bd1.277a54","type":"function","z":"7177b2be.2ec43c","name":"now-30days","func":"timestamp = msg.topic/1000;\nmyDate = new Date(timestamp);\nmsg.past = myDate.setTime(myDate.getTime()-2592000);\n//msg.start = parseInt(timestamp - 86400);\nmsg.start = parseInt(timestamp);\nreturn msg;\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":650,"y":200,"wires":[["ef858602.6f7018","951fbcab.a1cb1"]]},{"id":"be8bcfd7.e90be8","type":"change","z":"7177b2be.2ec43c","name":"topic timestamp","rules":[{"t":"set","p":"topic","pt":"msg","to":"","tot":"date"}],"action":"","property":"","from":"","to":"","reg":false,"x":460,"y":200,"wires":[["62132bd1.277a54"]]},{"id":"bd140338.ef17c","type":"ui_group","name":"Past flights - Type aircraft ICAO24 code, press enter. WAIT (Up to 60 seconds!!). Last 30 days of aircraft arrive/depart airports will be returned. (Using opensky-network.org data)","tab":"3d624982.18f596","order":1,"disp":true,"width":"15","collapse":false},{"id":"3d624982.18f596","type":"ui_tab","name":"Aircraft Search","icon":"aircraft","order":3,"disabled":false,"hidden":false}]

Airport arrivals

This flow takes the ICAO code of the airport (ie KLAX) and returns the past 3 days. The OpenSky API will allow up to 7 days, but for most airports the delay between sending the request and getting the data back caused the user to mash the enter button way too many times and in the end give up, if your user actually waits, then the slug of data that got returned caused the table node and dashboard node to blow up and crash Node-RED (for busy airports like Los Angles and San Diego), so I limited it to the last three days - Your mileage may vary.

[{"id":"47dbd9a8.d3b098","type":"debug","z":"7177b2be.2ec43c","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1590,"y":520,"wires":[]},{"id":"88683df8.dab5b","type":"http request","z":"7177b2be.2ec43c","name":"","method":"GET","ret":"obj","paytoqs":"ignore","url":"","tls":"","persist":false,"proxy":"","authType":"","x":1050,"y":580,"wires":[["32af9cb.c785564"]]},{"id":"d2c8a63b.238278","type":"function","z":"7177b2be.2ec43c","name":"build URL","func":"msg.url = \"https://yourusername:yourpassword@opensky-network.org/api/flights/arrival?airport=\"+msg.payload+\"&begin=\"+msg.past+\"&end=\"+msg.start\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":860,"y":580,"wires":[["a92ae62d.a89478","88683df8.dab5b"]]},{"id":"4278f908.094588","type":"ui_text_input","z":"7177b2be.2ec43c","name":"","label":"ICAO","tooltip":"","group":"733e3b6f.359a24","order":1,"width":"1","height":1,"passthru":true,"mode":"text","delay":"0","topic":"topic","topicType":"msg","x":130,"y":580,"wires":[["a4372beb.0ffe88"]]},{"id":"a4372beb.0ffe88","type":"function","z":"7177b2be.2ec43c","name":"icao","func":"//msg.payload = msg.payload.toLowerCase();\nflow.set(\"icao\", msg.payload);\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":270,"y":580,"wires":[["4a4ca2bc.6f9b7c"]]},{"id":"32af9cb.c785564","type":"function","z":"7177b2be.2ec43c","name":"OpenSky","func":"var m = [];\nfor (var i in msg.payload)\n{\n\n        // gather flight data in one object\n        flight = {};\n        flight.icao = (msg.payload[i].icao24);\n        flight.callsign = (msg.payload[i].callsign);\n        flight.firstseen = (new Date(msg.payload[i].firstSeen*1000).toUTCString());\n        flight.lastseen = (new Date(msg.payload[i].lastSeen*1000).toUTCString());\n        flight.departap = (msg.payload[i].estDepartureAirport);\n        flight.arriveap = (msg.payload[i].estArrivalAirport);\n        flight.abxurl = (\"https://globe.adsbexchange.com/?icao=\"+msg.payload[i].icao24);\n        m.push(flight);\n        \n    \n}\nif(m.length > 0) return { \"payload\" : m };\n\nelse return null; // no matches found. end of line.\n\n","outputs":"1","noerr":0,"initialize":"","finalize":"","x":1220,"y":580,"wires":[["5aab37fc.12c168","2bbff5cb.26ad8a"]]},{"id":"5aab37fc.12c168","type":"function","z":"7177b2be.2ec43c","name":"array to JSON","func":"var data = []; //create an empty array.\nvar loop = msg.payload.length;  // Loop over the entire array.\nfor (i = 0; i < loop; i++) { //Loop through and get all the arrays to build each JSON object.\n\n    //data.push({\"Date\" : msg.payload[i].tstring, \"Registration\" : msg.payload[i].rego, \"Call Sign\" : msg.payload[i].calls, \"Type\" : msg.payload[i].actype, \"Opperator\" : msg.payload[i].oppr, \"Squawk Code\" : msg.payload[i].sqk, \"Aircraft icao\" : msg.payload[i].icao, \"ADSBEx\" : msg.payload[i].abxurl, \"yours VRS\" : msg.payload[i].yoururl});\n    data.push({\"icao\" : msg.payload[i].icao, \"callsign\" : msg.payload[i].callsign, \"firstseen\" : msg.payload[i].firstseen, \"lastseen\" : msg.payload[i].lastseen, \"departap\" : msg.payload[i].departap,\"arriveap\" : msg.payload[i].arriveap, \"ADSBEx\" : msg.payload[i].abxurl});\n\n}   \nreturn { payload : data };","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1400,"y":580,"wires":[["943d939b.e4a56","47dbd9a8.d3b098"]]},{"id":"943d939b.e4a56","type":"ui_table","z":"7177b2be.2ec43c","group":"733e3b6f.359a24","name":"Last 3 days","order":8,"width":15,"height":45,"columns":[{"field":"icao","title":"ICAO","width":"100","align":"left","formatter":"plaintext","formatterParams":{"target":"_blank"}},{"field":"callsign","title":"Call sign","width":"100","align":"left","formatter":"plaintext","formatterParams":{"target":"_blank"}},{"field":"firstseen","title":"Time first seen","width":"250","align":"left","formatter":"plaintext","formatterParams":{"target":"_blank"}},{"field":"lastseen","title":"Time last seen","width":"250","align":"left","formatter":"plaintext","formatterParams":{"target":"_blank"}},{"field":"departap","title":"Depature Airport","width":"110","align":"left","formatter":"plaintext","formatterParams":{"target":"_blank"}},{"field":"arriveap","title":"Arrival Airport","width":"110","align":"left","formatter":"plaintext","formatterParams":{"target":"_blank"}},{"field":"ADSBEx","title":"ADSBEx - No history! Current location only.","width":"350","align":"left","formatter":"link","formatterParams":{"target":"_blank"}}],"outputs":0,"cts":false,"x":1610,"y":580,"wires":[]},{"id":"2bbff5cb.26ad8a","type":"debug","z":"7177b2be.2ec43c","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1370,"y":520,"wires":[]},{"id":"a92ae62d.a89478","type":"debug","z":"7177b2be.2ec43c","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1010,"y":520,"wires":[]},{"id":"e665c6c9.fac2c8","type":"function","z":"7177b2be.2ec43c","name":"test data","func":"msg.payload = return msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1080,"y":660,"wires":[["acbaa0fb.fd0e5","32af9cb.c785564"]]},{"id":"370beaf1.52cf26","type":"inject","z":"7177b2be.2ec43c","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":900,"y":660,"wires":[["e665c6c9.fac2c8"]]},{"id":"acbaa0fb.fd0e5","type":"debug","z":"7177b2be.2ec43c","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1270,"y":660,"wires":[]},{"id":"80e4e437.2ae2a8","type":"debug","z":"7177b2be.2ec43c","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":870,"y":740,"wires":[]},{"id":"9774b976.be62a8","type":"function","z":"7177b2be.2ec43c","name":"now-3days","func":"timestamp = msg.topic/1000;\nmyDate = new Date(timestamp);\nmsg.past = myDate.setTime(myDate.getTime()-259200);\n//msg.start = parseInt(timestamp - 86400);\nmsg.start = parseInt(timestamp);\nreturn msg;\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":630,"y":580,"wires":[["80e4e437.2ae2a8","d2c8a63b.238278"]]},{"id":"4a4ca2bc.6f9b7c","type":"change","z":"7177b2be.2ec43c","name":"topic timestamp","rules":[{"t":"set","p":"topic","pt":"msg","to":"","tot":"date"}],"action":"","property":"","from":"","to":"","reg":false,"x":440,"y":580,"wires":[["9774b976.be62a8"]]},{"id":"733e3b6f.359a24","type":"ui_group","name":"Airport Arrivals Search - Enter airport ICAO code, press enter. Wait! Last 3 days of arrivals listed. (Using opensky-network.org data)","tab":"5ce3fcb0.90e6a4","order":1,"disp":true,"width":"15","collapse":false},{"id":"5ce3fcb0.90e6a4","type":"ui_tab","name":"Airport Arr Search","icon":"aircraft","order":4,"disabled":false,"hidden":false}]

Airport departures

This flow takes the ICAO code of the airport (ie KLAX) and returns the past 3 days. The OpenSky API will allow up to 7 days, but for most airports the delay between sending the request and getting the data back caused the user to mash the enter button way too many times and in the end give up, if your user actually waits, then the slug of data that got returned caused the table node and dashboard node to blow up and crash Node-RED (for busy airports like Los Angles and San Diego), so I limited it to the last three days - Your mileage may vary..

  [{"id":"eeecee67.ba495","type":"debug","z":"7177b2be.2ec43c","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1570,"y":880,"wires":[]},{"id":"74b181a0.ae8ca","type":"http request","z":"7177b2be.2ec43c","name":"","method":"GET","ret":"obj","paytoqs":"ignore","url":"","tls":"","persist":false,"proxy":"","authType":"","x":1030,"y":940,"wires":[["f69f62bd.8f93e"]]},{"id":"65136bff.377ea4","type":"function","z":"7177b2be.2ec43c","name":"build URL","func":"msg.url = \"https://yourusername:yourpassword@opensky-network.org/api/flights/departure?airport=\"+msg.payload+\"&begin=\"+msg.past+\"&end=\"+msg.start\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":840,"y":940,"wires":[["2a353668.9903ea","74b181a0.ae8ca"]]},{"id":"4a24082c.87bcc8","type":"ui_text_input","z":"7177b2be.2ec43c","name":"","label":"ICAO","tooltip":"","group":"840f0e1a.dc2ab","order":1,"width":"1","height":1,"passthru":true,"mode":"text","delay":"0","topic":"topic","topicType":"msg","x":110,"y":940,"wires":[["e2782725.24de38"]]},{"id":"e2782725.24de38","type":"function","z":"7177b2be.2ec43c","name":"icao","func":"//msg.payload = msg.payload.toLowerCase();\nflow.set(\"icao\", msg.payload);\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":250,"y":940,"wires":[["52b8f3da.d457fc"]]},{"id":"f69f62bd.8f93e","type":"function","z":"7177b2be.2ec43c","name":"OpenSky","func":"var m = [];\nfor (var i in msg.payload)\n{\n\n        // gather flight data in one object\n        flight = {};\n        flight.icao = (msg.payload[i].icao24);\n        flight.callsign = (msg.payload[i].callsign);\n        flight.firstseen = (new Date(msg.payload[i].firstSeen*1000).toUTCString());\n        flight.lastseen = (new Date(msg.payload[i].lastSeen*1000).toUTCString());\n        flight.departap = (msg.payload[i].estDepartureAirport);\n        flight.arriveap = (msg.payload[i].estArrivalAirport);\n        flight.abxurl = (\"https://globe.adsbexchange.com/?icao=\"+msg.payload[i].icao24);\n        m.push(flight);\n        \n    \n}\nif(m.length > 0) return { \"payload\" : m };\n\nelse return null; // no matches found. end of line.\n\n","outputs":"1","noerr":0,"initialize":"","finalize":"","x":1200,"y":940,"wires":[["4d1d64b4.a7395c","e43c94a9.aef908"]]},{"id":"4d1d64b4.a7395c","type":"function","z":"7177b2be.2ec43c","name":"array to JSON","func":"var data = []; //create an empty array.\nvar loop = msg.payload.length;  // Loop over the entire array.\nfor (i = 0; i < loop; i++) { //Loop through and get all the arrays to build each JSON object.\n\n    //data.push({\"Date\" : msg.payload[i].tstring, \"Registration\" : msg.payload[i].rego, \"Call Sign\" : msg.payload[i].calls, \"Type\" : msg.payload[i].actype, \"Opperator\" : msg.payload[i].oppr, \"Squawk Code\" : msg.payload[i].sqk, \"Aircraft icao\" : msg.payload[i].icao, \"ADSBEx\" : msg.payload[i].abxurl, \"your VRS\" : msg.payload[i].benurl});\n    data.push({\"icao\" : msg.payload[i].icao, \"callsign\" : msg.payload[i].callsign, \"firstseen\" : msg.payload[i].firstseen, \"lastseen\" : msg.payload[i].lastseen, \"departap\" : msg.payload[i].departap,\"arriveap\" : msg.payload[i].arriveap, \"ADSBEx\" : msg.payload[i].abxurl});\n\n}   \nreturn { payload : data };","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1380,"y":940,"wires":[["fde8328c.d6ea7","eeecee67.ba495"]]},{"id":"fde8328c.d6ea7","type":"ui_table","z":"7177b2be.2ec43c","group":"840f0e1a.dc2ab","name":"Last 3 days","order":8,"width":15,"height":45,"columns":[{"field":"icao","title":"ICAO","width":"100","align":"left","formatter":"plaintext","formatterParams":{"target":"_blank"}},{"field":"callsign","title":"Call sign","width":"100","align":"left","formatter":"plaintext","formatterParams":{"target":"_blank"}},{"field":"firstseen","title":"Time first seen","width":"250","align":"left","formatter":"plaintext","formatterParams":{"target":"_blank"}},{"field":"lastseen","title":"Time last seen","width":"250","align":"left","formatter":"plaintext","formatterParams":{"target":"_blank"}},{"field":"departap","title":"Depature Airport","width":"110","align":"left","formatter":"plaintext","formatterParams":{"target":"_blank"}},{"field":"arriveap","title":"Arrival Airport","width":"110","align":"left","formatter":"plaintext","formatterParams":{"target":"_blank"}},{"field":"ADSBEx","title":"ADSBEx - No history! Current location only.","width":"350","align":"left","formatter":"link","formatterParams":{"target":"_blank"}}],"outputs":0,"cts":false,"x":1590,"y":940,"wires":[]},{"id":"e43c94a9.aef908","type":"debug","z":"7177b2be.2ec43c","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1350,"y":880,"wires":[]},{"id":"2a353668.9903ea","type":"debug","z":"7177b2be.2ec43c","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":990,"y":880,"wires":[]},{"id":"6ed61542.50caec","type":"function","z":"7177b2be.2ec43c","name":"test data","func":"msg.payload = return msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1060,"y":1020,"wires":[["f17da350.ed8f4","f69f62bd.8f93e"]]},{"id":"37c41ce7.167734","type":"inject","z":"7177b2be.2ec43c","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":880,"y":1020,"wires":[["6ed61542.50caec"]]},{"id":"f17da350.ed8f4","type":"debug","z":"7177b2be.2ec43c","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1250,"y":1020,"wires":[]},{"id":"b047c6ee.4beca8","type":"debug","z":"7177b2be.2ec43c","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":850,"y":1100,"wires":[]},{"id":"fece29e.9d623d8","type":"function","z":"7177b2be.2ec43c","name":"now-3days","func":"timestamp = msg.topic/1000;\nmyDate = new Date(timestamp);\nmsg.past = myDate.setTime(myDate.getTime()-259200);\n//msg.start = parseInt(timestamp - 86400);\nmsg.start = parseInt(timestamp);\nreturn msg;\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":610,"y":940,"wires":[["b047c6ee.4beca8","65136bff.377ea4"]]},{"id":"52b8f3da.d457fc","type":"change","z":"7177b2be.2ec43c","name":"topic timestamp","rules":[{"t":"set","p":"topic","pt":"msg","to":"","tot":"date"}],"action":"","property":"","from":"","to":"","reg":false,"x":420,"y":940,"wires":[["fece29e.9d623d8"]]},{"id":"840f0e1a.dc2ab","type":"ui_group","name":"Airport Departure Search - Enter airport ICAO code, press enter. Wait! Last 3 days of departures listed. (Using opensky-network.org data)","tab":"c9cd4ed.46100b","order":1,"disp":true,"width":"15","collapse":false},{"id":"c9cd4ed.46100b","type":"ui_tab","name":"Airport Dep Search","icon":"aircraft_takeoff","order":5,"disabled":false,"hidden":false}]

Have fun.

<script async src="https://www.googletagmanager.com/gtag/js?id=G-HGJWTNL65R"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'G-HGJWTNL65R'); </script>