wills106 / homeassistant-solax-modbus

SolaX Power Modbus custom_component for Home Assistant (Supports some AlphaESS, Growatt, Sofar, Solinteg, Solis, SRNE, Swatten)
317 stars 101 forks source link

[Bug]: No Entities after upgrade to 2024.03.4, 2024.03.5, 2024.03.6 #814

Closed jimbaxter closed 7 months ago

jimbaxter commented 7 months ago

Describe the bug

I have been using this integration for 6 months without any issues, then yesterday I upgraded to 2024.03.4 and all the entities disappeared so I tried removing removing and readding the Solax and then uninstalled and reinstalled this plugin but that did not help.

I get the errors: SolaX: attempt to read serialnumber failed at 0x0 data: None SolaX: attempt to read serialnumber failed at 0x300 data: None SolaX: cannot find serial number, even not for MIC unrecognized inverter type - serial number : unknown

I then found that there was an issue and the fixed version 2024.03.5 was released but I still get the same issues.

I am now using 2024.03.6 and have tried turning the inverter off on the front panel (to hopefully restart the PocketWifi v3), reinstalling this integration again and power cycling the Raspberry Pi but I still have these errors and no entities.

Integration Version

2023.04.6

Homeassistant core version

2024.3.1

Inverter brand

Solax X1-Hybrid G4

Plugin used

plugin_solax.py

Serial prefix

H4502A

Inverter firmware versions

ARM 2.03 DSP 2.07

Connection Method

Solax Pocket Wifi V3.0

Dongle firmware

V3.012.01

Detailed Error Log

2024-03-19 15:00:27.472 DEBUG (MainThread) [custom_components.hacs] Queue execution finished for 9 tasks finished in 1.75 seconds 2024-03-19 15:00:27.472 DEBUG (MainThread) [custom_components.hacs] Saving data 2024-03-19 15:00:30.020 WARNING (MainThread) [custom_components.solax_modbus.plugin_solax] SolaX: attempt to read serialnumber failed at 0x0 data: None Traceback (most recent call last): File "/config/custom_components/solax_modbus/plugin_solax.py", line 68, in async_read_serialnr inverter_data = await hub.async_read_holding_registers(unit=hub._modbus_addr, address=address, count=7) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/solax_modbus/init.py", line 401, in async_read_holding_registers return await self._client.read_holding_registers(address, count, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/pymodbus/client/base.py", line 167, in async_execute self.send(packet) File "/usr/local/lib/python3.12/site-packages/pymodbus/transport/transport.py", line 391, in send self.transport.write(data) # type: ignore[attr-defined] ^^^^^^^^^^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'write' 2024-03-19 15:00:30.047 WARNING (MainThread) [custom_components.solax_modbus.plugin_solax] SolaX: reading serial number from address 0x0 failed; other address may succeed 2024-03-19 15:00:30.048 INFO (MainThread) [custom_components.solax_modbus.plugin_solax] Read SolaX 0x0 serial number before potential swap: None 2024-03-19 15:00:30.048 WARNING (MainThread) [custom_components.solax_modbus.plugin_solax] SolaX: attempt to read serialnumber failed at 0x300 data: None Traceback (most recent call last): File "/config/custom_components/solax_modbus/plugin_solax.py", line 68, in async_read_serialnr inverter_data = await hub.async_read_holding_registers(unit=hub._modbus_addr, address=address, count=7) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/solax_modbus/init.py", line 401, in async_read_holding_registers return await self._client.read_holding_registers(address, count, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/pymodbus/client/mixin.py", line 107, in read_holding_registers return self.execute( ^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/pymodbus/client/base.py", line 152, in execute raise ConnectionException(f"Not connected[{self!s}]") pymodbus.exceptions.ConnectionException: Modbus Error: [Connection] Not connected[AsyncModbusTcpClient 192.168.1.174:502] 2024-03-19 15:00:30.057 WARNING (MainThread) [custom_components.solax_modbus.plugin_solax] SolaX: reading serial number from address 0x300 failed; other address may succeed 2024-03-19 15:00:30.058 INFO (MainThread) [custom_components.solax_modbus.plugin_solax] Read SolaX 0x300 serial number before potential swap: None 2024-03-19 15:00:30.058 ERROR (MainThread) [custom_components.solax_modbus.plugin_solax] SolaX: cannot find serial number, even not for MIC 2024-03-19 15:00:30.058 ERROR (MainThread) [custom_components.solax_modbus.plugin_solax] unrecognized inverter type - serial number : unknown 2024-03-19 15:00:30.059 ERROR (MainThread) [homeassistant] Error doing job: Future exception was never retrieved pymodbus.exceptions.ConnectionException: Modbus Error: [Connection] Client is not connected 2024-03-19 15:00:30.067 INFO (MainThread) [homeassistant.components.button] Setting up solax_modbus.button 2024-03-19 15:00:30.067 INFO (MainThread) [custom_components.solax_modbus.button] hub.wakeuButton: None 2024-03-19 15:00:30.072 INFO (MainThread) [homeassistant.components.number] Setting up solax_modbus.number 2024-03-19 15:00:30.076 INFO (MainThread) [homeassistant.components.select] Setting up solax_modbus.select 2024-03-19 15:00:30.083 INFO (MainThread) [homeassistant.components.sensor] Setting up solax_modbus.sensor 2024-03-19 15:00:30.086 INFO (MainThread) [custom_components.solax_modbus.sensor] computedRegs: {} 2024-03-19 15:00:39.576 INFO (MainThread) [custom_components.solax_modbus] trying to load plugin - plugin_name: solax 2024-03-19 15:00:39.578 INFO (MainThread) [custom_components.solax_modbus] Inverter is not connected, trying to connect 2024-03-19 15:00:39.585 INFO (MainThread) [custom_components.solax_modbus] Inverter connected at 192.168.1.174:502 2024-03-19 15:00:39.585 INFO (MainThread) [custom_components.solax_modbus.plugin_solax] SolaX: trying to determine inverter type 2024-03-19 15:00:59.591 WARNING (MainThread) [custom_components.solax_modbus.plugin_solax] SolaX: attempt to read serialnumber failed at 0x0 data: None Traceback (most recent call last): File "/config/custom_components/solax_modbus/plugin_solax.py", line 68, in async_read_serialnr inverter_data = await hub.async_read_holding_registers(unit=hub._modbus_addr, address=address, count=7) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/solax_modbus/init.py", line 401, in async_read_holding_registers return await self._client.read_holding_registers(address, count, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/pymodbus/client/base.py", line 180, in async_execute raise ModbusIOException( pymodbus.exceptions.ModbusIOException: Modbus Error: [Input/Output] ERROR: No response received after 3 retries 2024-03-19 15:00:59.598 WARNING (MainThread) [custom_components.solax_modbus.plugin_solax] SolaX: reading serial number from address 0x0 failed; other address may succeed 2024-03-19 15:00:59.598 INFO (MainThread) [custom_components.solax_modbus.plugin_solax] Read SolaX 0x0 serial number before potential swap: None 2024-03-19 15:00:59.599 WARNING (MainThread) [custom_components.solax_modbus.plugin_solax] SolaX: attempt to read serialnumber failed at 0x300 data: None Traceback (most recent call last): File "/config/custom_components/solax_modbus/plugin_solax.py", line 68, in async_read_serialnr inverter_data = await hub.async_read_holding_registers(unit=hub._modbus_addr, address=address, count=7) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/solax_modbus/init.py", line 401, in async_read_holding_registers return await self._client.read_holding_registers(address, count, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/pymodbus/client/mixin.py", line 107, in read_holding_registers return self.execute( ^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/pymodbus/client/base.py", line 152, in execute raise ConnectionException(f"Not connected[{self!s}]") pymodbus.exceptions.ConnectionException: Modbus Error: [Connection] Not connected[AsyncModbusTcpClient 192.168.1.174:502] 2024-03-19 15:00:59.607 WARNING (MainThread) [custom_components.solax_modbus.plugin_solax] SolaX: reading serial number from address 0x300 failed; other address may succeed 2024-03-19 15:00:59.608 INFO (MainThread) [custom_components.solax_modbus.plugin_solax] Read SolaX 0x300 serial number before potential swap: None 2024-03-19 15:00:59.608 ERROR (MainThread) [custom_components.solax_modbus.plugin_solax] SolaX: cannot find serial number, even not for MIC 2024-03-19 15:00:59.608 ERROR (MainThread) [custom_components.solax_modbus.plugin_solax] unrecognized inverter type - serial number : unknown

Additional context

No response

jimbaxter commented 7 months ago

I have managed to resolve this by deleting this integration from the custom_components, rebooting and reinstalling.