peted-davis / WeatherFlow_PiConsole

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

Sunrise/sunset times cause console to crash #60

Open miner90027 opened 2 years ago

miner90027 commented 2 years ago

As the name implies, the console crashes immediately upon starting. With auto-start enabled, the console attempts to start but immediately closes. Using the start command results in the following output shown below.

image

Fresh install of OS & console did not resolve the issue. The recommended file permissions change listed here did not work: https://community.weatherflow.com/t/weatherflow-piconsole/1933/2549

Unknow as to when the issue started, just suddenly stopped working. Ruled out the possibility of auto-update script causing the issue when fresh install resulted in the same issue. Unknown how to reproduce.

Hardware/OS/Version:

peted-davis commented 2 years ago

Thanks for the bug report. What is the latitude of your station? Are you particularly far north and therefore not seeing a sunset at the moment?

miner90027 commented 2 years ago

The latitude of the station is 61.56555 roughly Wasilla, AK. About this time of year the sun never fully sets, rather it stays at a dusk/dawn light level.

peted-davis commented 2 years ago

Ok, that's the issue. I will need to edit the code so it can handle locations where the sun does not set (or rise) for a period of the year. This may take a little time, so I will have a look into quick workarounds to get you up and running again asap. Bear with me!

miner90027 commented 2 years ago

Thanks. It works great during the winter when there is very little sun.

peted-davis commented 2 years ago

If you comment out lines 439 and 443 of main.py the console should start, just without the solar information. You should be able to use the console in this way until a roll out an update to fix the bug

miner90027 commented 2 years ago

Alright, that temp workaround works.

Striken5 commented 2 years ago

Is there an update on this bug? quickfix works, but want it to work the right way

peted-davis commented 2 years ago

I'm still working on this, unfortunately. It has turned into a much bigger re-write of the code as it was never originally designed to cope with locations where the sun never rises or sets (my fault, I know!).

Striken5 commented 2 years ago

I'm still working on this, unfortunately. It has turned into a much bigger re-write of the code as it was never originally designed to cope with locations where the sun never rises or sets (my fault, I know!).

Perfect :) The error does not only apply to sunrise/sunset. but also moonrise/moonset. if this is two different coding in the program