I’m fiddling around with trying to duplicate my python UDP listener via the WS interface, mainly as a learning exercise, and had some questions…
I see a development/personal-use key we can use that “has some limitations in terms of frequency of requests and volume of data” that are undocumented. What might those limits be ? When does a personal-use only app need to contact WF for a unique key ?
the WS API is very inconsistent with the approach of the UDP API.
- for UDP, we listen once to udp/50222 and hear everything
- for WS you seem to need to connect, then send listen_start for each physical sensor, and the Sky requires at least two listen_whatever messages to subscribe to observations plus rapid_wind and perhaps station up/down events… so for my station with two Sky units, I’d need to send:
- an initial connect to the endpoint
- a listen_start for the air
- a listen_start for sky1
- a listen_start for sky2
- a listen_rapid_wind for sky1
- a listen_rapid_wind for sky2
- a listen_start_events for the station as a whole
I can’t find any hub_status messages in the API
I can’t find any device_status messages in the API
The bottom of the WS API page has a couple confusing notes in it:
- “A client should only open one websocket connection.” - is one connect and multiple ‘start’ messages one connection or many (guessing it has to be one)
- “A client will be disconnected after 10 minutes of idle time.” - does this mean if I simply listen on the opened Websocket I’m considered idle and the connection will be terminated ?
Lastly - I left my WS listener python program listening for many minutes, far above 10 minutes, so how does WF detect ‘idle’ ? Is there something in WS that acts as a keep alive or the like under the hood ?