KWB Integration

Hello,

I would like to integrate my KWB Easyfire2 with Comfort 3 and a network card for comfort-online into HomeAssistant.
Since ComfortOnline unfortunately keeps crashing, I would like to map my KWK Easyfire2 to HomeAssistant.

In Comfort3, I selected ‘Webinterface’ under Grundeinstellungen/Hardware, and under software is Copmfortonline and Intercom enabled. For Intercom, I entered the IP address configured for the Easyfire2 in my Fritzbox.

I have now entered the following in the configuration.yaml:

  • platform: kwb
    name: kwb
    host: 192.168.0.174
    port: 502
    type: tcp
    raw: False

Unfortunately, I only get the following displayed in HomeAssistant:

I have already tried ports 22 and 23 without success.

Can someone please help me.

Hello.
Please show your yaml file for the modbus config.
Regards
R.

Hello,

Thank you for your reply.

I’ve partially managed to get it working now.
See my Modbus config:

  - name: kwb
    type: tcp
    host: 192.168.0.174
    port: 502
    sensors:
      - name: Anlage Ein/AUS
        address: 2300
        slave: 1
        input_type: input
        unique_id: 1
      - name: KesselVTSoll
        address: 2301
        device_class: temperature
        state_class: measurement
        unit_of_measurement: "°C"
        slave: 1
        scale: 1.0
        input_type: input
        precision: 1
        unique_id: 2
      - name: Kesselanforderung
        address: 2334
        slave: 1
        input_type: input
        unique_id: 3
      - name: Betriebsstunden
        address: 2337
        slave: 1
        input_type: input
        unit_of_measurement: "h"
        state_class: measurement
        unique_id: 4
      - name: Kesselleistung
        address: 2338
        slave: 1
        state_class: measurement
        unit_of_measurement: "%"
        scale: 1.0
        input_type: input
        unique_id: 5
      - name: Kesselstatus
        address: 2339
        slave: 1
        input_type: input
        unique_id: 6
      - name: Rauchgastemperatur
        address: 2346
        device_class: temperature
        state_class: measurement
        unit_of_measurement: "°C"
        slave: 1
        scale: 1.0
        input_type: input
        precision: 1
        unique_id: 7
      - name: KesselVT
        address: 2347
        device_class: temperature
        state_class: measurement
        unit_of_measurement: "°C"
        slave: 1
        scale: 1.0
        input_type: input
        precision: 1
        unique_id: 8
      - name: KesselRT
        address: 2348
        device_class: temperature
        state_class: measurement
        unit_of_measurement: "°C"
        slave: 1
        scale: 1.0
        input_type: input
        precision: 1
        unique_id: 9
      - name: Sauerstoff Ist
        address: 2349
        state_class: measurement
        unit_of_measurement: "%"
        slave: 1
        scale: 0.1
        input_type: input
        precision: 1
        unique_id: 10
      - name: Unterdruck
        address: 2351
        state_class: measurement
        unit_of_measurement: "mbar"
        slave: 1
        scale: 0.01
        input_type: input
        precision: 1
        unique_id: 11
      - name: Hauptantrieb Strom
        address: 2354
        state_class: measurement
        unit_of_measurement: "A"
        slave: 1
        scale: 0.1
        input_type: input
        precision: 1
        unique_id: 12
      - name: Reinigungsmotor Ein/Aus
        address: 2359
        state_class: measurement
        slave: 1
        scale: 1.0
        input_type: input
        precision: 0
        unique_id: 13
      - name: Zundung Heizung Ein/Aus
        address: 2361
        state_class: measurement
        slave: 1
        scale: 1.0
        input_type: input
        precision: 0
        unique_id: 14
      - name: Mischer RL Aus/Auf/Zu
        address: 2362
        state_class: measurement
        slave: 1
        scale: 1.0
        input_type: input
        precision: 0
        unique_id: 15
      - name: Saugturbine Ein/Aus
        address: 2364
        state_class: measurement
        slave: 1
        scale: 1.0
        input_type: input
        precision: 0
        unique_id: 16
      - name: Gebläsestufe
        address: 2376
        state_class: measurement
        unit_of_measurement: "%"
        slave: 1
        scale: 1.0
        input_type: input
        precision: 0
        unique_id: 17
      - name: Saugzugstufe
        address: 2377
        state_class: measurement
        unit_of_measurement: "%"
        slave: 1
        scale: 1.0
        input_type: input
        precision: 0
        unique_id: 18
      - name: Hauptantrieb Einschubzeit
        address: 2386
        state_class: measurement
        unit_of_measurement: "s"
        slave: 1
        scale: 1.0
        input_type: input
        precision: 1
        unique_id: 19
      - name: Hauptantrieb Periodendauer
        address: 2387
        state_class: measurement
        unit_of_measurement: "s"
        slave: 1
        scale: 1.0
        input_type: input
        precision: 1
        unique_id: 20
      - name: Brennstofffaktor
        address: 2391
        state_class: measurement
        unit_of_measurement: "%"
        slave: 1
        scale: 1.0
        input_type: input
        precision: 0
        unique_id: 21
      - name: Kessel Solltemperatur
        address: 2392
        device_class: temperature
        state_class: measurement
        unit_of_measurement: "°C"
        slave: 1
        scale: 1.0
        input_type: input
        precision: 1
        unique_id: 22
      - name: Sauerstoff Soll
        address: 2395
        state_class: measurement
        unit_of_measurement: "%"
        slave: 1
        scale: 0.1
        input_type: input
        precision: 1
        unique_id: 23
      - name: Raumaustragung Strom
        address: 2404
        state_class: measurement
        unit_of_measurement: "A"
        slave: 1
        scale: 0.1
        input_type: input
        precision: 1
        unique_id: 24
      - name: Einschub
        address: 2430
        state_class: measurement
        unit_of_measurement: "%"
        slave: 1
        scale: 1.0
        input_type: input
        precision: 1
        unique_id: 25
      - name: Boiler 0 Isttemperatur
        address: 2434
        device_class: temperature
        state_class: measurement
        unit_of_measurement: "°C"
        scale: 0.1
        slave: 1
        input_type: input
        precision: 1
        unique_id: 26
      - name: Boiler 0 Pumpe
        address: 2435
        state_class: measurement
        slave: 1
        input_type: input
        precision: 0
        unique_id: 27
      - name: Boiler 0 Schnellladung
        address: 2490
        state_class: measurement
        slave: 1
        input_type: input
        precision: 0
        unique_id: 28
      - name: Boiler 0 Programm
        address: 2491
        state_class: measurement
        slave: 1
        input_type: input
        precision: 0
        unique_id: 29
      - name: HK1 AT
        address: 2442
        device_class: temperature
        state_class: measurement
        unit_of_measurement: "°C"
        scale: 0.1
        slave: 1
        input_type: input
        precision: 1
        unique_id: 30
      - name: HK1 Programm
        address: 2493
        state_class: measurement
        slave: 1
        input_type: input
        precision: 0
        unique_id: 31
      - name: HK1 RaumT
        address: 2443
        device_class: temperature
        state_class: measurement
        unit_of_measurement: "°C"
        scale: 0.1
        slave: 1
        input_type: input
        precision: 1
        unique_id: 32
      - name: HK1 VT
        address: 2444
        device_class: temperature
        state_class: measurement
        unit_of_measurement: "°C"
        scale: 0.1
        slave: 1
        input_type: input
        precision: 1
        unique_id: 33
      - name: HK1 Pumpe
        address: 2445
        state_class: measurement
        slave: 1
        input_type: input
        precision: 0
        unique_id: 34
      - name: HK2 AT
        address: 2446
        device_class: temperature
        state_class: measurement
        unit_of_measurement: "°C"
        scale: 0.1
        slave: 1
        input_type: input
        precision: 1
        unique_id: 35
      - name: HK2 Programm
        address: 2494
        state_class: measurement
        slave: 1
        input_type: input
        precision: 0
        unique_id: 36
      - name: HK2 RaumT
        address: 2447
        device_class: temperature
        state_class: measurement
        unit_of_measurement: "°C"
        scale: 0.1
        slave: 1
        input_type: input
        precision: 1
        unique_id: 37
      - name: HK2 VT
        address: 2448
        device_class: temperature
        state_class: measurement
        unit_of_measurement: "°C"
        scale: 0.1
        slave: 1
        input_type: input
        precision: 1
        unique_id: 38
      - name: HK2 Pumpe
        address: 2449
        state_class: measurement
        slave: 1
        input_type: input
        precision: 0
        unique_id: 39
      - name: Flammtemperatur
        address: 2350
        scan_interval: 30
        device_class: temperature
        state_class: measurement
        unit_of_measurement: "°C"
        slave: 1
        scale: 1.0
        input_type: input
        precision: 0
        unique_id: 40

What I unfortunately haven’t managed to do yet is the data from HK3 onwards. Here the offsets (address) are used twice. I don’t have a solution yet.

Please provide the adresses you are using for the HK3 - HKx
Do you know the correct Adresses for the HK3-HKx?
Note: They have not the same structure as HK1 and HK2
e.g. adress 2500 is for HK3 : The LowByte shows the Outside Temperature, the Highbyte shows the Heating Program of it.
adress 2501 Highbyte shows: RoomTemperature of HK3
adress 2501 Lowbyte shows: Actual FF Temperature of HK3
adress 2502 Highbyte shows: Pump of HK3
adress 2502 Lowbyte shows: Heating Progam of HK4 !!!
Regards

Hello,

Thank you for the answer.
I use address 2500 - 2502…as you mentioned.
How do I distinguish between low and high byte in the modbus.yaml?

Kind regards

In HA you have to work with so called templates.
(I`m sure there are better explanations like mine :slight_smile: )
e.g.

# For Register 2500 the modbusconfig could look like this:
  sensors:
    - name: "Modbus_Register_2500_Raw" # Name for the Rawvalue
      slave: 1                          # Modbus Slave ID (Unit ID)
      address: 2500                    # Registeradress 
      input_type: input      
      data_type: uint16

etc.

and then you need a template for seperating into high and Lowbyte:
e.g. (perhaps in configuration.yaml or in a seperate included config file

template:
  - sensor:
      - name: "Modbus_Register_2500_High_Byte"
        unique_id: modbus_reg_2500_high_byte
        state: >
          {% set raw_value = states('sensor.Modbus_Register_2500_Raw') | int(default=0) %}
          {{ (raw_value / 256) | int }}
      - name: "Modbus_Register_2500_Low_Byte"
        unique_id: modbus_reg_2500_low_byte
        state: >
          {% set raw_value = states('sensor.Modbus_Register_2500_Raw') | int(default=0) %}
          {{ raw_value % 256 }}

If I made no mistakes, then the values can be found in modbus_reg_2500_high_byte and modbus_reg_2500_low_byte
I hope this clarifies the open points

1 Like

:+1: :+1:
Thats it
:+1: :+1:

Thank you

1 Like

Hello again,

Now I’m able to read data via modbus…but…how can I write e.g. boiler fast charging (offset/address 2490) via modbus to Easyfire?

Regards
Manfred

Hello,
I’m jumping on this thread because I’ve been trying to do the same thing since ComfortOnline has been very unstable.
I have an Easy Fire 1 boiler and a Comfort 3. I have two heating circuits (1 and 3), a water heater, and a buffer tank.
I tried the KWB integration, but nothing comes up.
So I see that I have to use Modbus. I’m getting some information there, but I’m having trouble connecting the addresses to what they’re reporting. Is there comprehensive documentation to help me properly use this information?
With Modbus, how far can I go? Could I modify the heating programs, for example?
Sorry for my English, I’m French.

Hello,

So far, I’m only able to read data from Easyfire 2.
I think, on Easyfire 1 the parameter are not the same as on Easyfire 2.

The easiest way would be to organize the parameter list from KWB Support.
Or you can try reading the data with QModMaster and then possibly assigning it to the individual data using comfortonline.
For the Easyfire 2, the relevant data begins with address 2300.

Kind regards
Manfred

Hey Guys,
i have the same problem. I connected my easyfire from 2008 with comfort 3.
i used a usr-dr302 to connect the easyfire to my lan.

but i still get this screen

thats my whole yaml:

Loads default set of integrations. Do not remove.

default_config:

Load frontend themes from the themes folder

frontend:
themes: !include_dir_merge_named themes

automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml

Example configuration.yaml entry

sensor:

  • platform: kwb
    name: kwb
    host: 192.168.178.189
    port: 23
    type: tcp
    raw: false

Im very new into homeassistant, so i dont know how to get the data of my heater.
the next problem ist, that my english ist not rather good - sorry

Perhaps someone can help me?

Hello,
From what I understand, the integration provided by HomeAssistant doesn’t work at all, so you have to query the boiler via the Modbus protocol.
At the beginning of the discussion, you can find MaKi68’s Modbus configuration; it’s a basic way to retrieve information: just change the IP address in the hosts field to that of your boiler and see if anything comes up.

For my part, KWB support sent me an address mapping file, but it’s identical to what I was able to find online, so I’ll take the time to configure it properly… when I have time.
And unfortunately, I don’t think you can change the heating circuit program, which is what I was most interested in :frowning: I managed to do it

@MaKi68
you asked to write on address 2490, I do the same thing for 2493
I create scripts

kwb_mode_off:
  alias: "KWB Mode OFF"
  sequence:
    - service: modbus.write_register
      data:
        hub: kwb
        unit: 1
        address: 2493
        value: 4

kwb_mode_transition:
  alias: "KWB Mode Transition"
  sequence:
    - service: modbus.write_register
      data:
        hub: kwb
        unit: 1
        address: 2493
        value: 2
1 Like

@_fp
Thank you! It’s running!

Hello,
thank you for sharing your progress.
With the help of your informations I have also managed to get some data from my 2008 Multifire (Comfort3 & Comfort Online (and Comfort Intercom as part of it?)).
I had to activate Intercom first and copy MaKi68’s HA-config.
The KWB-ModbusInfo-File file i could find online called for Adresses like 8197 - I think that is for “Comfort 4”-Units?
Called KWB-Support today and they sent me the correct Address-mapping-file “Intercom_parameter_…xls”(I had to tell him the currently intalled Software-Version on my Multifire)

Hi everyone, how did you handle the operating hours? Mine isn’t showing anything. Does it have something to do with the “long” type, or what do I need to change?

Hallo Leute
wie habt ihr das mit den Betriebsstunden gemacht? dort wird bei mir nichts angezeigt. hat das was mit dem typ “long” zu tun bzw was müsste ich hier ändern?

Hallo,
Wenn du einen EF2 hast, ist 2337 (nicht 2336) die richtige Adresse.

Hello,
If you have an EF2, 2337 (not 2336) is the correct address.

Kind regards
Manfred

Hallo
Nein hab einen Multifire 2 mit Comfort 3 und mein Adresse ist 2337.
Hätte da gleich noch eine Frage.
Man muss ja ein template erstellen zum trennen von High_Byte und Low_Byte.
Hab ich ganz gleich gemacht , nur lässt sich nicht per Skript das HK3 Programm ( mit High_Byte ) ändern. Adresse 2500
Bei HK4 (Low_Byte) mit Adresse 2502 funktioniert es.
Wiederum bei HK5 (High_Byte) mit Adresse 2505 lässt sich auch nicht ändern.
Liegt das irgendwie am High- oder Low_Byte?

Tröttl hier schon ewig mit Modbus und KWB herum

Hallo,
Du kannst mit dem Programm QModmaster alle Adressen abfragen, und so möglicherweise richtig zuordnen.
Leider kann ich dir zum Problem mit Low_byte und High_byte nicht weiterhelfen.

Hello,
You can use QModmaster to query all addresses and potentially assign them correctly.
Unfortunately, I can’t help you with the problem involving Low_byte and High_byte.

Hi,

is anyoune open to share the yaml code for the Modbus connection and at least 1 sensor as a template? I use Classicfire 2 with Comfort 4 controller. I can enter my own values for IP address, port number and address for specific sensor.
Thank you!