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
775 stars 122 forks source link

Danfoss Ally via ZHA: strange under- and overheating + does not honor "window open" sensor #962

Closed bsafh closed 1 year ago

bsafh commented 1 year ago

Prerequisites

{
  {
  "home_assistant": {
    "installation_type": "Home Assistant Supervised",
    "version": "2023.2.3",
    "dev": false,
    "hassio": true,
    "virtualenv": false,
    "python_version": "3.10.7",
    "docker": true,
    "arch": "x86_64",
    "timezone": "Europe/Berlin",
    "os_name": "Linux",
    "os_version": "5.10.0-21-amd64",
    "supervisor": "2023.01.1",
    "host_os": "Debian GNU/Linux 11 (bullseye)",
    "docker_version": "23.0.1",
    "chassis": "vm",
    "run_as_root": true
  },
  "custom_components": {
    "hacs": {
      "version": "1.30.1",
      "requirements": [
        "aiogithubapi>=22.10.1"
      ]
    },
    "openweathermap_all": {
      "version": "0.0.1",
      "requirements": [
        "owm2json==0.1.89"
      ]
    },
    "thermal_comfort": {
      "version": "2.1.0",
      "requirements": []
    },
    "climate_group": {
      "version": "0.4.2",
      "requirements": []
    },
    "holidays": {
      "version": "1.9.4",
      "requirements": [
        "python-dateutil>=2.8.2",
        "holidays>=0.14.2"
      ]
    },
    "openwrt": {
      "version": "0.0.1",
      "requirements": []
    },
    "homematicip_local": {
      "version": "1.30.1",
      "requirements": [
        "hahomematic==2023.2.7"
      ]
    },
    "kodi_media_sensors": {
      "version": "4.0.0",
      "requirements": []
    },
    "truenas": {
      "version": "0.0.0",
      "requirements": []
    },
    "tvh_rec": {
      "version": "0.0.1",
      "requirements": []
    },
    "nodered": {
      "version": "1.1.2",
      "requirements": []
    },
    "daily_schedule": {
      "version": "1.4.3",
      "requirements": []
    },
    "browser_mod": {
      "version": "2.2.0",
      "requirements": []
    },
    "kodi_recently_added": {
      "version": "2.0.3",
      "requirements": []
    },
    "better_thermostat": {
      "version": "1.0.1",
      "requirements": []
    },
    "ferienapidotde": {
      "version": "0.3.0",
      "requirements": [
        "ferien-api==0.3.7"
      ]
    },
    "climate_scheduler": {
      "version": "0.1.0",
      "requirements": []
    },
    "webrtc": {
      "version": "v3.0.2",
      "requirements": []
    },
    "gismeteo": {
      "version": "2.5.1",
      "requirements": []
    },
    "frigate": {
      "version": "3.0.0",
      "requirements": []
    },
    "zha_toolkit": {
      "version": "v0.8.33",
      "requirements": [
        "packaging>=20.8",
        "pytz"
      ]
    },
    "reversotts": {
      "version": "1.0.2",
      "requirements": [
        "pyttsreverso==0.4"
      ]
    },
    "tapo_control": {
      "version": "4.2.1",
      "requirements": [
        "pytapo==2.9.2",
        "onvif-zeep-async==1.2.0"
      ]
    },
    "picotts_remote": {
      "version": "1.0.1",
      "requirements": []
    },
    "smart_thermostat": {
      "version": "2021.11.1",
      "requirements": []
    },
    "scheduler": {
      "version": "v0.0.0",
      "requirements": []
    },
    "dwd_weather": {
      "version": "1.2.24",
      "requirements": [
        "simple_dwd_weatherforecast==1.1.5",
        "markdownify==0.6.5"
      ]
    },
    "watchman": {
      "version": "0.5.1",
      "requirements": [
        "prettytable==3.0.0"
      ]
    },
    "shelly": {
      "version": "1.0.2",
      "requirements": [
        "pyShelly==1.0.2",
        "paho-mqtt==1.6.1",
        "websocket-client"
      ]
    },
    "opnsense": {
      "version": "0.1.0",
      "requirements": [
        "mac-vendor-lookup>=0.1.11",
        "python-dateutil"
      ]
    },
    "mass": {
      "version": "2023.2.1",
      "requirements": [
        "music-assistant==1.8.7.4"
      ]
    },
    "dwains_dashboard": {
      "version": "3.3.0",
      "requirements": []
    }
  },
  "integration_manifest": {
    "domain": "better_thermostat",
    "name": "Better Thermostat",
    "documentation": "https://github.com/KartoffelToby/better_thermostat",
    "issue_tracker": "https://github.com/KartoffelToby/better_thermostat/issues",
    "iot_class": "local_push",
    "version": "1.0.1",
    "config_flow": true,
    "dependencies": [
      "climate",
      "recorder"
    ],
    "after_dependencies": [
      "climate"
    ],
    "codeowners": [
      "@kartoffeltoby"
    ],
    "requirements": [],
    "is_built_in": false
  },
  "data": {
    "info": {
      "name": "TRV_AI_Schlafzimmer_2",
      "temperature_sensor": "sensor.temp_hum_schlafzimmer_4_temperature",
      "window_off_delay": 120,
      "off_temperature": 20,
      "humidity_sensor": "sensor.temp_hum_schlafzimmer_4_humidity",
      "outdoor_sensor": "sensor.temp_hum_terrase_3_temperature",
      "window_sensors": "binary_sensor.fenster_tur_schlafzimmer",
      "weather": "weather.openweathermap",
      "model": "eTRV0100"
    },
    "thermostat": {
      "climate.trv_danfoss_schlafzimmer_fenster_thermostat": {
        "name": "TRV_Danfoss_Schlafzimmer_Fenster Thermostat",
        "state": "heat",
        "attributes": {
          "hvac_modes": [
            "off",
            "heat"
          ],
          "min_temp": 5.0,
          "max_temp": 35.0,
          "current_temperature": 19.3,
          "temperature": 17.5,
          "hvac_action": "heating",
          "system_mode": "[<SystemMode.Heat: 4>]/heat",
          "occupied_heating_setpoint": 1750,
          "pi_heating_demand": 4,
          "friendly_name": "TRV_Danfoss_Schlafzimmer_Fenster Thermostat",
          "supported_features": 1,
          "target_temp_step": 0.5
        },
        "bt_config": {
          "calibration": "target_temp_based",
          "calibration_mode": "heating_power_calibration",
          "protect_overheating": true,
          "no_off_system_mode": true,
          "heat_auto_swapped": false,
          "child_lock": false,
          "homaticip": false
        },
        "bt_adapter": "zha",
        "bt_integration": "zha",
        "model": "eTRV0100"
      }
    },
    "external_temperature_sensor": {
      "entity_id": "sensor.temp_hum_schlafzimmer_4_temperature",
      "state": "18.9",
      "attributes": {
        "state_class": "measurement",
        "unit_of_measurement": "\u00b0C",
        "device_class": "temperature",
        "friendly_name": "Temp_Hum_Schlafzimmer_4 Temperature"
      },
      "last_changed": "2023-02-12T15:47:55.038034+00:00",
      "last_updated": "2023-02-12T15:47:55.038034+00:00",
      "context": {
        "id": "01GS34ZE0YVDNTJAFCFEJKDZ07",
        "parent_id": null,
        "user_id": null
      }
    },
    "window_sensor": {
      "entity_id": "binary_sensor.fenster_tur_schlafzimmer",
      "state": "off",
      "attributes": {
        "entity_id": [
          "binary_sensor.fenster_tur_5_ias_zone",
          "binary_sensor.fenster_tur_6_ias_zone",
          "binary_sensor.fenster_tur_9_ias_zone"
        ],
        "device_class": "opening",
        "friendly_name": "Fenster T\u00fcr Schlafzimmer"
      },
      "last_changed": "2023-02-12T14:45:11.603491+00:00",
      "last_updated": "2023-02-12T14:45:11.603491+00:00",
      "context": {
        "id": "01GS31CJS17NX0W1J52P90AMZY",
        "parent_id": null,
        "user_id": null
      }
    }
  }
}
}

