gluap / pyess

Python library for communication with LG ESS power converters
MIT License
31 stars 10 forks source link

Addon is crashing daily #29

Closed aLimp86 closed 4 months ago

aLimp86 commented 4 months ago

Hi all, since 3 days the LG ESS Addon is crashing daily (on different timestamps) on my raspberry pi 4. It worked flawlessly until this date. It must be caused by the 2024.06.x update.

I have the following version: Core 2024.6.1 Supervisor 2024.06.0 OS 12.3 Frontend 20240605.0

Edit 2024-06-09: deleted the error text because this was misleading and the wrong one I always have to start the Addon manually again. Even the watchdog does not do his thing. I've created an automation to start the Addon again 2min after crashing. Did not work tonight.

gluap commented 4 months ago

How do you notice its crashing apart from the error message?

The error seems to be from a template dividing daily values and independent from pyess - and the error happening shortly after midnight makes me think that the denominator of that fraction causing the error may well be zero. At midnight the daily values reported by ess reset to zero.

aLimp86 commented 4 months ago

I've activated the binary sensor "lg_ess_running" entity from the Addon. As soon as this state goes to "not running" I get a notification on my phone and it try's to start the Addon again.

gluap commented 4 months ago

could you check the "Log" tab of the pyess-addon after such a crash? The output should contain some details on what happened.

gluap commented 4 months ago

Looks like this for me image

aLimp86 commented 4 months ago

It crashed again and seems not to be able to recover. This is the error message: image

aLimp86 commented 4 months ago

Or few minutes before it looked like this and was also not starting. image

aLimp86 commented 4 months ago

Ok, found something. As soon as the LG ESS Addon is crashing my complete LG ESS HOME 10 System is losing the network connection to my home network. This is strange and I don't know why. Nothing was changed. But it is not related to the Addon itself. Topic can be closed.

gluap commented 4 months ago

You could try to assign a static ip to your ess (for instance by configuring it in your router or in the ess connection settings) and configure that ip explicitly in pyess-addon. The error loooks like it iss happening when the connection is lost and pyess tries to search the network for the ESS which hasn't come back up yet. I'm not sure but it might deal with that situation more gracefully if a static ip is used.