Skip to content

Instantly share code, notes, and snippets.

@thebaldgeek thebaldgeek/README.md Secret
Last active May 6, 2019

Embed
What would you like to do?
Satnogs Station Status Dashboard

A very simple text only station status dashboard. The data is pulled from the station and scheduled Satnogs API.

Change the station number in the flow URL (HTTP Node) to match yours.

The following data points are provided;

Station Status:Testing
Station Observations: 421
Station Uptime (days): 4
Number of scheduled passes: 46
Start of next pass: 2019-05-06T14:23:01Z
Name of next pass: UWE-3
Mode of next pass: FSK9k6
Frequency of next pass: 437384000
Minutes till next pass: 1
UTC: 2019-05-06T14:24:41.289Z

[{"id":"f85974f0.72b768","type":"inject","z":"8b6dd621.402618","name":"stn 702 @ 15min","topic":"","payload":"","payloadType":"date","repeat":"900","crontab":"","once":false,"onceDelay":0.1,"x":130,"y":220,"wires":[["c65445f8.a6438"]]},{"id":"c65445f8.a6438","type":"http request","z":"8b6dd621.402618","name":"station status","method":"GET","ret":"obj","url":"https://network.satnogs.org/api/stations/?id=702","tls":"","x":380,"y":220,"wires":[["bedb71.3c28849","7ba53cc3.c03df4","76b2bdea.dd5ac4"]]},{"id":"61d23c0f.617bcc","type":"http request","z":"8b6dd621.402618","name":"Obs list","method":"GET","ret":"obj","url":"https://network.satnogs.org/api/observations/?ground_station=702","tls":"","x":280,"y":460,"wires":[[]]},{"id":"797c7585.dcbd44","type":"moment","z":"8b6dd621.402618","name":"UTC","topic":"","input":"","inputType":"msg","inTz":"America/Los_Angeles","adjAmount":0,"adjType":"days","adjDir":"add","format":"","locale":"en_US","output":"","outputType":"msg","outTz":"ETC/GMT","x":550,"y":60,"wires":[["988e74e8.5b54a8"]]},{"id":"7e6e0f31.1685b","type":"inject","z":"8b6dd621.402618","name":"1 sec","topic":"","payload":"","payloadType":"date","repeat":"1","crontab":"","once":false,"onceDelay":0.1,"x":370,"y":60,"wires":[["797c7585.dcbd44"]]},{"id":"bedb71.3c28849","type":"function","z":"8b6dd621.402618","name":"up time","func":"end = new Date(msg.payload[0].created);\nstart = new Date(msg.payload[0].last_seen);\n\nmsg.uptime = start.getTime() - end.getTime();\nhours = parseFloat(msg.uptime / 3600000);\nmsg.days = parseInt(hours / 24);\nmsg.hours = parseInt(hours % 24);\nmsg.minutes = parseInt((msg.uptime / 60000) % 60);\n\nreturn msg;","outputs":1,"noerr":0,"x":560,"y":220,"wires":[["96101c35.bc299"]]},{"id":"c3206408.f8a348","type":"http request","z":"8b6dd621.402618","name":"sched list","method":"GET","ret":"obj","url":"https://network.satnogs.org/api/jobs/?id=&ground_station=702","tls":"","x":280,"y":380,"wires":[["9e8dbe27.0869a"]]},{"id":"caf46ce0.61fbf","type":"inject","z":"8b6dd621.402618","name":"5 min","topic":"","payload":"","payloadType":"date","repeat":"300","crontab":"","once":false,"onceDelay":0.1,"x":110,"y":380,"wires":[["c3206408.f8a348"]]},{"id":"9e8dbe27.0869a","type":"function","z":"8b6dd621.402618","name":"get schd passes","func":"data = msg.payload[msg.payload.length-1];\nreport = \"\" + data.id + \" \" + data.tle0 + \" \" + data.frequency + \" \" + data.mode;\n\nremaining = Math.round(((new Date(data.start).getTime()) - (new Date().getTime())) / 60000);\n\nreturn {\n count : msg.payload.length,\n data : data,\n report : report,\n remaining : remaining\n}","outputs":1,"noerr":0,"x":460,"y":380,"wires":[["9ecdf287.c30c3","1855b713.23e579","a8634cf8.d0b53","f7ff9c4.78dfe6","fa86d0c3.843ef","2fb8daa1.b63bd6"]]},{"id":"7ba53cc3.c03df4","type":"ui_text","z":"8b6dd621.402618","group":"c4f9e60f.c57ad8","order":0,"width":0,"height":0,"name":"","label":"Station Status:","format":"{{msg.payload[0].status}}","layout":"row-left","x":990,"y":140,"wires":[]},{"id":"76b2bdea.dd5ac4","type":"ui_text","z":"8b6dd621.402618","group":"c4f9e60f.c57ad8","order":0,"width":0,"height":0,"name":"","label":"Station Observations:","format":"{{msg.payload[0].observations}}","layout":"row-left","x":1000,"y":180,"wires":[]},{"id":"96101c35.bc299","type":"ui_text","z":"8b6dd621.402618","group":"c4f9e60f.c57ad8","order":0,"width":0,"height":0,"name":"","label":"Station Uptime (days):","format":"{{msg.days}}","layout":"row-left","x":1000,"y":220,"wires":[]},{"id":"9ecdf287.c30c3","type":"ui_text","z":"8b6dd621.402618","group":"c4f9e60f.c57ad8","order":0,"width":0,"height":0,"name":"","label":"Number of scheduled passes:","format":"{{msg.count}}","layout":"row-left","x":1030,"y":340,"wires":[]},{"id":"1855b713.23e579","type":"ui_text","z":"8b6dd621.402618","group":"c4f9e60f.c57ad8","order":0,"width":0,"height":0,"name":"","label":"Start of next pass:","format":"{{msg.data.start}}","layout":"row-left","x":990,"y":380,"wires":[]},{"id":"a8634cf8.d0b53","type":"ui_text","z":"8b6dd621.402618","group":"c4f9e60f.c57ad8","order":0,"width":0,"height":0,"name":"","label":"Name of next pass:","format":"{{msg.data.tle0}}","layout":"row-left","x":990,"y":420,"wires":[]},{"id":"f7ff9c4.78dfe6","type":"ui_text","z":"8b6dd621.402618","group":"c4f9e60f.c57ad8","order":0,"width":0,"height":0,"name":"","label":"Mode of next pass:","format":"{{msg.data.mode}}","layout":"row-left","x":990,"y":460,"wires":[]},{"id":"fa86d0c3.843ef","type":"ui_text","z":"8b6dd621.402618","group":"c4f9e60f.c57ad8","order":0,"width":0,"height":0,"name":"","label":"Frequency of next pass:","format":"{{msg.data.frequency}}","layout":"row-left","x":1010,"y":500,"wires":[]},{"id":"2fb8daa1.b63bd6","type":"ui_text","z":"8b6dd621.402618","group":"c4f9e60f.c57ad8","order":0,"width":0,"height":0,"name":"","label":"Minutes till next pass:","format":"{{msg.remaining}}","layout":"row-left","x":1000,"y":540,"wires":[]},{"id":"988e74e8.5b54a8","type":"ui_text","z":"8b6dd621.402618","group":"c4f9e60f.c57ad8","order":0,"width":0,"height":0,"name":"","label":"UTC:","format":"{{msg.payload}}","layout":"row-left","x":950,"y":60,"wires":[]},{"id":"c4f9e60f.c57ad8","type":"ui_group","z":"","name":"Satnogs","tab":"4b29b624.234878","disp":true,"width":"10","collapse":false},{"id":"4b29b624.234878","type":"ui_tab","z":"","name":"Satnogs","icon":"dashboard","disabled":false,"hidden":false}]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.