Heaty will die, Schedy be born!

Does schedy work OK with the new OpenZWave (Beta) integration? I ask because it seems that Schedy is not controlling my Danfoss radiator valves anymore.

Background

I had a stable schedy installation that worked perfectly all through last winter (UK), controlling a set of Danfoss ZWave radiator valves through the original ZWave integration. I upgraded to the new OpenZWave (Beta) integration soon after it was released.

Initially it did not support climate entities but that didn’t matter because the heating was off anyway :slight_smile: Recently, the integration added support for the Danfoss valves and I can now control them through the UI.

The problem

This morning, I noticed one of the rads was set to 28C (the heating still comes on for one hour in the morning to heat the towel rail in the bathroom). All rads should be set to 17C in the summer, and Schedy should be resetting them if they get changed manually. However, it seems Schedy is not actually doing so.

The logs indicate that schedy is asking HA to set a radiator setpoint, but is not getting a confirmation. It resends a number of times and then gives up.

2020-08-22 11:50:10.039196 WARNING schedy_heating: !!! [R:livingroom] [A:climate.livingroom_radiator_thermostat] Re-sending value due to missing confirmation.
2020-08-22 11:50:10.047779 INFO schedy_heating: <-- [R:livingroom] [A:climate.livingroom_radiator_thermostat] Setting value 10.0�� (left tries = 1, interval = 30).
2020-08-22 11:50:10.057125 INFO schedy_heating: <-- [R:livingroom] [A:climate.livingroom_radiator_thermostat] Setting temperature = 10.0��, HVAC mode = 'heat'.
2020-08-22 11:50:10.242819 INFO schedy_heating: --- [R:livingroom] Unchanged HA state: state='10.0', attributes={'actor_wanted_values': {'climate.livingroom_radiator_thermostat': '10.0', 'climate.diningroom_radiator_thermostat': '10.0'}, 'scheduled_value': '10.0', 'rescheduling_time': None, 'overlay_active': False}
2020-08-22 11:50:10.275711 WARNING schedy_heating: !!! [R:livingroom] [A:climate.diningroom_radiator_thermostat] Re-sending value due to missing confirmation.
2020-08-22 11:50:10.278588 INFO schedy_heating: <-- [R:livingroom] [A:climate.diningroom_radiator_thermostat] Setting value 10.0�� (left tries = 1, interval = 30).
2020-08-22 11:50:10.281591 INFO schedy_heating: <-- [R:livingroom] [A:climate.diningroom_radiator_thermostat] Setting temperature = 10.0��, HVAC mode = 'heat'.
2020-08-22 11:50:10.353747 INFO schedy_heating: --- [R:livingroom] Unchanged HA state: state='10.0', attributes={'actor_wanted_values': {'climate.livingroom_radiator_thermostat': '10.0', 'climate.diningroom_radiator_thermostat': '10.0'}, 'scheduled_value': '10.0', 'rescheduling_time': None, 'overlay_active': False}
2020-08-22 11:50:38.014576 WARNING schedy_heating: !!! [R:bedroom_1] [A:climate.bedroom_1_radiator_thermostat] Gave up sending value after 10 retries.
2020-08-22 11:50:38.017561 INFO schedy_heating: --- [R:bedroom_1] Unchanged HA state: state='10.0', attributes={'actor_wanted_values': {'climate.bedroom_1_radiator_thermostat': '10.0'}, 'scheduled_value': '10.0', 'rescheduling_time': None, 'overlay_active': False}
2020-08-22 11:50:40.018551 WARNING schedy_heating: !!! [R:livingroom] [A:climate.livingroom_radiator_thermostat] Gave up sending value after 10 retries.
2020-08-22 11:50:40.021619 INFO schedy_heating: --- [R:livingroom] Unchanged HA state: state='10.0', attributes={'actor_wanted_values': {'climate.livingroom_radiator_thermostat': '10.0', 'climate.diningroom_radiator_thermostat': '10.0'}, 'scheduled_value': '10.0', 'rescheduling_time': None, 'overlay_active': False}
2020-08-22 11:50:40.054875 WARNING schedy_heating: !!! [R:livingroom] [A:climate.diningroom_radiator_thermostat] Gave up sending value after 10 retries.
2020-08-22 11:50:40.057898 INFO schedy_heating: --- [R:livingroom] Unchanged HA state: state='10.0', attributes={'actor_wanted_values': {'climate.livingroom_radiator_thermostat': '10.0', 'climate.diningroom_radiator_thermostat': '10.0'}, 'scheduled_value': '10.0', 'rescheduling_time': None, 'overlay_active': False}

The config is

schedy_heating:  # This is our app instance name.
  module: hass_apps_loader
  class: SchedyApp

  debug: true

  reset_at_startup: false

  actor_type: thermostat

  expression_environment: |
    def home_tomorrow():
      return state("input_boolean.home_tomorrow")

    def house_mode():
      return state("input_select.house_mode")

    def house_vacant():
      return state("input_boolean.house_vacant")

    def season():
      return state("input_select.season")

    def gareth_away():
      return (state('device_tracker.life360_gareth') == 'not_home')

    def varina_away():
      return (state('device_tracker.life360_varina') == 'not_home')

  schedule_snippets:

  watched_entities:
    - input_boolean.home_tomorrow
    - input_boolean.house_vacant
    - input_select.house_mode
    - input_select.season
    - device_tracker.life360_gareth
    - device_tracker.life360_varina

  schedule_prepend:
    - x: "10 if house_mode() == 'Away' else Next()"

  # default rule to apply if no other matches
  schedule_append:
    - v: 17

  rooms:
    bedroom_1:
      rescheduling_delay: 60
      actors:
        climate.bedroom_1_radiator_thermostat:
      schedule:
        - v: "19 if season() == 'Winter' else 17"
          rules:
            - x: "17 if house_vacant() else Next()"
            - { start: "07:00", end: "09:00" }
            - { start: "19:00", end: "22:00" }

    bedroom_2:
      rescheduling_delay: 0
      actors:
        climate.bedroom_2_radiator_thermostat:
      schedule:
        - v: "22 if season() == 'Winter' else 17"
          rules:
            - x: "17 if varina_away() or house_vacant() else Next()"
            - { start: "07:00", end: "22:00" }

    landing:
      actors:
        climate.landing_radiator_thermostat:
      schedule:
        - x: "17 if house_vacant() or season() == 'Summer' else Next()"
        - v: 20
          rules:
            - weekdays: 1-5
              rules:
              - rules:
                - x: "Next() if house_mode() == 'Home - Normal Day' else Break()"
                - { start: "07:00", end: "09:00" }
                - { start: "17:00", end: "22:00" }
              - rules:
                - x: "Next() if house_mode() == 'Home - Home Day' else Break()"
                - { start: "07:00", end: "22:00" }
            - weekdays: 6-7
              rules:
                - x: "17 if house_vacant() else Next()"
                - { start: "07:00", end: "22:00" }

    livingroom:
      rescheduling_delay: 0
      replicate_changes: true
      actors:
        climate.livingroom_radiator_thermostat:
        climate.diningroom_radiator_thermostat:
      schedule:
        - v: "19 if season() == 'Winter' else 17"
          rules:
            - weekdays: 1-5
              rules:
              - rules:
                - x: "17 if house_vacant() else Next()"
                - x: "Next() if house_mode() == 'Home - Normal Day' else Break()"
                - { start: "07:00", end: "09:00" }
                - { start: "17:00", end: "22:00" }
              - rules:
                - x: "17 if house_vacant() else Next()"
                - x: "Next() if house_mode() == 'Home - Home Day' else Break()"
                - { start: "07:00", end: "22:00" }
            - weekdays: 6-7
              rules:
                - x: "17 if house_vacant() else Next()"
                - { start: "07:00", end: "22:00" }

