Most days I see an error in my HA logs from the modbus integration. The time doesn't seem to coincide with any of my automations and I can't find the modbus map so I'm not sure which register this is trying to write?
The "Failed to write registers" error is then immediately followed with a "Error doing job: Task exception was never retrieved (None)". Output from both are below.
It doesn't seem to actually have had any effect on my inverter functioning normally that I can see. In fact its been flawless since the force charge whilst seeing solar bug was fixed, so I'm not too concerned about it but I guess would like to understand what's going on and fix it if possible.
Am running FoxESS - Modbus v1.12.2
Code: Select all
This error originated from a custom integration.
Logger: custom_components.foxess_modbus.modbus_controller
Source: custom_components/foxess_modbus/modbus_controller.py:222
integration: FoxESS - Modbus (documentation, issues)
First occurred: 5:09:47 AM (1 occurrences)
Last logged: 5:09:47 AM
Failed to write registers
pymodbus.exceptions.ModbusIOException: Modbus Error: [Input/Output] Modbus Error: [Connection] CustomModbusTcpClient 192.168.4.73:502: Connection unexpectedly closed 0.002 seconds into read of 8 bytes without response from slave before it closed connection
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 222, in write_registers
await self._client.write_registers(start_address, values, self._slave)
File "/config/custom_components/foxess_modbus/client/modbus_client.py", line 180, in write_registers
raise ModbusClientFailedError(message, self, response) from response
custom_components.foxess_modbus.client.modbus_client.ModbusClientFailedError: Error writing registers. Start: 44002; values: [61536]; slave: 247 from tcp://192.168.4.73:502: Modbus Error: [Input/Output] Modbus Error: [Connection] CustomModbusTcpClient 192.168.4.73:502: Connection unexpectedly closed 0.002 seconds into read of 8 bytes without response from slave before it closed connection
Code: Select all
This error originated from a custom integration.
Logger: homeassistant
Source: custom_components/foxess_modbus/client/modbus_client.py:180
integration: FoxESS - Modbus (documentation, issues)
First occurred: 5:09:47 AM (1 occurrences)
Last logged: 5:09:47 AM
Error doing job: Task exception was never retrieved (None)
pymodbus.exceptions.ModbusIOException: Modbus Error: [Input/Output] Modbus Error: [Connection] CustomModbusTcpClient 192.168.4.73:502: Connection unexpectedly closed 0.002 seconds into read of 8 bytes without response from slave before it closed connection
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 373, in _refresh
await self._remote_control_manager.poll_complete_callback()
File "/config/custom_components/foxess_modbus/remote_control_manager.py", line 324, in poll_complete_callback
await self._update()
File "/config/custom_components/foxess_modbus/remote_control_manager.py", line 85, in _update
await self._update_charge()
File "/config/custom_components/foxess_modbus/remote_control_manager.py", line 182, in _update_charge
await self._write_active_power(-max_import_power)
File "/config/custom_components/foxess_modbus/remote_control_manager.py", line 121, in _write_active_power
await self._controller.write_registers(self._addresses.active_power[-1], values)
File "/config/custom_components/foxess_modbus/modbus_controller.py", line 238, in write_registers
raise ex
File "/config/custom_components/foxess_modbus/modbus_controller.py", line 222, in write_registers
await self._client.write_registers(start_address, values, self._slave)
File "/config/custom_components/foxess_modbus/client/modbus_client.py", line 180, in write_registers
raise ModbusClientFailedError(message, self, response) from response
custom_components.foxess_modbus.client.modbus_client.ModbusClientFailedError: Error writing registers. Start: 44002; values: [61536]; slave: 247 from tcp://192.168.4.73:502: Modbus Error: [Input/Output] Modbus Error: [Connection] CustomModbusTcpClient 192.168.4.73:502: Connection unexpectedly closed 0.002 seconds into read of 8 bytes without response from slave before it closed connection