siku2 / hass-komfovent-c5

Home Assistant integration for Komfovent C5 air ventilation systems.
MIT License
7 stars 2 forks source link

communication fails after a few hours #2

Closed colseven closed 2 years ago

colseven commented 2 years ago

Unfortunately, the communication always fails after a few hours, even though the system has a fixed IP and can be reached permanently, what can be the reason? bild 2022-03-12 um 08 12 59 bild 2022-03-12 um 08 15 13

siku2 commented 2 years ago

Please take a look (and attach :) ) the logs. You might even want to increase the log level for the component (refer to the official docs).

One possible reason might be that someone else is connected to the device using Modbus. Unfortunately, the komfovent only supports a single Modbus user simultaneously.

colseven commented 2 years ago

`Dieser Fehler wurde von einer benutzerdefinierten Integration verursacht

Logger: homeassistant Source: custom_components/komfovent_c5/api/modes.py:218 Integration: Komfovent C5 (documentation, issues) First occurred: 12. März 2022, 11:19:02 (2068 occurrences) Last logged: 04:32:32

Error doing job: Task exception was never retrieved Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 134, in _handle_refresh_interval await self._async_refresh(log_failures=True, scheduled=True) File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 265, in _async_refresh update_callback() File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 325, in _handle_coordinator_update self.async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 553, in async_write_ha_state self._async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 590, in _async_write_ha_state state = self._stringify_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 559, in _stringify_state if (state := self.state) is None: File "/usr/src/homeassistant/homeassistant/components/sensor/init.py", line 372, in state value = self.native_value File "/config/custom_components/komfovent_c5/sensor.py", line 172, in native_value return self._modes_state.active_mode.supply_flow File "/config/custom_components/komfovent_c5/api/modes.py", line 218, in active_mode return self.modes[self.operation_mode] KeyError: <OperationMode.PROGRAM: 6>

`

siku2 commented 2 years ago

The issue is that your unit is running in program mode :) From what I remember, in this mode, the device no longer behaves exactly according to the documentation which causes these issues.

I'm pretty sure it's possible to fix this, just need to play around with the mode a bit.

colseven commented 2 years ago

Oh that would be really great.