peted-davis / WeatherFlow_PiConsole

Raspberry Pi Python console for WeatherFlow Tempest and Smart Home Weather Stations
GNU General Public License v3.0
159 stars 22 forks source link

Station in low battery causes errors #43

Closed cefoster0 closed 2 years ago

cefoster0 commented 2 years ago

My Tempest station has been in mode 3 for several days as was new in box and only got one morning of sun before a week of rain and clouds here in the north east. After the station went into mode 3 a couple days ago, I noticed dashes across most of the display values.

Running interactively, I saw the following errors: File "/home/pi/wfpiconsole/lib/derivedVariables.py", line 838, in MeanWindSpeed 2022-01-01 17:04:18-0500 [-] AvgWind = [Sum/Length,'mps',Sum/Length,Length,Now] 2022-01-01 17:04:18-0500 [-] ZeroDivisionError: division by zero

It looks like since since my system is so new and has been in mode 2/3 for so long, I do not have valid wind data coming out of the api.

I added a check. on 838 on the length value out of windups Length = len(windSpd) if Length > 0:

I also had to add another check and to line 896 not math.isnan(windGust[0]):

That got most of the data that is populating working , except the 'feels like' temperature. which is odd as feels like shows up in the regular app/website.

my station # is 47521 if you can peak via the API to see what's going on.

cefoster0 commented 2 years ago

Adding a photos. No change even after I reverted the sizing changes. 5CF2447B-97E4-4463-A504-6DA01148E58F

peted-davis commented 2 years ago

Unfortunately this is a known bug and there is going to be a fix in the next, long overdue, update. Sorry it is causing you issues!

peted-davis commented 2 years ago

This should now be fixed in the latest version (v22.3.1)