vindaalex / multizone-thermostat

This is a home assistant custom component. It is a thermostat including various control options, such as: on-off, PID, weather controlled. The thermostat can be used in stand-alone mode or as zoned heating (master- satellites).
35 stars 6 forks source link

Help with master-satellites configuration #13

Closed stomko11 closed 1 year ago

stomko11 commented 2 years ago

Hello. I started to use the thermostat to get better control of heating source turning on/off. Before, I used adrein.b's smart thermostat with PID, which works ok, but logic to turn main heater on/off is done simply outside of that, via automation. I check every 5 minutes if any zone needs heat. That, sometimes, results in turning it off while other zone will demand heat in a minute and will turn back on shortly, which is not ideal for heat pump.

I started with the following configuration:

- platform: multizone_thermostat
  name: master_thermostat
  sensor_out: sensor.espaltherma_outside
  sensor_filter: 3
  initial_hvac_mode: "off"
  initial_preset_mode: "none"
  precision: 0.1
  heat:
    entity_id: switch.heat_pump_switch
    initial_target_temp: 20
    away_temp: 17
    proportional_mode:
      control_interval:
        seconds: 60
      difference: 100
      minimal_diff: 5
      pwm:
        seconds: 600
      PID_mode:
        kp: 3
        ki: 0
        kd: 0
      weather_mode:
        ka: 2
        kb: -6
      MASTER_mode:
        satelites: [living_room, guest_room, bathroom, office, master_bathroom, master_bedroom, kids_room]
  sensor_stale_duration:
    hours: 12
  restore_from_old_state: False
  restore_parameters: False
  restore_integral: False

- platform: multizone_thermostat
  name: living_room
  sensor: sensor.aerq_temperature_and_humidity_sensor_v2_0_air_temperature_7
  sensor_filter: 3
  initial_hvac_mode: "off"
  initial_preset_mode: "none"
  precision: 0.1
  heat:
    entity_id: switch.underfloor_heating_ground_floor
    min_temp: 17
    max_temp: 28
    initial_target_temp: 20
    away_temp: 17
    proportional_mode:
      control_interval:
        seconds: 60
      difference: 100
      minimal_diff: 5
      pwm:
        seconds: 180
      PID_mode:
        kp: 30
        ki: 0.005
        kd: -24000
  sensor_stale_duration:
    hours: 12
  restore_from_old_state: False
  restore_parameters: False
  restore_integral: False

- platform: multizone_thermostat
  name: guest_room
  sensor: sensor.aerq_temperature_and_humidity_sensor_v2_0_air_temperature_5
  sensor_filter: 3
  initial_hvac_mode: "off"
  initial_preset_mode: "none"
  precision: 0.1
  heat:
    entity_id: switch.underfloor_heating_ground_floor_2
    min_temp: 17
    max_temp: 28
    initial_target_temp: 20
    away_temp: 17
    proportional_mode:
      control_interval:
        seconds: 60
      difference: 100
      minimal_diff: 5
      pwm:
        seconds: 180
      PID_mode:
        kp: 30
        ki: 0.005
        kd: -24000
  sensor_stale_duration:
    hours: 12
  restore_from_old_state: False
  restore_parameters: False
  restore_integral: False

- platform: multizone_thermostat
  name: bathroom
  sensor: sensor.aerq_temperature_and_humidity_sensor_v2_0_air_temperature_6
  sensor_filter: 3
  initial_hvac_mode: "off"
  initial_preset_mode: "none"
  precision: 0.1
  heat:
    entity_id: switch.underfloor_heating_ground_floor_3
    min_temp: 17
    max_temp: 28
    initial_target_temp: 20
    away_temp: 17
    proportional_mode:
      control_interval:
        seconds: 60
      difference: 100
      minimal_diff: 5
      pwm:
        seconds: 180
      PID_mode:
        kp: 30
        ki: 0.005
        kd: -24000
  sensor_stale_duration:
    hours: 12
  restore_from_old_state: False
  restore_parameters: False
  restore_integral: False

- platform: multizone_thermostat
  name: office
  sensor: sensor.aerq_temperature_and_humidity_sensor_v2_0_air_temperature
  sensor_filter: 3
  initial_hvac_mode: "off"
  initial_preset_mode: "none"
  precision: 0.1
  heat:
    entity_id: switch.underfloor_heating_1st_floor_4
    min_temp: 17
    max_temp: 28
    initial_target_temp: 20
    away_temp: 17
    proportional_mode:
      control_interval:
        seconds: 60
      difference: 100
      minimal_diff: 5
      pwm:
        seconds: 180
      PID_mode:
        kp: 30
        ki: 0.005
        kd: -24000
  sensor_stale_duration:
    hours: 12
  restore_from_old_state: False
  restore_parameters: False
  restore_integral: False

- platform: multizone_thermostat
  name: master_bathroom
  sensor: sensor.aerq_temperature_and_humidity_sensor_v2_0_air_temperature_2
  sensor_filter: 3
  initial_hvac_mode: "off"
  initial_preset_mode: "none"
  precision: 0.1
  heat:
    entity_id: switch.underfloor_heating_1st_floor
    min_temp: 17
    max_temp: 28
    initial_target_temp: 20
    away_temp: 17
    proportional_mode:
      control_interval:
        seconds: 60
      difference: 100
      minimal_diff: 5
      pwm:
        seconds: 180
      PID_mode:
        kp: 30
        ki: 0.005
        kd: -24000
  sensor_stale_duration:
    hours: 12
  restore_from_old_state: False
  restore_parameters: False
  restore_integral: False

- platform: multizone_thermostat
  name: master_bedroom
  sensor: sensor.aerq_temperature_and_humidity_sensor_v2_0_air_temperature_3
  sensor_filter: 3
  initial_hvac_mode: "off"
  initial_preset_mode: "none"
  precision: 0.1
  heat:
    entity_id: switch.underfloor_heating_1st_floor_2
    min_temp: 17
    max_temp: 28
    initial_target_temp: 20
    away_temp: 17
    proportional_mode:
      control_interval:
        seconds: 60
      difference: 100
      minimal_diff: 5
      pwm:
        seconds: 180
      PID_mode:
        kp: 30
        ki: 0.005
        kd: -24000
  sensor_stale_duration:
    hours: 12
  restore_from_old_state: False
  restore_parameters: False
  restore_integral: False

- platform: multizone_thermostat
  name: kids_room
  sensor: sensor.aerq_temperature_and_humidity_sensor_v2_0_air_temperature_4
  sensor_filter: 3
  initial_hvac_mode: "off"
  initial_preset_mode: "none"
  precision: 0.1
  heat:
    entity_id: switch.underfloor_heating_1st_floor_3
    min_temp: 17
    max_temp: 28
    initial_target_temp: 20
    away_temp: 17
    proportional_mode:
      control_interval:
        seconds: 60
      difference: 100
      minimal_diff: 5
      pwm:
        seconds: 180
      PID_mode:
        kp: 30
        ki: 0.005
        kd: -24000
  sensor_stale_duration:
    hours: 12
  restore_from_old_state: False
  restore_parameters: False
  restore_integral: False

Which resulted in too many on/offs in short cycles:

Turned off by service homeassistant.turn_off
6:31:27 AM - 39 minutes ago
Turned on by service homeassistant.turn_on
6:28:27 AM - 42 minutes ago
Turned off by service homeassistant.turn_off
6:20:27 AM - 1 hour ago
Turned on by service homeassistant.turn_on
6:17:27 AM - 1 hour ago
Turned off by service homeassistant.turn_off
6:09:27 AM - 1 hour ago
Turned on by service homeassistant.turn_on
6:06:27 AM - 1 hour ago
Turned off by service homeassistant.turn_off
5:58:27 AM - 1 hour ago
Turned on by service homeassistant.turn_on
5:55:27 AM - 1 hour ago
Turned off by service homeassistant.turn_off
5:47:27 AM - 1 hour ago
Turned on by service homeassistant.turn_on
5:44:27 AM - 1 hour ago
Turned off by service homeassistant.turn_off
5:36:27 AM - 2 hours ago
Turned on by service homeassistant.turn_on
5:33:27 AM - 2 hours ago
Turned off by service homeassistant.turn_off
5:25:27 AM - 2 hours ago
Turned on by service homeassistant.turn_on
5:22:27 AM - 2 hours ago
Turned off by service homeassistant.turn_off
5:14:27 AM - 2 hours ago
Turned on by service homeassistant.turn_on
5:11:27 AM - 2 hours ago
Turned off by service homeassistant.turn_off
5:03:27 AM - 2 hours ago
Turned on by service homeassistant.turn_on
5:00:27 AM - 2 hours ago
Turned off by service homeassistant.turn_off
4:52:27 AM - 2 hours ago
Turned on by service homeassistant.turn_on
4:49:27 AM - 2 hours ago
Turned off by service homeassistant.turn_off
4:41:27 AM - 2 hours ago
Turned on by service homeassistant.turn_on
4:38:27 AM - 3 hours ago
Turned off by service homeassistant.turn_off
4:30:27 AM - 3 hours ago
Turned on by service homeassistant.turn_on
4:27:27 AM - 3 hours ago
Turned off by service homeassistant.turn_off
4:18:27 AM - 3 hours ago
Turned on by service homeassistant.turn_on
4:15:27 AM - 3 hours ago
Turned off by service homeassistant.turn_off
4:07:27 AM - 3 hours ago
Turned on by service homeassistant.turn_on
4:05:27 AM - 3 hours ago
Turned off by service homeassistant.turn_off
3:56:27 AM - 3 hours ago
Turned on by service homeassistant.turn_on
3:53:27 AM - 3 hours ago
Turned off by service homeassistant.turn_off
3:45:27 AM - 3 hours ago
Turned on by service homeassistant.turn_on
3:42:27 AM - 3 hours ago
Turned off by service homeassistant.turn_off
3:34:27 AM - 4 hours ago
Turned on by service homeassistant.turn_on
3:32:27 AM - 4 hours ago
Turned off by service homeassistant.turn_off
3:23:27 AM - 4 hours ago
Turned on by service homeassistant.turn_on
3:21:27 AM - 4 hours ago
Turned off by service homeassistant.turn_off
3:12:27 AM - 4 hours ago
Turned on by service homeassistant.turn_on
3:10:27 AM - 4 hours ago
Turned off by service homeassistant.turn_off
3:01:27 AM - 4 hours ago
Turned on by service homeassistant.turn_on
2:59:27 AM - 4 hours ago
Turned off by service homeassistant.turn_off
2:50:27 AM - 4 hours ago
Turned on by service homeassistant.turn_on
2:48:27 AM - 4 hours ago
Turned off by service homeassistant.turn_off
2:39:27 AM - 5 hours ago
Turned on by service homeassistant.turn_on
2:37:27 AM - 5 hours ago
Turned off by service homeassistant.turn_off
2:28:27 AM - 5 hours ago
Turned on by service homeassistant.turn_on
2:26:27 AM - 5 hours ago

I am not using valves with position, just on/off. Weather compensation helps a bit as it won't take that much to heat the room if warmer outside, so that definitely helps to reduce the overshoot. My main heat source (heat pump) modulates the leaving water temperature based on outside temperature already, so this is really only about not running heating that long in particular zone.

With smart thermostat, I was using following values, I am not sure if I can just use them here as well, depending on the calculations:

  min_cycle_duration: 00:20:00
  kp : 100
  ki : 0.003
  kd : 220000
  ke: 0.588
  pwm : 02:00:00
  sampling_period: 00:10:00

I suspect pwm and min_cycle_duration could help me reduce those short on/offs?

For starters, I changed restore_* = False as suggested by you in forums. I also removed room_area for each room, and part of the configuration in the master thermostat, to use only PID and weather. I am not sure where to set pwm=0 as I have only on/off valves, and like in adrien's thermostat, where to set alternative to pwm, min cycle duration,... My goal here is to get better handling of main heat source, and its' on/off cycles.

stomko11 commented 2 years ago

I applied configuration recommended by you in the forum:

- platform: multizone_thermostat
  name: master_thermostat
  sensor_out: sensor.espaltherma_outside
  sensor_filter: 3
  initial_hvac_mode: "off"
  initial_preset_mode: "none"
  precision: 0.1
  heat:
    entity_id: switch.heat_pump_switch
    initial_target_temp: 20
    away_temp: 17
    proportional_mode:
      control_interval:
        seconds: 180
      difference: 100
      minimal_diff: 5
      pwm:
        seconds: 600
      PID_mode:
        kp: 3
        ki: 0
        kd: 0
      weather_mode:
        ka: 2
        kb: -6
      MASTER_mode:
        satelites: [living_room, guest_room, bathroom, office, master_bathroom, master_bedroom, kids_room]
        goal: 80
        kp: -0.15
        ki: 0
        kd: 0
  sensor_stale_duration:
    hours: 12
  restore_from_old_state: False
  restore_parameters: False
  restore_integral: False

- platform: multizone_thermostat
  name: living_room
  sensor: sensor.aerq_temperature_and_humidity_sensor_v2_0_air_temperature_7
  sensor_filter: 3
  initial_hvac_mode: "off"
  initial_preset_mode: "none"
  room_area: 40
  precision: 0.1
  heat:
    entity_id: switch.underfloor_heating_ground_floor
    min_temp: 17
    max_temp: 28
    initial_target_temp: 20
    away_temp: 17
    proportional_mode:
      control_interval:
        seconds: 600
      difference: 100
      minimal_diff: 5
      pwm:
        hours: 2
      PID_mode:
        kp: 100
        ki: 0.003
        kd: -220000
  sensor_stale_duration:
    hours: 12
  restore_from_old_state: False
  restore_parameters: False
  restore_integral: False

- platform: multizone_thermostat
  name: guest_room
  sensor: sensor.aerq_temperature_and_humidity_sensor_v2_0_air_temperature_5
  sensor_filter: 3
  initial_hvac_mode: "off"
  initial_preset_mode: "none"
  room_area: 20
  precision: 0.1
  heat:
    entity_id: switch.underfloor_heating_ground_floor_2
    min_temp: 17
    max_temp: 28
    initial_target_temp: 20
    away_temp: 17
    proportional_mode:
      control_interval:
        seconds: 600
      difference: 100
      minimal_diff: 5
      pwm:
        hours: 2
      PID_mode:
        kp: 100
        ki: 0.003
        kd: -220000
  sensor_stale_duration:
    hours: 12
  restore_from_old_state: False
  restore_parameters: False
  restore_integral: False

- platform: multizone_thermostat
  name: bathroom
  sensor: sensor.aerq_temperature_and_humidity_sensor_v2_0_air_temperature_6
  sensor_filter: 3
  initial_hvac_mode: "off"
  initial_preset_mode: "none"
  room_area: 10
  precision: 0.1
  heat:
    entity_id: switch.underfloor_heating_ground_floor_3
    min_temp: 17
    max_temp: 28
    initial_target_temp: 20
    away_temp: 17
    proportional_mode:
      control_interval:
        seconds: 600
      difference: 100
      minimal_diff: 5
      pwm:
        hours: 2
      PID_mode:
        kp: 100
        ki: 0.003
        kd: -220000
  sensor_stale_duration:
    hours: 12
  restore_from_old_state: False
  restore_parameters: False
  restore_integral: False

- platform: multizone_thermostat
  name: office
  sensor: sensor.aerq_temperature_and_humidity_sensor_v2_0_air_temperature
  sensor_filter: 3
  initial_hvac_mode: "off"
  initial_preset_mode: "none"
  room_area: 20
  precision: 0.1
  heat:
    entity_id: switch.underfloor_heating_1st_floor_4
    min_temp: 17
    max_temp: 28
    initial_target_temp: 20
    away_temp: 17
    proportional_mode:
      control_interval:
        seconds: 600
      difference: 100
      minimal_diff: 5
      pwm:
        hours: 2
      PID_mode:
        kp: 100
        ki: 0.003
        kd: -220000
  sensor_stale_duration:
    hours: 12
  restore_from_old_state: False
  restore_parameters: False
  restore_integral: False

- platform: multizone_thermostat
  name: master_bathroom
  sensor: sensor.aerq_temperature_and_humidity_sensor_v2_0_air_temperature_2
  sensor_filter: 3
  initial_hvac_mode: "off"
  initial_preset_mode: "none"
  room_area: 20
  precision: 0.1
  heat:
    entity_id: switch.underfloor_heating_1st_floor
    min_temp: 17
    max_temp: 28
    initial_target_temp: 20
    away_temp: 17
    proportional_mode:
      control_interval:
        seconds: 600
      difference: 100
      minimal_diff: 5
      pwm:
        hours: 2
      PID_mode:
        kp: 100
        ki: 0.003
        kd: -220000
  sensor_stale_duration:
    hours: 12
  restore_from_old_state: False
  restore_parameters: False
  restore_integral: False

