KartoffelToby / better_thermostat

This custom component for Home Assistant will add crucial features to your climate-controlling TRV (Thermostatic Radiator Valves) to save you the work of creating automations to make it smart. It combines a room-temperature sensor, window/door sensors, weather forecasts, or an ambient temperature probe to decide when it should call for heat and automatically calibrate your TRVs to fix the imprecise measurements taken in the radiator's vicinity.
https://better-thermostat.org
GNU Affero General Public License v3.0
717 stars 124 forks source link

Grouped TRVs automatically turn off #1145

Open deveth0 opened 8 months ago

deveth0 commented 8 months ago

Prerequisites

{
  "home_assistant": {
    "installation_type": "Home Assistant Container",
    "version": "2023.11.2",
    "dev": false,
    "hassio": false,
    "virtualenv": false,
    "python_version": "3.11.6",
    "docker": true,
    "arch": "x86_64",
    "timezone": "Europe/Berlin",
    "os_name": "Linux",
    "os_version": "6.2.16-19-pve",
    "run_as_root": true
  },
  "custom_components": {
    "better_thermostat": {
      "version": "1.4.0",
      "requirements": []
    },
    "climate_group": {
      "version": "0.4.2",
      "requirements": []
    },
    "hacs": {
      "version": "1.33.0",
      "requirements": [
        "aiogithubapi>=22.10.1"
      ]
    },
    "xiaomi_cloud_map_extractor": {
      "version": "v2.2.0",
      "requirements": [
        "pillow",
        "pybase64",
        "python-miio",
        "requests",
        "pycryptodome"
      ]
    }
  },
  "integration_manifest": {
    "domain": "better_thermostat",
    "name": "Better Thermostat",
    "after_dependencies": [
      "climate"
    ],
    "codeowners": [
      "@kartoffeltoby"
    ],
    "config_flow": true,
    "dependencies": [
      "climate",
      "recorder"
    ],
    "documentation": "https://github.com/KartoffelToby/better_thermostat",
    "iot_class": "local_push",
    "issue_tracker": "https://github.com/KartoffelToby/better_thermostat/issues",
    "requirements": [],
    "version": "1.4.0",
    "is_built_in": false
  },
  "data": {
    "info": {
      "name": "Heizung Wohnzimmer",
      "temperature_sensor": "sensor.temperatur_wohnzimmer_s1_temperature",
      "off_temperature": 20,
      "tolerance": 0.0,
      "humidity_sensor": "sensor.temperatur_wohnzimmer_s1_humidity",
      "outdoor_sensor": "sensor.temperatur_balkon_s10_temperature",
      "window_sensors": "binary_sensor.wohnzimmer_fenstersensoren",
      "weather": "weather.forecast_leipzig",
      "cooler": null,
      "window_off_delay": 0,
      "window_off_delay_after": 0,
      "model": "TS0601_thermostat/TS0601_thermostat"
    },
    "thermostat": {
      "climate.heizung_wohnzimmer_links_h2": {
        "name": "Heizung Wohnzimmer links - H2",
        "state": "off",
        "attributes": {
          "hvac_modes": [
            "heat",
            "auto",
            "off"
          ],
          "min_temp": 5.0,
          "max_temp": 35.0,
          "target_temp_step": 0.5,
          "preset_modes": [
            "none",
            "schedule",
            "manual",
            "boost",
            "complex",
            "comfort",
            "eco",
            "away"
          ],
          "current_temperature": 19.0,
          "temperature": 20.0,
          "hvac_action": "heating",
          "preset_mode": "manual",
          "auto_lock": "MANUAL",
          "away_mode": "OFF",
          "away_preset_days": 1,
          "away_preset_temperature": 15,
          "battery_low": false,
          "boost_time": 300,
          "child_lock": "UNLOCK",
          "comfort_temperature": 20,
          "current_heating_setpoint": 20,
          "eco_temperature": 15,
          "force": "close",
          "holidays": [
            {
              "hour": 6,
              "minute": 0,
              "temperature": 12
            },
            {
              "hour": 8,
              "minute": 0,
              "temperature": 12
            },
            {
              "hour": 18,
              "minute": 0,
              "temperature": 12
            },
            {
              "hour": 20,
              "minute": 30,
              "temperature": 12
            },
            {
              "hour": 22,
              "minute": 0,
              "temperature": 12
            },
            {
              "hour": 23,
              "minute": 30,
              "temperature": 12
            }
          ],
          "holidays_schedule": "06:00/12\u00b0C 08:00/12\u00b0C 18:00/12\u00b0C 20:30/12\u00b0C 22:00/12\u00b0C 23:30/12\u00b0C",
          "linkquality": 54,
          "local_temperature": 19,
          "local_temperature_calibration": 0,
          "max_temperature": 35,
          "min_temperature": 5,
          "position": 90,
          "preset": "manual",
          "programming_mode": null,
          "running_state": "heat",
          "system_mode": "off",
          "update": {
            "installed_version": 87,
            "latest_version": 87,
            "state": "idle"
          },
          "update_available": false,
          "valve_detection": null,
          "week": "7",
          "window_detection": "OFF",
          "window_detection_params": {
            "minutes": 10,
            "temperature": 5
          },
          "window_open": false,
          "workdays": [
            {
              "hour": 6,
              "minute": 0,
              "temperature": 12
            },
            {
              "hour": 8,
              "minute": 0,
              "temperature": 12
            },
            {
              "hour": 18,
              "minute": 0,
              "temperature": 12
            },
            {
              "hour": 20,
              "minute": 30,
              "temperature": 12
            },
            {
              "hour": 22,
              "minute": 0,
              "temperature": 12
            },
            {
              "hour": 23,
              "minute": 30,
              "temperature": 12
            }
          ],
          "workdays_schedule": "06:00/12\u00b0C 08:00/12\u00b0C 18:00/12\u00b0C 20:30/12\u00b0C 22:00/12\u00b0C 23:30/12\u00b0C",
          "friendly_name": "Heizung Wohnzimmer links - H2",
          "supported_features": 17
        },
        "bt_config": {
          "calibration": "local_calibration_based",
          "calibration_mode": "default",
          "protect_overheating": false,
          "no_off_system_mode": false,
          "heat_auto_swapped": true,
          "valve_maintenance": false,
          "child_lock": false,
          "homaticip": false
        },
        "bt_adapter": "mqtt",
        "bt_integration": "mqtt",
        "model": "TS0601_thermostat"
      },
      "climate.heizung_wohnzimmer_rechts_h1": {
        "name": "Heizung Wohnzimmer rechts - H1",
        "state": "off",
        "attributes": {
          "hvac_modes": [
            "heat",
            "auto",
            "off"
          ],
          "min_temp": 5.0,
          "max_temp": 35.0,
          "target_temp_step": 0.5,
          "preset_modes": [
            "none",
            "schedule",
            "manual",
            "boost",
            "complex",
            "comfort",
            "eco",
            "away"
          ],
          "current_temperature": 19.0,
          "temperature": 20.0,
          "hvac_action": "off",
          "preset_mode": "manual",
          "auto_lock": "MANUAL",
          "away_mode": "OFF",
          "away_preset_days": 1,
          "away_preset_temperature": 15,
          "battery_low": false,
          "boost_time": 300,
          "child_lock": "UNLOCK",
          "comfort_temperature": 20,
          "current_heating_setpoint": 20,
          "eco_temperature": 15,
          "force": "close",
          "holidays": [
            {
              "hour": 6,
              "minute": 0,
              "temperature": 12
            },
            {
              "hour": 8,
              "minute": 0,
              "temperature": 12
            },
            {
              "hour": 18,
              "minute": 0,
              "temperature": 12
            },
            {
              "hour": 20,
              "minute": 30,
              "temperature": 12
            },
            {
              "hour": 22,
              "minute": 0,
              "temperature": 12
            },
            {
              "hour": 23,
              "minute": 30,
              "temperature": 12
            }
          ],
          "holidays_schedule": "06:00/12\u00b0C 08:00/12\u00b0C 18:00/12\u00b0C 20:30/12\u00b0C 22:00/12\u00b0C 23:30/12\u00b0C",
          "linkquality": 51,
          "local_temperature": 19,
          "local_temperature_calibration": 0,
          "max_temperature": 35,
          "min_temperature": 5,
          "position": 0,
          "preset": "manual",
          "programming_mode": null,
          "running_state": "idle",
          "system_mode": "off",
          "update": {
            "installed_version": 87,
            "latest_version": 87,
            "state": "idle"
          },
          "update_available": false,
          "valve_detection": null,
          "week": "5+2",
          "window_detection": "OFF",
          "window_detection_params": {
            "minutes": 10,
            "temperature": 5
          },
          "window_open": false,
          "workdays": [
            {
              "hour": 6,
              "minute": 0,
              "temperature": 12
            },
            {
              "hour": 8,
              "minute": 0,
              "temperature": 12
            },
            {
              "hour": 18,
              "minute": 0,
              "temperature": 12
            },
            {
              "hour": 20,
              "minute": 30,
              "temperature": 12
            },
            {
              "hour": 22,
              "minute": 0,
              "temperature": 12
            },
            {
              "hour": 23,
              "minute": 30,
              "temperature": 12
            }
          ],
          "workdays_schedule": "06:00/12\u00b0C 08:00/12\u00b0C 18:00/12\u00b0C 20:30/12\u00b0C 22:00/12\u00b0C 23:30/12\u00b0C",
          "friendly_name": "Heizung Wohnzimmer rechts - H1",
          "supported_features": 17
        },
        "bt_config": {
          "calibration": "local_calibration_based",
          "calibration_mode": "default",
          "protect_overheating": false,
          "no_off_system_mode": false,
          "heat_auto_swapped": true,
          "valve_maintenance": false,
          "child_lock": false,
          "homaticip": false
        },
        "bt_adapter": "mqtt",
        "bt_integration": "mqtt",
        "model": "TS0601_thermostat"
      }
    },
    "external_temperature_sensor": {
      "entity_id": "sensor.temperatur_wohnzimmer_s1_temperature",
      "state": "19.5",
      "attributes": {
        "state_class": "measurement",
        "battery": 77,
        "humidity": 65.91,
        "linkquality": 105,
        "power_outage_count": 35448,
        "pressure": 987.9,
        "temperature": 19.5,
        "voltage": 2965,
        "unit_of_measurement": "\u00b0C",
        "device_class": "temperature",
        "friendly_name": "Temperatur Wohnzimmer - S1 Temperatur"
      },
      "last_changed": "2023-11-14T19:05:42.426890+00:00",
      "last_updated": "2023-11-14T19:05:42.435164+00:00",
      "context": {
        "id": "01HF7KK8935619RC9NRQHWPMCY",
        "parent_id": null,
        "user_id": null
      }
    },
    "window_sensor": {
      "entity_id": "binary_sensor.wohnzimmer_fenstersensoren",
      "state": "off",
      "attributes": {
        "entity_id": [
          "binary_sensor.fenster_wohnzimmer_rechts_f1_contact",
          "binary_sensor.fenster_wohnzimmer_links_f2_contact"
        ],
        "device_class": "window",
        "icon": "mdi:window-open",
        "friendly_name": "Wohnzimmer Fenstersensoren"
      },
      "last_changed": "2023-11-12T12:47:16.578932+00:00",
      "last_updated": "2023-11-12T12:47:16.578932+00:00",
      "context": {
        "id": "01HF1S4WJN9S9HXHNT76RK9VWE",
        "parent_id": null,
        "user_id": null
      }
    }
  }
}