Hi @Guff666

I haven’t used the new integration yet, still on the normal zwave component.

Have you tried calling the two services manually from HA developer tools? You need to fill in the correct entity id of course.

service: climate.set_hvac_mode
data: {"entity_id": "...", "hvac_mode": "heat"}

service: climate.set_temperature
data: {"entity_id": "...", "temperature": 10.0}

This is what Schedy does. How do your thermostats react to those calls?

And then please check the HVAC modes your thermostat offer. Also in the developer tools, search for the climate entity and post its attributes here as YAML. Maybe the HVAC mode isn’t supported or something.

It’s OK. Somehow some errors crept into my config.

@roschi, using this for years and it is brilliant. However, I updated AppDaemon4 to 0.3.1 last night and this morning this schedule has stopped working behaved oddly, wouldn’t work then suddenly started to.

room config

    study:
      schedule:
      - { x: 21 if is_on('input_boolean.vir_study') and state('person.brian') == 'home' else Next(), start: "07:00", end: "22:00", weekdays: "1-7"}
      - value: 17
      rescheduling_delay: 15
      actors:
        climate.study:
      watched_entities:
        - person.brian
        - input_boolean.vir_study

When the input boolean is true and I am home, set to 21. This worked before the update.

I noted from the docs that the conditions are now in quotes so I tried…

- { x: "21 if is_on('input_boolean.vir_study') and state('person.brian') == 'home' else Next()", start: "07:00", end: "22:00", weekdays: "1-7"}

No change

When I change the input boolean I get this is the logs and the value doesn’t change.

2020-10-03 06:51:35.033282 INFO schedy_thermostat: --> Attribute 'state' of 'input_boolean.vir_study' changed from 'off' to 'on', reevaluating <Room R:study>.
2020-10-03 06:51:35.039770 INFO schedy_thermostat: --- [R:study] Doing schedule re-evaluation in 1 second [reset=False]
2020-10-03 06:51:36.021074 INFO schedy_thermostat: --- [R:study] Evaluating room's schedule (reset=False, force_resend=False).
2020-10-03 06:51:36.029967 INFO schedy_thermostat: --- [R:study] Assuming it to be 2020-10-03 06:51:36.025259.
2020-10-03 06:51:36.034095 INFO schedy_thermostat: --- [R:study] ������ [SUB]  <<Schedule 'study'>/1:<Rule with sub <Schedule 'room-individual'>>>
2020-10-03 06:51:36.038402 INFO schedy_thermostat: --- [R:study]     ������ [INA]  <<Schedule 'study'>/1/1:<Rule from 07:00 to 22:00, weekdays={1-7}, x="21 if is_on('input_boolean.vir_study') a"...>>
2020-10-03 06:51:36.042481 INFO schedy_thermostat: --- [R:study]     ������ [ACT]  <<Schedule 'study'>/1/2:<Rule v=17>>
2020-10-03 06:51:36.047365 INFO schedy_thermostat: --- [R:study]     ������ => 17
2020-10-03 06:51:36.051020 INFO schedy_thermostat: --- [R:study] Final result: 17.0��, markers: set()
2020-10-03 06:51:36.054968 INFO schedy_thermostat: --- [R:study] Result didn't change, not setting it again.
2020-10-03 06:51:36.058755 INFO schedy_thermostat: --- [R:study] Unchanged HA state: state='17.0', attributes={'actor_wanted_values': {'climate.study': '17.0'}, 'scheduled_value': '17.0', 'rescheduling_time': None, 'overlay_active': False}

I tried just the is_on condition check and it seems schedy is not evaluating this correctly.

I am still on 0.114.4

Very Odd - suddenly started working. However, note the difference in the logs. I have not restarted AppDaemon or HA. I checked the person sensor and the input_boolean were as expected.

2020-10-03 07:04:33.270043 INFO schedy_thermostat: --> Attribute 'state' of 'input_boolean.vir_study' changed from 'off' to 'on', reevaluating <Room R:study>.
2020-10-03 07:04:33.273127 INFO schedy_thermostat: --- [R:study] Doing schedule re-evaluation in 1 second [reset=False]
2020-10-03 07:04:34.024977 INFO schedy_thermostat: --- [R:study] Evaluating room's schedule (reset=False, force_resend=False).
2020-10-03 07:04:34.033488 INFO schedy_thermostat: --- [R:study] Assuming it to be 2020-10-03 07:04:34.029603.
2020-10-03 07:04:34.037594 INFO schedy_thermostat: --- [R:study] ������ [SUB]  <<Schedule 'study'>/1:<Rule with sub <Schedule 'room-individual'>>>
2020-10-03 07:04:34.042969 INFO schedy_thermostat: --- [R:study]     ������ [ACT]  <<Schedule 'study'>/1/1:<Rule from 07:00 to 22:00, weekdays={1-7}, x="21 if is_on('input_boolean.vir_study') a"...>>
2020-10-03 07:04:34.046892 INFO schedy_thermostat: --- [R:study] Initializing expression helper: BasicHelper, order = 0
2020-10-03 07:04:34.051207 INFO schedy_thermostat: --- [R:study] Initializing expression helper: PatternHelper, order = 0
2020-10-03 07:04:34.054753 INFO schedy_thermostat: --- [R:study] Initializing expression helper: ScheduleHelper, order = 0
2020-10-03 07:04:34.058450 INFO schedy_thermostat: --- [R:study] Initializing expression helper: StateHelper, order = 0
2020-10-03 07:04:34.062567 INFO schedy_thermostat: --- [R:study] Initializing expression helper: ThermostatExpressionHelper, order = 0
2020-10-03 07:04:34.066423 INFO schedy_thermostat: --- [R:study] Initializing expression helper: CustomEnvironmentHelper, order = 1000
2020-10-03 07:04:34.083531 INFO schedy_thermostat: --- [R:study]     ������ => 21
2020-10-03 07:04:34.087402 INFO schedy_thermostat: --- [R:study] Final result: 21.0��, markers: set()
2020-10-03 07:04:34.090718 INFO schedy_thermostat: --- [R:study] Setting value to 21.0��.  [scheduled]
2020-10-03 07:04:34.094841 INFO schedy_thermostat: <-- [R:study] [A:climate.study] Setting value 21.0�� (left tries = 11, interval = 30).
2020-10-03 07:04:34.099312 INFO schedy_thermostat: <-- [R:study] [A:climate.study] Setting temperature = 21.0��, HVAC mode = 'heat'.
2020-10-03 07:04:34.206743 INFO schedy_thermostat: <-- [R:study] Value set to 21.0��.  [scheduled]
2020-10-03 07:04:34.209854 INFO schedy_thermostat: <-- [R:study] Sending state to HA: state='21.0', attributes={'actor_wanted_values': {'climate.study': '21.0'}, 'scheduled_value': '21.0', 'rescheduling_time': None, 'overlay_active': False}
2020-10-03 07:04:34.296768 INFO schedy_thermostat: --> [R:study] [A:climate.study] Attribute 'state' is 'heat'.
2020-10-03 07:04:34.300067 INFO schedy_thermostat: --> [R:study] [A:climate.study] Attribute 'temperature' is 21.0.
2020-10-03 07:04:34.303179 INFO schedy_thermostat: --> [R:study] [A:climate.study] Attribute 'current_temperature' is 20.6.
2020-10-03 07:04:34.309511 INFO schedy_thermostat: --- [R:study] [A:climate.study] Cancelled re-sending timer.
2020-10-03 07:04:34.312736 INFO schedy_thermostat: --> [R:study] [A:climate.study] Received value of 21.0��.
2020-10-03 07:04:34.315584 INFO schedy_thermostat: --- [R:study] Unchanged HA state: state='21.0', attributes={'actor_wanted_values': {'climate.study': '21.0'}, 'scheduled_value': '21.0', 'rescheduling_time': None, 'overlay_active': False}
2020-10-03 07:04:34.354056 INFO schedy_thermostat: --> [R:study] [A:climate.study] Attribute 'state' is 'heat'.
2020-10-03 07:04:34.358988 INFO schedy_thermostat: --> [R:study] [A:climate.study] Attribute 'temperature' is 21.0.
2020-10-03 07:04:34.372197 INFO schedy_thermostat: --> [R:study] [A:climate.study] Attribute 'current_temperature' is 20.6.
2020-10-03 07:04:34.375716 INFO schedy_thermostat: --- [R:study] Unchanged HA state: state='21.0', attributes={'actor_wanted_values': {'climate.study': '21.0'}, 'scheduled_value': '21.0', 'rescheduling_time': None, 'overlay_active': False}

I hate things that just start working again…

It started to work when I reduced the condition to just check the boolean_input, but still works when restored to the original state (without quotes).

Just an FYI in the end.

Hi @baz123

Your rule is active from 7.00 am to 10.00 pm, but the log you posted shows the evaluation happened at 06:51:36, hence Schedy correctly considered the rule as inactive (denoted by the [INA] prefix) and didn’t even evaluate it.

Could you please verify whether that was the actual problem?

EDIT: And regarding the quotes, it’s always better to quote strings like the rule expressions in YAML, otherwise you will encounter strange errors for some expressions with brackets or other special characters. Better play it safe.

1 Like

Doh! :man_facepalming: I’m not usually up that early! Apologies.

Doh! :man_facepalming: I’m not usually up that early! Apologies.

No worries :slight_smile:

Sorry for a pretty basic question, but I didn’t quite understand it in the documentation. I want to have a “condition” based on the outside temp. The code below works, but I want the heating to only kick in if the outside temparature is below 14 degrees (I have a sensor that gives the outside temperature).

    stue:
      rescheduling_delay: 180
      actors:
        climate.mit_varmepumpe:
          off_temp: "OFF"
      schedule:
      - v: 21
        months: 1-3, 10-12
        weekdays: 1-5
        rules:
        - { start: "16:00", end: "22:00" }

      - v: 21
        months: 1-3, 10-12
        weekdays: 6,7
        rules:
        - { start: "09:00", end: "23:00" }

      - v: "OFF"

As far as I understood shedy is not able to push the current temperature of the room, based on other sensors, to the thermostat, or?

There were an older project from a different user that does that via appdaemon. But he is not developed it anymore.

Maybe you can take it as a feature request.

Just put in an if condition that only evaluates to true if temp is less than 14. You can watch the external temperature sensor for changes. See my config above, in this case it only sets the temp at the specified times if an input boolean is on and I’m home.

Hi @ATWindsor

Sorry for the late reply, these days are pretty busy.

What you want to achieve is pretty simple, just insert something like this as the first rule in your schedule:

- x: "OFF if float(state('sensor.outside_temp') or 0) > 20 else Next()"
2 Likes

@teqqy

As far as I understood shedy is not able to push the current temperature of the room, based on other sensors, to the thermostat, or?

I don’t quite understand what you want to do. Do you want your thermostat to use an external temperature sensor instead of the built-in one? Then I fear your luck depends on the willingness of the particular thermostat vendor to offer such a feature.

I need some help please (newbie). I have Zigbee Eurotronic TRVs which have the following modes:

hvac_modes:
  - 'off'
  - auto
  - heat
min_temp: 5
max_temp: 30
target_temp_step: 0.5
current_temperature: 21.5
temperature: 30
battery: 5
battery_low: false
current_heating_setpoint: 30
eurotronic_error_status: 0
eurotronic_host_flags:
  boost: true
  child_protection: false
  mirror_display: false
  window_open: false
eurotronic_system_mode: 5
linkquality: 119
local_temperature: 21.5
occupied_heating_setpoint: 30
pi_heating_demand: 100
system_mode: heat
unoccupied_heating_setpoint: 16
friendly_name: Thermostat Downstairs Lounge climate
supported_features: 1

At times, the TRV switches into “auto” and schedy then reports this:

2020-10-07 20:14:20.266581 INFO schedy_heating: --> [R:bathroom] [A:climate.thermostat_downstairs_bathroom_climate] Attribute 'state' is 'auto'.
2020-10-07 20:14:20.269868 ERROR schedy_heating: !!! [R:bathroom] [A:climate.thermostat_downstairs_bathroom_climate] Unknown HVAC mode 'auto', ignoring thermostat.
2020-10-07 20:14:20.273154 INFO schedy_heating: --- [R:bathroom] Unchanged HA state: state='OFF', attributes={'actor_wanted_values': {'climate.thermostat_downstairs_bathroom_climate': 'OFF'}, 'scheduled_value': 'OFF', 'rescheduling_time': None, 'overlay_active': False}

Other times the HVAC mode is also “heat”, what changes to I need to make, that the HVAC mode is recognised?

Hi,

It’s the second winter that I use schedy but this autumn windows are not monitored anymore.

Something changed between now and spring?

This is my code that worked :

studio:
  rescheduling_delay: 120
  actors:
    climate.002018a99d17fb:
  watched_entities:
  - binary_sensor.001558a99d4529_state
  schedule:
  - v: 21
    rules:
      - x: "Next() if heating_mode() == 'Acceso' else Break()"
      - { start: "07:30", end: "23:30" }
  - v: 30
    months: 5-9

In appdaemon log I see this message when opening a window:

2020-10-09 13:01:28.300121 INFO schedy_heating: → Attribute ‘state’ of ‘binary_sensor.001558a99d4529_state’ changed from ‘off’ to ‘on’, reevaluating .

But nothing happens ( I was expection to switch off climate because in my file I have this:

schedule_append:
  - v: "OFF"

While climate status stays on heat.

Can someone please support me?

@Jokerigno This for sure never worked without a rule querying the window sensor. Please follow the guide in the tips and tricks section in docs and set up your schedule_prepend and customize.yaml accordingly.

Hi @magicdude4eva

The question is: Why does it switch to auto in the first place? As documented in the thermostat actor docs, Schedy needs to know exactly one HVAC mode it treats as “thermostat in operation” (“heat” by default) and one it considers as “thermostat is turned off” (“off” by default).

If you aren’t happy with this limitation, disable HVAC mode support in Schedy, but then you won’t be able to turn it off completely any longer.

You are right schedule_prepend was commented. I changed it and now it works properly.

Can I ask you something more?

I noticed that my rooms are often more hot that I requested. I think it’s because my radiator are quite old so even if the valve is closed when they reach the desired tempereature they are so hot that they will increase the temperature.

There’s something that schedy can do about it?

Thank you

Thanks, when reading Eurotronic SPZB0001 control via MQTT | Zigbee2MQTT it states:

The system mode will be either off , auto , or heat . When set to heat the boost host flags will be set, when using off the window_open host flag will be set (and off will be displayed on the display).

I read that “heat” actually means “boost” - i.e. max heat. Should I then not set?

  supports_hvac_modes: false
  off_temp: "OFF"
  hvac_mode_on: "auto"
  hvac_mode_off: "off"

No one using Eurotronic SPZB0001 with Schedy?

Yes i like that. Its totally useless to measure room temperature directly on the radiator. I like to have a specific temperature in the room so the radiator should heat as long the temperature is reached.

I do not use just one sensor. I have multipe in the room. On the ceiling, plant sensors, mutlisensor etc. That gives me a quite good median of the correct room temperature.

@magicdude4eva That sounds like you actually want it to be in either auto or off mode. If you set supports_hvac_modes: false, Schedy won’t care about the HVAC mode at all and hence the hvac_mode_* settings would have no effect. Why not just set hvac_mode_on: "auto"?