- platform: multizone_thermostat
  name: master_bedroom
  sensor: sensor.aerq_temperature_and_humidity_sensor_v2_0_air_temperature_3
  sensor_filter: 3
  initial_hvac_mode: "off"
  initial_preset_mode: "none"
  room_area: 20
  precision: 0.1
  heat:
    entity_id: switch.underfloor_heating_1st_floor_2
    min_temp: 17
    max_temp: 28
    initial_target_temp: 20
    away_temp: 17
    proportional_mode:
      control_interval:
        seconds: 600
      difference: 100
      minimal_diff: 5
      pwm:
        hours: 2
      PID_mode:
        kp: 100
        ki: 0.003
        kd: -220000
  sensor_stale_duration:
    hours: 12
  restore_from_old_state: False
  restore_parameters: False
  restore_integral: False

- platform: multizone_thermostat
  name: kids_room
  sensor: sensor.aerq_temperature_and_humidity_sensor_v2_0_air_temperature_4
  sensor_filter: 3
  initial_hvac_mode: "off"
  initial_preset_mode: "none"
  room_area: 20
  precision: 0.1
  heat:
    entity_id: switch.underfloor_heating_1st_floor_3
    min_temp: 17
    max_temp: 28
    initial_target_temp: 20
    away_temp: 17
    proportional_mode:
      control_interval:
        seconds: 600
      difference: 100
      minimal_diff: 5
      pwm:
        hours: 2
      PID_mode:
        kp: 100
        ki: 0.003
        kd: -220000
  sensor_stale_duration:
    hours: 12
  restore_from_old_state: False
  restore_parameters: False
  restore_integral: False

However I found out that despite some rooms being in "heating" state, actually never triggered main thermostat, which stayed off. That was the case for few hours. So I modified the master thermostat only (satellites stayed intact) and used following:

- platform: multizone_thermostat
  name: master_thermostat
  sensor_out: sensor.espaltherma_outside
  sensor_filter: 3
  initial_hvac_mode: "off"
  initial_preset_mode: "none"
  precision: 0.1
  heat:
    entity_id: switch.heat_pump_switch
    initial_target_temp: 20
    away_temp: 17
    proportional_mode:
      control_interval:
        seconds: 180
      difference: 100
      minimal_diff: 5
      pwm:
        seconds: 600
      PID_mode:
        kp: 3
        ki: 0
        kd: 0
      weather_mode:
        ka: 2
        kb: -6
      MASTER_mode:
        satelites: [living_room, guest_room, bathroom, office, master_bathroom, master_bedroom, kids_room]
  sensor_stale_duration:
    hours: 12
  restore_from_old_state: False
  restore_parameters: False
  restore_integral: False

I observed that for about hour to discover that despite 3 of my satellite rooms were below setpoint (in some cases even by 0,5 degrees), they never switched to "heating", yet my main thermostat was kicking off few times for very short time (so I am wondering what triggered it if not satellites)

Turned off by service homeassistant.turn_off
9:17:59 AM - 6 minutes ago
Turned on by service homeassistant.turn_on
9:15:59 AM - 8 minutes ago
Turned off by service homeassistant.turn_off
9:06:59 AM - 17 minutes ago
Turned on by service homeassistant.turn_on
9:04:59 AM - 19 minutes ago
Turned off by service homeassistant.turn_off
8:55:59 AM - 28 minutes ago
Turned on by service homeassistant.turn_on
8:53:59 AM - 30 minutes ago
Turned off by service homeassistant.turn_off
8:44:59 AM - 39 minutes ago
Turned on by service homeassistant.turn_on
8:42:59 AM - 41 minutes ago

As last attempt, I used following master thermostat configuration (without weather mode):

- platform: multizone_thermostat
  name: master_thermostat
  sensor_out: sensor.espaltherma_outside
  sensor_filter: 3
  initial_hvac_mode: "off"
  initial_preset_mode: "none"
  precision: 0.1
  heat:
    entity_id: switch.heat_pump_switch
    initial_target_temp: 20
    away_temp: 17
    proportional_mode:
      control_interval:
        seconds: 180
      difference: 100
      minimal_diff: 5
      pwm:
        seconds: 600
      PID_mode:
        kp: 3
        ki: 0
        kd: 0
      MASTER_mode:
        satelites: [living_room, guest_room, bathroom, office, master_bathroom, master_bedroom, kids_room]
  sensor_stale_duration:
    hours: 12
  restore_from_old_state: False
  restore_parameters: False
  restore_integral: False

And despite few rooms being below setpoint, which did not trigger any of satellite thermostats to "heating" hvac action, I went ahead and changed setpoint on one of rooms to +3 degrees up. That instantly triggered satellite to "heating", however master thermostat did not react. I did wait about 30 minutes, and nothing changed.

I can't figure out what am I doing wrong - to get the rooms operate based on PID controller and weather mode and trigger main thermostat when satellites need heat.

vindaalex commented 2 years ago

Sorry to hear it is not working yet. To start with, could you paste the attribute data for the master and a satellite which should be 'on'.

stomko11 commented 2 years ago

Hello. Thanks for getting back to me. I am not sure i understand what should I provide. Can you elaborate? For instance, my "Master Bathroom" setpoint is 22.5 degrees, while current temperature is 22.1. I would expect after some time (i understand that there are calculations going on) hvac action should change to heating which should trigger main thermostat as this one controls heat pump (heating source). I have switched back to Smart thermostat now, but if you can specify what data to gather, I will switch back later, observe and report back. But maybe I have some Basic config issue? I would like to operate based on PID and weather. My valves are on/off so I do not need to partially open valves, I can't anyway. And my main heat source (switch defined in master thermostat) is also just on/off.

vindaalex commented 2 years ago

Hello. I started to use the thermostat to get better control of heating source turning on/off. Before, I used adrein.b's smart thermostat with PID, which works ok, but logic to turn main heater on/off is done simply outside of that, via automation. I check every 5 minutes if any zone needs heat. That, sometimes, results in turning it off while other zone will demand heat in a minute and will turn back on shortly, which is not ideal for heat pump. ..... I suspect pwm and min_cycle_duration could help me reduce those short on/offs?

For starters, I changed restore_* = False as suggested by you in forums. I also removed room_area for each room, and part of the configuration in the master thermostat, to use only PID and weather. I am not sure where to set pwm=0 as I have only on/off valves, and like in adrien's thermostat, where to set alternative to pwm, min cycle duration,... My goal here is to get better handling of main heat source, and its' on/off cycles.

Sorry missed this one.

vindaalex commented 2 years ago
- platform: multizone_thermostat
  name: master_thermostat
  sensor_out: sensor.espaltherma_outside
  sensor_filter: 3
  initial_hvac_mode: "off"
  initial_preset_mode: "none"
  precision: 0.1
  heat:
    entity_id: switch.heat_pump_switch
    initial_target_temp: 20
    away_temp: 17
    proportional_mode:
      control_interval:
        seconds: 180
      difference: 100
      minimal_diff: 5
      pwm:
        seconds: 600
      PID_mode:
        kp: 3
        ki: 0
        kd: 0
      weather_mode:
        ka: 2
        kb: -6
      MASTER_mode:
        satelites: [living_room, guest_room, bathroom, office, master_bathroom, master_bedroom, kids_room]
  sensor_stale_duration:
    hours: 12
  restore_from_old_state: False
  restore_parameters: False
  restore_integral: False

I observed that for about hour to discover that despite 3 of my satellite rooms were below setpoint (in some cases even by 0,5 degrees), they never switched to "heating", yet my main thermostat was kicking off few times for very short time (so I am wondering what triggered it if not satellites)

Turned off by service homeassistant.turn_off
9:17:59 AM - 6 minutes ago
Turned on by service homeassistant.turn_on
9:15:59 AM - 8 minutes ago
Turned off by service homeassistant.turn_off
9:06:59 AM - 17 minutes ago
Turned on by service homeassistant.turn_on
9:04:59 AM - 19 minutes ago
Turned off by service homeassistant.turn_off
8:55:59 AM - 28 minutes ago
Turned on by service homeassistant.turn_on
8:53:59 AM - 30 minutes ago
Turned off by service homeassistant.turn_off
8:44:59 AM - 39 minutes ago
Turned on by service homeassistant.turn_on
8:42:59 AM - 41 minutes ago

The on-off switching is corresponding with the set pwm duration of 600 seconds thus seems to be correct. The balance between on-off is defined by the PID and weather configuration. PID is acting on the averaged setpoint and room temp of all satelites and weather on difference between averaged room temp and outside temp. Both of them will contribute to the valve_pos ( in this case with difference =100 the valve_pos can be read as percentage on time). When you look in hte attributes of the master you can see the contribution of both.

vindaalex commented 2 years ago

Hello. Thanks for getting back to me. I am not sure i understand what should I provide. Can you elaborate?

in HA /developer-tools/state you can select/click the climate.master_thermostat. At the top of the page it will show all kind of data. Can you paste this data?

For instance, my "Master Bathroom" setpoint is 22.5 degrees, while current temperature is 22.1. I would expect after some time (i understand that there are calculations going on) hvac action should change to heating which should trigger main thermostat as this one controls heat pump (heating source).

the setpoint of the bathroom at 22.5 and a room temp of 22.1 should trigger the thermostat of the bathroom to heating. The master thermostat will only notice the a contribution of the bathroom equal to room_size/(sum of areas). So if the averaged room temps and setpoints results in a avg room temp larger than avg set point it will give a negative contribution to the master valve_pos. Thus it lowers the weather valve_pos.

I have switched back to Smart thermostat now, but if you can specify what data to gather, I will switch back later, observe and report back. But maybe I have some Basic config issue?

As a start to validate the config as used in PID_thermostat you could configure the multizone_thermostat with the same settings. I think the differences in code are limited and should give the same behaviour. Just configure each room, use your own heatpump automation and do not specify the master thermostat.

See below example (please check it)

- platform: multizone_thermostat
  name: _name of room_
  sensor: _sensor of room_
  sensor_filter: 2
  initial_hvac_mode: "off"
  initial_preset_mode: "none"
  precision: 0.1
  heat:
    entity_id: _switch of room_
    initial_target_temp: 20
    away_temp: 17
    proportional_mode:
      control_interval:
        seconds: 600
      difference: 100
      minimal_diff: 5
      pwm:
        hours: 2
      PID_mode:
        kp: 100
        ki: 0.003
        kd: -22000
      weather_mode:
        ka: 0.588
        kb: 0
  sensor_stale_duration:
    hours: 12
  restore_from_old_state: False
  restore_parameters: False
  restore_integral: False

I would like to operate based on PID and weather. My valves are on/off so I do not need to partially open valves, I can't anyway. And my main heat source (switch defined in master thermostat) is also just on/off.

In my case I use it with a district heating system so the required operation is different. If I understand it correctly the heatpump operates as follows:

So the the only behaviour of the master thermostat would be to operate as.

I think when you use the room thermostats as shown in the example above in combination with the master as presented below it might work.

- platform: multizone_thermostat
  name: master_thermostat
  sensor_out: sensor.espaltherma_outside
  sensor_filter: 2
  initial_hvac_mode: "off"
  initial_preset_mode: "none"
  precision: 0.1
  heat:
    entity_id: switch.heat_pump_switch
    initial_target_temp: 20
    away_temp: 17
    proportional_mode:
      control_interval:
        seconds: 600
      difference: 100
      minimal_diff: 5
      pwm:
        hours: 2
#      PID_mode:
#        kp: 3
#        ki: 0
#        kd: 0
#      weather_mode:
#        ka: 2
#        kb: -6
      MASTER_mode:
        satelites: [living_room, guest_room, bathroom, office, master_bathroom, master_bedroom, kids_room]
        goal: 0
        kp: -1
        ki: 0
        kd: 0
  sensor_stale_duration:
    hours: 12
  restore_from_old_state: False
  restore_parameters: False
  restore_integral: False

The pwm and control_interval are equal to the satelites thus should result (I expect) synchronus pwm cycles for all satelites and master. It might be that HA execution of the switch operation results in some changes between the pwm cycles but you check it easily yourself when the master thermostat on-off states deviate much with the most heat demanding satelite. I hope to have some time this week to check it for myself as well.

The commented (#) parts can be removed as it resulting in a independent/stand-alone on-off switching of the heatpump based on the outide temperature (weather_mode) and avg setpoint - room temp error (PID).

You want an in sync switch operation based on the most heat requirering satelite (max valve_pos of all satelites) which could be included by the below section in MASTER_mode

        goal: 0
        kp: -1
        ki: 0
        kd: 0

This PID controller operates based on the error between required valve_pos (goal) and the max valve_pos (error= goal - "max valve_pos"). With a goal=0 the error follows the max valve_pos times kp (-1) it results in a valve_pos (on-off switching) for the master equal to the most heat demanding satelite.

minimal_diff: 5 avoids running the heat pump when very limited heat is required and waits until more heat is needed. This could result in that the room temp in the most heat demanding room lowers as the heat pump ( and the room swithc as well as this has the same minimal_diff1) is not switched on yet.

vindaalex commented 2 years ago

For starters, I changed restore_* = False as suggested by you in forums. I also removed room_area for each room, and part of the configuration in the master thermostat, to use only PID and weather.

The PID for the master thermostat requires the room_area per the satelite to determine the avg room temp and avg set point. I think the PID in master thermostat will not be effective.

stomko11 commented 2 years ago

I adjusted the config as suggested, removed PID and weather mode from master. I did keep the master though, and will test that. Switching my automation to control main heater on off is the easy way πŸ™‚ I had to keep outdoor sensor for each satellite, as I use weather for satellite and it errored out if I did not have it there. Also note that my kd is -220000 and not -22000 just to confirm it is not typo. That's what I used with master thermostat (used positive value though).

Regarding the heat operation, you are right in describing the operation of mine. Basically if there is heat demand, I just signal the heater by switching on switch. That kicks off its internal things (heater modulates leaving water temp based on outdoor temperature, so it will for example output 34 degrees when cold, while 30 when it is warmer), and I basically leave it running in its own cycles. The only thing I would not like, and might not be ideal for the pump, is to run it in short cycles, switching on to off and so on. So having some tolerance in not turning on the heater, when one room is 0,1degree below setpoint, is actually desired. On the other hand, if there is just one room demanding heat, but it is 0,5 below setpoint, it should turn on.

It is ~10 minutes after I changed the config. Using master, and here are 2 examples:

Master bathroom is set to 25 (intentionally, to kick it off) while actual is 22,4. HVAC action went straight to "heating"

hvac_modes:
  - heat
  - 'off'
min_temp: 17
max_temp: 28
target_temp_step: 0.1
preset_modes:
  - none
  - away
current_temperature: 22.4
temperature: 25
hvac_action: heating
preset_mode: none
current_temp_filt: 22.4
current_outdoor_temp: 14.2
room_area: 0
hvac_def:
  heat:
    target_temp: 25
    satelite_allowed: true
    valve_pos: 100
    PID_values:
      - 100
      - 0.003
      - -220000
    PID_integral: 249.767
    PID_differential: 0
    PID_valve_pos: 100
    ab_values:
      - 0.588
      - 0
    wc_valve_pos: 6.292
friendly_name: master_bathroom
supported_features: 17

Kids room is set to 22, while actual is 21,7. HVAC action did not change and thermostat is sitting in "idle":

hvac_modes:
  - heat
  - 'off'
min_temp: 17
max_temp: 28
target_temp_step: 0.1
preset_modes:
  - none
  - away
current_temperature: 21.7
temperature: 22
hvac_action: idle
preset_mode: none
current_temp_filt: 21.7
current_outdoor_temp: 14.1
room_area: 0
hvac_def:
  heat:
    target_temp: 22
    satelite_allowed: true
    valve_pos: 34.65
    PID_values:
      - 100
      - 0.003
      - -220000
    PID_integral: 1.498
    PID_differential: -0.0
    PID_valve_pos: 30.004
    ab_values:
      - 0.588
      - 0
    wc_valve_pos: 4.645
friendly_name: kids_room
supported_features: 17

Master thermostat is off, did not turn on.

hvac_modes:
  - heat
  - 'off'
min_temp: null
max_temp: null
target_temp_step: 0.1
current_temperature: null
temperature: null
hvac_action: 'off'
current_temp_filt: null
current_outdoor_temp: 14.1
room_area: 0
hvac_def:
  heat:
    target_temp: 20
    satelite_allowed: false
    satelites:
      - living_room
      - guest_room
      - bathroom
      - office
      - master_bathroom
      - master_bedroom
      - kids_room
    valve_pos: 0
    Valve_PID_values:
      - -1
      - 0
      - 0
    Valve_PID_integral: 0
    Valve_differential: 0
    Valve_PID_valve_pos: 0
friendly_name: master_thermostat
supported_features: 1

Here is full configuration:

- platform: multizone_thermostat
  name: master_thermostat
  sensor_out: sensor.espaltherma_outside
  sensor_filter: 3
  initial_hvac_mode: "off"
  initial_preset_mode: "none"
  precision: 0.1
  heat:
    entity_id: switch.heat_pump_switch
    initial_target_temp: 20
    away_temp: 17
    proportional_mode:
      control_interval:
        seconds: 600
      difference: 100
      minimal_diff: 5
      pwm:
        hours: 2
      MASTER_mode:
        satelites: [living_room, guest_room, bathroom, office, master_bathroom, master_bedroom, kids_room]
        goal: 0
        kp: -1
        ki: 0
        kd: 0
  sensor_stale_duration:
    hours: 12
  restore_from_old_state: False
  restore_parameters: False
  restore_integral: False

- platform: multizone_thermostat
  name: living_room
  sensor: sensor.aerq_temperature_and_humidity_sensor_v2_0_air_temperature_7
  sensor_out: sensor.espaltherma_outside
  sensor_filter: 2
  initial_hvac_mode: "off"
  initial_preset_mode: "none"
  precision: 0.1
  heat:
    entity_id: switch.underfloor_heating_ground_floor
    min_temp: 17
    max_temp: 28
    initial_target_temp: 20
    away_temp: 17
    proportional_mode:
      control_interval:
        seconds: 600
      difference: 100
      minimal_diff: 5
      pwm:
        hours: 2
      PID_mode:
        kp: 100
        ki: 0.003
        kd: -220000
      weather_mode:
        ka: 0.588
        kb: 0
  sensor_stale_duration:
    hours: 12
  restore_from_old_state: False
  restore_parameters: False
  restore_integral: False

- platform: multizone_thermostat
  name: guest_room
  sensor: sensor.aerq_temperature_and_humidity_sensor_v2_0_air_temperature_5
  sensor_out: sensor.espaltherma_outside
  sensor_filter: 2
  initial_hvac_mode: "off"
  initial_preset_mode: "none"
  precision: 0.1
  heat:
    entity_id: switch.underfloor_heating_ground_floor_2
    min_temp: 17
    max_temp: 28
    initial_target_temp: 20
    away_temp: 17
    proportional_mode:
      control_interval:
        seconds: 600
      difference: 100
      minimal_diff: 5
      pwm:
        hours: 2
      PID_mode:
        kp: 100
        ki: 0.003
        kd: -220000
      weather_mode:
        ka: 0.588
        kb: 0
  sensor_stale_duration:
    hours: 12
  restore_from_old_state: False
  restore_parameters: False
  restore_integral: False

- platform: multizone_thermostat
  name: bathroom
  sensor: sensor.aerq_temperature_and_humidity_sensor_v2_0_air_temperature_6
  sensor_out: sensor.espaltherma_outside
  sensor_filter: 2
  initial_hvac_mode: "off"
  initial_preset_mode: "none"
  precision: 0.1
  heat:
    entity_id: switch.underfloor_heating_ground_floor_3
    min_temp: 17
    max_temp: 28
    initial_target_temp: 20
    away_temp: 17
    proportional_mode:
      control_interval:
        seconds: 600
      difference: 100
      minimal_diff: 5
      pwm:
        hours: 2
      PID_mode:
        kp: 100
        ki: 0.003
        kd: -220000
      weather_mode:
        ka: 0.588
        kb: 0
  sensor_stale_duration:
    hours: 12
  restore_from_old_state: False
  restore_parameters: False
  restore_integral: False

- platform: multizone_thermostat
  name: office
  sensor: sensor.aerq_temperature_and_humidity_sensor_v2_0_air_temperature
  sensor_out: sensor.espaltherma_outside
  sensor_filter: 2
  initial_hvac_mode: "off"
  initial_preset_mode: "none"
  precision: 0.1
  heat:
    entity_id: switch.underfloor_heating_1st_floor_4
    min_temp: 17
    max_temp: 28
    initial_target_temp: 20
    away_temp: 17
    proportional_mode:
      control_interval:
        seconds: 600
      difference: 100
      minimal_diff: 5
      pwm:
        hours: 2
      PID_mode:
        kp: 100
        ki: 0.003
        kd: -220000
      weather_mode:
        ka: 0.588
        kb: 0
  sensor_stale_duration:
    hours: 12
  restore_from_old_state: False
  restore_parameters: False
  restore_integral: False

- platform: multizone_thermostat
  name: master_bathroom
  sensor: sensor.aerq_temperature_and_humidity_sensor_v2_0_air_temperature_2
  sensor_out: sensor.espaltherma_outside
  sensor_filter: 2
  initial_hvac_mode: "off"
  initial_preset_mode: "none"
  precision: 0.1
  heat:
    entity_id: switch.underfloor_heating_1st_floor
    min_temp: 17
    max_temp: 28
    initial_target_temp: 20
    away_temp: 17
    proportional_mode:
      control_interval:
        seconds: 600
      difference: 100
      minimal_diff: 5
      pwm:
        hours: 2
      PID_mode:
        kp: 100
        ki: 0.003
        kd: -220000
      weather_mode:
        ka: 0.588
        kb: 0
  sensor_stale_duration:
    hours: 12
  restore_from_old_state: False
  restore_parameters: False
  restore_integral: False

- platform: multizone_thermostat
  name: master_bedroom
  sensor: sensor.aerq_temperature_and_humidity_sensor_v2_0_air_temperature_3
  sensor_out: sensor.espaltherma_outside
  sensor_filter: 2
  initial_hvac_mode: "off"
  initial_preset_mode: "none"
  precision: 0.1
  heat:
    entity_id: switch.underfloor_heating_1st_floor_2
    min_temp: 17
    max_temp: 28
    initial_target_temp: 20
    away_temp: 17
    proportional_mode:
      control_interval:
        seconds: 600
      difference: 100
      minimal_diff: 5
      pwm:
        hours: 2
      PID_mode:
        kp: 100
        ki: 0.003
        kd: -220000
      weather_mode:
        ka: 0.588
        kb: 0
  sensor_stale_duration:
    hours: 12
  restore_from_old_state: False
  restore_parameters: False
  restore_integral: False

- platform: multizone_thermostat
  name: kids_room
  sensor: sensor.aerq_temperature_and_humidity_sensor_v2_0_air_temperature_4
  sensor_out: sensor.espaltherma_outside
  sensor_filter: 2
  initial_hvac_mode: "off"
  initial_preset_mode: "none"
  precision: 0.1
  heat:
    entity_id: switch.underfloor_heating_1st_floor_3
    min_temp: 17
    max_temp: 28
    initial_target_temp: 20
    away_temp: 17
    proportional_mode:
      control_interval:
        seconds: 600
      difference: 100
      minimal_diff: 5
      pwm:
        hours: 2
      PID_mode:
        kp: 100
        ki: 0.003
        kd: -220000
      weather_mode:
        ka: 0.588
        kb: 0
  sensor_stale_duration:
    hours: 12
  restore_from_old_state: False
  restore_parameters: False
  restore_integral: False

After, I disabled master thermostat completely, reloaded thermostats via service. They were all "off" as this is what initial action is configured to, so I had to on/off schedule for each, they changed the state to idle, and master bathroom started heating immediately. I now enabled my automation, that triggered heater to "on", however for satellites, it is still the same. Only master bathroom is now heating as I set it to 25 intentionally. Kids room is still 21,7 vs 22 set, and is idle, not heating.

vindaalex commented 2 years ago

I adjusted the config as suggested, removed PID and weather mode from master. I did keep the master though, and will test that. Switching my automation to control main heater on off is the easy way πŸ™‚ You could also use a fake switch for the master to see how it behaves relative to your automation.

I had to keep outdoor sensor for each satellite, as I use weather for satellite and it errored out if I did not have it there. Correct, my mistakes

Also note that my kd is -220000 and not -22000 just to confirm it is not typo. Corerct. Note to define only PID for the satelites.

That's what I used with master thermostat (used positive value though). What did you use for the master and what positive? The multizone_thermostat PID control loop originates from the PID thermostat only I've removed the sign in the control loop thus it has to be included in the ki.

Regarding the heat operation, you are right in describing the operation of mine. Basically if there is heat demand, I just signal the heater by switching on switch. That kicks off its internal things (heater modulates leaving water temp based on outdoor temperature, so it will for example output 34 degrees when cold, while 30 when it is warmer), and I basically leave it running in its own cycles. The only thing I would not like, and might not be ideal for the pump, is to run it in short cycles, switching on to off and so on. So having some tolerance in not turning on the heater, when one room is 0,1degree below setpoint, is actually desired. On the other hand, if there is just one room demanding heat, but it is 0,5 below setpoint, it should turn on.

This now more or less included by the minmum_diff```` at the master thermostat. If thevalve_posis in this case less than 5 it will not switch on. Thus if you defined apwm``` of 2 hours it will only switch on when activation time is more than 6 minutes.

It is ~10 minutes after I changed the config. Using master, and here are 2 examples:

Master bathroom is set to 25 (intentionally, to kick it off) while actual is 22,4. HVAC action went straight to "heating"

hvac_modes:
  - heat
  - 'off'
min_temp: 17
max_temp: 28
target_temp_step: 0.1
preset_modes:
  - none
  - away
current_temperature: 22.4
temperature: 25
hvac_action: heating
preset_mode: none
current_temp_filt: 22.4
current_outdoor_temp: 14.2
room_area: 0
hvac_def:
  heat:
    target_temp: 25
    satelite_allowed: true
    valve_pos: 100
    PID_values:
      - 100
      - 0.003
      - -220000
    PID_integral: 249.767
    PID_differential: 0
    PID_valve_pos: 100
    ab_values:
      - 0.588
      - 0
    wc_valve_pos: 6.292
friendly_name: master_bathroom
supported_features: 17

dT= (25-22.4)*100 = 260 => limited to 100 (see valve_pos) thus sets switch open for whole pwm cycle.

Kids room is set to 22, while actual is 21,7. HVAC action did not change and thermostat is sitting in "idle":

hvac_modes:
  - heat
  - 'off'
min_temp: 17
max_temp: 28
target_temp_step: 0.1
preset_modes:
  - none
  - away
current_temperature: 21.7
temperature: 22
hvac_action: idle
preset_mode: none
current_temp_filt: 21.7
current_outdoor_temp: 14.1
room_area: 0
hvac_def:
  heat:
    target_temp: 22
    satelite_allowed: true
    valve_pos: 34.65
    PID_values:
      - 100
      - 0.003
      - -220000
    PID_integral: 1.498
    PID_differential: -0.0
    PID_valve_pos: 30.004
    ab_values:
      - 0.588
      - 0
    wc_valve_pos: 4.645
friendly_name: kids_room
supported_features: 17

valve_pos = PID_valve_pos ```` +wc_valve_pos= 34.65. So when you use apwm``` 2hours it will be on for 41 minutes of the 2 hours.

Master thermostat is off, did not turn on.

hvac_modes:
  - heat
  - 'off'
min_temp: null
max_temp: null
target_temp_step: 0.1
current_temperature: null
temperature: null
hvac_action: 'off'
current_temp_filt: null
current_outdoor_temp: 14.1
room_area: 0
hvac_def:
  heat:
    target_temp: 20
    satelite_allowed: false
    satelites:
      - living_room
      - guest_room
      - bathroom
      - office
      - master_bathroom
      - master_bedroom
      - kids_room
    valve_pos: 0
    Valve_PID_values:
      - -1
      - 0
      - 0
    Valve_PID_integral: 0
    Valve_differential: 0
    Valve_PID_valve_pos: 0
friendly_name: master_thermostat
supported_features: 1

I think that at the moment the master valve position is calculated the satelites still did not had a heat requirement (valve_pos=0) . A next control loop or 2 loops (10 minutes later) I would expect that satelite valve_pos would have increased thus resulting in a valve_pos for the master thermostat. When booting first the satelite requires a valve_pos > 0 and the next loop of the master hereafter will change the master valve_pos. You could increase teh update frequency of the master thermostat such that satelite changes are inlcuded earlier by for instance control_interval = 300 seconds.

Here is full configuration:

- platform: multizone_thermostat
  name: master_thermostat
  sensor_out: sensor.espaltherma_outside
  sensor_filter: 3
  initial_hvac_mode: "off"
  initial_preset_mode: "none"
  precision: 0.1
  heat:
    entity_id: switch.heat_pump_switch
    initial_target_temp: 20
    away_temp: 17
    proportional_mode:
      control_interval:
        seconds: 600
      difference: 100
      minimal_diff: 5
      pwm:
        hours: 2
      MASTER_mode:
        satelites: [living_room, guest_room, bathroom, office, master_bathroom, master_bedroom, kids_room]
        goal: 0
        kp: -1
        ki: 0
        kd: 0
  sensor_stale_duration:
    hours: 12
  restore_from_old_state: False
  restore_parameters: False
  restore_integral: False

- platform: multizone_thermostat
  name: living_room
  sensor: sensor.aerq_temperature_and_humidity_sensor_v2_0_air_temperature_7
  sensor_out: sensor.espaltherma_outside
  sensor_filter: 2
  initial_hvac_mode: "off"
  initial_preset_mode: "none"
  precision: 0.1
  heat:
    entity_id: switch.underfloor_heating_ground_floor
    min_temp: 17
    max_temp: 28
    initial_target_temp: 20
    away_temp: 17
    proportional_mode:
      control_interval:
        seconds: 600
      difference: 100
      minimal_diff: 5
      pwm:
        hours: 2
      PID_mode:
        kp: 100
        ki: 0.003
        kd: -220000
      weather_mode:
        ka: 0.588
        kb: 0
  sensor_stale_duration:
    hours: 12
  restore_from_old_state: False
  restore_parameters: False
  restore_integral: False

- platform: multizone_thermostat
  name: guest_room
  sensor: sensor.aerq_temperature_and_humidity_sensor_v2_0_air_temperature_5
  sensor_out: sensor.espaltherma_outside
  sensor_filter: 2
  initial_hvac_mode: "off"
  initial_preset_mode: "none"
  precision: 0.1
  heat:
    entity_id: switch.underfloor_heating_ground_floor_2
    min_temp: 17
    max_temp: 28
    initial_target_temp: 20
    away_temp: 17
    proportional_mode:
      control_interval:
        seconds: 600
      difference: 100
      minimal_diff: 5
      pwm:
        hours: 2
      PID_mode:
        kp: 100
        ki: 0.003
        kd: -220000
      weather_mode:
        ka: 0.588
        kb: 0
  sensor_stale_duration:
    hours: 12
  restore_from_old_state: False
  restore_parameters: False
  restore_integral: False

- platform: multizone_thermostat
  name: bathroom
  sensor: sensor.aerq_temperature_and_humidity_sensor_v2_0_air_temperature_6
  sensor_out: sensor.espaltherma_outside
  sensor_filter: 2
  initial_hvac_mode: "off"
  initial_preset_mode: "none"
  precision: 0.1
  heat:
    entity_id: switch.underfloor_heating_ground_floor_3
    min_temp: 17
    max_temp: 28
    initial_target_temp: 20
    away_temp: 17
    proportional_mode:
      control_interval:
        seconds: 600
      difference: 100
      minimal_diff: 5
      pwm:
        hours: 2
      PID_mode:
        kp: 100
        ki: 0.003
        kd: -220000
      weather_mode:
        ka: 0.588
        kb: 0
  sensor_stale_duration:
    hours: 12
  restore_from_old_state: False
  restore_parameters: False
  restore_integral: False

- platform: multizone_thermostat
  name: office
  sensor: sensor.aerq_temperature_and_humidity_sensor_v2_0_air_temperature
  sensor_out: sensor.espaltherma_outside
  sensor_filter: 2
  initial_hvac_mode: "off"
  initial_preset_mode: "none"
  precision: 0.1
  heat:
    entity_id: switch.underfloor_heating_1st_floor_4
    min_temp: 17
    max_temp: 28
    initial_target_temp: 20
    away_temp: 17
    proportional_mode:
      control_interval:
        seconds: 600
      difference: 100
      minimal_diff: 5
      pwm:
        hours: 2
      PID_mode:
        kp: 100
        ki: 0.003
        kd: -220000
      weather_mode:
        ka: 0.588
        kb: 0
  sensor_stale_duration:
    hours: 12
  restore_from_old_state: False
  restore_parameters: False
  restore_integral: False

- platform: multizone_thermostat
  name: master_bathroom
  sensor: sensor.aerq_temperature_and_humidity_sensor_v2_0_air_temperature_2
  sensor_out: sensor.espaltherma_outside
  sensor_filter: 2
  initial_hvac_mode: "off"
  initial_preset_mode: "none"
  precision: 0.1
  heat:
    entity_id: switch.underfloor_heating_1st_floor
    min_temp: 17
    max_temp: 28
    initial_target_temp: 20
    away_temp: 17
    proportional_mode:
      control_interval:
        seconds: 600
      difference: 100
      minimal_diff: 5
      pwm:
        hours: 2
      PID_mode:
        kp: 100
        ki: 0.003
        kd: -220000
      weather_mode:
        ka: 0.588
        kb: 0
  sensor_stale_duration:
    hours: 12
  restore_from_old_state: False
  restore_parameters: False
  restore_integral: False

- platform: multizone_thermostat
  name: master_bedroom
  sensor: sensor.aerq_temperature_and_humidity_sensor_v2_0_air_temperature_3
  sensor_out: sensor.espaltherma_outside
  sensor_filter: 2
  initial_hvac_mode: "off"
  initial_preset_mode: "none"
  precision: 0.1
  heat:
    entity_id: switch.underfloor_heating_1st_floor_2
    min_temp: 17
    max_temp: 28
    initial_target_temp: 20
    away_temp: 17
    proportional_mode:
      control_interval:
        seconds: 600
      difference: 100
      minimal_diff: 5
      pwm:
        hours: 2
      PID_mode:
        kp: 100
        ki: 0.003
        kd: -220000
      weather_mode:
        ka: 0.588
        kb: 0
  sensor_stale_duration:
    hours: 12
  restore_from_old_state: False
  restore_parameters: False
  restore_integral: False

- platform: multizone_thermostat
  name: kids_room
  sensor: sensor.aerq_temperature_and_humidity_sensor_v2_0_air_temperature_4
  sensor_out: sensor.espaltherma_outside
  sensor_filter: 2
  initial_hvac_mode: "off"
  initial_preset_mode: "none"
  precision: 0.1
  heat:
    entity_id: switch.underfloor_heating_1st_floor_3
    min_temp: 17
    max_temp: 28
    initial_target_temp: 20
    away_temp: 17
    proportional_mode:
      control_interval:
        seconds: 600
      difference: 100
      minimal_diff: 5
      pwm:
        hours: 2
      PID_mode:
        kp: 100
        ki: 0.003
        kd: -220000
      weather_mode:
        ka: 0.588
        kb: 0
  sensor_stale_duration:
    hours: 12
  restore_from_old_state: False
  restore_parameters: False
  restore_integral: False

Seems to be ok. Note: you did not specify room_area per satelite. This is correct as long as you don't specify PID control for the master thermostat.

After, I disabled master thermostat completely, reloaded thermostats via service. They were all "off" as this is what initial action is configured to, so I had to on/off schedule for each, they changed the state to idle, and master bathroom started heating immediately. I now enabled my automation, that triggered heater to "on", however for satellites, it is still the same. Only master bathroom is now heating as I set it to 25 intentionally. Kids room is still 21,7 vs 22 set, and is idle, not heating.

I hope to have sufficiently explained this behaviour in above comments. If not, please let me know.

stomko11 commented 2 years ago

So what should I do now? My master thermostat is disabled. I have satellite for instance guest room, it is 21.3 vs 22 set, yet it hasn't changed to "heating" all day today, which is what my automation operates on, but I guess it is irrelevant at that point if automation or master thermostat. I basically need to reliably operate rooms when they demand heat.

hvac_modes:
  - heat
  - 'off'
min_temp: 17
max_temp: 28
target_temp_step: 0.1
preset_modes:
  - none
  - away
current_temperature: 21.3
temperature: 22
hvac_action: idle
preset_mode: none
current_temp_filt: 21.265
current_outdoor_temp: 13.6
room_area: 0
hvac_def:
  heat:
    target_temp: 22
    satelite_allowed: true
    valve_pos: 38.48
    PID_values:
      - 30
      - 0.005
      - -24000
    PID_integral: 2084.155
    PID_differential: -0.00004
    PID_valve_pos: 33.541
    ab_values:
      - 0.588
      - 0
    wc_valve_pos: 4.939
friendly_name: guest_room
supported_features: 17
vindaalex commented 2 years ago

So what should I do now? My master thermostat is disabled. I have satellite for instance guest room, it is 21.3 vs 22 set, yet it hasn't changed to "heating" all day today, which is what my automation operates on, but I guess it is irrelevant at that point if automation or master thermostat. I basically need to reliably operate rooms when they demand heat.

hvac_modes:
  - heat
  - 'off'
min_temp: 17
max_temp: 28
target_temp_step: 0.1
preset_modes:
  - none
  - away
current_temperature: 21.3
temperature: 22
hvac_action: idle
preset_mode: none
current_temp_filt: 21.265
current_outdoor_temp: 13.6
room_area: 0
hvac_def:
  heat:
    target_temp: 22
    satelite_allowed: true
    valve_pos: 38.48
    PID_values:
      - 30
      - 0.005
      - -24000
    PID_integral: 2084.155
    PID_differential: -0.00004
    PID_valve_pos: 33.541
    ab_values:
      - 0.588
      - 0
    wc_valve_pos: 4.939
friendly_name: guest_room
supported_features: 17

Strange, valve_pos is 38.48 thus the valve should be opened about 40 minutes per 2 hour.

Could you check:

stomko11 commented 2 years ago

Switch has not been operated. Also nothing in the log related to multizone thermostat or climate.guest_room. It is almost like due to "internal logic", it decided not to turn on. I am wondering if this is due to something I have configured in wrong way on the satelite? I don't focus on master now, as it is disabled.

vindaalex commented 2 years ago

I think first thing left is to do a debug run. If you ad the following to configuration.yaml you get extensive logging.

logger:
  default: info
  logs:
    multizone_thermostat: debug

Prepare a single thermostat with guest_room as basis and change to limit the waiting time:

reboot and set preset mode to heat, let it run for 6 minutes, check if switch is operated and paste log output here.

stomko11 commented 2 years ago

OK, that worked. Switch was operated, and hvac action was changing between heating and idle

hvac_modes:
  - heat
  - 'off'
min_temp: 17
max_temp: 28
target_temp_step: 0.1
preset_modes:
  - none
  - away
current_temperature: 21.6
temperature: 22
hvac_action: idle
preset_mode: none
current_temp_filt: 21.6
current_outdoor_temp: 12.8
room_area: 0
hvac_def:
  heat:
    target_temp: 22
    satelite_allowed: true
    valve_pos: 45.914
    PID_values:
      - 100
      - 0.003
      - -220000
    PID_integral: 168.003
    PID_differential: -0.0
    PID_valve_pos: 40.504
    ab_values:
      - 0.588
      - 0
    wc_valve_pos: 5.41
friendly_name: guest_room
supported_features: 17

And here is the debug (restart was done somewhere around 17:34)

[core-ssh config]$ more home-assistant.log | grep multizone_thermostat
2022-01-01 17:34:49 WARNING (SyncWorker_1) [homeassistant.loader] We found a custom integration multizone_thermostat which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2022-01-01 17:34:53 INFO (MainThread) [homeassistant.components.climate] Setting up climate.multizone_thermostat
2022-01-01 17:34:53 INFO (MainThread) [multizone_thermostat.guest_room] initialise: guest_room
2022-01-01 17:34:53 INFO (MainThread) [multizone_thermostat.guest_room.heat] Config hvac settings for mode : heat
2022-01-01 17:34:53 DEBUG (MainThread) [multizone_thermostat.guest_room.heat] HVAC mode 'proportional' active
2022-01-01 17:34:53 DEBUG (MainThread) [multizone_thermostat.guest_room.heat] HVAC mode 'pid' active
2022-01-01 17:34:53 DEBUG (MainThread) [multizone_thermostat.guest_room.heat] Init pid settings for mode : heat
2022-01-01 17:34:53 DEBUG (MainThread) [multizone_thermostat.guest_room.heat.pid] _sampletime: 60
2022-01-01 17:34:53 DEBUG (MainThread) [multizone_thermostat.guest_room.heat] HVAC mode 'weather control' active
2022-01-01 17:34:54 INFO (MainThread) [multizone_thermostat.guest_room] init thermostat
2022-01-01 17:34:54 WARNING (MainThread) [homeassistant.helpers.entity] Entity climate.guest_room (<class 'custom_components.multizone_thermostat.climate.MultiZoneThermostat'>) implements device_state_attributes. Please report it to the custom component author.
2022-01-01 17:34:54 DEBUG (MainThread) [multizone_thermostat.guest_room] Sensor outdoor temperature updated to unknown
2022-01-01 17:34:54 WARNING (MainThread) [multizone_thermostat.guest_room] Sensor temperature Altherma Outside Temp invalid unknown
2022-01-01 17:34:54 WARNING (MainThread) [multizone_thermostat.guest_room] Emergency OFF order send due to:Altherma Outside Temp
2022-01-01 17:34:54 DEBUG (MainThread) [multizone_thermostat.guest_room] Turn OFF called
2022-01-01 17:34:54 DEBUG (MainThread) [multizone_thermostat.guest_room] No switch defined for off
2022-01-01 17:34:54 DEBUG (MainThread) [multizone_thermostat.guest_room] Temperature updated to 22.0 for mode heat
  File "/config/custom_components/multizone_thermostat/climate.py", line 989, in async_set_temperature
2022-01-01 17:34:59 INFO (MainThread) [multizone_thermostat.guest_room] HVAC mode changed to heat
2022-01-01 17:34:59 DEBUG (MainThread) [multizone_thermostat.guest_room] Turn OFF called
2022-01-01 17:34:59 DEBUG (MainThread) [multizone_thermostat.guest_room] Switch already OFF
2022-01-01 17:34:59 DEBUG (MainThread) [multizone_thermostat.guest_room] No switch defined for heat
2022-01-01 17:34:59 DEBUG (MainThread) [multizone_thermostat.guest_room] No switch defined for heat
2022-01-01 17:34:59 DEBUG (MainThread) [multizone_thermostat.guest_room] update 'keep alive' for heat
2022-01-01 17:34:59 DEBUG (MainThread) [multizone_thermostat.guest_room] update 'pwm alive' for heat per 0:03:00 (hh:mm:ss)
2022-01-01 17:34:59 WARNING (MainThread) [multizone_thermostat.guest_room] Cannot operate in emergency stop state
2022-01-01 17:35:01 DEBUG (MainThread) [multizone_thermostat.guest_room] Switch of switch.underfloor_heating_ground_floor_2 changed to off
2022-01-01 17:35:01 DEBUG (MainThread) [multizone_thermostat.guest_room] Sensor temperature updated to 21.6
2022-01-01 17:35:01 INFO (MainThread) [multizone_thermostat.guest_room] Recover from emergency mode, new temperature updated to 21.6
2022-01-01 17:35:01 DEBUG (MainThread) [multizone_thermostat.guest_room] Current temperature updated to 21.6
2022-01-01 17:35:01 INFO (MainThread) [multizone_thermostat.guest_room] modified sensor filter mode to: 2
2022-01-01 17:35:01 DEBUG (MainThread) [multizone_thermostat.guest_room] kp update temp 21.599999999627347
2022-01-01 17:35:04 DEBUG (MainThread) [multizone_thermostat.guest_room] Temperature updated to 22.0 for mode heat
2022-01-01 17:35:04 DEBUG (MainThread) [multizone_thermostat.guest_room] kp update temp 21.599999999621076
2022-01-01 17:35:04 WARNING (MainThread) [multizone_thermostat.guest_room] Current outdoor temp is %s and setpoint is %s cannot run weather mode
2022-01-01 17:35:05 DEBUG (MainThread) [multizone_thermostat.guest_room] Current temperature updated to 21.6
2022-01-01 17:35:05 DEBUG (MainThread) [multizone_thermostat.guest_room] kp update temp 21.5999999996257
2022-01-01 17:35:05 INFO (MainThread) [multizone_thermostat.guest_room] init default hvac mode: heat
2022-01-01 17:35:14 DEBUG (MainThread) [multizone_thermostat.guest_room] Sensor outdoor temperature updated to 13.7
2022-01-01 17:35:14 DEBUG (MainThread) [multizone_thermostat.guest_room] Current outdoor temperature updated to 13.7
2022-01-01 17:35:17 DEBUG (MainThread) [multizone_thermostat.guest_room] Turn OFF called
2022-01-01 17:35:17 DEBUG (MainThread) [multizone_thermostat.guest_room] Order OFF sent to switch device switch.underfloor_heating_ground_floor_2
2022-01-01 17:35:35 DEBUG (MainThread) [multizone_thermostat.guest_room] Turn OFF called
2022-01-01 17:35:35 DEBUG (MainThread) [multizone_thermostat.guest_room] Order OFF sent to switch device switch.underfloor_heating_ground_floor_2
2022-01-01 17:35:48 DEBUG (MainThread) [multizone_thermostat.guest_room] Sensor outdoor temperature updated to 13.5
2022-01-01 17:35:48 DEBUG (MainThread) [multizone_thermostat.guest_room] Current outdoor temperature updated to 13.5
2022-01-01 17:35:53 DEBUG (MainThread) [multizone_thermostat.guest_room] Turn OFF called
2022-01-01 17:35:53 DEBUG (MainThread) [multizone_thermostat.guest_room] Order OFF sent to switch device switch.underfloor_heating_ground_floor_2
2022-01-01 17:35:59 DEBUG (MainThread) [multizone_thermostat.guest_room] kp update temp 21.600000000038904
2022-01-01 17:35:59 DEBUG (MainThread) [multizone_thermostat.guest_room] update controller
2022-01-01 17:35:59 DEBUG (MainThread) [multizone_thermostat.guest_room.heat.pid] current temp 21.600000000038904 ; current velocity 2.0747537770198957e-11
2022-01-01 17:35:59 DEBUG (MainThread) [multizone_thermostat.guest_room.heat.pid] P: 39.999999996109636
2022-01-01 17:35:59 DEBUG (MainThread) [multizone_thermostat.guest_room.heat.pid] I: 0.07200249909654324
2022-01-01 17:35:59 DEBUG (MainThread) [multizone_thermostat.guest_room.heat.pid] D: -4.56445830944377e-06
2022-01-01 17:35:59 DEBUG (MainThread) [multizone_thermostat.guest_room.heat.pid] output: 40.07199793074787
2022-01-01 17:35:59 DEBUG (MainThread) [multizone_thermostat.guest_room] Obtained current control output: 45.07
2022-01-01 17:35:59 DEBUG (MainThread) [multizone_thermostat.guest_room] Time until switch.underfloor_heating_ground_floor_2 turns on: 38.87167112731933 sec
2022-01-01 17:36:11 DEBUG (MainThread) [multizone_thermostat.guest_room] Time until switch.underfloor_heating_ground_floor_2 turns on: 26.869130538940425 sec
2022-01-01 17:36:29 DEBUG (MainThread) [multizone_thermostat.guest_room] Time until switch.underfloor_heating_ground_floor_2 turns on: 8.868385719299312 sec
2022-01-01 17:36:47 DEBUG (MainThread) [multizone_thermostat.guest_room] Time finshed 'off-time' by switch.underfloor_heating_ground_floor_2 sec: turn on: 9.0
2022-01-01 17:36:47 DEBUG (MainThread) [multizone_thermostat.guest_room] Turn ON
2022-01-01 17:36:47 DEBUG (MainThread) [multizone_thermostat.guest_room] Order ON sent to switch device switch.underfloor_heating_ground_floor_2
2022-01-01 17:36:47 DEBUG (MainThread) [multizone_thermostat.guest_room] Switch of switch.underfloor_heating_ground_floor_2 changed to on
2022-01-01 17:36:54 DEBUG (MainThread) [multizone_thermostat.guest_room] Sensor outdoor temperature updated to 13.1
2022-01-01 17:36:54 DEBUG (MainThread) [multizone_thermostat.guest_room] Current outdoor temperature updated to 13.1
2022-01-01 17:36:59 DEBUG (MainThread) [multizone_thermostat.guest_room] kp update temp 21.59999999944844
2022-01-01 17:36:59 DEBUG (MainThread) [multizone_thermostat.guest_room] update controller
2022-01-01 17:36:59 DEBUG (MainThread) [multizone_thermostat.guest_room.heat.pid] current temp 21.59999999944844 ; current velocity -1.2222279972363807e-11
2022-01-01 17:36:59 DEBUG (MainThread) [multizone_thermostat.guest_room.heat.pid] P: 40.00000005515609
2022-01-01 17:36:59 DEBUG (MainThread) [multizone_thermostat.guest_room.heat.pid] I: 0.14400345563579747
2022-01-01 17:36:59 DEBUG (MainThread) [multizone_thermostat.guest_room.heat.pid] D: 2.6889015939200374e-06
2022-01-01 17:36:59 DEBUG (MainThread) [multizone_thermostat.guest_room.heat.pid] output: 40.144006199693486
2022-01-01 17:36:59 DEBUG (MainThread) [multizone_thermostat.guest_room] Obtained current control output: 45.377
2022-01-01 17:36:59 DEBUG (MainThread) [multizone_thermostat.guest_room] Time until switch.underfloor_heating_ground_floor_2 turns off: 69.6824640499115 sec
2022-01-01 17:37:05 DEBUG (MainThread) [multizone_thermostat.guest_room] Time until switch.underfloor_heating_ground_floor_2 turns off: 63.678188489532474 sec
2022-01-01 17:37:23 DEBUG (MainThread) [multizone_thermostat.guest_room] Time until switch.underfloor_heating_ground_floor_2 turns off: 45.67717497215271 sec
2022-01-01 17:37:28 DEBUG (MainThread) [multizone_thermostat.guest_room] Sensor outdoor temperature updated to 12.9
2022-01-01 17:37:28 DEBUG (MainThread) [multizone_thermostat.guest_room] Current outdoor temperature updated to 12.9
2022-01-01 17:37:41 DEBUG (MainThread) [multizone_thermostat.guest_room] Time until switch.underfloor_heating_ground_floor_2 turns off: 27.675773309326175 sec
2022-01-01 17:37:59 DEBUG (MainThread) [multizone_thermostat.guest_room] kp update temp 21.59999999819773
2022-01-01 17:37:59 DEBUG (MainThread) [multizone_thermostat.guest_room] update controller
2022-01-01 17:37:59 DEBUG (MainThread) [multizone_thermostat.guest_room.heat.pid] current temp 21.59999999819773 ; current velocity -2.0239077819383146e-11
2022-01-01 17:37:59 DEBUG (MainThread) [multizone_thermostat.guest_room.heat.pid] P: 40.00000018022689
2022-01-01 17:37:59 DEBUG (MainThread) [multizone_thermostat.guest_room.heat.pid] I: 0.21600440524762468
2022-01-01 17:37:59 DEBUG (MainThread) [multizone_thermostat.guest_room.heat.pid] D: 4.452597120264292e-06
2022-01-01 17:37:59 DEBUG (MainThread) [multizone_thermostat.guest_room.heat.pid] output: 40.21600903807163
2022-01-01 17:37:59 DEBUG (MainThread) [multizone_thermostat.guest_room] Obtained current control output: 45.567
2022-01-01 17:37:59 DEBUG (MainThread) [multizone_thermostat.guest_room] Time until switch.underfloor_heating_ground_floor_2 turns off: 10.023638406372072 sec
2022-01-01 17:37:59 DEBUG (MainThread) [multizone_thermostat.guest_room] Time until switch.underfloor_heating_ground_floor_2 turns off: 10.017160573577883 sec
2022-01-01 17:38:01 DEBUG (MainThread) [multizone_thermostat.guest_room] Sensor outdoor temperature updated to 12.8
2022-01-01 17:38:01 DEBUG (MainThread) [multizone_thermostat.guest_room] Current outdoor temperature updated to 12.8
2022-01-01 17:38:17 DEBUG (MainThread) [multizone_thermostat.guest_room] Time exceeds 'on-time' by switch.underfloor_heating_ground_floor_2 sec: turn off: -8.0
2022-01-01 17:38:17 DEBUG (MainThread) [multizone_thermostat.guest_room] Turn OFF called
2022-01-01 17:38:17 DEBUG (MainThread) [multizone_thermostat.guest_room] Order OFF sent to switch device switch.underfloor_heating_ground_floor_2
2022-01-01 17:38:17 DEBUG (MainThread) [multizone_thermostat.guest_room] Switch of switch.underfloor_heating_ground_floor_2 changed to off
2022-01-01 17:38:35 DEBUG (MainThread) [multizone_thermostat.guest_room] Time until switch.underfloor_heating_ground_floor_2 turns on: 79.97847612800598 sec
2022-01-01 17:38:53 DEBUG (MainThread) [multizone_thermostat.guest_room] Time until switch.underfloor_heating_ground_floor_2 turns on: 61.97673257293701 sec
2022-01-01 17:38:59 DEBUG (MainThread) [multizone_thermostat.guest_room] kp update temp 21.599999997049338
2022-01-01 17:38:59 DEBUG (MainThread) [multizone_thermostat.guest_room] update controller
2022-01-01 17:38:59 DEBUG (MainThread) [multizone_thermostat.guest_room.heat.pid] current temp 21.599999997049338 ; current velocity -1.543722719749596e-11
2022-01-01 17:38:59 DEBUG (MainThread) [multizone_thermostat.guest_room.heat.pid] P: 40.00000029506623
2022-01-01 17:38:59 DEBUG (MainThread) [multizone_thermostat.guest_room.heat.pid] I: 0.2880055313051804
2022-01-01 17:38:59 DEBUG (MainThread) [multizone_thermostat.guest_room.heat.pid] D: 3.396189983449111e-06
2022-01-01 17:38:59 DEBUG (MainThread) [multizone_thermostat.guest_room.heat.pid] output: 40.28800922256139
2022-01-01 17:38:59 DEBUG (MainThread) [multizone_thermostat.guest_room] Obtained current control output: 45.698
2022-01-01 17:38:59 DEBUG (MainThread) [multizone_thermostat.guest_room] Time until switch.underfloor_heating_ground_floor_2 turns on: 55.750919688797 sec
2022-01-01 17:39:11 DEBUG (MainThread) [multizone_thermostat.guest_room] Time until switch.underfloor_heating_ground_floor_2 turns on: 43.73980866775513 sec
2022-01-01 17:39:29 DEBUG (MainThread) [multizone_thermostat.guest_room] Time until switch.underfloor_heating_ground_floor_2 turns on: 25.738276113128663 sec
2022-01-01 17:39:47 DEBUG (MainThread) [multizone_thermostat.guest_room] Time until switch.underfloor_heating_ground_floor_2 turns on: 7.737001527404786 sec
2022-01-01 17:39:59 DEBUG (MainThread) [multizone_thermostat.guest_room] kp update temp 21.5999999971113
2022-01-01 17:39:59 DEBUG (MainThread) [multizone_thermostat.guest_room] update controller
2022-01-01 17:39:59 DEBUG (MainThread) [multizone_thermostat.guest_room.heat.pid] current temp 21.5999999971113 ; current velocity -5.1489940892321834e-12
2022-01-01 17:39:59 DEBUG (MainThread) [multizone_thermostat.guest_room.heat.pid] P: 40.00000028886994
2022-01-01 17:39:59 DEBUG (MainThread) [multizone_thermostat.guest_room.heat.pid] I: 0.36000589002522215
2022-01-01 17:39:59 DEBUG (MainThread) [multizone_thermostat.guest_room.heat.pid] D: 1.1327786996310803e-06
2022-01-01 17:39:59 DEBUG (MainThread) [multizone_thermostat.guest_room.heat.pid] output: 40.36000731167386
2022-01-01 17:39:59 DEBUG (MainThread) [multizone_thermostat.guest_room] Obtained current control output: 45.77
2022-01-01 17:39:59 DEBUG (MainThread) [multizone_thermostat.guest_room] Time finshed 'off-time' by switch.underfloor_heating_ground_floor_2 sec: turn on: 4.0
2022-01-01 17:39:59 DEBUG (MainThread) [multizone_thermostat.guest_room] Turn ON
2022-01-01 17:39:59 DEBUG (MainThread) [multizone_thermostat.guest_room] Order ON sent to switch device switch.underfloor_heating_ground_floor_2
2022-01-01 17:39:59 DEBUG (MainThread) [multizone_thermostat.guest_room] Switch of switch.underfloor_heating_ground_floor_2 changed to on
2022-01-01 17:40:05 DEBUG (MainThread) [multizone_thermostat.guest_room] Time until switch.underfloor_heating_ground_floor_2 turns off: 76.37132009124757 sec
2022-01-01 17:40:23 DEBUG (MainThread) [multizone_thermostat.guest_room] Time until switch.underfloor_heating_ground_floor_2 turns off: 58.36914619064332 sec
2022-01-01 17:40:41 DEBUG (MainThread) [multizone_thermostat.guest_room] Time until switch.underfloor_heating_ground_floor_2 turns off: 40.3679941520691 sec
2022-01-01 17:40:59 DEBUG (MainThread) [multizone_thermostat.guest_room] kp update temp 21.599999998275138
2022-01-01 17:40:59 DEBUG (MainThread) [multizone_thermostat.guest_room] update controller
2022-01-01 17:40:59 DEBUG (MainThread) [multizone_thermostat.guest_room.heat.pid] current temp 21.599999998275138 ; current velocity -3.726066703005134e-12
2022-01-01 17:40:59 DEBUG (MainThread) [multizone_thermostat.guest_room.heat.pid] P: 40.00000017248624
2022-01-01 17:40:59 DEBUG (MainThread) [multizone_thermostat.guest_room.heat.pid] I: 0.432007747711804
2022-01-01 17:40:59 DEBUG (MainThread) [multizone_thermostat.guest_room.heat.pid] D: 8.197346746611295e-07
2022-01-01 17:40:59 DEBUG (MainThread) [multizone_thermostat.guest_room.heat.pid] output: 40.43200873993271
2022-01-01 17:40:59 DEBUG (MainThread) [multizone_thermostat.guest_room] Obtained current control output: 45.842
2022-01-01 17:40:59 DEBUG (MainThread) [multizone_thermostat.guest_room] Time until switch.underfloor_heating_ground_floor_2 turns off: 22.514264379119865 sec
2022-01-01 17:40:59 DEBUG (MainThread) [multizone_thermostat.guest_room] Time until switch.underfloor_heating_ground_floor_2 turns off: 22.496779237365715 sec
2022-01-01 17:41:17 DEBUG (MainThread) [multizone_thermostat.guest_room] Time until switch.underfloor_heating_ground_floor_2 turns off: 4.495323453521721 sec
2022-01-01 17:41:35 DEBUG (MainThread) [multizone_thermostat.guest_room] Time exceeds 'on-time' by switch.underfloor_heating_ground_floor_2 sec: turn off: -14.0
2022-01-01 17:41:35 DEBUG (MainThread) [multizone_thermostat.guest_room] Turn OFF called
2022-01-01 17:41:35 DEBUG (MainThread) [multizone_thermostat.guest_room] Order OFF sent to switch device switch.underfloor_heating_ground_floor_2
2022-01-01 17:41:35 DEBUG (MainThread) [multizone_thermostat.guest_room] Switch of switch.underfloor_heating_ground_floor_2 changed to off
2022-01-01 17:41:53 DEBUG (MainThread) [multizone_thermostat.guest_room] Time until switch.underfloor_heating_ground_floor_2 turns on: 79.48341223182679 sec
2022-01-01 17:41:59 DEBUG (MainThread) [multizone_thermostat.guest_room] kp update temp 21.60000000004036
2022-01-01 17:41:59 DEBUG (MainThread) [multizone_thermostat.guest_room] update controller
2022-01-01 17:41:59 DEBUG (MainThread) [multizone_thermostat.guest_room.heat.pid] current temp 21.60000000004036 ; current velocity -4.959265204681922e-12
2022-01-01 17:41:59 DEBUG (MainThread) [multizone_thermostat.guest_room.heat.pid] P: 39.999999995963975
2022-01-01 17:41:59 DEBUG (MainThread) [multizone_thermostat.guest_room.heat.pid] I: 0.5040089384622906
2022-01-01 17:41:59 DEBUG (MainThread) [multizone_thermostat.guest_room.heat.pid] D: 1.0910383450300228e-06
2022-01-01 17:41:59 DEBUG (MainThread) [multizone_thermostat.guest_room.heat.pid] output: 40.50401002546461
2022-01-01 17:41:59 DEBUG (MainThread) [multizone_thermostat.guest_room] Obtained current control output: 45.914
2022-01-01 17:41:59 DEBUG (MainThread) [multizone_thermostat.guest_room] Time until switch.underfloor_heating_ground_floor_2 turns on: 73.37442733268738 sec
2022-01-01 17:42:11 DEBUG (MainThread) [multizone_thermostat.guest_room] Time until switch.underfloor_heating_ground_floor_2 turns on: 61.352618946838376 sec
2022-01-01 17:42:29 DEBUG (MainThread) [multizone_thermostat.guest_room] Time until switch.underfloor_heating_ground_floor_2 turns on: 43.35197783927917 sec
2022-01-01 17:42:33 DEBUG (MainThread) [multizone_thermostat.guest_room] Sensor temperature updated to 21.7
2022-01-01 17:42:33 DEBUG (MainThread) [multizone_thermostat.guest_room] Current temperature updated to 21.7
2022-01-01 17:42:33 DEBUG (MainThread) [multizone_thermostat.guest_room] kp update temp 21.62887488193732
vindaalex commented 2 years ago

Great! πŸ˜…. Log looks as expected. Can you rerun with your control_interval and pwm?

stomko11 commented 2 years ago

I did switch all rooms back to multizone thermostat, and I did go with pwm of 1 hour and control_interval of 180 seconds for each satellite. Right now, there is only one room that is heating and it works ok. Maybe I was just too impatient, which - in combination with pwm set to 2 hours and control_interval of 10 minutes resulted in the mess I saw? Who knows. I will keep an eye on it. Is there a way to force minimal cycle duration when using PID+weather? I noticed this is just for on/off. I want to avoid situations that zone will open for short time only, as in any case, those heater cycles take long, + counting time just to open valves itself, I guess anything less than 20 minutes does not make much sense.

I will observe during night if temperatures drop below setpoint, or by how much, and report back likely tomorrow.

Then the next step would be to figure out master_thermostat.

btw, I still struggle understanding all those values, how they relate to each other, what needs to be in satellite, what in master, so I will definitely have further questions. So I apologize in advance.

To make things clear - control interval basically defines how often PID values, temperature, ... are checked to determine the control output. And control output is defined in %? So If I get 100, that means 100% of PWM the heater will be on (in my case now, 1 hour). And that control output can change since control_interval is 180 seconds, so it is possible that if control output is 50, but I open windows, temperature drops, in next control cycle, it will determine that output should be 100 because temperature decreased? Am I right?

vindaalex commented 2 years ago

I did switch all rooms back to multizone thermostat, and I did go with pwm of 1 hour and control_interval of 180 seconds for each satellite. Right now, there is only one room that is heating and it works ok. Maybe I was just too impatient, which - in combination with pwm set to 2 hours and control_interval of 10 minutes resulted in the mess I saw? Who knows. I will keep an eye on it.

It might be. Maybe regular changes and reloading of the thermostat or HA resulted in re-initiation of hte thermostat.

Is there a way to force minimal cycle duration when using PID+weather? I noticed this is just for on/off. I want to avoid situations that zone will open for short time only, as in any case, those heater cycles take long, + counting time just to open valves itself, I guess anything less than 20 minutes does not make much sense.

You have specified minimal_diff in the proportial_mode section. This is the minimum value of valve_pos before pwm will set a switch to "on". This should prevent short durations where the switch is "on". This quick on-off-on or off-on-off switch could occur when valve_pos is very low but not equal to 0 or very high but not equal to 100. Only the valve_pos low is covered (thus off-on-off). The other is for a feature code update.

I will observe during night if temperatures drop below setpoint, or by how much, and report back likely tomorrow.

Ok, keep me informed.

Then the next step would be to figure out master_thermostat.

Indeed

btw, I still struggle understanding all those values, how they relate to each other, what needs to be in satellite, what in master, so I will definitely have further questions. So I apologize in advance.

No worries.

To make things clear - control interval basically defines how often PID values, temperature, ... are checked to determine the control output. Yes

And control output is defined in %?

In most cases the thermostat is specified with difference = 100 thus 100 = 100%. In case you specifiy difference = 36 then 36 = 100% and valve_pos is less easy to convert to percentages as 36 as valve_pos would result in switch constantly on.

So If I get 100, that means 100% of PWM the heater will be on (in my case now, 1 hour). And that control output can change since control_interval is 180 seconds, so it is possible that if control output is 50, but I open windows, temperature drops, in next control cycle, it will determine that output should be 100 because temperature decreased? Am I right?

Yes, this is correct. The control_interval updates the valve_pos which is used for the pwm cycle. Currently the pwm cycle is checked at an interval 1/10 of the pwm duration. Also an update of the control loop results in a direct adjustment of the pwm on or off time. Both could results in a drift of the pwm cycle whereby all thermostats could have varying start times of the pwm cycle. I think this is also the case for the PID thermostat.

Thus in your case you want to switch the heatpump on-off based on the most heat requiring thermostat (longest 'on' time) it needs to have the master thermostats and all satelites in sync for their pwm loop, at least all at the same time switching 'on'. Writing this I realise that the preferred heatpump control (master thermostat) in sync with all of the satelite thermostats to provide heat when valves are open is not possible (yet). I will give it some thought if all could be kept in sync.

If I understand it correctly often a buffer storage is added to the heating system in case zone-heating is present due to this varying heat requirement per zone. Does your system have a buffer inlcuded? If you have a buffer, I wonder, could you control the heatpump by switching the heatpump to 'on' when any single thermostat requires heat valve_pos > minimal_diff and 'off' when max of all valve_pos < minimal_diff. I expect the heatpump itself will stop heating when dT of the water is too small and start heating when the dT is above a certain limit. The logic/control would then be of the heatpump itself. Only I expect when limited amount of heat is required it could increase quick heatpump off-on switching.

Sorry for the bad news.. I hope we still can find a solution as a heatpump has my interest as well ...

stomko11 commented 2 years ago

OK, so one by one. I have switched all satellites to mutlizone_thermostat. I pretty much observe correct behavior for satellites now, they turn on and off when needed. One of the things I can't explain was (and that is probably related to PID, I had same issue with smart_thermostat) that some rooms heat when temperature is above set point.

Example: guest room It switched ON at 1:49:36 AM and OFF at 2:01:36. Set point at that time was 21,5 degrees, while actual room temperature was 21,9.

image

This lines up with energy usage that went up at that time - main heater turned on via automation and heat pump started to heat: image

Additional graph just FYI is to understand what's going with heating at that time: On the left, there is temperature of leaving hot water vs. inlet water temperature. I capture this data every 30 seconds. At some point, those temperatures line up (with difference of deltaT), meaning heat was transferred to the concrete and what's returning is the same temperature, as no more heat could be transferred. This could be regulated a bit by lowering manually throughput on the zone, slowing the flow down should prolong the time of hot water traversing through the concrete, thus increase amount of heat that can be transferred. On the right, it is flow (l/min), normally with no circuits opened, just 2 bathroom radiators, flow is around 17l/min. At 1:57 (7 minutes after signaling source to heat), valves get fully opened as there is visible jump in flow 17l/min --> 20l/min and this is when temperature curves start to shift as heat pump starts to heat the water and that heat is being transferred. So as you can see, turning heater ON brings actual leaving water temperature increase few minutes later. So possibly, I might increase PWM back to 2 hours. Will decide later. image

So question - is there anything I can do about those unnecessary starts, when temperature is above set point? I have my debug running, here is what's captured at that time:

2022-01-02 01:46:41 DEBUG (MainThread) [multizone_thermostat.guest_room] Sensor outdoor temperature updated to 5.2
2022-01-02 01:46:41 DEBUG (MainThread) [multizone_thermostat.guest_room] Current outdoor temperature updated to 5.2
2022-01-02 01:47:40 DEBUG (MainThread) [multizone_thermostat.guest_room] Sensor outdoor temperature updated to 5.1
2022-01-02 01:47:40 DEBUG (MainThread) [multizone_thermostat.guest_room] Current outdoor temperature updated to 5.1
2022-01-02 01:48:30 DEBUG (MainThread) [multizone_thermostat.guest_room] Sensor temperature updated to 21.9
2022-01-02 01:48:30 DEBUG (MainThread) [multizone_thermostat.guest_room] Current temperature updated to 21.9
2022-01-02 01:48:30 DEBUG (MainThread) [multizone_thermostat.guest_room] kp update temp 21.926942655339666
2022-01-02 01:49:36 DEBUG (MainThread) [multizone_thermostat.guest_room] kp update temp 21.894387330474167
2022-01-02 01:49:36 DEBUG (MainThread) [multizone_thermostat.guest_room] update controller
2022-01-02 01:49:36 DEBUG (MainThread) [multizone_thermostat.guest_room.heat.pid] current temp 21.894387330474167 ; current velocity -0.0005934222496245847
2022-01-02 01:49:36 DEBUG (MainThread) [multizone_thermostat.guest_room.heat.pid] P: -39.43873304741672
2022-01-02 01:49:36 DEBUG (MainThread) [multizone_thermostat.guest_room.heat.pid] I: -0.21297138610341354
2022-01-02 01:49:36 DEBUG (MainThread) [multizone_thermostat.guest_room.heat.pid] D: 130.55289491740862
2022-01-02 01:49:36 DEBUG (MainThread) [multizone_thermostat.guest_room.heat.pid] output: 90.90119048388848
2022-01-02 01:49:36 DEBUG (MainThread) [multizone_thermostat.guest_room] Obtained current control output: 100.0
2022-01-02 01:49:36 DEBUG (MainThread) [multizone_thermostat.guest_room] Turn ON
2022-01-02 01:49:36 DEBUG (MainThread) [multizone_thermostat.guest_room] Order ON sent to switch device switch.underfloor_heating_ground_floor_2
2022-01-02 01:49:36 DEBUG (MainThread) [multizone_thermostat.guest_room] Switch of switch.underfloor_heating_ground_floor_2 changed to on
2022-01-02 01:51:33 DEBUG (MainThread) [multizone_thermostat.guest_room] Sensor outdoor temperature updated to 5
2022-01-02 01:51:33 DEBUG (MainThread) [multizone_thermostat.guest_room] Current outdoor temperature updated to 5
2022-01-02 01:52:07 DEBUG (MainThread) [multizone_thermostat.guest_room] Sensor outdoor temperature updated to 4.9
2022-01-02 01:52:07 DEBUG (MainThread) [multizone_thermostat.guest_room] Current outdoor temperature updated to 4.9
2022-01-02 01:52:36 DEBUG (MainThread) [multizone_thermostat.guest_room] kp update temp 21.86895824753847
2022-01-02 01:52:36 DEBUG (MainThread) [multizone_thermostat.guest_room] update controller
2022-01-02 01:52:36 DEBUG (MainThread) [multizone_thermostat.guest_room.heat.pid] current temp 21.86895824753847 ; current velocity -0.0003660168142812138
2022-01-02 01:52:36 DEBUG (MainThread) [multizone_thermostat.guest_room.heat.pid] P: -36.895824753846895
2022-01-02 01:52:36 DEBUG (MainThread) [multizone_thermostat.guest_room.heat.pid] I: -0.41220901262836146
2022-01-02 01:52:36 DEBUG (MainThread) [multizone_thermostat.guest_room.heat.pid] D: 80.52369914186703
2022-01-02 01:52:36 DEBUG (MainThread) [multizone_thermostat.guest_room.heat.pid] output: 43.21566537539177
2022-01-02 01:52:36 DEBUG (MainThread) [multizone_thermostat.guest_room] Obtained current control output: 52.976
2022-01-02 01:52:36 DEBUG (MainThread) [multizone_thermostat.guest_room] Time until switch.underfloor_heating_ground_floor_2 turns off: 1907.1349030361175 sec
2022-01-02 01:55:36 DEBUG (MainThread) [multizone_thermostat.guest_room] kp update temp 21.863222094513038
2022-01-02 01:55:36 DEBUG (MainThread) [multizone_thermostat.guest_room] update controller
2022-01-02 01:55:36 DEBUG (MainThread) [multizone_thermostat.guest_room.heat.pid] current temp 21.863222094513038 ; current velocity -0.00025415920920734286
2022-01-02 01:55:36 DEBUG (MainThread) [multizone_thermostat.guest_room.heat.pid] P: -36.32220945130378
2022-01-02 01:55:36 DEBUG (MainThread) [multizone_thermostat.guest_room.heat.pid] I: -0.6083501054761862
2022-01-02 01:55:36 DEBUG (MainThread) [multizone_thermostat.guest_room.heat.pid] D: 55.91502602561543
2022-01-02 01:55:36 DEBUG (MainThread) [multizone_thermostat.guest_room.heat.pid] output: 18.98446646883547
2022-01-02 01:55:36 DEBUG (MainThread) [multizone_thermostat.guest_room] Obtained current control output: 28.745
2022-01-02 01:55:36 DEBUG (MainThread) [multizone_thermostat.guest_room] Time until switch.underfloor_heating_ground_floor_2 turns off: 854.8177571964263 sec
2022-01-02 01:56:33 DEBUG (MainThread) [multizone_thermostat.guest_room] Sensor outdoor temperature updated to 5
2022-01-02 01:56:33 DEBUG (MainThread) [multizone_thermostat.guest_room] Current outdoor temperature updated to 5
2022-01-02 01:57:06 DEBUG (MainThread) [multizone_thermostat.guest_room] Sensor outdoor temperature updated to 4.9
2022-01-02 01:57:06 DEBUG (MainThread) [multizone_thermostat.guest_room] Current outdoor temperature updated to 4.9
2022-01-02 01:57:40 DEBUG (MainThread) [multizone_thermostat.guest_room] Sensor outdoor temperature updated to 4.7
2022-01-02 01:57:40 DEBUG (MainThread) [multizone_thermostat.guest_room] Current outdoor temperature updated to 4.7
2022-01-02 01:58:36 DEBUG (MainThread) [multizone_thermostat.guest_room] Time until switch.underfloor_heating_ground_floor_2 turns off: 674.819638557434 sec
2022-01-02 01:58:36 DEBUG (MainThread) [multizone_thermostat.guest_room] kp update temp 21.860810213999898
2022-01-02 01:58:36 DEBUG (MainThread) [multizone_thermostat.guest_room] update controller
2022-01-02 01:58:36 DEBUG (MainThread) [multizone_thermostat.guest_room.heat.pid] pid timediff: 180.0 < sampletime 180: keep previous value
2022-01-02 01:58:36 DEBUG (MainThread) [multizone_thermostat.guest_room] Obtained current control output: 28.863
2022-01-02 01:58:36 DEBUG (MainThread) [multizone_thermostat.guest_room] Time until switch.underfloor_heating_ground_floor_2 turns off: 679.0663489513397 sec
2022-01-02 01:58:46 DEBUG (MainThread) [multizone_thermostat.guest_room] Sensor outdoor temperature updated to 4.6
2022-01-02 01:58:46 DEBUG (MainThread) [multizone_thermostat.guest_room] Current outdoor temperature updated to 4.6
2022-01-02 02:00:26 DEBUG (MainThread) [multizone_thermostat.guest_room] Sensor outdoor temperature updated to 4.5
2022-01-02 02:00:26 DEBUG (MainThread) [multizone_thermostat.guest_room] Current outdoor temperature updated to 4.5
2022-01-02 02:01:33 DEBUG (MainThread) [multizone_thermostat.guest_room] Sensor outdoor temperature updated to 4.4
2022-01-02 02:01:33 DEBUG (MainThread) [multizone_thermostat.guest_room] Current outdoor temperature updated to 4.4
2022-01-02 02:01:36 DEBUG (MainThread) [multizone_thermostat.guest_room] kp update temp 21.8593544225018
2022-01-02 02:01:36 DEBUG (MainThread) [multizone_thermostat.guest_room] update controller
2022-01-02 02:01:36 DEBUG (MainThread) [multizone_thermostat.guest_room.heat.pid] current temp 21.8593544225018 ; current velocity -0.00015642217138321594
2022-01-02 02:01:36 DEBUG (MainThread) [multizone_thermostat.guest_room.heat.pid] P: -35.93544225017986
2022-01-02 02:01:36 DEBUG (MainThread) [multizone_thermostat.guest_room.heat.pid] I: -0.9964531406076534
2022-01-02 02:01:36 DEBUG (MainThread) [multizone_thermostat.guest_room.heat.pid] D: 34.412877704307505
2022-01-02 02:01:36 DEBUG (MainThread) [multizone_thermostat.guest_room.heat.pid] output: -2.5190176864800122
2022-01-02 02:01:36 DEBUG (MainThread) [multizone_thermostat.guest_room] Obtained current control output: 7.536
2022-01-02 02:01:36 DEBUG (MainThread) [multizone_thermostat.guest_room] Time exceeds 'on-time' by switch.underfloor_heating_ground_floor_2 sec: turn off: -269.0
2022-01-02 02:01:36 DEBUG (MainThread) [multizone_thermostat.guest_room] Turn OFF called
2022-01-02 02:01:36 DEBUG (MainThread) [multizone_thermostat.guest_room] Order OFF sent to switch device switch.underfloor_heating_ground_floor_2
2022-01-02 02:01:36 DEBUG (MainThread) [multizone_thermostat.guest_room] Switch of switch.underfloor_heating_ground_floor_2 changed to off
2022-01-02 02:04:36 DEBUG (MainThread) [multizone_thermostat.guest_room] Time until switch.underfloor_heating_ground_floor_2 turns on: 3148.706121925354 sec
2022-01-02 02:04:36 DEBUG (MainThread) [multizone_thermostat.guest_room] kp update temp 21.85833015770776
2022-01-02 02:04:36 DEBUG (MainThread) [multizone_thermostat.guest_room] update controller

For now, looks like other "spikes" that can be observed on energy graph above, are rooms that demanded heat, because temperature hit or was closing to set point, so it heated for a moment to keep/increase the temperature. I won't focuse on those right now, as they seem OK.

So this is the current "problem". I will observe behavior and temperature progresses throughout the day.

In regards to master thermostat - so how is master thermostat controlling the heater on/off? Once I switch to it, is there any added value compared to my automation? My automation is really dumb - every 3 minutes or so, check if any of rooms' hvac action is "heating". If yes, turn on heater, if no, turn it off. I also have fail safe directly on relay switch (is configured with auto-off feature), so in case my HA dies, heating will turn off. I guess turning off is better than having it on forever. But back to master thermostat - is it applying any logic? I am not saying that cycles between satellites need to be in sync. I am actually trying to think of what could be the ideal scenario. Clearly, I would prefer not to turn it on if satellite is above set point, yet it kicks off, but that needs to be addressed in the satellite. For the master, maybe if only one satellite is about to demand heat, it could check how the others look. If there is chance that other will need heat too (not sure how that prediction would be done, based on which criteria), it could wait a little longer before turning it on. But on the other hand - wouldn't it ruing PID calculations for the satellite? Just thinking out loud.

Regarding your question if my heater has buffer. No, it does not. And as I was building the house and learning more about those, I found out that there are many ways, and you can't really find universal one. One would install the buffer, other would not. Seems like installers either keep doing what they used to in the past, some don't. One approach is that since new heatpumps can modulate temperature, there is no need to keep buffer warm, why heating more water than needed. That used to be in the past when you had gas heater and once you heated the water, you could not regulate it properly, so heating buffer was an option to keep the extra unnecessary warmth in the "buffer", and that's not needed nowadays. However you will find others that install that no matter what. Unfortunate truth is that many installers these days don't know how it should be done, they get quick "how to" from heat pump producers. But do they know? πŸ™‚

That's all for now, it is not little.

stomko11 commented 2 years ago

I just noticed following errors in the core log, not sure if this is related to HA OS 7.1 update, or they were there before:

2022-01-05 01:10:32 ERROR (MainThread) [homeassistant.core] Error executing service: <ServiceCall climate.set_temperature (c:0da73f1347fd62832e19e0f1bdc7bacd): hvac_mode=heat, temperature=22.0, entity_id=['climate.bathroom']>
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/core.py", line 1511, in catch_exceptions
    await coro_or_task
  File "/usr/src/homeassistant/homeassistant/core.py", line 1530, in _execute_service
    await handler.job.target(service_call)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 209, in handle_service
    await self.hass.helpers.service.entity_service_call(
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 663, in entity_service_call
    future.result()  # pop exception if have
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 896, in async_request_call
    await coro
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 700, in _handle_entity_call
    await result
  File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 586, in async_service_temperature_set
    await entity.async_set_temperature(**kwargs)
  File "/config/custom_components/multizone_thermostat/climate.py", line 989, in async_set_temperature
    self._hvac_on.target_temperature = temperature
AttributeError: 'NoneType' object has no attribute 'target_temperature'
2022-01-05 01:10:32 ERROR (MainThread) [homeassistant.core] Error executing service: <ServiceCall climate.set_temperature (c:afd4270d77c4899ee3e785130cc30f7e): hvac_mode=heat, temperature=21.0, entity_id=['climate.office']>
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/core.py", line 1511, in catch_exceptions
    await coro_or_task
  File "/usr/src/homeassistant/homeassistant/core.py", line 1530, in _execute_service
    await handler.job.target(service_call)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 209, in handle_service
    await self.hass.helpers.service.entity_service_call(
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 663, in entity_service_call
    future.result()  # pop exception if have
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 896, in async_request_call
    await coro
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 700, in _handle_entity_call
    await result
  File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 586, in async_service_temperature_set
    await entity.async_set_temperature(**kwargs)
  File "/config/custom_components/multizone_thermostat/climate.py", line 989, in async_set_temperature
    self._hvac_on.target_temperature = temperature
AttributeError: 'NoneType' object has no attribute 'target_temperature'
2022-01-05 01:10:32 ERROR (MainThread) [homeassistant.core] Error executing service: <ServiceCall climate.set_temperature (c:d82c1fcc07ba7ec1c4303dd2be2333d7): hvac_mode=heat, temperature=22.0, entity_id=['climate.master_bathroom']>
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/core.py", line 1511, in catch_exceptions
    await coro_or_task
  File "/usr/src/homeassistant/homeassistant/core.py", line 1530, in _execute_service
    await handler.job.target(service_call)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 209, in handle_service
    await self.hass.helpers.service.entity_service_call(
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 663, in entity_service_call
    future.result()  # pop exception if have
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 896, in async_request_call
    await coro
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 700, in _handle_entity_call
    await result
  File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 586, in async_service_temperature_set
    await entity.async_set_temperature(**kwargs)
  File "/config/custom_components/multizone_thermostat/climate.py", line 989, in async_set_temperature
    self._hvac_on.target_temperature = temperature
AttributeError: 'NoneType' object has no attribute 'target_temperature'
2022-01-05 01:10:32 ERROR (MainThread) [homeassistant.core] Error executing service: <ServiceCall climate.set_temperature (c:5ab74a6c859f14ed83371257f7cec59c): hvac_mode=heat, temperature=22.5, entity_id=['climate.master_bedroom']>
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/core.py", line 1511, in catch_exceptions
    await coro_or_task
  File "/usr/src/homeassistant/homeassistant/core.py", line 1530, in _execute_service
    await handler.job.target(service_call)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 209, in handle_service
    await self.hass.helpers.service.entity_service_call(
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 663, in entity_service_call
    future.result()  # pop exception if have
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 896, in async_request_call
    await coro
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 700, in _handle_entity_call
    await result
  File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 586, in async_service_temperature_set
    await entity.async_set_temperature(**kwargs)
  File "/config/custom_components/multizone_thermostat/climate.py", line 989, in async_set_temperature
    self._hvac_on.target_temperature = temperature
AttributeError: 'NoneType' object has no attribute 'target_temperature'
2022-01-05 01:10:32 ERROR (MainThread) [homeassistant.core] Error executing service: <ServiceCall climate.set_temperature (c:134e81cab5a710b255716b583dd0ef07): hvac_mode=heat, temperature=21.5, entity_id=['climate.kids_room']>
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/core.py", line 1511, in catch_exceptions
    await coro_or_task
  File "/usr/src/homeassistant/homeassistant/core.py", line 1530, in _execute_service
    await handler.job.target(service_call)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 209, in handle_service
    await self.hass.helpers.service.entity_service_call(
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 663, in entity_service_call
    future.result()  # pop exception if have
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 896, in async_request_call
    await coro
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 700, in _handle_entity_call
    await result
  File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 586, in async_service_temperature_set
    await entity.async_set_temperature(**kwargs)
  File "/config/custom_components/multizone_thermostat/climate.py", line 989, in async_set_temperature
    self._hvac_on.target_temperature = temperature
AttributeError: 'NoneType' object has no attribute 'target_temperature'
vindaalex commented 2 years ago

I think it could be two things. 1) thermostat was off while changing the temperature? 2) or something with unique_id. Could you check if all the thermostats loadedcorrectly. Are there duplicate climate entities present?

stomko11 commented 2 years ago

It is possible that it was around time when I did some reboots. For now, I ended up disabling weather compensation as I figured that this is already done by my heat pump that modulates leaving water temperature. So basically it would just double the negative effect (I suppose) - heating with lowever temperature water, and shorter than usual. @vindaalex I would like to try again and go with master thermostat. Below is my current master config (disabled for now) and one example of satellite - just PID, no weather compensation, pwm for satellite is 1 hour, with control interval of 180 seconds. Any recommendations for master (to change) to get the "ideal" operation? How does it actually operate the main switch? Does it send constant "on" in some intervals? I am asking as I have "fail safe" on the switch to turn it off after 15 minutes (auto off), so if it does not get regular ON commands, it will turn off.

Also, should I now revert these to true ?

  restore_from_old_state: False
  restore_parameters: False
  restore_integral: False

And my config:

- platform: multizone_thermostat
  name: master_thermostat
  sensor_out: sensor.espaltherma_outside
  sensor_filter: 3
  initial_hvac_mode: "off"
  initial_preset_mode: "none"
  precision: 0.1
  heat:
    entity_id: switch.heat_pump_switch
    initial_target_temp: 20
    away_temp: 17
    proportional_mode:
      control_interval:
        seconds: 600
      difference: 100
      minimal_diff: 5
      pwm:
        hours: 1
      MASTER_mode:
        satelites: [living_room, guest_room, bathroom, office, master_bathroom, master_bedroom, kids_room]
        goal: 0
        kp: -1
        ki: 0
        kd: 0
  sensor_stale_duration:
    hours: 12
  restore_from_old_state: False
  restore_parameters: False
  restore_integral: False

- platform: multizone_thermostat
  name: living_room
  sensor: sensor.living_room_e6_sensor_temperature
  sensor_out: sensor.espaltherma_outside
  sensor_filter: 2
  initial_hvac_mode: "heat"
  initial_preset_mode: "none"
  precision: 0.1
  heat:
    entity_id: switch.underfloor_heating_ground_floor
    min_temp: 17
    max_temp: 28
    initial_target_temp: 20
    away_temp: 17
    proportional_mode:
      control_interval:
        seconds: 180
      difference: 100
      minimal_diff: 5
      pwm:
        hours: 1
      PID_mode:
        kp: 100
        ki: 0.003
        kd: -220000
  sensor_stale_duration:
    hours: 12
  restore_from_old_state: False
  restore_parameters: False
  restore_integral: False
vindaalex commented 2 years ago

It is possible that it was around time when I did some reboots. ok. That could be indeed the cause.

... How does it actually operate the main switch? Does it send constant "on" in some intervals? I am asking as I have "fail safe" on the switch to turn it off after 15 minutes (auto off), so if it does not get regular ON commands, it will turn off.

It operates the switch just as a normal thermostat: when pwm time interval is specified then the switch is operated with that cycle period. The valve_pos is defining the time on (incase difference is 100 then valve_pos is eqal to percentage open). So when for a longer period (>1 hour in your case) the valve_pos > 100 it remains open all the time until it is updated to a lower value.

Also, should I now revert these to true ?

  restore_from_old_state: False
  restore_parameters: False
  restore_integral: False
restore_from_old_state: True
restore_parameters: False
restore_integral: True

In this case the original settings are restored

restore_from_old_state: True
restore_parameters: False
restore_integral: True

In this case yaml settings which are updated by services are restored with the updated values. Yaml ones are not used.

not required for master as no weather mode is used

  sensor_out: sensor.espaltherma_outside
  sensor_filter: 3
- platform: multizone_thermostat
  name: master_thermostat
  initial_hvac_mode: "off"
  initial_preset_mode: "none"
  precision: 0.1
  heat:
    entity_id: switch.heat_pump_switch
    initial_target_temp: 20
    away_temp: 17
    proportional_mode:
      control_interval:
        seconds: 600
      difference: 100
      minimal_diff: 5
      pwm:
        hours: 1
      MASTER_mode:
        satelites: [living_room, guest_room, bathroom, office, master_bathroom, master_bedroom, kids_room]
        goal: 0
        kp: -1
        ki: 0
        kd: 0
  sensor_stale_duration:
    hours: 12
  restore_from_old_state: True
  restore_parameters: False
  restore_integral: True
stomko11 commented 2 years ago

So what is actually room_area? Is it defined in %? Meaning - if my goal is 100 (in master), then sum of rooms should be equal to 100? Let's say 1 room would take half of my entire house's area - should that room have room area 50? Or can that be any number, as long as they all add up to number defined as goal in master and represent proportional size of each room? Additionally - is sensor_filter applied only for outside temp sensor, or also for internal ones?

I also think you made a typo here as both are the same?

restore_from_old_state: True
restore_parameters: False
restore_integral: True

In this case the original settings are restored

restore_from_old_state: True
restore_parameters: False
restore_integral: True

In this case yaml settings which are updated by services are restored with the updated values. Yaml ones are not used.
vindaalex commented 2 years ago

So what is actually room_area? Is it defined in %? Meaning - if my goal is 100 (in master), then sum of rooms should be equal to 100? Let's say 1 room would take half of my entire house's area - should that room have room area 50? Or can that be any number, as long as they all add up to number defined as goal in master and represent proportional size of each room?

Yes, this can be any number to specify the ratio between rooms. My intention with this was indeed to use it as area ratio between rooms. So for instance a house with room floor area of 50,15,5 would calculate the average house temp and set point with these scale factors. The larger room would have a larger influence. Rooms where the thermostat has a different preset mode are not taken into account. Thus if master is in 'heat' mode and the rooms on 'heat', 'heat', 'off' then the last one is not included in the averaged values.

Additionally - is sensor_filter applied only for outside temp sensor, or also for internal ones?

It is used for the room sensor and the outdoor sensor.

I also think you made a typo here as both are the same?

Yes, it should have been

restore_from_old_state: True
restore_parameters: False
restore_integral: True

In this case the original settings are restored

restore_from_old_state: True
restore_parameters: True
restore_integral: True
stomko11 commented 2 years ago

I enabled master thermostat, but I could not get it to turn on heating. I had 2 rooms demanding heat - living room with largest room area, and then one room with area of 30. Yet, heating stayed off. I had debug disabled, so I don't have additional details for now, but here is how the state of master looked like:

hvac_modes:
  - heat
  - 'off'
min_temp: 22.7
max_temp: 22.7
target_temp_step: 0.1
preset_modes:
  - none
  - away
current_temperature: 22.4
temperature: 22.7
hvac_action: idle
preset_mode: none
current_temp_filt: 22.35
current_outdoor_temp: null
room_area: 0
hvac_def:
  heat:
    target_temp: 22.71
    satelite_allowed: false
    satelites:
      - living_room
      - guest_room
      - bathroom
      - office
      - master_bathroom
      - master_bedroom
      - kids_room
    valve_pos: 0
    Valve_PID_values:
      - -1
      - 0
      - 0
    Valve_PID_integral: 0
    Valve_differential: 0
    Valve_PID_valve_pos: 0
friendly_name: master_thermostat
supported_features: 17

And here is config (master + 1 example room)

- platform: multizone_thermostat
  name: master_thermostat
  initial_hvac_mode: "heat"
  initial_preset_mode: "none"
  precision: 0.1
  heat:
    entity_id: switch.heat_pump_switch
    initial_target_temp: 20
    away_temp: 17
    proportional_mode:
      control_interval:
        seconds: 180
      difference: 100
      minimal_diff: 5
      pwm:
        hours: 2
      MASTER_mode:
        satelites: [living_room, guest_room, bathroom, office, master_bathroom, master_bedroom, kids_room]
        goal: 190
        kp: -1
        ki: 0
        kd: 0
  sensor_stale_duration:
    hours: 12
  restore_from_old_state: False
  restore_parameters: False
  restore_integral: False

- platform: multizone_thermostat
  name: living_room
  sensor: sensor.living_room_e6_sensor_temperature
  sensor_filter: 2
  room_area: 50
  initial_hvac_mode: "heat"
  initial_preset_mode: "none"
  precision: 0.1
  heat:
    entity_id: switch.underfloor_heating_ground_floor
    min_temp: 17
    max_temp: 28
    initial_target_temp: 20
    away_temp: 17
    proportional_mode:
      control_interval:
        seconds: 180
      difference: 100
      minimal_diff: 5
      pwm:
        hours: 2
      PID_mode:
        kp: 100
        ki: 0.003
        kd: -220000
  sensor_stale_duration:
    hours: 12
  restore_from_old_state: False
  restore_parameters: False
  restore_integral: False

Anything obviously wrong in my config?

vindaalex commented 2 years ago

The only odd thing i see is the goal: 190. How did you determined this value. Should this have been goal: 0 ?

Can you give the current attribute states of the thermostats?

stomko11 commented 2 years ago

I followed the example. I thought goal is supposed to be sum of room areas. Did I get that wrong?

vindaalex commented 2 years ago

Yes, the area is only used in the code. In your case it should be 0.

stomko11 commented 2 years ago

OK, I changed the goal to 0 and enabled master thermostat. In one room, I changed temperature to +3 degrees, just not to wait and kick the room thermostat (master bedroom). Anyhow, it is few moments and main thermostat is sitting in idle. Here are the stats from master and each room:

hvac_modes:
  - heat
  - 'off'
min_temp: 23
max_temp: 23
target_temp_step: 0.1
preset_modes:
  - none
  - away
current_temperature: 23.1
temperature: 23
hvac_action: idle
preset_mode: none
current_temp_filt: 23.05
current_outdoor_temp: null
room_area: 0
hvac_def:
  heat:
    target_temp: 23.03
    satelite_allowed: false
    satelites:
      - living_room
      - guest_room
      - bathroom
      - office
      - master_bathroom
      - master_bedroom
      - kids_room
    valve_pos: 0
    Valve_PID_values:
      - -1
      - 0
      - 0
    Valve_PID_integral: 0
    Valve_differential: 0
    Valve_PID_valve_pos: 0
friendly_name: master_thermostat
supported_features: 17

hvac_modes:
  - heat
  - 'off'
min_temp: 17
max_temp: 28
target_temp_step: 0.1
preset_modes:
  - none
  - away
current_temperature: 23.9
temperature: 22.5
hvac_action: idle
preset_mode: none
current_temp_filt: 23.9
current_outdoor_temp: null
room_area: 10
hvac_def:
  heat:
    target_temp: 22.5
    satelite_allowed: true
    valve_pos: 0
    PID_values:
      - 100
      - 0.003
      - -220000
    PID_integral: 0
    PID_differential: 0
    PID_valve_pos: 0
friendly_name: bathroom
supported_features: 17

hvac_modes:
  - heat
  - 'off'
min_temp: 17
max_temp: 28
target_temp_step: 0.1
preset_modes:
  - none
  - away
current_temperature: 23.9
temperature: 23
hvac_action: idle
preset_mode: none
current_temp_filt: 23.9
current_outdoor_temp: null
room_area: 50
hvac_def:
  heat:
    target_temp: 23
    satelite_allowed: true
    valve_pos: 0
    PID_values:
      - 100
      - 0.003
      - -220000
    PID_integral: 0
    PID_differential: 0
    PID_valve_pos: 0
friendly_name: living_room
supported_features: 17

hvac_modes:
  - heat
  - 'off'
min_temp: 17
max_temp: 28
target_temp_step: 0.1
preset_modes:
  - none
  - away
current_temperature: 22.9
temperature: 23
hvac_action: idle
preset_mode: none
current_temp_filt: 22.9
current_outdoor_temp: null
room_area: 30
hvac_def:
  heat:
    target_temp: 23
    satelite_allowed: true
    valve_pos: 10.054
    PID_values:
      - 100
      - 0.003
      - -220000
    PID_integral: 18
    PID_differential: 0
    PID_valve_pos: 10.054
friendly_name: guest_room
supported_features: 17

hvac_modes:
  - heat
  - 'off'
min_temp: 17
max_temp: 28
target_temp_step: 0.1
preset_modes:
  - none
  - away
current_temperature: 21.3
temperature: 21
hvac_action: idle
preset_mode: none
current_temp_filt: 21.3
current_outdoor_temp: null
room_area: 20
hvac_def:
  heat:
    target_temp: 21
    satelite_allowed: true
    valve_pos: 0
    PID_values:
      - 100
      - 0.003
      - -220000
    PID_integral: 0
    PID_differential: 0
    PID_valve_pos: 0
friendly_name: office
supported_features: 17

hvac_modes:
  - heat
  - 'off'
min_temp: 17
max_temp: 28
target_temp_step: 0.1
preset_modes:
  - none
  - away
current_temperature: 22.8
temperature: 23
hvac_action: idle
preset_mode: none
current_temp_filt: 22.8
current_outdoor_temp: null
room_area: 30
hvac_def:
  heat:
    target_temp: 23
    satelite_allowed: true
    valve_pos: 20.108
    PID_values:
      - 100
      - 0.003
      - -220000
    PID_integral: 36.001
    PID_differential: 0
    PID_valve_pos: 20.108
friendly_name: kids_room
supported_features: 17

hvac_modes:
  - heat
  - 'off'
min_temp: 17
max_temp: 28
target_temp_step: 0.1
preset_modes:
  - none
  - away
current_temperature: 23.4
temperature: 22.5
hvac_action: idle
preset_mode: none
current_temp_filt: 23.4
current_outdoor_temp: null
room_area: 20
hvac_def:
  heat:
    target_temp: 22.5
    satelite_allowed: true
    valve_pos: 0
    PID_values:
      - 100
      - 0.003
      - -220000
    PID_integral: 0
    PID_differential: 0
    PID_valve_pos: 0
friendly_name: master_bathroom
supported_features: 17

hvac_modes:
  - heat
  - 'off'
min_temp: 17
max_temp: 28
target_temp_step: 0.1
preset_modes:
  - none
  - away
current_temperature: 22.7
temperature: 25
hvac_action: heating
preset_mode: none
current_temp_filt: 22.7
current_outdoor_temp: null
room_area: 30
hvac_def:
  heat:
    target_temp: 25
    satelite_allowed: true
    valve_pos: 100
    PID_values:
      - 100
      - 0.003
      - -220000
    PID_integral: 761.273
    PID_differential: 0
    PID_valve_pos: 100
friendly_name: master_bedroom
supported_features: 17

I also tried to change set temp of room with largest area, but the result is the same.

vindaalex commented 2 years ago

Some of the rooms show a heat requirement valve_pos > 0 thus this should result in an update of the master. Note that this could take 3 minutes as control_interval is 180 sec. Changes in each room thermostat are not triggering the master, the master checks for changes each control_interval. Thus I would expect that with the shown heat requirements at least after 6 to 9 minutes a valve_pos > 0 should be present at the master.

stomko11 commented 2 years ago

OK, activated main thermostat again, this time with debug, set temperature high in room with biggest area, and gave it 11 minutes. Nothing happened. Here is the state of master and the room:

hvac_modes:
  - heat
  - 'off'
min_temp: 23.3
max_temp: 23.3
target_temp_step: 0.1
preset_modes:
  - none
  - away
current_temperature: 22.6
temperature: 23.3
hvac_action: idle
preset_mode: none
current_temp_filt: 22.64
current_outdoor_temp: null
room_area: 0
hvac_def:
  heat:
    target_temp: 23.34
    satelite_allowed: false
    satelites:
      - living_room
      - guest_room
      - bathroom
      - office
      - master_bathroom
      - master_bedroom
      - kids_room
    valve_pos: 0
    Valve_PID_values:
      - -1
      - 0
      - 0
    Valve_PID_integral: 0
    Valve_differential: 0
    Valve_PID_valve_pos: 0
friendly_name: master_thermostat
supported_features: 17
hvac_modes:
  - heat
  - 'off'
min_temp: 17
max_temp: 28
target_temp_step: 0.1
preset_modes:
  - none
  - away
current_temperature: 22.5
temperature: 26
hvac_action: heating
preset_mode: none
current_temp_filt: 22.5
current_outdoor_temp: null
room_area: 50
hvac_def:
  heat:
    target_temp: 26
    satelite_allowed: true
    valve_pos: 100
    PID_values:
      - 100
      - 0.003
      - -220000
    PID_integral: 2520.013
    PID_differential: 0
    PID_valve_pos: 100
friendly_name: living_room
supported_features: 17

And here is the debug, there are some warnings which I don't understand how to fix (if that's relevant):

2022-01-20 00:09:37 DEBUG (MainThread) [multizone_thermostat.master_thermostat] receiving thermostat guest_room update. new state: heat
2022-01-20 00:09:37 DEBUG (MainThread) [multizone_thermostat.master_thermostat] update from satelite: guest_room to state heat
2022-01-20 00:09:37 DEBUG (MainThread) [multizone_thermostat.master_thermostat.heat] new data for : guest_room
2022-01-20 00:09:41 DEBUG (MainThread) [multizone_thermostat.master_thermostat] update controller
2022-01-20 00:09:41 WARNING (MainThread) [multizone_thermostat.master_thermostat.heat.valve_pid] no setpoint specified, return with previous control value 0
2022-01-20 00:09:41 DEBUG (MainThread) [multizone_thermostat.master_thermostat] Obtained current control output: 0
2022-01-20 00:09:45 DEBUG (MainThread) [multizone_thermostat.master_thermostat] receiving thermostat living_room update. new state: heat
2022-01-20 00:09:45 DEBUG (MainThread) [multizone_thermostat.master_thermostat] update from satelite: living_room to state heat
2022-01-20 00:09:45 DEBUG (MainThread) [multizone_thermostat.master_thermostat.heat] new data for : living_room
2022-01-20 00:09:45 DEBUG (MainThread) [multizone_thermostat.master_thermostat] receiving thermostat living_room update. new state: heat
2022-01-20 00:09:45 DEBUG (MainThread) [multizone_thermostat.master_thermostat] update from satelite: living_room to state heat
2022-01-20 00:09:45 DEBUG (MainThread) [multizone_thermostat.master_thermostat.heat] new data for : living_room
2022-01-20 00:09:45 DEBUG (MainThread) [multizone_thermostat.master_thermostat] receiving thermostat living_room update. new state: heat
2022-01-20 00:09:45 DEBUG (MainThread) [multizone_thermostat.master_thermostat] update from satelite: living_room to state heat
2022-01-20 00:09:45 DEBUG (MainThread) [multizone_thermostat.master_thermostat.heat] new data for : living_room
2022-01-20 00:12:37 DEBUG (MainThread) [multizone_thermostat.master_thermostat] receiving thermostat guest_room update. new state: heat
2022-01-20 00:12:37 DEBUG (MainThread) [multizone_thermostat.master_thermostat] update from satelite: guest_room to state heat
2022-01-20 00:12:37 DEBUG (MainThread) [multizone_thermostat.master_thermostat.heat] new data for : guest_room
2022-01-20 00:12:41 DEBUG (MainThread) [multizone_thermostat.master_thermostat] update controller
2022-01-20 00:12:41 WARNING (MainThread) [multizone_thermostat.master_thermostat.heat.valve_pid] no setpoint specified, return with previous control value 0
2022-01-20 00:12:41 DEBUG (MainThread) [multizone_thermostat.master_thermostat] Obtained current control output: 0
2022-01-20 00:15:37 DEBUG (MainThread) [multizone_thermostat.master_thermostat] receiving thermostat living_room update. new state: heat
2022-01-20 00:15:37 DEBUG (MainThread) [multizone_thermostat.master_thermostat] update from satelite: living_room to state heat
2022-01-20 00:15:37 DEBUG (MainThread) [multizone_thermostat.master_thermostat.heat] new data for : living_room
2022-01-20 00:15:37 DEBUG (MainThread) [multizone_thermostat.master_thermostat] receiving thermostat guest_room update. new state: heat
2022-01-20 00:15:37 DEBUG (MainThread) [multizone_thermostat.master_thermostat] update from satelite: guest_room to state heat
2022-01-20 00:15:37 DEBUG (MainThread) [multizone_thermostat.master_thermostat.heat] new data for : guest_room
2022-01-20 00:15:41 DEBUG (MainThread) [multizone_thermostat.master_thermostat] update controller
2022-01-20 00:15:41 WARNING (MainThread) [multizone_thermostat.master_thermostat.heat.valve_pid] no setpoint specified, return with previous control value 0
2022-01-20 00:15:41 DEBUG (MainThread) [multizone_thermostat.master_thermostat] Obtained current control output: 0
2022-01-20 00:18:37 DEBUG (MainThread) [multizone_thermostat.master_thermostat] receiving thermostat living_room update. new state: heat
2022-01-20 00:18:37 DEBUG (MainThread) [multizone_thermostat.master_thermostat] update from satelite: living_room to state heat
2022-01-20 00:18:37 DEBUG (MainThread) [multizone_thermostat.master_thermostat.heat] new data for : living_room
2022-01-20 00:18:37 DEBUG (MainThread) [multizone_thermostat.master_thermostat] receiving thermostat guest_room update. new state: heat
2022-01-20 00:18:37 DEBUG (MainThread) [multizone_thermostat.master_thermostat] update from satelite: guest_room to state heat
2022-01-20 00:18:37 DEBUG (MainThread) [multizone_thermostat.master_thermostat.heat] new data for : guest_room
2022-01-20 00:18:41 DEBUG (MainThread) [multizone_thermostat.master_thermostat] update controller
2022-01-20 00:18:41 WARNING (MainThread) [multizone_thermostat.master_thermostat.heat.valve_pid] no setpoint specified, return with previous control value 0
2022-01-20 00:18:41 DEBUG (MainThread) [multizone_thermostat.master_thermostat] Obtained current control output: 0
2022-01-20 00:21:37 DEBUG (MainThread) [multizone_thermostat.master_thermostat] receiving thermostat living_room update. new state: heat
2022-01-20 00:21:37 DEBUG (MainThread) [multizone_thermostat.master_thermostat] update from satelite: living_room to state heat
2022-01-20 00:21:37 DEBUG (MainThread) [multizone_thermostat.master_thermostat.heat] new data for : living_room
2022-01-20 00:21:37 DEBUG (MainThread) [multizone_thermostat.master_thermostat] receiving thermostat guest_room update. new state: heat
2022-01-20 00:21:37 DEBUG (MainThread) [multizone_thermostat.master_thermostat] update from satelite: guest_room to state heat
2022-01-20 00:21:37 DEBUG (MainThread) [multizone_thermostat.master_thermostat.heat] new data for : guest_room
2022-01-20 00:21:41 DEBUG (MainThread) [multizone_thermostat.master_thermostat] update controller
2022-01-20 00:21:41 WARNING (MainThread) [multizone_thermostat.master_thermostat.heat.valve_pid] no setpoint specified, return with previous control value 0
2022-01-20 00:21:41 DEBUG (MainThread) [multizone_thermostat.master_thermostat] Obtained current control output: 0

and also debug for the room where I increased temperature:

2022-01-20 00:09:37 DEBUG (MainThread) [multizone_thermostat.living_room] kp update temp 22.50000000100588
2022-01-20 00:09:37 DEBUG (MainThread) [multizone_thermostat.living_room] update controller
2022-01-20 00:09:37 DEBUG (MainThread) [multizone_thermostat.living_room.heat.pid] current temp 22.50000000100588 ; current velocity 2.6552053452035403e-11
2022-01-20 00:09:37 DEBUG (MainThread) [multizone_thermostat.living_room.heat.pid] P: -1.0058798238787858e-07
2022-01-20 00:09:37 DEBUG (MainThread) [multizone_thermostat.living_room.heat.pid] I: 0.0
2022-01-20 00:09:37 DEBUG (MainThread) [multizone_thermostat.living_room.heat.pid] D: -5.841451759447789e-06
2022-01-20 00:09:37 DEBUG (MainThread) [multizone_thermostat.living_room.heat.pid] output: 0
2022-01-20 00:09:37 DEBUG (MainThread) [multizone_thermostat.living_room] Obtained current control output: 0
2022-01-20 00:09:45 DEBUG (MainThread) [multizone_thermostat.living_room] Temperature updated to 26.0 for mode heat
2022-01-20 00:09:45 DEBUG (MainThread) [multizone_thermostat.living_room] kp update temp 22.500000002391108
2022-01-20 00:09:45 DEBUG (MainThread) [multizone_thermostat.living_room] update controller
2022-01-20 00:09:45 DEBUG (MainThread) [multizone_thermostat.living_room.heat.pid] current temp 22.500000002391108 ; current velocity 1.774838382348057e-11
2022-01-20 00:09:45 DEBUG (MainThread) [multizone_thermostat.living_room.heat.pid] P: 349.99999976088924
2022-01-20 00:09:45 DEBUG (MainThread) [multizone_thermostat.living_room.heat.pid] I: 0.0876262803671151
2022-01-20 00:09:45 DEBUG (MainThread) [multizone_thermostat.living_room.heat.pid] D: -3.904644441165725e-06
2022-01-20 00:09:45 DEBUG (MainThread) [multizone_thermostat.living_room.heat.pid] output: 100.0
2022-01-20 00:09:45 DEBUG (MainThread) [multizone_thermostat.living_room] Obtained current control output: 100.0
2022-01-20 00:09:45 DEBUG (MainThread) [multizone_thermostat.living_room] Turn ON
2022-01-20 00:09:45 DEBUG (MainThread) [multizone_thermostat.living_room] Order ON sent to switch device switch.underfloor_heating_ground_floor
2022-01-20 00:09:45 DEBUG (MainThread) [multizone_thermostat.living_room] Switch of switch.underfloor_heating_ground_floor changed to on
2022-01-20 00:12:37 DEBUG (MainThread) [multizone_thermostat.living_room] kp update temp 22.500000002742933
2022-01-20 00:12:37 DEBUG (MainThread) [multizone_thermostat.living_room] update controller
2022-01-20 00:12:37 DEBUG (MainThread) [multizone_thermostat.living_room.heat.pid] pid timediff: 172.0 < sampletime 180: keep previous value
2022-01-20 00:12:37 DEBUG (MainThread) [multizone_thermostat.living_room] Obtained current control output: 100.0
2022-01-20 00:15:37 DEBUG (MainThread) [multizone_thermostat.living_room] kp update temp 22.500000000937092
2022-01-20 00:15:37 DEBUG (MainThread) [multizone_thermostat.living_room] update controller
2022-01-20 00:15:37 DEBUG (MainThread) [multizone_thermostat.living_room.heat.pid] current temp 22.500000000937092 ; current velocity 2.5695063874924927e-12
2022-01-20 00:15:37 DEBUG (MainThread) [multizone_thermostat.living_room.heat.pid] P: 349.9999999062908
2022-01-20 00:15:37 DEBUG (MainThread) [multizone_thermostat.living_room.heat.pid] I: 3.7800221389776247
2022-01-20 00:15:37 DEBUG (MainThread) [multizone_thermostat.living_room.heat.pid] D: -5.652914052483484e-07
2022-01-20 00:15:37 DEBUG (MainThread) [multizone_thermostat.living_room.heat.pid] output: 100.0
2022-01-20 00:15:37 DEBUG (MainThread) [multizone_thermostat.living_room] Obtained current control output: 100.0
2022-01-20 00:18:37 DEBUG (MainThread) [multizone_thermostat.living_room] kp update temp 22.50000000192816
2022-01-20 00:18:37 DEBUG (MainThread) [multizone_thermostat.living_room] update controller
2022-01-20 00:18:37 DEBUG (MainThread) [multizone_thermostat.living_room.heat.pid] current temp 22.50000000192816 ; current velocity 4.030185361821734e-12
2022-01-20 00:18:37 DEBUG (MainThread) [multizone_thermostat.living_room.heat.pid] P: 349.99999980718394
2022-01-20 00:18:37 DEBUG (MainThread) [multizone_thermostat.living_room.heat.pid] I: 5.670032669719516
2022-01-20 00:18:37 DEBUG (MainThread) [multizone_thermostat.living_room.heat.pid] D: -8.866407796007815e-07
2022-01-20 00:18:37 DEBUG (MainThread) [multizone_thermostat.living_room.heat.pid] output: 100.0
2022-01-20 00:18:37 DEBUG (MainThread) [multizone_thermostat.living_room] Obtained current control output: 100.0
2022-01-20 00:21:37 DEBUG (MainThread) [multizone_thermostat.living_room] kp update temp 22.500000003368793
2022-01-20 00:21:37 DEBUG (MainThread) [multizone_thermostat.living_room] update controller
2022-01-20 00:21:37 DEBUG (MainThread) [multizone_thermostat.living_room.heat.pid] current temp 22.500000003368793 ; current velocity 2.5363980717155312e-12
2022-01-20 00:21:37 DEBUG (MainThread) [multizone_thermostat.living_room.heat.pid] P: 349.99999966312066
2022-01-20 00:21:37 DEBUG (MainThread) [multizone_thermostat.living_room.heat.pid] I: 7.560037937547007
2022-01-20 00:21:37 DEBUG (MainThread) [multizone_thermostat.living_room.heat.pid] D: -5.580075757774168e-07
2022-01-20 00:21:37 DEBUG (MainThread) [multizone_thermostat.living_room.heat.pid] output: 100.0
2022-01-20 00:21:37 DEBUG (MainThread) [multizone_thermostat.living_room] Obtained current control output: 100.0
vindaalex commented 2 years ago

Aah, I think I see the problem, seems to be a bug. Could you give it a try with goal: 1?

stomko11 commented 2 years ago

It worked, but I quickly returned back to my automation switching main heater on/off. The reason is - during those few hours, heating was turned on few times for 10 minutes only, regardless if there was still heat demand from room. In one case, 2 rooms reported "heating", so almost hour later, main thermostat kicked in, but at the time it turned on, those 2 rooms changed from heating to idle. Which results in turning on main heater, while all circuits are closed, which is useless.

vindaalex commented 2 years ago

Unfortunately this is currently the limitation. The thermostats are not synchronised regarding the moments the valves are on. I will have a look if those can be synchronised.

When operating without the master does it give similar behaviour as the PID thermostat?

stomko11 commented 2 years ago

It does. I am using it and not noticing any discomfort, overshoots, except for few occasions where room that's well above set point, kicks in and starts heating. I have noticed that few times. Overall I am happy with the way how it works. PID tuning was a bit of headache for me (thanks to Adrien.b). Next level would be having a possibility to look at schedule for particular thermostat, see when and how the setpoint will change, to not heat if for instance setpoint will lower in 20 minutes. But I guess I would want too much :-)

vindaalex commented 1 year ago

Unfortunately this is currently the limitation. The thermostats are not synchronised regarding the moments the valves are on. I will have a look if those can be synchronised.

When operating without the master does it give similar behaviour as the PID thermostat?

New version has synchronization between master and satellites