arthurrump / esphome-opentherm

Create your own smart modulating thermostat using the OpenTherm component for ESPHome
BSD 2-Clause "Simplified" License
69 stars 37 forks source link

I get "sabotaged" by max_t_set #12

Open Arise opened 1 year ago

Arise commented 1 year ago

For some reason, my boiler ends up with a max_t_set value set at 0. This is an "invalid" value anyway, because my boiler should only allow values like 40-80 (lower and higher bounds). But because my boiler setting is override from ESP OpenTherm, I end up with max_t_set as a zero value.

number:
  - platform: opentherm
    max_t_set:
      name: "Boiler Max Setpoint"
      min_value : 40
      max_value : 80

Even if I remove this from the config file I still get the problem.

Because of that my boiler is "stuck"/bugged, like the max temperature allowed is 0 so the boiler will never/ever heat water again. I feel a bit lucky because I found this very fast. I can fix this by going in the complicated/hard to access secret menu of my boiler and setting up the parameter to the right value. As soon as I touch the wheel it jumps from 0 back to the minimum 40 value, and I can go up to 80. This issue can also be fixed by setting the value in the HomeAssistant interface by setting the value manually at something higher than 40, like 80. After that my boiler will happily start heating water.

I tried also:

auto_min_value: true
auto_max_value: true

and still get the issue.

Not sure what zero_means_zero: true is supposed to do.

I don't know how to exclude it or prevent the ESP code to touch this parameter, it seems to always affect me even if I remove the code from the yaml config file.

Arise commented 1 year ago

Found a workaround as below:

esphome:
  name: testthermo3
  on_boot:
    priority: -100  
    then:
      number.set:
        id: max_t_set
        value: 76   

Also I had to add id: max_t_set to properly identify that in the on_boot block above.

number:
  - platform: opentherm
    max_t_set:
      id: max_t_set
      name: "Boiler Max Setpoint"
      min_value : 40
      max_value : 77

Now it seems to keep this at 76 degrees for my upper bound max heating value.

Also noticed this repeated in my logs:

[20:30:14][D][opentherm:157]: Building MaxTSet write request
[20:30:14][D][opentherm:251]: Sent OpenTherm request: 10394c00
[20:30:15][D][opentherm:201]: Received OpenTherm response with id 57: 50390000
[20:30:15][D][opentherm:216]: Received MaxTSet response
[20:30:15][D][sensor:127]: 'Boiler Maximum allowable CH water setpoint': Sending state 0.00000 °C with 2 decimals of accuracy

Is there a reason why this write request is repeated in the loop? Is this necessary? I understand when a read is done in a loop, but a write?