weltmeyer / ha_sonnenbatterie

Homeassistant integration to show many stats of Sonnenbatterie
GNU General Public License v3.0
51 stars 24 forks source link

Entities intermittently freeze and get unavailable #39

Closed johanschelin closed 9 months ago

johanschelin commented 9 months ago

Since the last weeks my Sonnenbatteri integrations freeze and drop entites intermittently. Could it be related to the inactivation functinality of "unavailable sensors"?

This started at the same time as i added a second battery (I have one ECO 8 and one 10P), but it may be unrelated, as someone else alse asks about this error in the forum at the same time (9 days ago): https://community.home-assistant.io/t/custom-integration-sonnenbatterie/181781/179?u=johanschelin

For example even my State of Charge sensors get unavailable. A total restart of HA brings them back sometimes, but at the moment I cant seem to get them back at all. Attaching a debug log.

Can I do something more to help with the troubleshooting?

image home-assistant_sonnenbatterie_2023-09-21T19-18-06.286Z.log

home-rj commented 9 months ago

Having the same issue when the entity is frozen and doesnt update., Can we have a refresh button installed?

It would be a shell command or similar to refresh the request. Ive seen other apps impliment this and with a simple automation. you can have it refresh every hour to make sure its deploying the correct values

im images im showing is when its flat lined and not diplaying or recording anymore. but once the ENtire home assist resets. it now has the data again.

image

weltmeyer commented 9 months ago

image home-assistant_sonnenbatterie_2023-09-21T19-18-06.286Z.log

It looks like the addone cant find the sensor value in the battery data at start. so some sensors are disabled. Can you check when you last updated the firmware of you battery?

My SB10 is now on 1.10.7 and it works perfectly.

image
weltmeyer commented 9 months ago

You could try to enable debug mode and send fresh logs. image You need to restart ha after enabling it

home-rj commented 9 months ago

The simple thing is the reporting is too close you gst more freezing.

I have mine recording at 15 and it seems to be ok but i was hopeing for an easier fix with a refresh button

johanschelin commented 9 months ago

I already did enable debug logging and restarted, could you see anything in the log alreadey provided? The error "at the moment" is from the ECO8 not showing the battery.

But the 10P does no longer show Battery temperature, so the problem seems to affect both.

Did not experience any problems when I was using onely 1 batter (ECO8). But if it is related to two batteries, or just timing (2 weeks ago), I am not sure.


Från: Jan Weltmeyer @.> Skickat: den 22 september 2023 08:26 Till: weltmeyer/ha_sonnenbatterie @.> Kopia: Johan Schelin @.>; Author @.> Ämne: Re: [weltmeyer/ha_sonnenbatterie] Entities intermittently freeze and get unavailable (Issue #39)

[image]https://user-images.githubusercontent.com/65488934/269736759-39916d5d-4b6d-457e-9b0f-b0d3f7bfc930.png home-assistant_sonnenbatterie_2023-09-21T19-18-06.286Z.loghttps://github.com/weltmeyer/ha_sonnenbatterie/files/12691195/home-assistant_sonnenbatterie_2023-09-21T19-18-06.286Z.log

It looks like the addone cant find the sensor value in the battery data at start. so some sensors are disabled. Can you check when you last updated the firmware of you battery?

My SB10 is now on 1.10.7 and it works perfectly. [image]https://user-images.githubusercontent.com/1668465/269848921-41933e7d-5b1e-45b7-8cbf-54d0630d1e9b.png

— Reply to this email directly, view it on GitHubhttps://github.com/weltmeyer/ha_sonnenbatterie/issues/39#issuecomment-1730870752, or unsubscribehttps://github.com/notifications/unsubscribe-auth/APTUQJVCG7SVFDOLLACEBQDX3UVQ7ANCNFSM6AAAAAA5CB4G2Q. You are receiving this because you authored the thread.Message ID: @.***>

weltmeyer commented 9 months ago

I updated the component to use Home Assistent regulated polling instead of my own threading. Can you update and check again. Also I fixed the debug output to work correctly

weltmeyer commented 9 months ago

The simple thing is the reporting is too close you gst more freezing.

I have mine recording at 15 and it seems to be ok but i was hopeing for an easier fix with a refresh button

Commit 5153818 adds the reload functionality

johanschelin commented 9 months ago

Thanks for quick help. Just tested to update and this far it looks like everything is working fine with this new version👍

home-rj commented 9 months ago

I have tested this also with the refresh its 100% awsome.

I have also found a way to capture the freezing and do an auto reset through node red.

I havnt perfected it yet as im still learning but its close and my entity cards for the first time didnt freeze since 8am 23- 24hrs ago