Modbus Sensor TCP for Komfovent

Updated HA OS to 9.5 today and core to 2023.2.2. Has anyone had issues with modbus after that? I’v seem to lost communication with komfovent after the update. All entities are not available.

Only modbus error in log:

Logger: homeassistant.components.modbus.modbus
Source: components/modbus/modbus.py:391 
Integration: Modbus (documentation, issues) 
First occurred: 10:52:55 PM (1 occurrences) 
Last logged: 10:52:55 PM

Pymodbus: Komfovent: Modbus Error: [Input/Output] Modbus Error: [Invalid Message] No response received, expected at least 8 bytes (0 received)

And then a bunch for automations:

Logger: homeassistant.components.automation.komfovent_set_eco_min_temp_input_number
Source: components/automation/__init__.py:567 
Integration: Automation (documentation, issues) 
First occurred: 10:58:38 PM (1 occurrences) 
Last logged: 10:58:38 PM

Error while executing automation automation.komfovent_set_eco_min_temp_input_number: expected float for dictionary value @ data['value']

EDIT: Never mind. Working again after Komfoven reboot.

Would you mind sharing some data from you project? I presume you used esphome?
I have also netatmo sensor and have configured it at the moment with different automations in HA.

1 Like

hi, I installed the config, but I can’t set the display as in the pictures… can I ask you for detailed instructions?

There is a sample Lovelace Card in the repository.

image

You need to copy that yaml into a card on your dashboard.

I understand this, but I can’t do it, you can ask for instructions step by step

i try

komfovent_ui.yaml

and i have this error

then if I try to add your file (komfovent_lovalace_cards.yaml) to lovelace, nothing happens at all… please tell me the instructions

Ah, sorry, You need to add in this button card GitHub - custom-cards/button-card: ❇️ Lovelace button-card for home assistant

I had forgotten this - I’ll update the readme.

[edit]
Docs updated.

Remember some elements rely on sensors I have that you might not (such as CO2)

hank you, the display worked.

please tell me how to fix these errors (everything works when entering) after 1-2 seconds, an error appears

co2 - i deleted

Sorry, another custom card :frowning: GitHub - htmltiger/numberbox-card: Replace input_number sliders with plus and minus buttons

Hi, I’ve already figured it out and everything worked, thank you so much!!!

There are 2 questions left:
1 what do you mean:
Binary Sensor mean
Decode register 900 ?

  1. How to manage the flows (I have only 1 control, general, both input and output at the same time) I would like to manage separately, as I understand these are different channels?

Not sure where that is.

What control unit do you have - mine is C6M? I suspect you have a different controller so you might need to learn about YAML and adjust the code to suit your unit.

For instance, when the flow rate changes via the UI, an automation writes the value to the Modbus register (using a script - listed earlier).

  - alias: Komfovent Write Normal Fan Setpoint on Input change
    description: 'Write Normal Fan Setpoint (Sup & Extract) when input_number changes'
    trigger:
      - platform: state
        entity_id: input_number.komfovent_set_fan
    condition: []
    action:
      - service: script.komfovent_write_fan_intensity_normal
        data:
          komfovent_fan_intensity: ["0","{{states('input_number.komfovent_set_fan')}}"]
    mode: single

Here is my unit, I think the same as yours …
Please tell me if you have an original co2 sensor or have you installed it yourself?

If you look, the CO2 sensor is not coming from the Komfovent package as I do not have one fitted.

i’m running latest HA and have some issues with Komfovent:

"

