-
-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Excessive logging when the solar inverter goes offline at night #360
Comments
Excessive logging when the solar inverter goes offline at night #360
fix: Excessive logging during discovery flow should do. |
Will test today and report back tomorrow. |
Much, much improved 👏 but still generates 17 log messages, will try and get a debug log tomorrow. |
Spoke to soon, keeps logging, now up to 84 tries. home-assistant_solarman_2025-01-08T17-53-37.393Z.log edit: debug log added |
So this other part is because of the row ha-solarman/custom_components/solarman/api.py Line 127 in 036a5df
which often results in your case in success because you are not making request w/ every iteration. Could you test my theory by temporarily changing your custom file so that one sensor is requested w/ each iteration: |
To clarify, I currently have a single default_update interval of 30 seconds for all sensors. So you want me to try adding an update_interval: 5 to one sensor? |
Yes. |
That has reduced the logging to a single log message which is good but with the debug log enabled you can see that the integration is continually trying to connect to the inverter and flooding the network with discovery messages every few seconds which is not great as the inverter won't come on line for 14 hours. |
This is the same behavior as before. 😉 Few packets per 5 seconds is really very, very, very far from flooding. 😆 Edit: Now you can try to insert between rows
It should cause returning an Exception instead of a success w/ no connection and no scheduled requests. But it feels kinda hacky though... |
Ehm, the code in previous post is exactly for that.. |
Sorry, I haven't had my morning pot of coffee yet.... |
Hi all, I recently noticed that my HomeAssistant sometimes behaves sluggish. I thought this was related to some HA update itself and so I waited. Yesterday night I was working with some stuff in my HA and noticed again that my system behaves very sluggish so I wanted to find the reason. I disabled a lot of integrations and add-ons but nothing helped. Then today during the day I wanted to check again - there was no sluggish behavior of Homeassistant - Which got me thinking... So this evening - once I noticed that HA is once more "slow", I disabled the Solarman integration. And voila - The system is now running "smooth". So I enabled the Debug-Logging for Solarman and observed the system. What I noticed, whenever Solarman is searching for the Inverter - HA is "Waiting" for Solarman to finish the cycle - which makes the whole HA-Webinterface unresponsive during this time! I can pinpoint the behavior to this message in the logs:
Whenever this Thread "active" the whole system does not react anymore. I think HA is "Waiting" for this Thread to finish? As this Thread has a timeout of approximately 3 seconds, the whole HA system is unresponsive for 3 seconds every 5 seconds 5 times in a row. Then there seems to be some "Wait-time" before the integration tries the same cycle again. You are right, that 5 calls over the period of 20 seconds is not a lot, but when HA completely hangs during this time, it is not so good. I could try to create a video for you, but maybe you can reproduce the Behavior yourself? Steps to reproduce:
During these 3-4 seconds the whole HA-web interface (Maybe even the whole system) becomes unresponsive. I think reducing the amount of retries or increasing the time between retries is just a "Hotfix" but not a solution. The integration should not block the HA-Webinterface from working. If you have questions or need a Video, please let me know. And before I go: THANK YOU VERY MUCH FOR YOUR INTEGRATION! I am very thankful that you invest your time to create and maintain such an awesome Integration! Kind regards |
No I'm really not able to reproduce this behavior. |
Description
Originally the Solarman integration would log a single message that the inverter couldn't be contacted but in the current version 24.12.22 there is excessive logging continuously until the inverter comes back on line.
Reproduction Steps
Arrange for the inverter to go off-line.
Log
home-assistant_solarman_2025-01-07T16-55-30.186Z.log
Version
24.12.22
Home Assistant Core Version
2024.12.5
Home Assistant Operating System Version
N/A
The text was updated successfully, but these errors were encountered: