nathanmarlor / foxess_modbus

FoxESS inverter integration. Connect directly to your FoxESS inverter (no cloud!) for real-time status and control.
MIT License
105 stars 14 forks source link

modbus / USB RS485 stopped working after HA Supervisor upgrade / reboot but maybe Forced Discharge #559

Closed Stephens-ely closed 4 months ago

Stephens-ely commented 4 months ago

HA did a Supervisor update this evening but also did my first force discharge using the newest HA / modbus integration

Havre rebooted HA and Inverter but getting this in logs...

This error originated from a custom integration.

Logger: homeassistant Source: custom_components/foxess_modbus/client/modbus_client.py:179 Integration: FoxESS - Modbus (documentation, issues) First occurred: 23:37:26 (1 occurrences) Last logged: 23:37:26

Error doing job: Task exception was never retrieved pymodbus.exceptions.ModbusIOException: Modbus Error: [Input/Output] Modbus Error: [Invalid Message] No response received, expected at least 4 bytes (0 received)

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/config/custom_components/foxess_modbus/modbus_controller.py", line 328, in _refresh await self._remote_control_manager.poll_complete_callback() File "/config/custom_components/foxess_modbus/remote_control_manager.py", line 335, in poll_complete_callback await self._update() File "/config/custom_components/foxess_modbus/remote_control_manager.py", line 92, in _update await self._update_disable() File "/config/custom_components/foxess_modbus/remote_control_manager.py", line 101, in _update_disable await self._disable_remote_control() File "/config/custom_components/foxess_modbus/remote_control_manager.py", line 317, in _disable_remote_control await self._controller.write_register(self._addresses.remote_enable, 0) File "/config/custom_components/foxess_modbus/modbus_controller.py", line 174, in write_register await self.write_registers(address, [value]) File "/config/custom_components/foxess_modbus/modbus_controller.py", line 211, in write_registers raise ex File "/config/custom_components/foxess_modbus/modbus_controller.py", line 195, in write_registers await self._client.write_registers(start_address, values, self._slave) File "/config/custom_components/foxess_modbus/client/modbus_client.py", line 179, in write_registers raise ModbusClientFailedError(message, self, response) from response custom_components.foxess_modbus.client.modbus_client.ModbusClientFailedError: Error writing registers. Start: 44000; values: [0]; slave: 247 from /dev/ttyUSB0: Modbus Error: [Input/Output] Modbus Error: [Invalid Message] No response received, expected at least 4 bytes (0 received)

This error originated from a custom integration.

Logger: custom_components.foxess_modbus.modbus_controller Source: custom_components/foxess_modbus/modbus_controller.py:195 Integration: FoxESS - Modbus (documentation, issues) First occurred: 23:37:26 (1 occurrences) Last logged: 23:37:26

Failed to write registers pymodbus.exceptions.ModbusIOException: Modbus Error: [Input/Output] Modbus Error: [Invalid Message] No response received, expected at least 4 bytes (0 received)

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/config/custom_components/foxess_modbus/modbus_controller.py", line 195, in write_registers await self._client.write_registers(start_address, values, self._slave) File "/config/custom_components/foxess_modbus/client/modbus_client.py", line 179, in write_registers raise ModbusClientFailedError(message, self, response) from response custom_components.foxess_modbus.client.modbus_client.ModbusClientFailedError: Error writing registers. Start: 44000; values: [0]; slave: 247 from /dev/ttyUSB0: Modbus Error: [Input/Output] Modbus Error: [Invalid Message] No response received, expected at least 4 bytes (0 received)

Any thoughts ?

Stephens-ely commented 4 months ago

Think this may be a USB lockup issue. Have just done a hard shutdown/power off and moved USB to an alternate port and once back up, the integration has started.

Please close this issue.