Description

after working fine for some time (weeks), there was a very strange behavior last week (no changes made to HA or BT, I was away the whole week): the TRV would overheat drastically; changing the temperature on the physical TRV itself did not work, it just jumped back to maximum (35°C) after a few second. Same behavior when changing the desired temperature in the BT UI card: it just jumped back to maximum. This went on for hours, until the external scheduler (scheduler_card) set a new target temp.

After three days, it seems to settle again a bit, but still overheating, just not for that long.

But: it still does not react on the windows sensor: even after 15 minutes of the windows being open (and this correctly being shown by the binary_sensor), the TRV keeps heating. Other BT TRVs do react to their window sensors though.

Steps to Reproduce

  1. set a temperature
  2. wait
  3. correct temperature on BT UI card or on the physical TRV
  4. wait a few seconds, target temperature jumps to 35°C
  5. goto 3. and repeat as often as you like

Expected behavior:

set target temperature TRV starts heating TRV stops heating when reaching the target temperature

Actual behavior:

set target temperature TRV starts heating TRV does not stop heating when reaching the target temperature, overheating the whole room

Versions

Home Assistant 2023.2.3 Supervisor 2023.01.1 BT 1.0.1

TRV:

IEEE: 84:71:27:ff:fe:f2:bc:b5
Nwk: 0x6000
Device Type: EndDevice
LQI: 134
RSSI: Unbekannt
Zuletzt gesehen: 2023-02-12T17:22:13
Energiequelle: Battery or Unknown
Eigenart: danfoss.thermostat.DanfossThermostat

diagnose info ZHA Danfos: zha-781ff12630479e27224762af51ad5b8e-Danfoss eTRV0100-74cd39aedb527905ecec7ca1fae94d4c.json.txt

Additional Information

image

image

image

image

image

image

image

image

image

image

image

image

image

image

KartoffelToby commented 1 year ago

Zha isnt native supported. You can open an issue for that or look at others