Hello,
First of all, thank you very much for NIBE plugin for HA. I’m using it via MODBUS 40 and installation was really easy. However I have few questions.
When I try to set some value, e.g. “DM start heating” in some cases I got CRC validation error. The value is set, but it cause that all values are unavailible for few seconds. Also automation are shown as failed in this case. Can you please help me, what’s the problem?
2023-11-17 09:36:33.956 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [547033687616] CRC validation failed.
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 230, in handle_call_service
await hass.services.async_call(
File "/usr/src/homeassistant/homeassistant/core.py", line 2035, in async_call
response_data = await coro
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2072, in _execute_service
return await target(service_call)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 235, in handle_service
return await service.entity_service_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 876, in entity_service_call
response_data = await _handle_entity_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 948, in _handle_entity_call
result = await task
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/number/__init__.py", line 106, in async_set_value
await entity.async_set_native_value(native_value)
File "/usr/src/homeassistant/homeassistant/components/nibe_heatpump/number.py", line 74, in async_set_native_value
await self._async_write_coil(value)
File "/usr/src/homeassistant/homeassistant/components/nibe_heatpump/__init__.py", line 340, in _async_write_coil
await self.coordinator.async_write_coil(self._coil, value)
File "/usr/src/homeassistant/homeassistant/components/nibe_heatpump/__init__.py", line 253, in async_write_coil
await self.connection.write_coil(data)
File "/usr/local/lib/python3.11/site-packages/tenacity/_asyncio.py", line 88, in async_wrapped
return await fn(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/tenacity/_asyncio.py", line 47, in __call__
do = self.iter(retry_state=retry_state)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/tenacity/__init__.py", line 314, in iter
return fut.result()
^^^^^^^^^^^^
File "/usr/local/lib/python3.11/concurrent/futures/_base.py", line 449, in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/concurrent/futures/_base.py", line 401, in __get_result
raise self._exception
File "/usr/local/lib/python3.11/site-packages/tenacity/_asyncio.py", line 50, in __call__
result = await fn(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/nibe/connection/modbus.py", line 164, in write_coil
result = await self._client.write_registers(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/async_modbus/core.py", line 236, in write_registers
return await self._send_message(request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/async_modbus/core.py", line 142, in _send_message
return await self.protocol._async_send_message(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/async_modbus/core.py", line 78, in send_message_rtu
return rtu.parse_response_adu(response_error_adu + response_remainder, adu)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/umodbus/client/serial/rtu.py", line 183, in parse_response_adu
validate_crc(resp_adu)
File "/usr/local/lib/python3.11/site-packages/umodbus/client/serial/redundancy_check.py", line 76, in validate_crc
raise CRCError('CRC validation failed.')
umodbus.client.serial.redundancy_check.CRCError: CRC validation failed.
2023-11-17 09:36:36.959 ERROR (MainThread) [homeassistant.components.nibe_heatpump] Unexpected error fetching Nibe Heat Pump data: CRC validation failed.
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 290, in _async_refresh
self.data = await self._async_update_data()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/nibe_heatpump/__init__.py", line 266, in _async_update_data
return await self._async_update_data_internal()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/nibe_heatpump/__init__.py", line 288, in _async_update_data_internal
async for data in self.connection.read_coils(_get_coils()):
File "/usr/local/lib/python3.11/site-packages/nibe/connection/__init__.py", line 43, in read_coils
yield await self.read_coil(coil, timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/tenacity/_asyncio.py", line 88, in async_wrapped
return await fn(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/tenacity/_asyncio.py", line 47, in __call__
do = self.iter(retry_state=retry_state)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/tenacity/__init__.py", line 314, in iter
return fut.result()
^^^^^^^^^^^^
File "/usr/local/lib/python3.11/concurrent/futures/_base.py", line 449, in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/concurrent/futures/_base.py", line 401, in __get_result
raise self._exception
File "/usr/local/lib/python3.11/site-packages/tenacity/_asyncio.py", line 50, in __call__
result = await fn(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/nibe/connection/modbus.py", line 116, in read_coil
result = await self._client.read_holding_registers(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/async_modbus/core.py", line 181, in read_holding_registers
return await self._send_message(request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/async_modbus/core.py", line 142, in _send_message
return await self.protocol._async_send_message(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/async_modbus/core.py", line 78, in send_message_rtu
return rtu.parse_response_adu(response_error_adu + response_remainder, adu)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/umodbus/client/serial/rtu.py", line 183, in parse_response_adu
validate_crc(resp_adu)
File "/usr/local/lib/python3.11/site-packages/umodbus/client/serial/redundancy_check.py", line 76, in validate_crc
raise CRCError('CRC validation failed.')
umodbus.client.serial.redundancy_check.CRCError: CRC validation failed.
Second question is about reading freqency. When I selected first value to get from heat pump, the update frequency was less then 2 minutes. Now I has approx. 20 values and update frequency is slightly above 2 minutes. When I tried allow all params, the update frequency was for sure more than 20 minutes. Is it correct, that more values cause longer update period? I’m confused that difference between 1 and 20 values isn’t significant.
Third question is regarding heat meter values. When I allow them for my VVM320, the value is stil 0 kWh. Isn’t that some bug?
Last questions is probably just my wish Is it possible to set some priority to values? For example outdoor temperature or heat meter can be updated once per 10 minutes, so it doesn’t have to lower the udate frequency for other entities. I know that I can choose 20 values for fast reading, but I mean something different. Kind of workaround I’m using is getting these values by NIBE API online, but one day I would like to use just MODBUS connection and don’t use NIBE API anymore.
Thank you all who read this post to the end