cdpuk / givenergy-local

Home Assistant integration for local access to GivEnergy inverter and battery systems
MIT License
47 stars 14 forks source link

Curious about errors in log #63

Closed TimWardCam closed 9 months ago

TimWardCam commented 9 months ago

Although the integration appears to be largely working, I'm getting large numbers of errors in the log.

Version of the custom_component

Sorry, don't know where to find the version. It was downloaded a few days ago so I assume it's the current version.

Configuration

Sorry, I don't know which configuration file you want. I can't find one that obviously matches what I filled in on the configuration screen when installing the integration.

Add your logs here.

A small sample:

2023-09-19 17:17:17.783 ERROR (SyncWorker_7) [givenergy_modbus] Did not receive expected response type: ReadHoldingRegistersResponse != ReadInputRegistersResponse 2023-09-19 17:17:18.297 ERROR (SyncWorker_7) [givenergy_modbus] Did not receive expected response type: ReadHoldingRegistersResponse != ReadInputRegistersResponse 2023-09-19 17:57:32.326 ERROR (SyncWorker_2) [givenergy_modbus] Returned base register (0) does not match that from request (180). 2023-09-19 17:58:37.287 ERROR (SyncWorker_3) [givenergy_modbus] Did not receive expected response type: ReadInputRegistersResponse != ErrorResponse 2023-09-19 18:05:37.501 ERROR (SyncWorker_1) [givenergy_modbus] Did not receive expected response type: ReadInputRegistersResponse != ErrorResponse 2023-09-19 18:35:37.805 ERROR (SyncWorker_5) [givenergy_modbus] Did not receive expected response type: ReadInputRegistersResponse != ErrorResponse 2023-09-19 18:35:38.540 ERROR (SyncWorker_5) [givenergy_modbus] Modbus Error: [Input/Output] No Response received from the remote unit/Unable to decode response NoneType: None 2023-09-19 18:35:38.541 ERROR (SyncWorker_5) [givenergy_modbus] Did not receive expected response type: ReadInputRegistersResponse != ModbusIOException 2023-09-19 18:37:47.882 ERROR (SyncWorker_0) [givenergy_modbus] Did not receive expected response type: ReadHoldingRegistersResponse != ReadInputRegistersResponse 2023-09-19 18:37:48.389 ERROR (SyncWorker_0) [givenergy_modbus] Did not receive expected response type: ReadHoldingRegistersResponse != ReadInputRegistersResponse 2023-09-19 18:48:31.565 ERROR (SyncWorker_7) [pymodbus.client.sync] Connection to (192.168.1.14, 8899) failed: timed out 2023-09-19 18:48:31.574 ERROR (SyncWorker_7) [givenergy_modbus] Modbus Error: [Connection] Failed to connect[ModbusTcpClient(192.168.1.14:8899)] Traceback (most recent call last): File "/usr/local/lib/python3.11/site-packages/givenergy_modbus/modbus.py", line 50, in execute response = super().execute(request) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/pymodbus/client/sync.py", line 108, in execute raise ConnectionException("Failed to connect[%s]" % (self.str())) pymodbus.exceptions.ConnectionException: Modbus Error: [Connection] Failed to connect[ModbusTcpClient(192.168.1.14:8899)] 2023-09-19 18:48:31.581 ERROR (SyncWorker_7) [givenergy_modbus] Did not receive expected response type: ReadInputRegistersResponse != NoneType

Describe the bug

Unexpected errors in the log.

cdpuk commented 9 months ago

These errors are quite common due to the way the underlying giverergy_modbus library works. There is a new version being create to address this, but it could still be a long way off release, and there's nothing that could be changed in the integration to prevent the errors.

As you say, fortunately the errors tend not to interfere too much - they just cause the occasional update to be missed.