Closed wimleers closed 4 months ago
Looking at https://github.com/naofireblade/homebridge-weather-plus/blob/master/apis/weatherflow.js, I don't understand how it could ever get set to undefined
by the actual Weatherflow plugin though:
that.currentReport.RainBool = true;
that.currentReport.RainBool = message.obs[0][3] > 0 ? true : false;
that.currentReport.RainBool = message.obs[0][12] > 0 ? true : false;
These are the only 3 lines modifying RainBool
. So that suggests the bug lies in the overarching infrastructure? 🤔
/cc @dacarson
Looking at the debug information above, all the values are set to their defaults, so it seems that we have not received an initial set of data from the weather station. Which makes sense from your description - the battery is dead. Looking through the set of initialization data in Weaatherflow.js, I see that RainBool is never set to a default value. A value is only set when a set of data is received. There is an easy fix, to initialize it.
I have the simple fix on my branch, as well as a number of other fixes. Can you remind me how to get the changes onto the main branch? https://github.com/naofireblade/homebridge-weather-plus/compare/master...dacarson:homebridge-weather-plus:master
I have the simple fix on my branch, as well as a number of other fixes. Can you remind me how to get the changes onto the main branch?
Sure thing!
Here you go: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request-from-a-fork ← this is AFAICT the exact thing you need.
General docs are at https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request 😊
Thanks! Pull request created
Found 2 bugs in the changed code, fixes proposed at #276! 👍
Fixed and landed in #276
Now we just need a new release — could you tag one, @naofireblade? 🙏
Done
Maybe we can close this one now?
+1!
My Tempest Weatherflow local weather station has been down for a few weeks now. Root cause: dead battery due to gloomy Belgian winter skies, that are so densely gray you'd believe the sun has been replaced by a single shitty TL-light 🤣😭
The WiFi-connected base station is still live though, so this Homebridge plugin still continues to communicate with it just fine.
Two bugs occur:
RainBool
characteristic, despite no new data being available:Seems like a trivial edge case to fix 😊
If I enable Homebridge's debug mode, I get this:
(Note that that
ObservationTime: '04:35:52',
corresponds to the very last observation it received, a few weeks ago. So that is sort of accurate.)