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
[Bug]: cant connect to inverter in 1.2.0b5 #225
Comments
Can you let me know if the problem persists if you retry while the inverters are online (eg. when there is enough sun to let them all generate some power)? |
I'll do that in a few hours, since the Sun is setting right now here in New Zealand. |
Ok, thanks for the confirmation. I'll need to look into working around the timeouts you are receiving. Very strange that those are consistent after many retries. |
I would expect your logs to contain a stacktrace of the error that is occurring. Can you also post that error here please? I've gone through all the log lines from your initial bugreport, and those are all valid communication between HA and the inverter. The "Backing off file upload" is something that is retried up to 6 times (as required by the documentation provided by Huawei), so I'm surprised that it's already cut of after 3 retries. |
Good morning. Unfortunately the same is happening.
|
I'm afraid that what you are sending me is still incomplete for me to figure out what is going wrong. Can you please increase the overall 'default' logging level so that you hopefully capture the real error that is occurring? Adjust the
|
Done. Here's the unfiltered log:
|
I'm still missing any clue on what error is really occurring. Is there really nothing of potential interest that appears after what you copy&pasting now? If not, can you increase the 'default' logging level to 'debug' and try again? This should create considerable amount of output. Please also upload the diagnostics file of another integration, as this will help me to understand how the rest of your HA system looks like (version numbers of all installed dependencies) |
OK, doing it right now.
Stand by for the |
You'll probably want to upload the home-assistant.log as a file by dragging&dropping it. This logging level will create a considerable amount of output. FYI: I've been creating fresh HA installations and have been installing my own installer multiple times already this evening, but am unable to recreate your error for now. |
config_entry-webostv-d1f82df05b35e29580d97318bfbd7f64.json.txt LE: there is some sensible data, I'll delete the shared file as soon as you have it. |
I've downloaded it. Feel free to delete it from your drive again. |
Strange thing just happened.
Now I can provide a diag file. |
Forgot to attach the HA log file to the previous message. |
Ok, glad to hear that we've progressed a bit so that we can better debug the issue.
The integration has to eventually give up fetching the optimizer data: even after retrying 6 times, and waiting for 10 seconds on each try for a response to occur we cannot read the optimizer information file from the inverter. Your inverter is thus not adhering to the spec that Huawei defined. It is therefore choosing to ignore the optimizers as to not hinder the setup of the rest of the integration:
(ignore the part in the message about insufficient permissions, not applicable in your case) A few things to consider:
|
FYI: I did not learn anything from your 85MB log. I think it is incomplete because it had not been fully flushed to disk on the moment you uploaded it. It only included 2 retries instead of the 3 that you uploaded with your previous log excerpts. I've thus removed it from my disk again, as I don't want to store any of your -potentially- sensitive data for longer than necessary. |
I did restart the whole system, ran the subdevice discovery and the 4 optimizers I have have been rediscovered, but they didn't show up in HA. So I removed the integration, added again, but Now I can't get the inverter discovered into HA, not even after a restart. PS |
I slept on the problem for a night, and found that it probably is a bug introduced in the major version upgrade of pyModbus. This will be tough to find the root cause, so I'll potentially have to revert that upgrade. |
Good morning. I had to revert to 1.1.6 to be able to run my automations that control the maximum charging power. |
I found the root cause: the slave id was not passed correctly when retrieving the optimizer data. This caused it to default to slave_id 0 (which works for many people, including me). Can you try again with 1.2.0b7? |
Updated to b7 and got connected after the restart. All the devices are there AFAIK. |
Closing it now. |
🎉 |
Describe the issue
After recommending to upgrade to beta, to get access to my optimizers, as stated in #222 , I can not connect to the inverter anymore.
Tried deleting the integration from HACS, multiple HA restarts, etc.
The procedure crashes in the moment this line appears in the log
2023-01-01 19:36:24.510 DEBUG (MainThread) [huawei_solar.huawei_solar] Backing off file upload for 10.0 seconds after 3 tries
Bescribe your Huawei Solar Setup
Inverter Type: SUN2000-5KTL-L1
Inverter Firmware version: V200R001C00SPC125
SDongle present: yes
Power meter present: single phase
Battery: LUNA2000 10kWh
Battery Firmware version :V100R002C00SPC116
How do you connect to the inverter?
Via the SDongle, wired connection
Upload your Diagnostics File
Drag & Drop your Diagnostics File here.
Upload your relevant debug logs
Please confirm the following:
The text was updated successfully, but these errors were encountered: