Opentherm gateway/thermostat with full integration for Home Assistant

Why? Describe in more detail pls

I’m sorry if I sound dumb but I’m pretty new with HA :wink:
my bad! I do have a device called “opemtherm gateway”.

to add the automation, I had to add them in “automation” menu rather than directly through the device. the “+” doesn’t do anything, same for the scripts.
The automation for the external temperature and internal are working fine.

What I would like to have and try to understand, is this scenario for instance:
Automatic temperature: everyday, from 7h30 until 22h30, temperature should be 19°c and outside this timeslot it should be 15°c.
Vacance scenario: I would like to have a button for the scenario “vacation” and force the temperature to 10°.
=> automatic temperature is the normal way until the “vacation” scenario is activated.

What I understand for this, the trigger would be time, “07:30:00”; if condition [I have created a sensor “vacances” which is “on” or “off”`] entity “sensor.vacances” = “off”.

but then, what would be the action?

Also, the other point I need to know is creating an automation will trigger the action only at the time defined. if at 9h00, I change the temperature to 20°, this temperature will stay until 22h30 and afterwards it’s the second automation starting and will change the temperature to 15°
So in otherwords, the automation will still be active. I’m pretty sure the answer is yes.

thanks for your time :slight_smile:

The firmware has been successfully burned, but after ESP8266 is powered on again, it cannot search for Opentnerm’s WIFI signal. May I ask what is the situation

@pyromana firmware does not really have built-in schedules and modes (vacation/not at home/etc), because it is easier and more correct to do this using automation.
I think you could use the Schedule integration to set the temperature based on time and the Input boolean integration for vacation mode. These integrations can be created via a graphical interface. In this case, only one automation can be created. Example of automation (not tested):

alias: Set heating temp
description: ""
trigger:
  - platform: state
    entity_id:
      - schedule.work_time
    from: "on"
    to: "off"
    id: work_time_off
  - platform: state
    entity_id:
      - schedule.work_time
    from: "off"
    to: "on"
    id: work_time_on
  - platform: state
    entity_id:
      - input_boolean.vacation
    from: "on"
    to: "off"
    id: vacation_off
  - platform: state
    entity_id:
      - input_boolean.vacation
    from: "off"
    to: "on"
    id: vacation_on
condition: []
action:
  - if:
      - condition: trigger
        id:
          - work_time_off
      - condition: state
        entity_id: input_boolean.vacation
        state: "off"
    then:
      - service: climate.set_temperature
        target:
          entity_id: climate.opentherm_heating
        data:
          temperature: 22
  - if:
      - condition: trigger
        id:
          - work_time_on
      - condition: state
        entity_id: input_boolean.vacation
        state: "off"
    then:
      - service: climate.set_temperature
        target:
          entity_id: climate.opentherm_heating
        data:
          temperature: 20
  - if:
      - condition: trigger
        id:
          - vacation_off
    then:
      - service: climate.set_temperature
        target:
          entity_id: climate.opentherm_heating
        data:
          temperature: 22
  - if:
      - condition: trigger
        id:
          - vacation_on
    then:
      - service: climate.set_temperature
        target:
          entity_id: climate.opentherm_heating
        data:
          temperature: 10
mode: single

@qiuliunian look at the logs via the serial port. Probably you flashed the wrong image or to the wrong address.

After burning the firmware, I couldn’t find Opentherm’s WiFi signal. This is my log. Could you please help me check where the error is

*************************** START ****************************

START TIME: 202408120902

CONNECT BAUD: 115200
set state: ESP_DL_SYNC
serial port opened

baud:115200
root baud:115200

===============BAUD : 115200===============CALL DEVICE SYNC
connecting…
0x3ff00050: 41720000
0x3ff00054: 02007e9f
0x3ff00058: c900b000
0x3ff0005c: 00500291
check_err_0: 0bcheck_err_1: 00check_err_2: 00check_err_3: 02check_err_4: 0b====================
EFUSE NORMAL MODE

=========================
CRC IN MODE 1:
crc_calc_res: 201
target crc val: 201

=========================
CRC IN MODE 1:
crc_calc_res: 114
target crc val: 114

==================
EFUSE LOG:

EFUSE LOG:


REG0:41720000

REG1:02007E9F

REG2:c900b000

REG3:00500291


====================

EFUSE NORMAL MODE

====================

EFUSE CHECK PASS…48bit mac

50 02 91 7e 9f 41CUSTOM_ID: 0C 90 00 00 00 07 20 00
MAC AP : 52-02-91-7E-9F-41
MAC STA: 50-02-91-7E-9F-41
get mac res: 1
get flash id : 0x001660c4

manufacturer_id: 0xc4

device_id: 0x6016

com closed
Use time: 0 s

Download result: PASS

*************************** END ****************************

*************************** START ****************************

START TIME: 202408120902

CONNECT BAUD: 115200
set state: ESP_DL_SYNC
serial port opened

baud:115200
root baud:115200

===============BAUD : 115200===============CALL DEVICE SYNC
connecting…
0x3ff00050: 41720000
0x3ff00054: 02007e9f
0x3ff00058: c900b000
0x3ff0005c: 00500291
check_err_0: 0bcheck_err_1: 00check_err_2: 00check_err_3: 02check_err_4: 0b====================
EFUSE NORMAL MODE

=========================
CRC IN MODE 1:
crc_calc_res: 201
target crc val: 201

=========================
CRC IN MODE 1:
crc_calc_res: 114
target crc val: 114

==================
EFUSE LOG:

EFUSE LOG:


REG0:41720000

REG1:02007E9F

REG2:c900b000

REG3:00500291


====================

EFUSE NORMAL MODE

====================

EFUSE CHECK PASS…48bit mac

50 02 91 7e 9f 41CUSTOM_ID: 0C 90 00 00 00 07 20 00
MAC AP : 52-02-91-7E-9F-41
MAC STA: 50-02-91-7E-9F-41
get mac res: 1
get flash id : 0x001660c4

manufacturer_id: 0xc4

device_id: 0x6016

Wrote 1024000 bytes at 0x00300000 in 6.6 seconds (effective 1250.3 kbit/s)…

Hash of data verified.
Leaving…

com closed
Use time: 8 s

Download result: PASS

*************************** END ****************************

*************************** START ****************************

START TIME: 202408120940

CONNECT BAUD: 115200
set state: ESP_DL_SYNC
serial port opened

baud:115200
root baud:115200

===============BAUD : 115200===============CALL DEVICE SYNC
connecting…
0x3ff00050: 41720000
0x3ff00054: 02007e9f
0x3ff00058: c900b000
0x3ff0005c: 00500291
check_err_0: 0bcheck_err_1: 00check_err_2: 00check_err_3: 02check_err_4: 0b====================
EFUSE NORMAL MODE

=========================
CRC IN MODE 1:
crc_calc_res: 201
target crc val: 201

=========================
CRC IN MODE 1:
crc_calc_res: 114
target crc val: 114

==================
EFUSE LOG:

EFUSE LOG:


REG0:41720000

REG1:02007E9F

REG2:c900b000

REG3:00500291


====================

EFUSE NORMAL MODE

====================

EFUSE CHECK PASS…48bit mac

50 02 91 7e 9f 41CUSTOM_ID: 0C 90 00 00 00 07 20 00
MAC AP : 52-02-91-7E-9F-41
MAC STA: 50-02-91-7E-9F-41
get mac res: 1
get flash id : 0x001660c4

manufacturer_id: 0xc4

device_id: 0x6016

com closed
Use time: 1 s

Download result: PASS

*************************** END ****************************

*************************** START ****************************

START TIME: 202408120940

CONNECT BAUD: 115200
set state: ESP_DL_SYNC
serial port opened

baud:115200
root baud:115200

===============BAUD : 115200===============CALL DEVICE SYNC
connecting…
0x3ff00050: 41720000
0x3ff00054: 02007e9f
0x3ff00058: c900b000
0x3ff0005c: 00500291
check_err_0: 0bcheck_err_1: 00check_err_2: 00check_err_3: 02check_err_4: 0b====================
EFUSE NORMAL MODE

=========================
CRC IN MODE 1:
crc_calc_res: 201
target crc val: 201

=========================
CRC IN MODE 1:
crc_calc_res: 114
target crc val: 114

==================
EFUSE LOG:

EFUSE LOG:


REG0:41720000

REG1:02007E9F

REG2:c900b000

REG3:00500291


====================

EFUSE NORMAL MODE

====================

EFUSE CHECK PASS…48bit mac

50 02 91 7e 9f 41CUSTOM_ID: 0C 90 00 00 00 07 20 00
MAC AP : 52-02-91-7E-9F-41
MAC STA: 50-02-91-7E-9F-41
get mac res: 1
get flash id : 0x001660c4

manufacturer_id: 0xc4

device_id: 0x6016

Wrote 1024000 bytes at 0x00300000 in 6.5 seconds (effective 1250.9 kbit/s)…

Hash of data verified.
Leaving…

com closed
Use time: 8 s

Download result: PASS

*************************** END ****************************

*************************** START ****************************

START TIME: 202408120955

CONNECT BAUD: 115200
set state: ESP_DL_SYNC
serial port opened

baud:115200
root baud:115200

===============BAUD : 115200===============CALL DEVICE SYNC
connecting…
0x3ff00050: 41720000
0x3ff00054: 02007e9f
0x3ff00058: c900b000
0x3ff0005c: 00500291
check_err_0: 0bcheck_err_1: 00check_err_2: 00check_err_3: 02check_err_4: 0b====================
EFUSE NORMAL MODE

=========================
CRC IN MODE 1:
crc_calc_res: 201
target crc val: 201

=========================
CRC IN MODE 1:
crc_calc_res: 114
target crc val: 114

==================
EFUSE LOG:

EFUSE LOG:


REG0:41720000

REG1:02007E9F

REG2:c900b000

REG3:00500291


====================

EFUSE NORMAL MODE

====================

EFUSE CHECK PASS…48bit mac

50 02 91 7e 9f 41CUSTOM_ID: 0C 90 00 00 00 07 20 00
MAC AP : 52-02-91-7E-9F-41
MAC STA: 50-02-91-7E-9F-41
get mac res: 1
get flash id : 0x001660c4

manufacturer_id: 0xc4

device_id: 0x6016

com closed
Use time: 2 s

Download result: PASS

*************************** END ****************************

*************************** START ****************************

START TIME: 202408120955

CONNECT BAUD: 115200
set state: ESP_DL_SYNC
serial port opened

baud:115200
root baud:115200

===============BAUD : 115200===============CALL DEVICE SYNC
connecting…
0x3ff00050: 41720000
0x3ff00054: 02007e9f
0x3ff00058: c900b000
0x3ff0005c: 00500291
check_err_0: 0bcheck_err_1: 00check_err_2: 00check_err_3: 02check_err_4: 0b====================
EFUSE NORMAL MODE

=========================
CRC IN MODE 1:
crc_calc_res: 201
target crc val: 201

=========================
CRC IN MODE 1:
crc_calc_res: 114
target crc val: 114

==================
EFUSE LOG:

EFUSE LOG:


REG0:41720000

REG1:02007E9F

REG2:c900b000

REG3:00500291


====================

EFUSE NORMAL MODE

====================

EFUSE CHECK PASS…48bit mac

50 02 91 7e 9f 41CUSTOM_ID: 0C 90 00 00 00 07 20 00
MAC AP : 52-02-91-7E-9F-41
MAC STA: 50-02-91-7E-9F-41
get mac res: 1
get flash id : 0x001660c4

manufacturer_id: 0xc4

device_id: 0x6016

Wrote 1024000 bytes at 0x00300000 in 6.6 seconds (effective 1250.1 kbit/s)…

Hash of data verified.
Leaving…

com closed
Use time: 8 s

Download result: PASS

*************************** END ****************************

@qiuliunian do you flash according to these instructions? I don’t see any information in your logs about writing to address 0x0 (firmware).

I am using ESP8266 and the input is 0x300000

The filesystem must be written to address 0x300000, the firmware must be written to address 0x0. Please read the instructions.

Do I need to burn both the file system and firmware into it

Yes, it is necessary

thanks !
so the service that need to be called is “climate.set_temperature”. I’ll see what I can do with an autoation using time as trigger.
I will mess up with HA and turn back once .

Boss, I have successfully burned it. Thank you very much. Can you add Chinese language

so i think i’ve managed, I’ve done it 5 automations :rofl: but should work, I guess

automatic to 19°c during the day:

alias: on-auto-19°c
description: ""
trigger:
  - platform: time
    at: "07:00:00"
condition:
  - condition: state
    entity_id: sensor.vacances
    state: "off"
action:
  - action: climate.set_temperature
    target:
      entity_id: climate.opentherm_heating
    data:
      temperature: 19
mode: single

automatic to 15°c during the night:

alias: off-auto-15°c
description: ""
trigger:
  - platform: time
    at: "22:30:00"
condition:
  - condition: state
    entity_id: sensor.vacances
    state: "off"
action:
  - action: climate.set_temperature
    target:
      entity_id: climate.opentherm_heating
    data:
      temperature: 15
mode: single

vacantion mode:

alias: off-auto-15°c
description: ""
trigger:
  - platform: time
    at: "22:30:00"
condition:
  - condition: state
    entity_id: sensor.vacances
    state: "off"
action:
  - action: climate.set_temperature
    target:
      entity_id: climate.opentherm_heating
    data:
      temperature: 15
mode: single

when returning from vacation if during the day:

alias: retour-auto-19
description: ""
trigger:
  - platform: state
    entity_id:
      - sensor.vacances
    from: "off"
    to: "on"
condition:
  - condition: time
    after: "07:00:00"
    before: "22:30:00"
action:
  - action: climate.set_temperature
    target:
      entity_id: climate.opentherm_heating
    data:
      temperature: 19
mode: single

when returning from vacation if during the night:

alias: retour-auto-15
description: ""
trigger:
  - platform: state
    entity_id:
      - sensor.vacances
    from: "off"
    to: "on"
condition:
  - condition: time
    after: "22:30:00"
    before: "07:00:00"
action:
  - action: climate.set_temperature
    target:
      entity_id: climate.opentherm_heating
    data:
      temperature: 15
mode: single

I don’t speak Chinese, you can create a Chinese locale based on English and create a PR in the project repository on GitHub.

@pyromana :+1:

Boss, I failed to add a gateway using HA’s built-in OPENTHERM integration. The name I filled in was opentherm. Address filled in 192.168.0.5

After saving the wifi and mqtt settings on the device, the opentherm device will appear automatically in your home assistant. No need to use other integrations.

so, the different automation seems to work great. that’s a good news for me :slight_smile:
I have a question. When the thermostatis is turned off, in the middle, above thetemperature, there is the word “idle” and when we turn it on, it changes to “heating”.
As I don’t have an AC and only the possibility to heat the house, I was wondering how to change this info depending on the flame status.
I would like to have the thermostat turned red when the status of thhe flame (I guess binary_sensor.opentherm_flame) is “true” and turn (blue or grey) when the status of the flame is “false”.

Would it be possile to let me know whether it’s feasible? thanks

edit: i have another question. in the thermostat, you have the big numbers, this is the temperature asked. but what’s the other temperature below? I think it’s “opentherm gateway heating temprature”. so i guess it’s the temperature of the water in the heating système. am i right?
thanks

If PID and/or Equitherm mode is enabled and hysteresis is enabled, the status changes:

  • to idle if the firmware decides that there is no need heating home and the burner must be turned off;
  • to heating otherwise.

Not all boilers report the flame status, so this is not a good solution for all.

This also depends on whether PID and/or Equitherm mode is enabled. If enabled, then these are the indoor temperatures: setpoint and current. If not enabled, then the coolant setpoint and current.

May I ask if these automation codes should be placed in automations.yaml or configuration.yaml
The code in GitHub is as follows
Before creating automation you need to go to Settings page, in the Indoor sensor settings sections change the parameters:
Source type: Manual
And save the settings. After that, you can create automation. The automation code can be copied from here. Before saving, you need to change the entity IDs:

The source sensor from which we take the temperature

source_entity: “sensor.livingroom_temperature”

Target entity number where we set the temperature

To report indoor temperature: number.opentherm_indoor_temp

To report outdoor temperature: number.opentherm_outdoor_temp

target_entity: “number.opentherm_indoor_temp”

The automation code can be pasted when creating automation via the graphical interface (three dots on the top right → edit in yaml)