-
-
Notifications
You must be signed in to change notification settings - Fork 28.5k
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
Solax Power Integration Regularly Fails to Start-Up on HAOS Startup #109968
Comments
Hey there @squishykid, mind taking a look at this issue as it has been labeled with an integration ( Code owner commandsCode owners of
(message by CodeOwnersMention) solax documentation |
This has been happening since 2023.11.0. For me it fails to load every time on HA restart. Works every time after deleting and reconfiguring. It can take a few minutes to load. I have static IP for the Solax inverter and now know its IP without checking. |
Yes I should have mentioned I have static ip too, and I'm Wifi connected to the Inverter which is model Solax Hybrid Inverter SK-TL5000E |
If you just restart integration does it start like mine does? (ie I don't need to delete & reconfigure) |
I retested by restarting several times and yes, it does reload rather than deleting and reconfiguring. It seems to take much longer to reload than deleting and re-adding. Doubt it's relevant but I'm docker core not HASOS. |
Understood thanks for checking - was seeking info primarily to verify and assist symptom definition for code owner to hopefully debug and resolve. In my case mostly (est 90%) it restarts within seconds very occasionally it takes a while. Whenever I restart HA go check if Solax integration has started it so regular - rare to find it has. (Again stating this for clarity as this is not occasional it’s almost all the time). |
This may assist - I see these errors over and over in my logs (Log Viewer) |
Same error log here:
|
I can confirm this, I too have had this issue for a very long time. I just reload the integration once it has timed out trying to load on restart and everything else has started. |
I think I've found a culprit of this problem: The X3HybridG4 inverter in the solax python library has sensor with ID 19 listed twice - line 71 and 72. The way the integration works is that it takes the inverter serial number and sensor ID to create a HomeAssistant sensor:
But with two IDs we'll get two sensors with the same ID and it breaks the integration. I tried a simple workaround: +uuids = set()
for sensor, (idx, measurement) in api.inverter.sensor_map().items():
description = SENSOR_DESCRIPTIONS[(measurement.unit, measurement.is_monotonic)]
uid = f"{serial}-{idx}"
+ while uid in uuids:
+ uid = f"{uid}x"
+ uuids.add(uid)
devices.append(...) It's not the nicest (basically it just appends I can submit a PR if needed. |
Hi thanks & sorry for my slow reply. Your comments sound encouraging, I’m not enough of a programmer to make informed comment. My Inverter which is a Solax Hybrid Inverter SK-TL5000E, is exhibiting the problem described. Not clear (to me) if your investigation & suggestion may fix problem for all inverters or the model X3HybridG4 only? Hopefully all, and assuming so I’d be most appreciative if you are able to have your suggested solution implemented or put out for others to test etc. (or can we do that ourselves? - again my inexperience on this process) but as it appears source code owner may not be available / around at the moment any and all help is appreciated. |
Some inverters (X3HybridG4 for example) in the solax python library has muliple sensors with the same ID which breaks the library loading. This change adds a workaround for this - it will apply a suffix to the ID to make it unique. Fixes home-assistant#109968
Some inverters (X3HybridG4 for example) in the solax python library has muliple sensors with the same ID which breaks the library loading. This change adds a workaround for this - it will apply a suffix to the ID to make it unique. Fixes home-assistant#109968
I have created a PR #115580 to (hopefully) fix this. |
Excellent thank you for doing so 🤞 |
Some inverters (X3HybridG4 for example) in the solax python library has muliple sensors with the same ID which breaks the library loading. This change adds a workaround for this - it will apply a suffix to the ID to make it unique. Fixes home-assistant#109968
fixes #109968 I do not have this integration and cannot test this change.
It pretty clear there is a race here where the background task finishes before the entities can be added. If someone wants to test #117767 it should fix the problem |
Confirming I appears to be working for me fine now - thanks to all for your efforts in fixing this. |
The problem
By way of background. I'm doing a lot of work in setting up energy monitoring. Accordingly I've been restarting HA multiple times a day and mostly but not every time I see that the 'Solax Power' Integration failed to start-up, resulting in me having to manually restart it after which it works fine. This issue for me is unique to this integration i.e. all other integrations start normally. I am months new to HA, this is my first report hopefully i get it rihjt.
What version of Home Assistant Core has the issue?
core-2024.2.0
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant OS
Integration causing the issue
Solax Power
Link to integration documentation on our website
https://www.home-assistant.io/integrations/solax
Diagnostics information
home-assistant_solax_2024-02-08T09-16-29.206Z.log
Example YAML snippet
No response
Anything in the logs that might be useful for us?
Additional information
It 'feels' like a timeout error watching the boot process on screen but that's a wild guess.
No sure what else I can add here to be more specific - open to assist any way I can?
The text was updated successfully, but these errors were encountered: