Propose addition to station API

I see the station API returns ‘Observations’, I would like to see it also return ‘Scheduled’.

I am trying to set up a station status web dashboard so I can alert any anomaly.

Does it not? I was tinkering with the scrollphat (from this forum about a month ago) and you can get scheduled observations. We used the api call:

https://network.satnogs.org/api/jobs/?id=&ground_station=272&satellite__norad_cat_id=&transmitter=&vetted_status=&vetted_user=&sta$

No, it does not.
I saw the API call you mention, and will have to write code to count the number of scheduled obs to get the total number. Seems inefficient.

Here is what the Station API call returns.
image

I guess I have no clue what you are asking. I just submitted that call and I got 52 scheduled observations over the next two days for station 272.

Is what you are looking for just the “number” of scheduled observations, as in “52”?

Yes, that correct.
Just the number.

Well, the api is like magic to me, so can’t help you there.

But is the other observation information of no value? Seems like you’d want that stuff, too.

That should be an easy fix for our API. Please file an issue on the gitlab repository, and someone will get to that soon.

1 Like

Sample of the dashboard I quickly threw together.
Will clean it up and flesh it out a little more.
(I get an automatic email when scheduled is less than 5).

2 Likes

Looks cool!

Any chance you have the code somewhere? It would be interesting if we can incorporate some of the functionality in network.satnogs.org . How is your python/django/js @thebaldgeek ? :wink:

I plan to convert it to Node-RED, once I do that, I will share the code. At the moment it is very heavily embedded in my custom home automation dashboard.

My JS is so so. Tiny bit of exposure to Python, but nothing of any merit.
I pretty much do everything in Node-RED.

Here is the Node-RED flow to make a basic dashboard.

[{"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}]
1 Like

Very cool!
I might steal some inspiration from you. And build up another page to my map site https://satnogs.jwgtechs.com to display specific information.

Tweaked for GS33. I can confirm that it looks good…but not on an old kindle

Glad you got it working. Pity about the old kindle. The paper display would look great.
Lets know if you end up adding to it, tempting to add a gauge or something, but its pretty functional as it stands.

Yep, shame about the kindle, it thought about it so I’m not quite ready to give up. It did get me starting thinking about recreating some other facts and figures about the groundstation such as sat’s observed versus those not able to observe. There are 7000+ observations that my puny VHF station has received so there must be a nice way of dispalyig that data.

Every time I look at a gauge or graph I think it needs one…but does it really ?