Description

I created a group of two TRV0601 plus window sensors, outdoor sensors and so on. As soon as I try to set the heating do "on" it is automatically turned off shortly after.

Might be related to #1144 (?)

Steps to Reproduce

  1. Create group of TRVs
  2. Try to enable heating

Expected behavior:

Temperature should be set correctly, all TRVs should have HVAC mode auto.

Actual behavior:

HVAC mode is set and immediatly afterwards set to "off"

2023-11-14 20:10:42.567 DEBUG (MainThread) [custom_components.better_thermostat.utils.controlling] better_thermostat Heizung Wohnzimmer: TO TRV set_hvac_mode: climate.heizung_wohnzimmer_links_h2 from: off to: auto
2023-11-14 20:10:46.839 DEBUG (MainThread) [custom_components.better_thermostat.events.trv] better_thermostat Heizung Wohnzimmer: TRV climate.heizung_wohnzimmer_links_h2 update received
2023-11-14 20:10:46.839 ERROR (MainThread) [custom_components.better_thermostat.utils.helpers] better_thermostat Heizung Wohnzimmer: climate.heizung_wohnzimmer_links_h2 HVAC mode auto is not supported by this device, is it possible that you forgot to set the heat auto swapped option?
2023-11-14 20:10:46.839 DEBUG (MainThread) [custom_components.better_thermostat.events.trv] better_thermostat Heizung Wohnzimmer links: TRV climate.heizung_wohnzimmer_links_h2 update received
2023-11-14 20:10:46.839 DEBUG (MainThread) [custom_components.better_thermostat.events.trv] better_thermostat Heizung Wohnzimmer links: trigger_trv_change / _old_heating_setpoint: 20.0 - _new_heating_setpoint: 20.0 - _last_temperature: 5.0
2023-11-14 20:10:48.570 DEBUG (MainThread) [custom_components.better_thermostat.utils.controlling] better_thermostat Heizung Wohnzimmer: TO TRV set_hvac_mode: climate.heizung_wohnzimmer_rechts_h1 from: off to: auto
2023-11-14 20:10:54.544 DEBUG (MainThread) [custom_components.better_thermostat.events.trv] better_thermostat Heizung Wohnzimmer: TRV climate.heizung_wohnzimmer_rechts_h1 update received
2023-11-14 20:10:54.544 ERROR (MainThread) [custom_components.better_thermostat.utils.helpers] better_thermostat Heizung Wohnzimmer: climate.heizung_wohnzimmer_rechts_h1 HVAC mode auto is not supported by this device, is it possible that you forgot to set the heat auto swapped option?
2023-11-14 20:10:54.544 DEBUG (MainThread) [custom_components.better_thermostat.events.trv] better_thermostat Heizung Wohnzimmer: TRV climate.heizung_wohnzimmer_rechts_h1 decoded TRV mode changed from off to auto - converted auto
2023-11-14 20:10:54.544 DEBUG (MainThread) [custom_components.better_thermostat.events.trv] better_thermostat Heizung Wohnzimmer rechts: TRV climate.heizung_wohnzimmer_rechts_h1 update received
2023-11-14 20:10:54.544 DEBUG (MainThread) [custom_components.better_thermostat.events.trv] better_thermostat Heizung Wohnzimmer rechts: trigger_trv_change / _old_heating_setpoint: 20.0 - _new_heating_setpoint: 20.0 - _last_temperature: 20.0
2023-11-14 20:10:54.544 DEBUG (MainThread) [custom_components.better_thermostat.events.trv] better_thermostat Heizung Wohnzimmer rechts: TRV climate.heizung_wohnzimmer_rechts_h1 update received
2023-11-14 20:10:54.544 DEBUG (MainThread) [custom_components.better_thermostat.events.trv] better_thermostat Heizung Wohnzimmer rechts: trigger_trv_change / _old_heating_setpoint: 20.0 - _new_heating_setpoint: 20.0 - _last_temperature: 19.5
2023-11-14 20:10:54.545 DEBUG (MainThread) [custom_components.better_thermostat.events.trv] better_thermostat Heizung Wohnzimmer: TRV climate.heizung_wohnzimmer_rechts_h1 update received
2023-11-14 20:10:54.545 DEBUG (MainThread) [custom_components.better_thermostat.utils.controlling] better_thermostat Heizung Wohnzimmer: TO TRV set_hvac_mode: climate.heizung_wohnzimmer_links_h2 from: auto to: off
2023-11-14 20:10:59.718 DEBUG (MainThread) [custom_components.better_thermostat.events.trv] better_thermostat Heizung Wohnzimmer: TRV climate.heizung_wohnzimmer_links_h2 update received
2023-11-14 20:10:59.718 DEBUG (MainThread) [custom_components.better_thermostat.events.trv] better_thermostat Heizung Wohnzimmer links: TRV climate.heizung_wohnzimmer_links_h2 update received
2023-11-14 20:10:59.718 DEBUG (MainThread) [custom_components.better_thermostat.events.trv] better_thermostat Heizung Wohnzimmer links: TRV climate.heizung_wohnzimmer_links_h2 decoded TRV mode changed from auto to off - converted off
2023-11-14 20:10:59.718 DEBUG (MainThread) [custom_components.better_thermostat.events.trv] better_thermostat Heizung Wohnzimmer links: trigger_trv_change / _old_heating_setpoint: 20.0 - _new_heating_setpoint: 20.0 - _last_temperature: 5.0
2023-11-14 20:10:59.718 DEBUG (MainThread) [custom_components.better_thermostat.events.trv] better_thermostat Heizung Wohnzimmer: TRV climate.heizung_wohnzimmer_links_h2 update received
2023-11-14 20:10:59.718 DEBUG (MainThread) [custom_components.better_thermostat.events.trv] better_thermostat Heizung Wohnzimmer: trigger_trv_change / _old_heating_setpoint: 20.0 - _new_heating_setpoint: 20.0 - _last_temperature: 20.0
2023-11-14 20:11:00.548 DEBUG (MainThread) [custom_components.better_thermostat.utils.controlling] better_thermostat Heizung Wohnzimmer: TO TRV set_hvac_mode: climate.heizung_wohnzimmer_rechts_h1 from: auto to: off

Versions

Additional Information

matziu commented 8 months ago

I also have this problem with popp.

pbranly commented 8 months ago

Hi I had the same issue with ts-601 But it came back from auto to heat after several (tens of ?) minutes

fir3drag0n commented 8 months ago

Same problem with Homematic ip

Xalio commented 7 months ago

Same issue here, I have created automation to force it enabled… It happens also when I have only 1 TRV my case. (Tried with the same TRVs by deleting the config and recreating it ungrouped). My TRVs are MOES BRT-100-TRV Zigbee Model TS0601 Zigbee Manufacturer _TZE200_b6wax7g0

here is the screenshot of what “triggers” the turn off command in my case: image

thanks

fir3drag0n commented 7 months ago

In my case it turns off when one trv changes to Auto mode.

sorryusernameisalreadytaken commented 7 months ago

Same issue here, I have created automation to force it enabled… It happens also when I have only 1 TRV my case. (Tried with the same TRVs by deleting the config and recreating it ungrouped). My TRVs are MOES BRT-100-TRV Zigbee Model TS0601 Zigbee Manufacturer _TZE200_b6wax7g0

here is the screenshot of what “triggers” the turn off command in my case: image

thanks

I got the same message yesterday. Environment: -zigbee2mqtt (z2m) -homeassistant latest as docker -better_thermostat v1.4.0 -Tuya SEA801-Zigbee/SEA802-Zigbee aka Zigbee-Modell TS0601 & Zigbee-Producer _TZE200_c88teujp

Xalio commented 7 months ago

Nobody responded to this issue. Have you been able to look closely at it ? Can we provide more logs to help you with it? Thanks