I have following error:
ERROR (MainThread) [homeassistant.components.sensor] Setup of platform huawei_solar is taking longer than 60 seconds. Startup will proceed without waiting any longer.
Any ideas how to solve it? Conncetion to huawei inverter via python works fine.
Log Details (ERROR)
Logger: homeassistant.components.sensor
Source: custom_components/huawei_solar/sensor.py:270
Integration: Sensor (documentation, issues)
First occurred: 3:45:25 PM (1 occurrences)
Last logged: 3:45:25 PM
huawei_solar: Error on device update!
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.9/site-packages/huawei_solar/huawei_solar.py", line 169, in read_register
response = self.client.read_holding_registers(register, length)
File "/srv/homeassistant/lib/python3.9/site-packages/pymodbus/client/common.py", line 114, in read_holding_registers
return self.execute(request)
File "/srv/homeassistant/lib/python3.9/site-packages/pymodbus/client/sync.py", line 109, in execute
return self.transaction.execute(request)
File "/srv/homeassistant/lib/python3.9/site-packages/pymodbus/transaction.py", line 173, in execute
response, last_exception = self._transact(
File "/srv/homeassistant/lib/python3.9/site-packages/pymodbus/transaction.py", line 289, in _transact
result = self._recv(response_length, full)
File "/srv/homeassistant/lib/python3.9/site-packages/pymodbus/transaction.py", line 320, in _recv
read_min = self.client.framer.recvPacket(min_size)
File "/srv/homeassistant/lib/python3.9/site-packages/pymodbus/framer/__init__.py", line 49, in recvPacket
return self.client.recv(size)
File "/srv/homeassistant/lib/python3.9/site-packages/pymodbus/client/sync.py", line 89, in recv
return self._recv(size)
File "/srv/homeassistant/lib/python3.9/site-packages/pymodbus/client/sync.py", line 298, in _recv
return self._handle_abrupt_socket_close(
File "/srv/homeassistant/lib/python3.9/site-packages/pymodbus/client/sync.py", line 343, in _handle_abrupt_socket_close
raise ConnectionException(msg)
pymodbus.exceptions.ConnectionException: Modbus Error: [Connection] ModbusTcpClient(192.168.8.1:502): Connection unexpectedly closed 0.080834 seconds into read of 8 bytes without response from unit before it closed connection
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/helpers/entity_platform.py", line 360, in _async_add_entity
await entity.async_device_update(warning=False)
File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/helpers/entity.py", line 465, in async_device_update
await task
File "/usr/lib/python3.9/concurrent/futures/thread.py", line 52, in run
result = self.fn(*self.args, **self.kwargs)
File "/home/homeassistant/.homeassistant/custom_components/huawei_solar/sensor.py", line 270, in update
self._phase_B_current = self._inverter.get("phase_B_current").value
File "/srv/homeassistant/lib/python3.9/site-packages/huawei_solar/huawei_solar.py", line 40, in get
response = self.read_register(reg.register, reg.length)
File "/srv/homeassistant/lib/python3.9/site-packages/huawei_solar/huawei_solar.py", line 172, in read_register
raise ConnectionException(ex)
huawei_solar.huawei_solar.ConnectionException: Modbus Error: [Connection] ModbusTcpClient(192.168.8.1:502): Connection unexpectedly closed 0.080834 seconds into read of 8 bytes without response from unit before it closed connection