The system cannot restart because the configuration is not valid: Invalid config for [modbus]: Komfovent AHU Consumption Day, kWh: count: 2 cannot be combined with data_type: uint32 @ data[‘modbus’][0][‘sensors’][33]. Got {‘name’: ‘Komfovent AHU Consumption Day, kWh’, ‘address’: 926, ‘data_type’: ‘uint32’, ‘input_type’: ‘holding’, ‘count’: 2, ‘precision’: 2, ‘scale’: 0.001, ‘unit_of_measurement’: ‘kWh’, ‘device_class’: ‘energy’, ‘state_class’: ‘total_increasing’, ‘scan_interval’: 30} Komfovent AHU Consumption Month, kWh: count: 2 cannot be combined with data_type: uint32 @ data[‘modbus’][0][‘sensors’][34]. Got {‘name’: ‘Komfovent AHU Consumption Month, kWh’, ‘address’: 928, ‘data_type’: ‘uint32’, ‘input_type’: ‘holding’, ‘count’: 2, ‘precision’: 2, ‘scale’: 0.001, ‘unit_of_measurement’: ‘kWh’, ‘device_class’: ‘energy’, ‘state_class’: ‘total_increasing’, ‘scan_interval’: 30} Komfovent AHU Consumption Total, kWh: count: 2 cannot be combined with data_type: uint32 @ data[‘modbus’][0][‘sensors’][35]. Got {‘name’: ‘Komfovent AHU Consumption Total, kWh’, ‘address’: 930, ‘data_type’: ‘uint32’, ‘input_type’: ‘holding’, ‘count’: 2, ‘precision’: 2, ‘scale’: 0.001, ‘unit_of_measurement’: ‘kWh’, ‘device_class’: ‘energy’, ‘state_class’: ‘total_increasing’, ‘scan_interval’: 30} Komfovent Extract Flow volume: count: 2 cannot be combined with data_type: uint32 @ data[‘modbus’][0][‘sensors’][21]. Got {‘name’: ‘Komfovent Extract Flow volume’, ‘address’: 907, ‘count’: 2, ‘data_type’: ‘uint32’, ‘input_type’: ‘holding’, ‘precision’: 0, ‘unit_of_measurement’: ‘m³/h’, ‘scan_interval’: 10} Komfovent Heater Consumption Day, kWh: count: 2 cannot be combined with data_type: uint32 @ data[‘modbus’][0][‘sensors’][36]. Got {‘name’: ‘Komfovent Heater Consumption Day, kWh’, ‘address’: 932, ‘data_type’: ‘uint32’, ‘input_type’: ‘holding’, ‘count’: 2, ‘precision’: 2, ‘scale’: 0.001, ‘unit_of_measurement’: ‘kWh’, ‘device_class’: ‘energy’, ‘state_class’: ‘total_increasing’, ‘scan_interval’: 30} Komfovent Heater Consumption Month, kWh: count: 2 cannot be combined with data_type: uint32 @ data[‘modbus’][0][‘sensors’][37]. Got {‘name’: ‘Komfovent Heater Consumption Month, kWh’, ‘address’: 934, ‘data_type’: ‘uint32’, ‘input_type’: ‘holding’, ‘count’: 2, ‘precision’: 2, ‘scale’: 0.001, ‘unit_of_measurement’: ‘kWh’, ‘device_class’: ‘energy’, ‘state_class’: ‘total_increasing’, ‘scan_interval’: 30} Komfovent Heater Consumption Total, kWh: count: 2 cannot be combined with data_type: uint32 @ data[‘modbus’][0][‘sensors’][38]. Got {‘name’: ‘Komfovent Heater Consumption Total, kWh’, ‘address’: 936, ‘data_type’: ‘uint32’, ‘input_type’: ‘holding’, ‘count’: 2, ‘precision’: 2, ‘scale’: 0.001, ‘unit_of_measurement’: ‘kWh’, ‘device_class’: ‘energy’, ‘state_class’: ‘total_increasing’, ‘scan_interval’: 30} Komfovent Heating Recovery Day, kWh: count: 2 cannot be combined with data_type: uint32 @ data[‘modbus’][0][‘sensors’][39]. Got {‘name’: ‘Komfovent Heating Recovery Day, kWh’, ‘address’: 938, ‘data_type’: ‘uint32’, ‘input_type’: ‘holding’, ‘count’: 2, ‘precision’: 2, ‘scale’: 0.001, ‘unit_of_measurement’: ‘kWh’, ‘device_class’: ‘energy’, ‘state_class’: ‘total_increasing’, ‘scan_interval’: 30} Komfovent Heating Recovery Month, kWh: count: 2 cannot be combined with data_type: uint32 @ data[‘modbus’][0][‘sensors’][40]. Got {‘name’: ‘Komfovent Heating Recovery Month, kWh’, ‘address’: 940, ‘data_type’: ‘uint32’, ‘input_type’: ‘holding’, ‘count’: 2, ‘precision’: 2, ‘scale’: 0.001, ‘unit_of_measurement’: ‘kWh’, ‘device_class’: ‘energy’, ‘state_class’: ‘total_increasing’, ‘scan_interval’: 30} Komfovent Heating Recovery Total, kWh: count: 2 cannot be combined with data_type: uint32 @ data[‘modbus’][0][‘sensors’][41]. Got {‘name’: ‘Komfovent Heating Recovery Total, kWh’, ‘address’: 942, ‘data_type’: ‘uint32’, ‘input_type’: ‘holding’, ‘count’: 2, ‘precision’: 2, ‘scale’: 0.001, ‘unit_of_measurement’: ‘kWh’, ‘device_class’: ‘energy’, ‘state_class’: ‘total_increasing’, ‘scan_interval’: 30} Komfovent Supply Flow volume: count: 2 cannot be combined with data_type: uint32 @ data[‘modbus’][0][‘sensors’][20]. Got {‘name’: ‘Komfovent Supply Flow volume’, ‘address’: 905, ‘count’: 2, ‘data_type’: ‘uint32’, ‘input_type’: ‘holding’, ‘precision’: 0, ‘unit_of_measurement’: ‘m³/h’, ‘scan_interval’: 10}. (See ?, line ?).

OK
"

Edit: Looks like same problem: https://github.com/home-assistant/core/issues/101437

Just remove “count” from the configuration file

1 Like

Have just set this up, Adjusted lovelace a little bit, because i use C8 unit and also dont have co2 sensor, the only not workig thing is state of the current mode, anybody solve this before ?

how did you fix the ± with set fan and degrees?

Do you have the MODBUS spec for this controller? It might be on their website. Current status is a bit tricky to extract. If they have changed the bit order that will be why.

[edit]
I found the MODBUS spec here ( Downloads | Komfovent filter on MODBUS) there are differences, but the current status looks the same.

Do you mean the colour changing? Anything in the log?

In case anyone is interested. This is how you can test your C8 modbus readings from a linux terminal.

mbpoll -m tcp -a 1 -t 4 -r 914 -c 1 -1 192.168.1.12 -o 2 -p 502 -l 2000

This command includes:

    -m tcp: Specifies Modbus TCP mode.
    -a 1: Sets the slave address to 1.
    -t 4: Chooses the data type for 16-bit output (holding) registers.
    -r 914: Specifies the start reference, which corresponds to the Modbus register address you want to read.
    -c 1: Defines the number of registers to read, in this case, just one.
    -1 192.168.1.12: Specifies the IP address of the Modbus device.
    -o 2: Sets a timeout of 2 seconds.
    -p 502: Sets the TCP port to 502.
    -l 2000: Sets the poll rate to 2000 milliseconds.
1 Like

if there are python devs maybe someone would be able to help develop custom integration that is using html to read and control Komfovent device.
ProstoSanja/komfovent-api-python: WIP (github.com)
as for a start just few functions are working

p.s. this is not my project, just sharing but someone had interesting idea to approach this

1 Like

Integration without fiddling with modbus would be nice!