hass-weatherflow2mqtt
hass-weatherflow2mqtt copied to clipboard
Add sensor to indicate if hub is connected to servers
Would be great to have a sensor that indicates is the hub is connected to the servers. This way we can automate things smart plugs to reset the hub.
To make sure I understand this: You want a sensor that indicates if the Hub is transmitting data to the Tempest Servers. Is that correct? If this is correct, that is not currently possible. There is nowhere in the UDP API, that this data can be retrieved.
The only way I currently think this could be done is polling the servers, to check when data was last updated. But that somehow defeats the purpose of having a local solution. I know we already pull servers when getting the Weather Forecast, but that brings a different dataset.
Could it be done by the color of the light on the hub? A green light indicates is online, thus by polling locally the color of the light get the online/offline status. If not I understand.
This is not exposed in the API. I will need to do some test on some other areas just to see if this somehow indicates this.
Thanks!
Preface: I do not recommend this for this integration (at least what I say below) One way this could be implemented is by polling your email. WeatherFlow will send an email when your station has not transmitted after 8 hours. So, you could manually take your hub offline for a period of time to get the details of the email and base your own automation off that.
You could possible scrape the website for your station, it is not in the API so ANY little change will render it useless. The site, at least it used to, had a little colored dot to indicate station connection status.
If you go to the WeatherFlow forum you could recommend they add that to the API and then it would be easy to implement.