Closed daxxxit closed 8 months ago
Same issue - Home Assistant 2024.2.5. A day ago the integration stopped working. Removing the integration and trying to reconnect does not work
Logger: huawei_solar.huawei_solar Source: /usr/local/lib/python3.12/site-packages/huawei_solar/huawei_solar.py:184 First occurred: 17:21:22 (10 occurrences) Last logged: 18:01:24
Aborting client creation due to error. Traceback (most recent call last): File "/usr/local/lib/python3.12/asyncio/tasks.py", line 520, in wait_for return await fut ^^^^^^^^^ File "/usr/local/lib/python3.12/asyncio/locks.py", line 212, in wait await fut asyncio.exceptions.CancelledError
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "/usr/local/lib/python3.12/site-packages/huawei_solar/huawei_solar.py", line 178, in create await huawei_solar._initialize() File "/usr/local/lib/python3.12/site-packages/huawei_solar/huawei_solar.py", line 107, in _initialize self.time_zone = (await self.get(rn.TIME_ZONE)).value ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/huawei_solar/huawei_solar.py", line 241, in get return (await self.get_multiple([name], slave))[0] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/huawei_solar/huawei_solar.py", line 276, in get_multiple response = await self._read_registers(registers[0].register, total_length, slave) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/huawei_solar/huawei_solar.py", line 396, in _read_registers async with self._communication_lock(): File "/usr/local/lib/python3.12/contextlib.py", line 210, in aenter return await anext(self.gen) ^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/huawei_solar/huawei_solar.py", line 145, in _communication_lock raise err File "/usr/local/lib/python3.12/site-packages/huawei_solar/huawei_solar.py", line 141, in _communication_lock await asyncio.wait_for(self._client.connected_event.wait(), WAIT_FOR_CONNECTION_TIMEOUT) File "/usr/local/lib/python3.12/asyncio/tasks.py", line 519, in wait_for async with timeouts.timeout(timeout): File "/usr/local/lib/python3.12/asyncio/timeouts.py", line 115, in aexit raise TimeoutError from exc_val TimeoutError
This issue seems to be caused by a connection failure or an unstable connection to the inverter. This integration already has already implemented a lot of logic to automatically recover from connection failures or unstable connections. The three most important ones are:
Please understand that I cannot help you solve your connection failure or unstable connection. Consider an alternative connection method. If you are convinced that there is no connectivity issue, then I invite you to debug and fix the problem yourself and submit a pull request to the underlying huawei-solar Python library. Your input would be greatly appreciated.
As there is nothing actionable for me to do in this issue, I'm closing it. You are welcome to open a topic in Discussions: Connecting to the inverter to get community support for your problem.
Describe the issue
Hardware: SUN2000-6KTL-M0 fw: V100R001C00SPC159 (latest) SDongleA-01 fw: V100R001C00SPC123 (latest)
I made the connection with the integration about 3 years ago with the wifi AP port 502 slave ID 0 (I’m not sure if 0 or 1), it went well and I never had any problems. I need to replace the NUC, I have performed the backup and restore in a Proxmox VM. Everything has started working again except for huawei-solar which tries to connect in a loop but always fails. Obviously, I have turned off the old NUC. I tried to assign the same IP ADDRESS and MAC ADDRESS of the old NUC to the VM but it does not connect.
Connection:
From the VM Home Assistant, if I execute the ping:
The port 502 is open:
The port 6607 is close. I tried to create a ‘clean’ Home Assistant VM but it does not connect to any slave ID on port 502. If I turn on the old NUC, the connection is immediately restored and works perfectly.
In the FusionSolar APP, there is no ‘Modbus-TCP’ option and therefore it is not possible to enable ‘Advanced: elevate permissions’, but 3 years ago the old NUC connected perfectly and still connects every time I reboot. Even on FusionSolar WEB as an installer, the ‘Modbus-TCP’ option is not present. I thought that perhaps an old version of the integration created the connection, with updates it no longer creates a new connection but the existing connection continues to work, but I do not understand why it does not work with the VM created with the full backup from the NUC.
I am not interested in connecting to the dongle’s wifi but I would like to be able to connect to the inverter’s internal AP wifi as it has been so far with the old NUC.
I hope I have included all the useful and requested information, I apologize if this is not the case, for us who do not know the English language it is all very complicated even using translators.
I have searched for ‘Download diagnostis’ but it is not there.
Bescribe your Huawei Solar Setup
Inverter Type: SUN2000-6KTL-M0 Inverter Firmware version: V100R001C00SPC159 (latest) SDongle present: SDongleA-01 fw: V100R001C00SPC123 (latest) Power meter present: no Battery: None Battery Firmware version: None
How do you connect to the inverter?
Over serial, with a serial-to-WiFi stick
Upload your Diagnostics File
Drag & Drop your Diagnostics File here.
Upload your relevant debug logs
Please confirm the following: