From 2863f5f5a6672849df1cb86b06943561a378f523 Mon Sep 17 00:00:00 2001 From: Wolfgang Hottgenroth Date: Tue, 18 Nov 2025 12:59:14 +0100 Subject: [PATCH] refactored --- 2025-11-18-abstraction-debug.log | 268 +++++++++++++++++++++++ 2025-11-18-debug.log | 332 +++++++++++++++++++++++++++++ apps/abstraction/main.py | 75 ++----- apps/abstraction/transformation.py | 90 ++++---- 4 files changed, 653 insertions(+), 112 deletions(-) create mode 100644 2025-11-18-abstraction-debug.log create mode 100644 2025-11-18-debug.log diff --git a/2025-11-18-abstraction-debug.log b/2025-11-18-abstraction-debug.log new file mode 100644 index 0000000..51dc596 --- /dev/null +++ b/2025-11-18-abstraction-debug.log @@ -0,0 +1,268 @@ +abstraction | 2025-11-18 10:23:59,179 - asyncio - DEBUG - Using selector: EpollSelector +abstraction | 2025-11-18 10:23:59,240 - __main__ - INFO - Loaded configuration from /app/config/devices.yaml +abstraction | 2025-11-18 10:23:59,240 - __main__ - INFO - Loaded 64 device(s): lampe_semeniere_wohnzimmer, stehlampe_esszimmer_spiegel, stehlampe_esszimmer_schrank, grosse_lampe_wohnzimmer, lampe_naehtischchen_wohnzimmer, kleine_lampe_rechts_esszimmer, kleine_lampe_links_esszimmer, leselampe_esszimmer, medusalampe_schlafzimmer, sportlicht_am_fernseher_studierzimmer, deckenlampe_schlafzimmer, bettlicht_wolfgang, bettlicht_patty, schranklicht_hinten_patty, schranklicht_vorne_patty, leselampe_patty, deckenlampe_esszimmer, standlampe_esszimmer, haustuer, deckenlampe_flur_oben, kueche_deckenlampe, sportlicht_tisch, sportlicht_regal, licht_flur_oben_am_spiegel, experimentlabtest, thermostat_wolfgang, thermostat_kueche, thermostat_schlafzimmer, thermostat_esszimmer, thermostat_wohnzimmer, thermostat_patty, thermostat_bad_oben, thermostat_bad_unten, sterne_wohnzimmer, kontakt_schlafzimmer_strasse, kontakt_esszimmer_strasse_rechts, kontakt_esszimmer_strasse_links, kontakt_wohnzimmer_garten_rechts, kontakt_wohnzimmer_garten_links, kontakt_kueche_garten_fenster, kontakt_kueche_garten_tuer, kontakt_kueche_strasse_rechts, kontakt_kueche_strasse_links, kontakt_patty_garten_rechts, kontakt_patty_garten_links, kontakt_patty_strasse, kontakt_wolfgang_garten, kontakt_bad_oben_strasse, kontakt_bad_unten_strasse, sensor_schlafzimmer, sensor_wohnzimmer, sensor_kueche, sensor_arbeitszimmer_patty, sensor_arbeitszimmer_wolfgang, sensor_bad_oben, sensor_bad_unten, sensor_flur, sensor_waschkueche, sensor_sportzimmer, licht_spuele_kueche, licht_schrank_esszimmer, licht_regal_wohnzimmer, licht_flur_schrank, licht_terasse +abstraction | 2025-11-18 10:23:59,241 - __main__ - INFO - Loaded 64 device(s) from configuration +abstraction | 2025-11-18 10:23:59,292 - __main__ - INFO - Connected to Redis: redis://172.23.1.116:6379/8 +abstraction | 2025-11-18 10:23:59,292 - __main__ - INFO - Abstraction worker started +abstraction | 2025-11-18 10:23:59,293 - __main__ - INFO - Connecting to MQTT broker: 172.23.1.102:1883 +abstraction | 2025-11-18 10:23:59,341 - __main__ - INFO - Connected to MQTT broker as home-automation-abstraction-2cfdfa +abstraction | 2025-11-18 10:23:59,359 - __main__ - INFO - Subscribed to abstract SET: home/relay/lampe_semeniere_wohnzimmer/set +abstraction | 2025-11-18 10:23:59,377 - __main__ - INFO - Subscribed to vendor STATE: zigbee2mqtt/0xf0d1b8000015480b +abstraction | 2025-11-18 10:23:59,394 - __main__ - INFO - Subscribed to abstract SET: home/light/stehlampe_esszimmer_spiegel/set +abstraction | 2025-11-18 10:23:59,411 - __main__ - INFO - Subscribed to vendor STATE: zigbee2mqtt/0x001788010d06ea09 +abstraction | 2025-11-18 10:23:59,428 - __main__ - INFO - Subscribed to abstract SET: home/light/stehlampe_esszimmer_schrank/set +abstraction | 2025-11-18 10:23:59,444 - __main__ - INFO - Subscribed to vendor STATE: zigbee2mqtt/0x001788010d09176c +abstraction | 2025-11-18 10:23:59,460 - __main__ - INFO - Subscribed to abstract SET: home/relay/grosse_lampe_wohnzimmer/set +abstraction | 2025-11-18 10:23:59,477 - __main__ - INFO - Subscribed to vendor STATE: zigbee2mqtt/0xf0d1b80000151aca +abstraction | 2025-11-18 10:23:59,493 - __main__ - INFO - Subscribed to abstract SET: home/relay/lampe_naehtischchen_wohnzimmer/set +abstraction | 2025-11-18 10:23:59,510 - __main__ - INFO - Subscribed to vendor STATE: zigbee2mqtt/0x842e14fffee560ee +abstraction | 2025-11-18 10:23:59,526 - __main__ - INFO - Subscribed to abstract SET: home/relay/kleine_lampe_rechts_esszimmer/set +abstraction | 2025-11-18 10:23:59,543 - __main__ - INFO - Subscribed to vendor STATE: zigbee2mqtt/0xf0d1b80000156645 +abstraction | 2025-11-18 10:23:59,560 - __main__ - INFO - Subscribed to abstract SET: home/relay/kleine_lampe_links_esszimmer/set +abstraction | 2025-11-18 10:23:59,578 - __main__ - INFO - Subscribed to vendor STATE: zigbee2mqtt/0xf0d1b80000153099 +abstraction | 2025-11-18 10:23:59,595 - __main__ - INFO - Subscribed to abstract SET: home/light/leselampe_esszimmer/set +abstraction | 2025-11-18 10:23:59,612 - __main__ - INFO - Subscribed to vendor STATE: zigbee2mqtt/0xec1bbdfffe7b84f2 +abstraction | 2025-11-18 10:23:59,630 - __main__ - INFO - Subscribed to abstract SET: home/relay/medusalampe_schlafzimmer/set +abstraction | 2025-11-18 10:23:59,647 - __main__ - INFO - Subscribed to vendor STATE: zigbee2mqtt/0xf0d1b80000154c7c +abstraction | 2025-11-18 10:23:59,665 - __main__ - INFO - Subscribed to abstract SET: home/light/sportlicht_am_fernseher_studierzimmer/set +abstraction | 2025-11-18 10:23:59,682 - __main__ - INFO - Subscribed to vendor STATE: zigbee2mqtt/0x842e14fffe76a23a +abstraction | 2025-11-18 10:23:59,700 - __main__ - INFO - Subscribed to abstract SET: home/light/deckenlampe_schlafzimmer/set +abstraction | 2025-11-18 10:23:59,717 - __main__ - INFO - Subscribed to vendor STATE: zigbee2mqtt/0x0017880108a406a7 +abstraction | 2025-11-18 10:23:59,735 - __main__ - INFO - Subscribed to abstract SET: home/light/bettlicht_wolfgang/set +abstraction | 2025-11-18 10:23:59,753 - __main__ - INFO - Subscribed to vendor STATE: zigbee2mqtt/0x00178801081570bf +abstraction | 2025-11-18 10:23:59,770 - __main__ - INFO - Subscribed to abstract SET: home/light/bettlicht_patty/set +abstraction | 2025-11-18 10:23:59,788 - __main__ - INFO - Subscribed to vendor STATE: zigbee2mqtt/0x0017880108158b32 +abstraction | 2025-11-18 10:23:59,807 - __main__ - INFO - Subscribed to abstract SET: home/light/schranklicht_hinten_patty/set +abstraction | 2025-11-18 10:23:59,825 - __main__ - INFO - Subscribed to vendor STATE: zigbee2mqtt/0x0017880106e29571 +abstraction | 2025-11-18 10:23:59,844 - __main__ - INFO - Subscribed to abstract SET: home/relay/schranklicht_vorne_patty/set +abstraction | 2025-11-18 10:23:59,862 - __main__ - INFO - Subscribed to vendor STATE: zigbee2mqtt/0xf0d1b80000154cf5 +abstraction | 2025-11-18 10:23:59,881 - __main__ - INFO - Subscribed to abstract SET: home/light/leselampe_patty/set +abstraction | 2025-11-18 10:23:59,901 - __main__ - INFO - Subscribed to vendor STATE: zigbee2mqtt/0x001788010600ec9d +abstraction | 2025-11-18 10:23:59,920 - __main__ - INFO - Subscribed to abstract SET: home/light/deckenlampe_esszimmer/set +abstraction | 2025-11-18 10:23:59,940 - __main__ - INFO - Subscribed to vendor STATE: zigbee2mqtt/0x0017880108a03e45 +abstraction | 2025-11-18 10:23:59,959 - __main__ - INFO - Subscribed to abstract SET: home/light/standlampe_esszimmer/set +abstraction | 2025-11-18 10:23:59,979 - __main__ - INFO - Subscribed to vendor STATE: zigbee2mqtt/0xbc33acfffe21f547 +abstraction | 2025-11-18 10:23:59,999 - __main__ - INFO - Subscribed to abstract SET: home/light/haustuer/set +abstraction | 2025-11-18 10:24:00,016 - __main__ - INFO - Subscribed to vendor STATE: zigbee2mqtt/0xec1bbdfffea6a3da +abstraction | 2025-11-18 10:24:00,034 - __main__ - INFO - Subscribed to abstract SET: home/light/deckenlampe_flur_oben/set +abstraction | 2025-11-18 10:24:00,053 - __main__ - INFO - Subscribed to vendor STATE: zigbee2mqtt/0x001788010d2123a7 +abstraction | 2025-11-18 10:24:00,072 - __main__ - INFO - Subscribed to abstract SET: home/light/kueche_deckenlampe/set +abstraction | 2025-11-18 10:24:00,090 - __main__ - INFO - Subscribed to vendor STATE: zigbee2mqtt/0x001788010d2c40c4 +abstraction | 2025-11-18 10:24:00,108 - __main__ - INFO - Subscribed to abstract SET: home/light/sportlicht_tisch/set +abstraction | 2025-11-18 10:24:00,127 - __main__ - INFO - Subscribed to vendor STATE: zigbee2mqtt/0xf0d1b8be2409f31b +abstraction | 2025-11-18 10:24:00,145 - __main__ - INFO - Subscribed to abstract SET: home/light/sportlicht_regal/set +abstraction | 2025-11-18 10:24:00,163 - __main__ - INFO - Subscribed to vendor STATE: zigbee2mqtt/0xf0d1b8be2409f569 +abstraction | 2025-11-18 10:24:00,183 - __main__ - INFO - Subscribed to abstract SET: home/light/licht_flur_oben_am_spiegel/set +abstraction | 2025-11-18 10:24:00,201 - __main__ - INFO - Subscribed to vendor STATE: zigbee2mqtt/0x842e14fffefe4ba4 +abstraction | 2025-11-18 10:24:00,218 - __main__ - INFO - Subscribed to abstract SET: home/light/experimentlabtest/set +abstraction | 2025-11-18 10:24:00,237 - __main__ - INFO - Subscribed to vendor STATE: zigbee2mqtt/0xf0d1b80000195038 +abstraction | 2025-11-18 10:24:00,255 - __main__ - INFO - Subscribed to abstract SET: home/thermostat/thermostat_wolfgang/set +abstraction | 2025-11-18 10:24:00,271 - __main__ - INFO - Subscribed to vendor STATE: zigbee2mqtt/0x540f57fffe7e3cfe +abstraction | 2025-11-18 10:24:00,292 - __main__ - INFO - Subscribed to abstract SET: home/thermostat/thermostat_kueche/set +abstraction | 2025-11-18 10:24:00,313 - __main__ - INFO - Subscribed to vendor STATE: zigbee2mqtt/0x94deb8fffe2e5c06 +abstraction | 2025-11-18 10:24:00,334 - __main__ - INFO - Subscribed to abstract SET: home/thermostat/thermostat_schlafzimmer/set +abstraction | 2025-11-18 10:24:00,356 - __main__ - INFO - Subscribed to vendor STATE: homegear/instance1/plain/42/1/SET_TEMPERATURE +abstraction | 2025-11-18 10:24:00,377 - __main__ - INFO - Subscribed to abstract SET: home/thermostat/thermostat_esszimmer/set +abstraction | 2025-11-18 10:24:00,398 - __main__ - INFO - Subscribed to vendor STATE: homegear/instance1/plain/45/1/SET_TEMPERATURE +abstraction | 2025-11-18 10:24:00,420 - __main__ - INFO - Subscribed to abstract SET: home/thermostat/thermostat_wohnzimmer/set +abstraction | 2025-11-18 10:24:00,440 - __main__ - INFO - Subscribed to vendor STATE: homegear/instance1/plain/46/1/SET_TEMPERATURE +abstraction | 2025-11-18 10:24:00,457 - __main__ - INFO - Subscribed to abstract SET: home/thermostat/thermostat_patty/set +abstraction | 2025-11-18 10:24:00,475 - __main__ - INFO - Subscribed to vendor STATE: homegear/instance1/plain/39/1/SET_TEMPERATURE +abstraction | 2025-11-18 10:24:00,493 - __main__ - INFO - Subscribed to abstract SET: home/thermostat/thermostat_bad_oben/set +abstraction | 2025-11-18 10:24:00,509 - __main__ - INFO - Subscribed to vendor STATE: homegear/instance1/plain/41/1/SET_TEMPERATURE +abstraction | 2025-11-18 10:24:00,530 - __main__ - INFO - Subscribed to abstract SET: home/thermostat/thermostat_bad_unten/set +abstraction | 2025-11-18 10:24:00,551 - __main__ - INFO - Subscribed to vendor STATE: homegear/instance1/plain/48/1/SET_TEMPERATURE +abstraction | 2025-11-18 10:24:00,572 - __main__ - INFO - Subscribed to abstract SET: home/relay/sterne_wohnzimmer/set +abstraction | 2025-11-18 10:24:00,593 - __main__ - INFO - Subscribed to vendor STATE: zigbee2mqtt/0xf0d1b80000155fc2 +abstraction | 2025-11-18 10:24:00,593 - __main__ - INFO - Skipping SET subscription for read-only device: kontakt_schlafzimmer_strasse +abstraction | 2025-11-18 10:24:00,614 - __main__ - INFO - Subscribed to vendor STATE: homegear/instance1/plain/52/1/STATE +abstraction | 2025-11-18 10:24:00,614 - __main__ - INFO - Skipping SET subscription for read-only device: kontakt_esszimmer_strasse_rechts +abstraction | 2025-11-18 10:24:00,630 - __main__ - INFO - Subscribed to vendor STATE: homegear/instance1/plain/26/1/STATE +abstraction | 2025-11-18 10:24:00,630 - __main__ - INFO - Skipping SET subscription for read-only device: kontakt_esszimmer_strasse_links +abstraction | 2025-11-18 10:24:00,647 - __main__ - INFO - Subscribed to vendor STATE: homegear/instance1/plain/27/1/STATE +abstraction | 2025-11-18 10:24:00,647 - __main__ - INFO - Skipping SET subscription for read-only device: kontakt_wohnzimmer_garten_rechts +abstraction | 2025-11-18 10:24:00,668 - __main__ - INFO - Subscribed to vendor STATE: homegear/instance1/plain/28/1/STATE +abstraction | 2025-11-18 10:24:00,668 - __main__ - INFO - Skipping SET subscription for read-only device: kontakt_wohnzimmer_garten_links +abstraction | 2025-11-18 10:24:00,691 - __main__ - INFO - Subscribed to vendor STATE: homegear/instance1/plain/29/1/STATE +abstraction | 2025-11-18 10:24:00,691 - __main__ - INFO - Skipping SET subscription for read-only device: kontakt_kueche_garten_fenster +abstraction | 2025-11-18 10:24:00,708 - __main__ - INFO - Subscribed to vendor STATE: zigbee2mqtt/0x00158d008b332785 +abstraction | 2025-11-18 10:24:00,708 - __main__ - INFO - Skipping SET subscription for read-only device: kontakt_kueche_garten_tuer +abstraction | 2025-11-18 10:24:00,728 - __main__ - INFO - Subscribed to vendor STATE: zigbee2mqtt/0x00158d008b332788 +abstraction | 2025-11-18 10:24:00,728 - __main__ - INFO - Skipping SET subscription for read-only device: kontakt_kueche_strasse_rechts +abstraction | 2025-11-18 10:24:00,747 - __main__ - INFO - Subscribed to vendor STATE: zigbee2mqtt/0x00158d008b151803 +abstraction | 2025-11-18 10:24:00,747 - __main__ - INFO - Skipping SET subscription for read-only device: kontakt_kueche_strasse_links +abstraction | 2025-11-18 10:24:00,767 - __main__ - INFO - Subscribed to vendor STATE: zigbee2mqtt/0x00158d008b331d0b +abstraction | 2025-11-18 10:24:00,767 - __main__ - INFO - Skipping SET subscription for read-only device: kontakt_patty_garten_rechts +abstraction | 2025-11-18 10:24:00,784 - __main__ - INFO - Subscribed to vendor STATE: homegear/instance1/plain/18/1/STATE +abstraction | 2025-11-18 10:24:00,784 - __main__ - INFO - Skipping SET subscription for read-only device: kontakt_patty_garten_links +abstraction | 2025-11-18 10:24:00,802 - __main__ - INFO - Subscribed to vendor STATE: homegear/instance1/plain/22/1/STATE +abstraction | 2025-11-18 10:24:00,802 - __main__ - INFO - Skipping SET subscription for read-only device: kontakt_patty_strasse +abstraction | 2025-11-18 10:24:00,821 - __main__ - INFO - Subscribed to vendor STATE: zigbee2mqtt/0x00158d000af457cf +abstraction | 2025-11-18 10:24:00,821 - __main__ - INFO - Skipping SET subscription for read-only device: kontakt_wolfgang_garten +abstraction | 2025-11-18 10:24:00,838 - __main__ - INFO - Subscribed to vendor STATE: zigbee2mqtt/0x00158d008b3328da +abstraction | 2025-11-18 10:24:00,838 - __main__ - INFO - Skipping SET subscription for read-only device: kontakt_bad_oben_strasse +abstraction | 2025-11-18 10:24:00,855 - __main__ - INFO - Subscribed to vendor STATE: zigbee2mqtt/0x00158d008b333aec +abstraction | 2025-11-18 10:24:00,855 - __main__ - INFO - Skipping SET subscription for read-only device: kontakt_bad_unten_strasse +abstraction | 2025-11-18 10:24:00,872 - __main__ - INFO - Subscribed to vendor STATE: homegear/instance1/plain/44/1/STATE +abstraction | 2025-11-18 10:24:00,872 - __main__ - INFO - Skipping SET subscription for read-only device: sensor_schlafzimmer +abstraction | 2025-11-18 10:24:00,891 - __main__ - INFO - Subscribed to vendor STATE: zigbee2mqtt/0x00158d00043292dc +abstraction | 2025-11-18 10:24:00,891 - __main__ - INFO - Skipping SET subscription for read-only device: sensor_wohnzimmer +abstraction | 2025-11-18 10:24:00,907 - __main__ - INFO - Subscribed to vendor STATE: zigbee2mqtt/0x00158d0008975707 +abstraction | 2025-11-18 10:24:00,907 - __main__ - INFO - Skipping SET subscription for read-only device: sensor_kueche +abstraction | 2025-11-18 10:24:00,925 - __main__ - INFO - Subscribed to vendor STATE: zigbee2mqtt/0x00158d00083299bb +abstraction | 2025-11-18 10:24:00,925 - __main__ - INFO - Skipping SET subscription for read-only device: sensor_arbeitszimmer_patty +abstraction | 2025-11-18 10:24:00,947 - __main__ - INFO - Subscribed to vendor STATE: zigbee2mqtt/0x00158d0003f052b7 +abstraction | 2025-11-18 10:24:00,947 - __main__ - INFO - Skipping SET subscription for read-only device: sensor_arbeitszimmer_wolfgang +abstraction | 2025-11-18 10:24:00,969 - __main__ - INFO - Subscribed to vendor STATE: zigbee2mqtt/0x00158d000543fb99 +abstraction | 2025-11-18 10:24:00,969 - __main__ - INFO - Skipping SET subscription for read-only device: sensor_bad_oben +abstraction | 2025-11-18 10:24:00,986 - __main__ - INFO - Subscribed to vendor STATE: zigbee2mqtt/0x00158d00093e8987 +abstraction | 2025-11-18 10:24:00,986 - __main__ - INFO - Skipping SET subscription for read-only device: sensor_bad_unten +abstraction | 2025-11-18 10:24:01,004 - __main__ - INFO - Subscribed to vendor STATE: zigbee2mqtt/0x00158d00093e662a +abstraction | 2025-11-18 10:24:01,004 - __main__ - INFO - Skipping SET subscription for read-only device: sensor_flur +abstraction | 2025-11-18 10:24:01,022 - __main__ - INFO - Subscribed to vendor STATE: zigbee2mqtt/0x00158d000836ccc6 +abstraction | 2025-11-18 10:24:01,022 - __main__ - INFO - Skipping SET subscription for read-only device: sensor_waschkueche +abstraction | 2025-11-18 10:24:01,038 - __main__ - INFO - Subscribed to vendor STATE: zigbee2mqtt/0x00158d000449f3bc +abstraction | 2025-11-18 10:24:01,038 - __main__ - INFO - Skipping SET subscription for read-only device: sensor_sportzimmer +abstraction | 2025-11-18 10:24:01,058 - __main__ - INFO - Subscribed to vendor STATE: zigbee2mqtt/0x00158d0009421422 +abstraction | 2025-11-18 10:24:01,074 - __main__ - INFO - Subscribed to abstract SET: home/relay/licht_spuele_kueche/set +abstraction | 2025-11-18 10:24:01,090 - __main__ - INFO - Subscribed to vendor STATE: shellies/LightKitchenSink/relay/0 +abstraction | 2025-11-18 10:24:01,107 - __main__ - INFO - Subscribed to abstract SET: home/relay/licht_schrank_esszimmer/set +abstraction | 2025-11-18 10:24:01,122 - __main__ - INFO - Subscribed to vendor STATE: shellies/schrankesszimmer/relay/0 +abstraction | 2025-11-18 10:24:01,139 - __main__ - INFO - Subscribed to abstract SET: home/relay/licht_regal_wohnzimmer/set +abstraction | 2025-11-18 10:24:01,155 - __main__ - INFO - Subscribed to vendor STATE: shellies/wohnzimmer-regal/relay/0 +abstraction | 2025-11-18 10:24:01,172 - __main__ - INFO - Subscribed to abstract SET: home/relay/licht_flur_schrank/set +abstraction | 2025-11-18 10:24:01,189 - __main__ - INFO - Subscribed to vendor STATE: shellies/schrankflur/relay/0 +abstraction | 2025-11-18 10:24:01,205 - __main__ - INFO - Subscribed to abstract SET: home/relay/licht_terasse/set +abstraction | 2025-11-18 10:24:01,222 - __main__ - INFO - Subscribed to vendor STATE: shellies/lichtterasse/relay/0 +abstraction | 2025-11-18 10:24:01,222 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract IN: type=thermostat, tech=max, payload=21 +abstraction | 2025-11-18 10:24:01,222 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract OUT: type=thermostat, tech=max, payload={'target': 21.0, 'mode': 'heat'} +abstraction | 2025-11-18 10:24:01,222 - __main__ - INFO - ← abstract STATE thermostat_schlafzimmer: home/thermostat/thermostat_schlafzimmer/state → {"target": 21.0, "mode": "heat"} +abstraction | 2025-11-18 10:24:01,243 - __main__ - INFO - ← Redis PUBLISH ui:updates → {"type": "state", "device_id": "thermostat_schlafzimmer", "payload": {"target": 21.0, "mode": "heat"}, "ts": "2025-11-18T10:24:01.243641+00:00"} +abstraction | 2025-11-18 10:24:01,260 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract IN: type=thermostat, tech=max, payload=15 +abstraction | 2025-11-18 10:24:01,260 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract OUT: type=thermostat, tech=max, payload={'target': 15.0, 'mode': 'heat'} +abstraction | 2025-11-18 10:24:01,260 - __main__ - INFO - ← abstract STATE thermostat_esszimmer: home/thermostat/thermostat_esszimmer/state → {"target": 15.0, "mode": "heat"} +abstraction | 2025-11-18 10:24:01,280 - __main__ - INFO - ← Redis PUBLISH ui:updates → {"type": "state", "device_id": "thermostat_esszimmer", "payload": {"target": 15.0, "mode": "heat"}, "ts": "2025-11-18T10:24:01.280285+00:00"} +abstraction | 2025-11-18 10:24:01,296 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract IN: type=thermostat, tech=max, payload=15 +abstraction | 2025-11-18 10:24:01,296 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract OUT: type=thermostat, tech=max, payload={'target': 15.0, 'mode': 'heat'} +abstraction | 2025-11-18 10:24:01,296 - __main__ - INFO - ← abstract STATE thermostat_wohnzimmer: home/thermostat/thermostat_wohnzimmer/state → {"target": 15.0, "mode": "heat"} +abstraction | 2025-11-18 10:24:01,317 - __main__ - INFO - ← Redis PUBLISH ui:updates → {"type": "state", "device_id": "thermostat_wohnzimmer", "payload": {"target": 15.0, "mode": "heat"}, "ts": "2025-11-18T10:24:01.317708+00:00"} +abstraction | 2025-11-18 10:24:01,334 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract IN: type=thermostat, tech=max, payload=22 +abstraction | 2025-11-18 10:24:01,334 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract OUT: type=thermostat, tech=max, payload={'target': 22.0, 'mode': 'heat'} +abstraction | 2025-11-18 10:24:01,334 - __main__ - INFO - ← abstract STATE thermostat_patty: home/thermostat/thermostat_patty/state → {"target": 22.0, "mode": "heat"} +abstraction | 2025-11-18 10:24:01,357 - __main__ - INFO - ← Redis PUBLISH ui:updates → {"type": "state", "device_id": "thermostat_patty", "payload": {"target": 22.0, "mode": "heat"}, "ts": "2025-11-18T10:24:01.357082+00:00"} +abstraction | 2025-11-18 10:24:01,373 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract IN: type=thermostat, tech=max, payload=20 +abstraction | 2025-11-18 10:24:01,373 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract OUT: type=thermostat, tech=max, payload={'target': 20.0, 'mode': 'heat'} +abstraction | 2025-11-18 10:24:01,373 - __main__ - INFO - ← abstract STATE thermostat_bad_oben: home/thermostat/thermostat_bad_oben/state → {"target": 20.0, "mode": "heat"} +abstraction | 2025-11-18 10:24:01,395 - __main__ - INFO - ← Redis PUBLISH ui:updates → {"type": "state", "device_id": "thermostat_bad_oben", "payload": {"target": 20.0, "mode": "heat"}, "ts": "2025-11-18T10:24:01.395470+00:00"} +abstraction | 2025-11-18 10:24:01,411 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract IN: type=thermostat, tech=max, payload=5 +abstraction | 2025-11-18 10:24:01,411 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract OUT: type=thermostat, tech=max, payload={'target': 5.0, 'mode': 'heat'} +abstraction | 2025-11-18 10:24:01,411 - __main__ - INFO - ← abstract STATE thermostat_bad_unten: home/thermostat/thermostat_bad_unten/state → {"target": 5.0, "mode": "heat"} +abstraction | 2025-11-18 10:24:01,431 - __main__ - INFO - ← Redis PUBLISH ui:updates → {"type": "state", "device_id": "thermostat_bad_unten", "payload": {"target": 5.0, "mode": "heat"}, "ts": "2025-11-18T10:24:01.431068+00:00"} +abstraction | 2025-11-18 10:24:01,448 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract IN: type=contact, tech=max, payload=false +abstraction | 2025-11-18 10:24:01,448 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract OUT: type=contact, tech=max, payload={'contact': 'closed'} +abstraction | 2025-11-18 10:24:01,449 - __main__ - INFO - ← abstract STATE kontakt_schlafzimmer_strasse: home/contact/kontakt_schlafzimmer_strasse/state → {"contact": "closed"} +abstraction | 2025-11-18 10:24:01,472 - __main__ - INFO - ← Redis PUBLISH ui:updates → {"type": "state", "device_id": "kontakt_schlafzimmer_strasse", "payload": {"contact": "closed"}, "ts": "2025-11-18T10:24:01.472456+00:00"} +abstraction | 2025-11-18 10:24:01,491 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract IN: type=contact, tech=max, payload=false +abstraction | 2025-11-18 10:24:01,491 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract OUT: type=contact, tech=max, payload={'contact': 'closed'} +abstraction | 2025-11-18 10:24:01,491 - __main__ - INFO - ← abstract STATE kontakt_esszimmer_strasse_rechts: home/contact/kontakt_esszimmer_strasse_rechts/state → {"contact": "closed"} +abstraction | 2025-11-18 10:24:01,733 - __main__ - INFO - ← Redis PUBLISH ui:updates → {"type": "state", "device_id": "kontakt_esszimmer_strasse_rechts", "payload": {"contact": "closed"}, "ts": "2025-11-18T10:24:01.733873+00:00"} +abstraction | 2025-11-18 10:24:01,750 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract IN: type=contact, tech=max, payload=false +abstraction | 2025-11-18 10:24:01,750 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract OUT: type=contact, tech=max, payload={'contact': 'closed'} +abstraction | 2025-11-18 10:24:01,750 - __main__ - INFO - ← abstract STATE kontakt_esszimmer_strasse_links: home/contact/kontakt_esszimmer_strasse_links/state → {"contact": "closed"} +abstraction | 2025-11-18 10:24:01,771 - __main__ - INFO - ← Redis PUBLISH ui:updates → {"type": "state", "device_id": "kontakt_esszimmer_strasse_links", "payload": {"contact": "closed"}, "ts": "2025-11-18T10:24:01.771380+00:00"} +abstraction | 2025-11-18 10:24:01,788 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract IN: type=contact, tech=max, payload=false +abstraction | 2025-11-18 10:24:01,788 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract OUT: type=contact, tech=max, payload={'contact': 'closed'} +abstraction | 2025-11-18 10:24:01,788 - __main__ - INFO - ← abstract STATE kontakt_wohnzimmer_garten_rechts: home/contact/kontakt_wohnzimmer_garten_rechts/state → {"contact": "closed"} +abstraction | 2025-11-18 10:24:01,808 - __main__ - INFO - ← Redis PUBLISH ui:updates → {"type": "state", "device_id": "kontakt_wohnzimmer_garten_rechts", "payload": {"contact": "closed"}, "ts": "2025-11-18T10:24:01.808516+00:00"} +abstraction | 2025-11-18 10:24:01,825 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract IN: type=contact, tech=max, payload=false +abstraction | 2025-11-18 10:24:01,825 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract OUT: type=contact, tech=max, payload={'contact': 'closed'} +abstraction | 2025-11-18 10:24:01,825 - __main__ - INFO - ← abstract STATE kontakt_wohnzimmer_garten_links: home/contact/kontakt_wohnzimmer_garten_links/state → {"contact": "closed"} +abstraction | 2025-11-18 10:24:01,844 - __main__ - INFO - ← Redis PUBLISH ui:updates → {"type": "state", "device_id": "kontakt_wohnzimmer_garten_links", "payload": {"contact": "closed"}, "ts": "2025-11-18T10:24:01.844046+00:00"} +abstraction | 2025-11-18 10:24:01,860 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract IN: type=contact, tech=max, payload=false +abstraction | 2025-11-18 10:24:01,861 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract OUT: type=contact, tech=max, payload={'contact': 'closed'} +abstraction | 2025-11-18 10:24:01,861 - __main__ - INFO - ← abstract STATE kontakt_patty_garten_rechts: home/contact/kontakt_patty_garten_rechts/state → {"contact": "closed"} +abstraction | 2025-11-18 10:24:01,881 - __main__ - INFO - ← Redis PUBLISH ui:updates → {"type": "state", "device_id": "kontakt_patty_garten_rechts", "payload": {"contact": "closed"}, "ts": "2025-11-18T10:24:01.881922+00:00"} +abstraction | 2025-11-18 10:24:01,898 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract IN: type=contact, tech=max, payload=false +abstraction | 2025-11-18 10:24:01,898 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract OUT: type=contact, tech=max, payload={'contact': 'closed'} +abstraction | 2025-11-18 10:24:01,898 - __main__ - INFO - ← abstract STATE kontakt_patty_garten_links: home/contact/kontakt_patty_garten_links/state → {"contact": "closed"} +abstraction | 2025-11-18 10:24:01,922 - __main__ - INFO - ← Redis PUBLISH ui:updates → {"type": "state", "device_id": "kontakt_patty_garten_links", "payload": {"contact": "closed"}, "ts": "2025-11-18T10:24:01.922254+00:00"} +abstraction | 2025-11-18 10:24:01,940 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract IN: type=contact, tech=max, payload=true +abstraction | 2025-11-18 10:24:01,940 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract OUT: type=contact, tech=max, payload={'contact': 'open'} +abstraction | 2025-11-18 10:24:01,940 - __main__ - INFO - ← abstract STATE kontakt_bad_unten_strasse: home/contact/kontakt_bad_unten_strasse/state → {"contact": "open"} +abstraction | 2025-11-18 10:24:01,959 - __main__ - INFO - ← Redis PUBLISH ui:updates → {"type": "state", "device_id": "kontakt_bad_unten_strasse", "payload": {"contact": "open"}, "ts": "2025-11-18T10:24:01.959678+00:00"} +abstraction | 2025-11-18 10:24:02,354 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract IN: type=relay, tech=shelly, payload=off +abstraction | 2025-11-18 10:24:02,354 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract OUT: type=relay, tech=shelly, payload={'power': 'off'} +abstraction | 2025-11-18 10:24:02,354 - __main__ - INFO - ← abstract STATE licht_terasse: home/relay/licht_terasse/state → {"power": "off"} +abstraction | 2025-11-18 10:24:02,373 - __main__ - INFO - ← Redis PUBLISH ui:updates → {"type": "state", "device_id": "licht_terasse", "payload": {"power": "off"}, "ts": "2025-11-18T10:24:02.373461+00:00"} +abstraction | 2025-11-18 10:24:07,440 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract IN: type=relay, tech=shelly, payload=off +abstraction | 2025-11-18 10:24:07,440 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract OUT: type=relay, tech=shelly, payload={'power': 'off'} +abstraction | 2025-11-18 10:24:07,441 - __main__ - INFO - ← abstract STATE licht_regal_wohnzimmer: home/relay/licht_regal_wohnzimmer/state → {"power": "off"} +abstraction | 2025-11-18 10:24:07,459 - __main__ - INFO - ← Redis PUBLISH ui:updates → {"type": "state", "device_id": "licht_regal_wohnzimmer", "payload": {"power": "off"}, "ts": "2025-11-18T10:24:07.459082+00:00"} +abstraction | 2025-11-18 10:24:08,817 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract IN: type=temp_humidity_sensor, tech=zigbee2mqtt, payload={'battery': 100, 'humidity': 54.37, 'linkquality': 83, 'power_outage_count': 38416, 'pressure': 1004.2, 'temperature': 22.16, 'voltage': 3015} +abstraction | 2025-11-18 10:24:08,817 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract OUT: type=temp_humidity_sensor, tech=zigbee2mqtt, payload={'battery': 100, 'humidity': 54.37, 'linkquality': 83, 'power_outage_count': 38416, 'pressure': 1004.2, 'temperature': 22.16, 'voltage': 3015} +abstraction | 2025-11-18 10:24:08,817 - __main__ - INFO - ← abstract STATE sensor_arbeitszimmer_patty: home/temp_humidity/sensor_arbeitszimmer_patty/state → {"battery": 100, "humidity": 54.37, "linkquality": 83, "power_outage_count": 38416, "pressure": 1004.2, "temperature": 22.16, "voltage": 3015} +abstraction | 2025-11-18 10:24:08,835 - __main__ - INFO - ← Redis PUBLISH ui:updates → {"type": "state", "device_id": "sensor_arbeitszimmer_patty", "payload": {"battery": 100, "humidity": 54.37, "linkquality": 83, "power_outage_count": 38416, "pressure": 1004.2, "temperature": 22.16, "voltage": 3015}, "ts": "2025-11-18T10:24:08.835488+00:00"} +abstraction | 2025-11-18 10:24:08,852 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract IN: type=temp_humidity_sensor, tech=zigbee2mqtt, payload={'battery': 100, 'humidity': 54.22, 'linkquality': 83, 'power_outage_count': 38416, 'pressure': 1004.2, 'temperature': 22.16, 'voltage': 3015} +abstraction | 2025-11-18 10:24:08,852 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract OUT: type=temp_humidity_sensor, tech=zigbee2mqtt, payload={'battery': 100, 'humidity': 54.22, 'linkquality': 83, 'power_outage_count': 38416, 'pressure': 1004.2, 'temperature': 22.16, 'voltage': 3015} +abstraction | 2025-11-18 10:24:08,852 - __main__ - INFO - ← abstract STATE sensor_arbeitszimmer_patty: home/temp_humidity/sensor_arbeitszimmer_patty/state → {"battery": 100, "humidity": 54.22, "linkquality": 83, "power_outage_count": 38416, "pressure": 1004.2, "temperature": 22.16, "voltage": 3015} +abstraction | 2025-11-18 10:24:08,870 - __main__ - INFO - ← Redis PUBLISH ui:updates → {"type": "state", "device_id": "sensor_arbeitszimmer_patty", "payload": {"battery": 100, "humidity": 54.22, "linkquality": 83, "power_outage_count": 38416, "pressure": 1004.2, "temperature": 22.16, "voltage": 3015}, "ts": "2025-11-18T10:24:08.870674+00:00"} +abstraction | 2025-11-18 10:24:08,887 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract IN: type=temp_humidity_sensor, tech=zigbee2mqtt, payload={'battery': 100, 'humidity': 54.22, 'linkquality': 83, 'power_outage_count': 38416, 'pressure': 1003.9, 'temperature': 22.16, 'voltage': 3015} +abstraction | 2025-11-18 10:24:08,887 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract OUT: type=temp_humidity_sensor, tech=zigbee2mqtt, payload={'battery': 100, 'humidity': 54.22, 'linkquality': 83, 'power_outage_count': 38416, 'pressure': 1003.9, 'temperature': 22.16, 'voltage': 3015} +abstraction | 2025-11-18 10:24:08,887 - __main__ - INFO - ← abstract STATE sensor_arbeitszimmer_patty: home/temp_humidity/sensor_arbeitszimmer_patty/state → {"battery": 100, "humidity": 54.22, "linkquality": 83, "power_outage_count": 38416, "pressure": 1003.9, "temperature": 22.16, "voltage": 3015} +abstraction | 2025-11-18 10:24:08,907 - __main__ - INFO - ← Redis PUBLISH ui:updates → {"type": "state", "device_id": "sensor_arbeitszimmer_patty", "payload": {"battery": 100, "humidity": 54.22, "linkquality": 83, "power_outage_count": 38416, "pressure": 1003.9, "temperature": 22.16, "voltage": 3015}, "ts": "2025-11-18T10:24:08.907729+00:00"} +abstraction | 2025-11-18 10:24:10,178 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract IN: type=relay, tech=shelly, payload=on +abstraction | 2025-11-18 10:24:10,178 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract OUT: type=relay, tech=shelly, payload={'power': 'on'} +abstraction | 2025-11-18 10:24:10,178 - __main__ - INFO - ← abstract STATE licht_spuele_kueche: home/relay/licht_spuele_kueche/state → {"power": "on"} +abstraction | 2025-11-18 10:24:10,196 - __main__ - INFO - ← Redis PUBLISH ui:updates → {"type": "state", "device_id": "licht_spuele_kueche", "payload": {"power": "on"}, "ts": "2025-11-18T10:24:10.196762+00:00"} +abstraction | 2025-11-18 10:24:17,815 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract IN: type=relay, tech=shelly, payload=off +abstraction | 2025-11-18 10:24:17,815 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract OUT: type=relay, tech=shelly, payload={'power': 'off'} +abstraction | 2025-11-18 10:24:17,815 - __main__ - INFO - ← abstract STATE licht_schrank_esszimmer: home/relay/licht_schrank_esszimmer/state → {"power": "off"} +abstraction | 2025-11-18 10:24:17,834 - __main__ - INFO - ← Redis PUBLISH ui:updates → {"type": "state", "device_id": "licht_schrank_esszimmer", "payload": {"power": "off"}, "ts": "2025-11-18T10:24:17.834042+00:00"} +abstraction | 2025-11-18 10:24:32,370 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract IN: type=relay, tech=shelly, payload=off +abstraction | 2025-11-18 10:24:32,370 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract OUT: type=relay, tech=shelly, payload={'power': 'off'} +abstraction | 2025-11-18 10:24:32,370 - __main__ - INFO - ← abstract STATE licht_terasse: home/relay/licht_terasse/state → {"power": "off"} +abstraction | 2025-11-18 10:24:32,405 - __main__ - INFO - ← Redis PUBLISH ui:updates → {"type": "state", "device_id": "licht_terasse", "payload": {"power": "off"}, "ts": "2025-11-18T10:24:32.405754+00:00"} +abstraction | 2025-11-18 10:24:37,447 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract IN: type=relay, tech=shelly, payload=off +abstraction | 2025-11-18 10:24:37,447 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract OUT: type=relay, tech=shelly, payload={'power': 'off'} +abstraction | 2025-11-18 10:24:37,447 - __main__ - INFO - ← abstract STATE licht_regal_wohnzimmer: home/relay/licht_regal_wohnzimmer/state → {"power": "off"} +abstraction | 2025-11-18 10:24:37,465 - __main__ - INFO - ← Redis PUBLISH ui:updates → {"type": "state", "device_id": "licht_regal_wohnzimmer", "payload": {"power": "off"}, "ts": "2025-11-18T10:24:37.465220+00:00"} +abstraction | 2025-11-18 10:24:40,188 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract IN: type=relay, tech=shelly, payload=on +abstraction | 2025-11-18 10:24:40,189 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract OUT: type=relay, tech=shelly, payload={'power': 'on'} +abstraction | 2025-11-18 10:24:40,189 - __main__ - INFO - ← abstract STATE licht_spuele_kueche: home/relay/licht_spuele_kueche/state → {"power": "on"} +abstraction | 2025-11-18 10:24:40,207 - __main__ - INFO - ← Redis PUBLISH ui:updates → {"type": "state", "device_id": "licht_spuele_kueche", "payload": {"power": "on"}, "ts": "2025-11-18T10:24:40.207222+00:00"} +abstraction | 2025-11-18 10:24:47,833 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract IN: type=relay, tech=shelly, payload=off +abstraction | 2025-11-18 10:24:47,833 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract OUT: type=relay, tech=shelly, payload={'power': 'off'} +abstraction | 2025-11-18 10:24:47,833 - __main__ - INFO - ← abstract STATE licht_schrank_esszimmer: home/relay/licht_schrank_esszimmer/state → {"power": "off"} +abstraction | 2025-11-18 10:24:47,868 - __main__ - INFO - ← Redis PUBLISH ui:updates → {"type": "state", "device_id": "licht_schrank_esszimmer", "payload": {"power": "off"}, "ts": "2025-11-18T10:24:47.868787+00:00"} +abstraction | 2025-11-18 10:25:02,363 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract IN: type=relay, tech=shelly, payload=off +abstraction | 2025-11-18 10:25:02,363 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract OUT: type=relay, tech=shelly, payload={'power': 'off'} +abstraction | 2025-11-18 10:25:02,363 - __main__ - INFO - ← abstract STATE licht_terasse: home/relay/licht_terasse/state → {"power": "off"} +abstraction | 2025-11-18 10:25:02,381 - __main__ - INFO - ← Redis PUBLISH ui:updates → {"type": "state", "device_id": "licht_terasse", "payload": {"power": "off"}, "ts": "2025-11-18T10:25:02.381792+00:00"} +abstraction | 2025-11-18 10:25:07,447 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract IN: type=relay, tech=shelly, payload=off +abstraction | 2025-11-18 10:25:07,448 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract OUT: type=relay, tech=shelly, payload={'power': 'off'} +abstraction | 2025-11-18 10:25:07,448 - __main__ - INFO - ← abstract STATE licht_regal_wohnzimmer: home/relay/licht_regal_wohnzimmer/state → {"power": "off"} +abstraction | 2025-11-18 10:25:07,465 - __main__ - INFO - ← Redis PUBLISH ui:updates → {"type": "state", "device_id": "licht_regal_wohnzimmer", "payload": {"power": "off"}, "ts": "2025-11-18T10:25:07.465566+00:00"} +abstraction | 2025-11-18 10:25:10,185 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract IN: type=relay, tech=shelly, payload=on +abstraction | 2025-11-18 10:25:10,185 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract OUT: type=relay, tech=shelly, payload={'power': 'on'} +abstraction | 2025-11-18 10:25:10,185 - __main__ - INFO - ← abstract STATE licht_spuele_kueche: home/relay/licht_spuele_kueche/state → {"power": "on"} +abstraction | 2025-11-18 10:25:10,202 - __main__ - INFO - ← Redis PUBLISH ui:updates → {"type": "state", "device_id": "licht_spuele_kueche", "payload": {"power": "on"}, "ts": "2025-11-18T10:25:10.202372+00:00"} +abstraction | 2025-11-18 10:25:17,820 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract IN: type=relay, tech=shelly, payload=off +abstraction | 2025-11-18 10:25:17,820 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract OUT: type=relay, tech=shelly, payload={'power': 'off'} +abstraction | 2025-11-18 10:25:17,820 - __main__ - INFO - ← abstract STATE licht_schrank_esszimmer: home/relay/licht_schrank_esszimmer/state → {"power": "off"} +abstraction | 2025-11-18 10:25:17,838 - __main__ - INFO - ← Redis PUBLISH ui:updates → {"type": "state", "device_id": "licht_schrank_esszimmer", "payload": {"power": "off"}, "ts": "2025-11-18T10:25:17.838140+00:00"} +abstraction | 2025-11-18 10:25:32,361 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract IN: type=relay, tech=shelly, payload=off +abstraction | 2025-11-18 10:25:32,361 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract OUT: type=relay, tech=shelly, payload={'power': 'off'} +abstraction | 2025-11-18 10:25:32,361 - __main__ - INFO - ← abstract STATE licht_terasse: home/relay/licht_terasse/state → {"power": "off"} +abstraction | 2025-11-18 10:25:32,379 - __main__ - INFO - ← Redis PUBLISH ui:updates → {"type": "state", "device_id": "licht_terasse", "payload": {"power": "off"}, "ts": "2025-11-18T10:25:32.379286+00:00"} +abstraction | 2025-11-18 10:25:37,455 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract IN: type=relay, tech=shelly, payload=off +abstraction | 2025-11-18 10:25:37,455 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract OUT: type=relay, tech=shelly, payload={'power': 'off'} +abstraction | 2025-11-18 10:25:37,455 - __main__ - INFO - ← abstract STATE licht_regal_wohnzimmer: home/relay/licht_regal_wohnzimmer/state → {"power": "off"} +abstraction | 2025-11-18 10:25:37,473 - __main__ - INFO - ← Redis PUBLISH ui:updates → {"type": "state", "device_id": "licht_regal_wohnzimmer", "payload": {"power": "off"}, "ts": "2025-11-18T10:25:37.473171+00:00"} +abstraction | 2025-11-18 10:25:40,193 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract IN: type=relay, tech=shelly, payload=on +abstraction | 2025-11-18 10:25:40,194 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract OUT: type=relay, tech=shelly, payload={'power': 'on'} +abstraction | 2025-11-18 10:25:40,194 - __main__ - INFO - ← abstract STATE licht_spuele_kueche: home/relay/licht_spuele_kueche/state → {"power": "on"} +abstraction | 2025-11-18 10:25:40,211 - __main__ - INFO - ← Redis PUBLISH ui:updates → {"type": "state", "device_id": "licht_spuele_kueche", "payload": {"power": "on"}, "ts": "2025-11-18T10:25:40.211493+00:00"} +abstraction | 2025-11-18 10:25:47,821 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract IN: type=relay, tech=shelly, payload=off +abstraction | 2025-11-18 10:25:47,821 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract OUT: type=relay, tech=shelly, payload={'power': 'off'} +abstraction | 2025-11-18 10:25:47,821 - __main__ - INFO - ← abstract STATE licht_schrank_esszimmer: home/relay/licht_schrank_esszimmer/state → {"power": "off"} +abstraction | 2025-11-18 10:25:47,838 - __main__ - INFO - ← Redis PUBLISH ui:updates → {"type": "state", "device_id": "licht_schrank_esszimmer", "payload": {"power": "off"}, "ts": "2025-11-18T10:25:47.838508+00:00"} diff --git a/2025-11-18-debug.log b/2025-11-18-debug.log new file mode 100644 index 0000000..6d3ee6a --- /dev/null +++ b/2025-11-18-debug.log @@ -0,0 +1,332 @@ + ✔ home-automation-abstraction Built 0.0s + ✔ home-automation-api Built 0.0s + ✔ home-automation-rules Built 0.0s + ✔ home-automation-ui Built 0.0s +Attaching to abstraction, api, rules, ui +abstraction | 2025-11-18 10:23:59,179 - asyncio - DEBUG - Using selector: EpollSelector +rules | 2025-11-18 10:23:59,207 - asyncio - DEBUG - Using selector: EpollSelector +rules | 2025-11-18 10:23:59,208 - __main__ - INFO - ============================================================ +rules | 2025-11-18 10:23:59,208 - __main__ - INFO - Rules Engine Starting +rules | 2025-11-18 10:23:59,209 - __main__ - INFO - ============================================================ +rules | 2025-11-18 10:23:59,209 - __main__ - INFO - Config: /app/config/rules.yaml +rules | 2025-11-18 10:23:59,210 - __main__ - INFO - MQTT: 172.23.1.102:1883 +rules | 2025-11-18 10:23:59,210 - __main__ - INFO - Redis: redis://172.23.1.116:6379/8 +rules | 2025-11-18 10:23:59,210 - __main__ - INFO - ============================================================ +rules | 2025-11-18 10:23:59,211 - __main__ - INFO - Loading rules configuration from /app/config/rules.yaml +rules | 2025-11-18 10:23:59,217 - __main__ - INFO - Loaded 6 rule(s) from configuration +rules | 2025-11-18 10:23:59,218 - __main__ - INFO - - window_setback_esszimmer (type: window_setback@1.0) [DISABLED] +rules | 2025-11-18 10:23:59,218 - __main__ - INFO - - window_setback_kueche (type: window_setback@1.0) [DISABLED] +rules | 2025-11-18 10:23:59,219 - __main__ - INFO - - window_setback_patty (type: window_setback@1.0) [DISABLED] +rules | 2025-11-18 10:23:59,219 - __main__ - INFO - - window_setback_schlafzimmer (type: window_setback@1.0) [DISABLED] +rules | 2025-11-18 10:23:59,220 - __main__ - INFO - - window_setback_wohnzimmer (type: window_setback@1.0) [DISABLED] +rules | 2025-11-18 10:23:59,225 - __main__ - INFO - - window_setback_wolfgang (type: window_setback@1.0) +rules | 2025-11-18 10:23:59,225 - __main__ - INFO - Successfully loaded 1 rule implementation(s) (5 disabled) +rules | 2025-11-18 10:23:59,226 - __main__ - INFO - Rule window_setback_wolfgang validated: 1 contacts, 1 thermostats +rules | 2025-11-18 10:23:59,226 - __main__ - DEBUG - Rule window_setback_wolfgang subscribes to 2 topic(s) +rules | 2025-11-18 10:23:59,227 - __main__ - INFO - Total MQTT subscriptions needed: 2 +rules | 2025-11-18 10:23:59,227 - __main__ - INFO - Starting event processing loop +abstraction | 2025-11-18 10:23:59,240 - __main__ - INFO - Loaded configuration from /app/config/devices.yaml +abstraction | 2025-11-18 10:23:59,240 - __main__ - INFO - Loaded 64 device(s): lampe_semeniere_wohnzimmer, stehlampe_esszimmer_spiegel, stehlampe_esszimmer_schrank, grosse_lampe_wohnzimmer, lampe_naehtischchen_wohnzimmer, kleine_lampe_rechts_esszimmer, kleine_lampe_links_esszimmer, leselampe_esszimmer, medusalampe_schlafzimmer, sportlicht_am_fernseher_studierzimmer, deckenlampe_schlafzimmer, bettlicht_wolfgang, bettlicht_patty, schranklicht_hinten_patty, schranklicht_vorne_patty, leselampe_patty, deckenlampe_esszimmer, standlampe_esszimmer, haustuer, deckenlampe_flur_oben, kueche_deckenlampe, sportlicht_tisch, sportlicht_regal, licht_flur_oben_am_spiegel, experimentlabtest, thermostat_wolfgang, thermostat_kueche, thermostat_schlafzimmer, thermostat_esszimmer, thermostat_wohnzimmer, thermostat_patty, thermostat_bad_oben, thermostat_bad_unten, sterne_wohnzimmer, kontakt_schlafzimmer_strasse, kontakt_esszimmer_strasse_rechts, kontakt_esszimmer_strasse_links, kontakt_wohnzimmer_garten_rechts, kontakt_wohnzimmer_garten_links, kontakt_kueche_garten_fenster, kontakt_kueche_garten_tuer, kontakt_kueche_strasse_rechts, kontakt_kueche_strasse_links, kontakt_patty_garten_rechts, kontakt_patty_garten_links, kontakt_patty_strasse, kontakt_wolfgang_garten, kontakt_bad_oben_strasse, kontakt_bad_unten_strasse, sensor_schlafzimmer, sensor_wohnzimmer, sensor_kueche, sensor_arbeitszimmer_patty, sensor_arbeitszimmer_wolfgang, sensor_bad_oben, sensor_bad_unten, sensor_flur, sensor_waschkueche, sensor_sportzimmer, licht_spuele_kueche, licht_schrank_esszimmer, licht_regal_wohnzimmer, licht_flur_schrank, licht_terasse +abstraction | 2025-11-18 10:23:59,241 - __main__ - INFO - Loaded 64 device(s) from configuration +abstraction | 2025-11-18 10:23:59,292 - __main__ - INFO - Connected to Redis: redis://172.23.1.116:6379/8 +abstraction | 2025-11-18 10:23:59,292 - __main__ - INFO - Abstraction worker started +abstraction | 2025-11-18 10:23:59,293 - __main__ - INFO - Connecting to MQTT broker: 172.23.1.102:1883 +abstraction | 2025-11-18 10:23:59,341 - __main__ - INFO - Connected to MQTT broker as home-automation-abstraction-2cfdfa +abstraction | 2025-11-18 10:23:59,359 - __main__ - INFO - Subscribed to abstract SET: home/relay/lampe_semeniere_wohnzimmer/set +abstraction | 2025-11-18 10:23:59,377 - __main__ - INFO - Subscribed to vendor STATE: zigbee2mqtt/0xf0d1b8000015480b +rules | 2025-11-18 10:23:59,378 - __main__ - INFO - Connecting to MQTT broker 172.23.1.102:1883 (client_id=rule_engine-782522) +abstraction | 2025-11-18 10:23:59,394 - __main__ - INFO - Subscribed to abstract SET: home/light/stehlampe_esszimmer_spiegel/set +abstraction | 2025-11-18 10:23:59,411 - __main__ - INFO - Subscribed to vendor STATE: zigbee2mqtt/0x001788010d06ea09 +abstraction | 2025-11-18 10:23:59,428 - __main__ - INFO - Subscribed to abstract SET: home/light/stehlampe_esszimmer_schrank/set +rules | 2025-11-18 10:23:59,431 - __main__ - INFO - Connected to MQTT broker 172.23.1.102:1883 +abstraction | 2025-11-18 10:23:59,444 - __main__ - INFO - Subscribed to vendor STATE: zigbee2mqtt/0x001788010d09176c +abstraction | 2025-11-18 10:23:59,460 - __main__ - INFO - Subscribed to abstract SET: home/relay/grosse_lampe_wohnzimmer/set +rules | 2025-11-18 10:23:59,466 - __main__ - INFO - Subscribed to 2 topic(s): home/thermostat/thermostat_wolfgang/state, home/contact/kontakt_wolfgang_garten/state +rules | 2025-11-18 10:23:59,467 - __main__ - DEBUG - Received event: {'topic': 'home/thermostat/thermostat_wolfgang/state', 'type': 'state', 'cap': 'thermostat', 'device_id': 'thermostat_wolfgang', 'payload': {'target': 23.0, 'current': 22.5, 'mode': 'heat'}, 'ts': '2025-11-18T10:23:59.467177'} +rules | 2025-11-18 10:23:59,467 - __main__ - DEBUG - Filtering for cap=thermostat, device_id=thermostat_wolfgang +rules | 2025-11-18 10:23:59,468 - __main__ - DEBUG - Rule window_setback_wolfgang: checking thermostats ['thermostat_wolfgang'] +rules | 2025-11-18 10:23:59,468 - __main__ - INFO - Event thermostat/thermostat_wolfgang: 1 matching rule(s) +abstraction | 2025-11-18 10:23:59,477 - __main__ - INFO - Subscribed to vendor STATE: zigbee2mqtt/0xf0d1b80000151aca +abstraction | 2025-11-18 10:23:59,493 - __main__ - INFO - Subscribed to abstract SET: home/relay/lampe_naehtischchen_wohnzimmer/set +abstraction | 2025-11-18 10:23:59,510 - __main__ - INFO - Subscribed to vendor STATE: zigbee2mqtt/0x842e14fffee560ee +abstraction | 2025-11-18 10:23:59,526 - __main__ - INFO - Subscribed to abstract SET: home/relay/kleine_lampe_rechts_esszimmer/set +abstraction | 2025-11-18 10:23:59,543 - __main__ - INFO - Subscribed to vendor STATE: zigbee2mqtt/0xf0d1b80000156645 +abstraction | 2025-11-18 10:23:59,560 - __main__ - INFO - Subscribed to abstract SET: home/relay/kleine_lampe_links_esszimmer/set +rules | 2025-11-18 10:23:59,572 - __main__ - DEBUG - Rule window_setback_wolfgang: Updated current target for thermostat_wolfgang: 23.0°C +rules | 2025-11-18 10:23:59,573 - __main__ - DEBUG - Received event: {'topic': 'home/contact/kontakt_wolfgang_garten/state', 'type': 'state', 'cap': 'contact', 'device_id': 'kontakt_wolfgang_garten', 'payload': {'contact': 'closed', 'battery': 100, 'linkquality': 32, 'device_temperature': 26, 'voltage': 3025}, 'ts': '2025-11-18T10:23:59.573073'} +rules | 2025-11-18 10:23:59,573 - __main__ - DEBUG - Filtering for cap=contact, device_id=kontakt_wolfgang_garten +rules | 2025-11-18 10:23:59,573 - __main__ - DEBUG - Rule window_setback_wolfgang: checking contacts ['kontakt_wolfgang_garten'] +rules | 2025-11-18 10:23:59,574 - __main__ - INFO - Event contact/kontakt_wolfgang_garten: 1 matching rule(s) +abstraction | 2025-11-18 10:23:59,578 - __main__ - INFO - Subscribed to vendor STATE: zigbee2mqtt/0xf0d1b80000153099 +abstraction | 2025-11-18 10:23:59,595 - __main__ - INFO - Subscribed to abstract SET: home/light/leselampe_esszimmer/set +rules | 2025-11-18 10:23:59,610 - __main__ - INFO - Rule window_setback_wolfgang: Window closed, restoring 1 thermostats to previous temperatures +abstraction | 2025-11-18 10:23:59,612 - __main__ - INFO - Subscribed to vendor STATE: zigbee2mqtt/0xec1bbdfffe7b84f2 +rules | 2025-11-18 10:23:59,627 - __main__ - WARNING - No previous target found for thermostat_wolfgang, cannot restore +abstraction | 2025-11-18 10:23:59,630 - __main__ - INFO - Subscribed to abstract SET: home/relay/medusalampe_schlafzimmer/set +abstraction | 2025-11-18 10:23:59,647 - __main__ - INFO - Subscribed to vendor STATE: zigbee2mqtt/0xf0d1b80000154c7c +abstraction | 2025-11-18 10:23:59,665 - __main__ - INFO - Subscribed to abstract SET: home/light/sportlicht_am_fernseher_studierzimmer/set +abstraction | 2025-11-18 10:23:59,682 - __main__ - INFO - Subscribed to vendor STATE: zigbee2mqtt/0x842e14fffe76a23a +abstraction | 2025-11-18 10:23:59,700 - __main__ - INFO - Subscribed to abstract SET: home/light/deckenlampe_schlafzimmer/set +abstraction | 2025-11-18 10:23:59,717 - __main__ - INFO - Subscribed to vendor STATE: zigbee2mqtt/0x0017880108a406a7 +api | INFO: Started server process [1] +api | INFO: Waiting for application startup. +abstraction | 2025-11-18 10:23:59,735 - __main__ - INFO - Subscribed to abstract SET: home/light/bettlicht_wolfgang/set +api | INFO: Application startup complete. +abstraction | 2025-11-18 10:23:59,753 - __main__ - INFO - Subscribed to vendor STATE: zigbee2mqtt/0x00178801081570bf +api | INFO: Uvicorn running on http://0.0.0.0:8001 (Press CTRL+C to quit) +abstraction | 2025-11-18 10:23:59,770 - __main__ - INFO - Subscribed to abstract SET: home/light/bettlicht_patty/set +abstraction | 2025-11-18 10:23:59,788 - __main__ - INFO - Subscribed to vendor STATE: zigbee2mqtt/0x0017880108158b32 +abstraction | 2025-11-18 10:23:59,807 - __main__ - INFO - Subscribed to abstract SET: home/light/schranklicht_hinten_patty/set +abstraction | 2025-11-18 10:23:59,825 - __main__ - INFO - Subscribed to vendor STATE: zigbee2mqtt/0x0017880106e29571 +abstraction | 2025-11-18 10:23:59,844 - __main__ - INFO - Subscribed to abstract SET: home/relay/schranklicht_vorne_patty/set +abstraction | 2025-11-18 10:23:59,862 - __main__ - INFO - Subscribed to vendor STATE: zigbee2mqtt/0xf0d1b80000154cf5 +abstraction | 2025-11-18 10:23:59,881 - __main__ - INFO - Subscribed to abstract SET: home/light/leselampe_patty/set +abstraction | 2025-11-18 10:23:59,901 - __main__ - INFO - Subscribed to vendor STATE: zigbee2mqtt/0x001788010600ec9d +abstraction | 2025-11-18 10:23:59,920 - __main__ - INFO - Subscribed to abstract SET: home/light/deckenlampe_esszimmer/set +abstraction | 2025-11-18 10:23:59,940 - __main__ - INFO - Subscribed to vendor STATE: zigbee2mqtt/0x0017880108a03e45 +abstraction | 2025-11-18 10:23:59,959 - __main__ - INFO - Subscribed to abstract SET: home/light/standlampe_esszimmer/set +abstraction | 2025-11-18 10:23:59,979 - __main__ - INFO - Subscribed to vendor STATE: zigbee2mqtt/0xbc33acfffe21f547 +ui | UI using API_BASE: http://172.19.1.11:8001 +ui | UI using BASE_PATH: / +ui | INFO: Started server process [1] +ui | INFO: Waiting for application startup. +ui | INFO: Application startup complete. +abstraction | 2025-11-18 10:23:59,999 - __main__ - INFO - Subscribed to abstract SET: home/light/haustuer/set +ui | INFO: Uvicorn running on http://0.0.0.0:8002 (Press CTRL+C to quit) +abstraction | 2025-11-18 10:24:00,016 - __main__ - INFO - Subscribed to vendor STATE: zigbee2mqtt/0xec1bbdfffea6a3da +abstraction | 2025-11-18 10:24:00,034 - __main__ - INFO - Subscribed to abstract SET: home/light/deckenlampe_flur_oben/set +abstraction | 2025-11-18 10:24:00,053 - __main__ - INFO - Subscribed to vendor STATE: zigbee2mqtt/0x001788010d2123a7 +abstraction | 2025-11-18 10:24:00,072 - __main__ - INFO - Subscribed to abstract SET: home/light/kueche_deckenlampe/set +abstraction | 2025-11-18 10:24:00,090 - __main__ - INFO - Subscribed to vendor STATE: zigbee2mqtt/0x001788010d2c40c4 +abstraction | 2025-11-18 10:24:00,108 - __main__ - INFO - Subscribed to abstract SET: home/light/sportlicht_tisch/set +abstraction | 2025-11-18 10:24:00,127 - __main__ - INFO - Subscribed to vendor STATE: zigbee2mqtt/0xf0d1b8be2409f31b +abstraction | 2025-11-18 10:24:00,145 - __main__ - INFO - Subscribed to abstract SET: home/light/sportlicht_regal/set +abstraction | 2025-11-18 10:24:00,163 - __main__ - INFO - Subscribed to vendor STATE: zigbee2mqtt/0xf0d1b8be2409f569 +abstraction | 2025-11-18 10:24:00,183 - __main__ - INFO - Subscribed to abstract SET: home/light/licht_flur_oben_am_spiegel/set +abstraction | 2025-11-18 10:24:00,201 - __main__ - INFO - Subscribed to vendor STATE: zigbee2mqtt/0x842e14fffefe4ba4 +abstraction | 2025-11-18 10:24:00,218 - __main__ - INFO - Subscribed to abstract SET: home/light/experimentlabtest/set +abstraction | 2025-11-18 10:24:00,237 - __main__ - INFO - Subscribed to vendor STATE: zigbee2mqtt/0xf0d1b80000195038 +abstraction | 2025-11-18 10:24:00,255 - __main__ - INFO - Subscribed to abstract SET: home/thermostat/thermostat_wolfgang/set +abstraction | 2025-11-18 10:24:00,271 - __main__ - INFO - Subscribed to vendor STATE: zigbee2mqtt/0x540f57fffe7e3cfe +abstraction | 2025-11-18 10:24:00,292 - __main__ - INFO - Subscribed to abstract SET: home/thermostat/thermostat_kueche/set +abstraction | 2025-11-18 10:24:00,313 - __main__ - INFO - Subscribed to vendor STATE: zigbee2mqtt/0x94deb8fffe2e5c06 +abstraction | 2025-11-18 10:24:00,334 - __main__ - INFO - Subscribed to abstract SET: home/thermostat/thermostat_schlafzimmer/set +abstraction | 2025-11-18 10:24:00,356 - __main__ - INFO - Subscribed to vendor STATE: homegear/instance1/plain/42/1/SET_TEMPERATURE +abstraction | 2025-11-18 10:24:00,377 - __main__ - INFO - Subscribed to abstract SET: home/thermostat/thermostat_esszimmer/set +abstraction | 2025-11-18 10:24:00,398 - __main__ - INFO - Subscribed to vendor STATE: homegear/instance1/plain/45/1/SET_TEMPERATURE +abstraction | 2025-11-18 10:24:00,420 - __main__ - INFO - Subscribed to abstract SET: home/thermostat/thermostat_wohnzimmer/set +abstraction | 2025-11-18 10:24:00,440 - __main__ - INFO - Subscribed to vendor STATE: homegear/instance1/plain/46/1/SET_TEMPERATURE +abstraction | 2025-11-18 10:24:00,457 - __main__ - INFO - Subscribed to abstract SET: home/thermostat/thermostat_patty/set +abstraction | 2025-11-18 10:24:00,475 - __main__ - INFO - Subscribed to vendor STATE: homegear/instance1/plain/39/1/SET_TEMPERATURE +abstraction | 2025-11-18 10:24:00,493 - __main__ - INFO - Subscribed to abstract SET: home/thermostat/thermostat_bad_oben/set +abstraction | 2025-11-18 10:24:00,509 - __main__ - INFO - Subscribed to vendor STATE: homegear/instance1/plain/41/1/SET_TEMPERATURE +abstraction | 2025-11-18 10:24:00,530 - __main__ - INFO - Subscribed to abstract SET: home/thermostat/thermostat_bad_unten/set +abstraction | 2025-11-18 10:24:00,551 - __main__ - INFO - Subscribed to vendor STATE: homegear/instance1/plain/48/1/SET_TEMPERATURE +abstraction | 2025-11-18 10:24:00,572 - __main__ - INFO - Subscribed to abstract SET: home/relay/sterne_wohnzimmer/set +abstraction | 2025-11-18 10:24:00,593 - __main__ - INFO - Subscribed to vendor STATE: zigbee2mqtt/0xf0d1b80000155fc2 +abstraction | 2025-11-18 10:24:00,593 - __main__ - INFO - Skipping SET subscription for read-only device: kontakt_schlafzimmer_strasse +abstraction | 2025-11-18 10:24:00,614 - __main__ - INFO - Subscribed to vendor STATE: homegear/instance1/plain/52/1/STATE +abstraction | 2025-11-18 10:24:00,614 - __main__ - INFO - Skipping SET subscription for read-only device: kontakt_esszimmer_strasse_rechts +abstraction | 2025-11-18 10:24:00,630 - __main__ - INFO - Subscribed to vendor STATE: homegear/instance1/plain/26/1/STATE +abstraction | 2025-11-18 10:24:00,630 - __main__ - INFO - Skipping SET subscription for read-only device: kontakt_esszimmer_strasse_links +abstraction | 2025-11-18 10:24:00,647 - __main__ - INFO - Subscribed to vendor STATE: homegear/instance1/plain/27/1/STATE +abstraction | 2025-11-18 10:24:00,647 - __main__ - INFO - Skipping SET subscription for read-only device: kontakt_wohnzimmer_garten_rechts +abstraction | 2025-11-18 10:24:00,668 - __main__ - INFO - Subscribed to vendor STATE: homegear/instance1/plain/28/1/STATE +abstraction | 2025-11-18 10:24:00,668 - __main__ - INFO - Skipping SET subscription for read-only device: kontakt_wohnzimmer_garten_links +abstraction | 2025-11-18 10:24:00,691 - __main__ - INFO - Subscribed to vendor STATE: homegear/instance1/plain/29/1/STATE +abstraction | 2025-11-18 10:24:00,691 - __main__ - INFO - Skipping SET subscription for read-only device: kontakt_kueche_garten_fenster +abstraction | 2025-11-18 10:24:00,708 - __main__ - INFO - Subscribed to vendor STATE: zigbee2mqtt/0x00158d008b332785 +abstraction | 2025-11-18 10:24:00,708 - __main__ - INFO - Skipping SET subscription for read-only device: kontakt_kueche_garten_tuer +abstraction | 2025-11-18 10:24:00,728 - __main__ - INFO - Subscribed to vendor STATE: zigbee2mqtt/0x00158d008b332788 +abstraction | 2025-11-18 10:24:00,728 - __main__ - INFO - Skipping SET subscription for read-only device: kontakt_kueche_strasse_rechts +abstraction | 2025-11-18 10:24:00,747 - __main__ - INFO - Subscribed to vendor STATE: zigbee2mqtt/0x00158d008b151803 +abstraction | 2025-11-18 10:24:00,747 - __main__ - INFO - Skipping SET subscription for read-only device: kontakt_kueche_strasse_links +abstraction | 2025-11-18 10:24:00,767 - __main__ - INFO - Subscribed to vendor STATE: zigbee2mqtt/0x00158d008b331d0b +abstraction | 2025-11-18 10:24:00,767 - __main__ - INFO - Skipping SET subscription for read-only device: kontakt_patty_garten_rechts +abstraction | 2025-11-18 10:24:00,784 - __main__ - INFO - Subscribed to vendor STATE: homegear/instance1/plain/18/1/STATE +abstraction | 2025-11-18 10:24:00,784 - __main__ - INFO - Skipping SET subscription for read-only device: kontakt_patty_garten_links +abstraction | 2025-11-18 10:24:00,802 - __main__ - INFO - Subscribed to vendor STATE: homegear/instance1/plain/22/1/STATE +abstraction | 2025-11-18 10:24:00,802 - __main__ - INFO - Skipping SET subscription for read-only device: kontakt_patty_strasse +abstraction | 2025-11-18 10:24:00,821 - __main__ - INFO - Subscribed to vendor STATE: zigbee2mqtt/0x00158d000af457cf +abstraction | 2025-11-18 10:24:00,821 - __main__ - INFO - Skipping SET subscription for read-only device: kontakt_wolfgang_garten +abstraction | 2025-11-18 10:24:00,838 - __main__ - INFO - Subscribed to vendor STATE: zigbee2mqtt/0x00158d008b3328da +abstraction | 2025-11-18 10:24:00,838 - __main__ - INFO - Skipping SET subscription for read-only device: kontakt_bad_oben_strasse +abstraction | 2025-11-18 10:24:00,855 - __main__ - INFO - Subscribed to vendor STATE: zigbee2mqtt/0x00158d008b333aec +abstraction | 2025-11-18 10:24:00,855 - __main__ - INFO - Skipping SET subscription for read-only device: kontakt_bad_unten_strasse +api | INFO: 172.16.3.98:51428 - "GET /realtime HTTP/1.1" 200 OK +abstraction | 2025-11-18 10:24:00,872 - __main__ - INFO - Subscribed to vendor STATE: homegear/instance1/plain/44/1/STATE +abstraction | 2025-11-18 10:24:00,872 - __main__ - INFO - Skipping SET subscription for read-only device: sensor_schlafzimmer +abstraction | 2025-11-18 10:24:00,891 - __main__ - INFO - Subscribed to vendor STATE: zigbee2mqtt/0x00158d00043292dc +abstraction | 2025-11-18 10:24:00,891 - __main__ - INFO - Skipping SET subscription for read-only device: sensor_wohnzimmer +api | INFO: 172.16.3.98:51429 - "GET /realtime HTTP/1.1" 200 OK +abstraction | 2025-11-18 10:24:00,907 - __main__ - INFO - Subscribed to vendor STATE: zigbee2mqtt/0x00158d0008975707 +abstraction | 2025-11-18 10:24:00,907 - __main__ - INFO - Skipping SET subscription for read-only device: sensor_kueche +abstraction | 2025-11-18 10:24:00,925 - __main__ - INFO - Subscribed to vendor STATE: zigbee2mqtt/0x00158d00083299bb +abstraction | 2025-11-18 10:24:00,925 - __main__ - INFO - Skipping SET subscription for read-only device: sensor_arbeitszimmer_patty +abstraction | 2025-11-18 10:24:00,947 - __main__ - INFO - Subscribed to vendor STATE: zigbee2mqtt/0x00158d0003f052b7 +abstraction | 2025-11-18 10:24:00,947 - __main__ - INFO - Skipping SET subscription for read-only device: sensor_arbeitszimmer_wolfgang +abstraction | 2025-11-18 10:24:00,969 - __main__ - INFO - Subscribed to vendor STATE: zigbee2mqtt/0x00158d000543fb99 +abstraction | 2025-11-18 10:24:00,969 - __main__ - INFO - Skipping SET subscription for read-only device: sensor_bad_oben +abstraction | 2025-11-18 10:24:00,986 - __main__ - INFO - Subscribed to vendor STATE: zigbee2mqtt/0x00158d00093e8987 +abstraction | 2025-11-18 10:24:00,986 - __main__ - INFO - Skipping SET subscription for read-only device: sensor_bad_unten +abstraction | 2025-11-18 10:24:01,004 - __main__ - INFO - Subscribed to vendor STATE: zigbee2mqtt/0x00158d00093e662a +abstraction | 2025-11-18 10:24:01,004 - __main__ - INFO - Skipping SET subscription for read-only device: sensor_flur +abstraction | 2025-11-18 10:24:01,022 - __main__ - INFO - Subscribed to vendor STATE: zigbee2mqtt/0x00158d000836ccc6 +abstraction | 2025-11-18 10:24:01,022 - __main__ - INFO - Skipping SET subscription for read-only device: sensor_waschkueche +abstraction | 2025-11-18 10:24:01,038 - __main__ - INFO - Subscribed to vendor STATE: zigbee2mqtt/0x00158d000449f3bc +abstraction | 2025-11-18 10:24:01,038 - __main__ - INFO - Skipping SET subscription for read-only device: sensor_sportzimmer +abstraction | 2025-11-18 10:24:01,058 - __main__ - INFO - Subscribed to vendor STATE: zigbee2mqtt/0x00158d0009421422 +abstraction | 2025-11-18 10:24:01,074 - __main__ - INFO - Subscribed to abstract SET: home/relay/licht_spuele_kueche/set +abstraction | 2025-11-18 10:24:01,090 - __main__ - INFO - Subscribed to vendor STATE: shellies/LightKitchenSink/relay/0 +abstraction | 2025-11-18 10:24:01,107 - __main__ - INFO - Subscribed to abstract SET: home/relay/licht_schrank_esszimmer/set +abstraction | 2025-11-18 10:24:01,122 - __main__ - INFO - Subscribed to vendor STATE: shellies/schrankesszimmer/relay/0 +abstraction | 2025-11-18 10:24:01,139 - __main__ - INFO - Subscribed to abstract SET: home/relay/licht_regal_wohnzimmer/set +abstraction | 2025-11-18 10:24:01,155 - __main__ - INFO - Subscribed to vendor STATE: shellies/wohnzimmer-regal/relay/0 +abstraction | 2025-11-18 10:24:01,172 - __main__ - INFO - Subscribed to abstract SET: home/relay/licht_flur_schrank/set +abstraction | 2025-11-18 10:24:01,189 - __main__ - INFO - Subscribed to vendor STATE: shellies/schrankflur/relay/0 +abstraction | 2025-11-18 10:24:01,205 - __main__ - INFO - Subscribed to abstract SET: home/relay/licht_terasse/set +abstraction | 2025-11-18 10:24:01,222 - __main__ - INFO - Subscribed to vendor STATE: shellies/lichtterasse/relay/0 +abstraction | 2025-11-18 10:24:01,222 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract IN: type=thermostat, tech=max, payload=21 +abstraction | 2025-11-18 10:24:01,222 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract OUT: type=thermostat, tech=max, payload={'target': 21.0, 'mode': 'heat'} +abstraction | 2025-11-18 10:24:01,222 - __main__ - INFO - ← abstract STATE thermostat_schlafzimmer: home/thermostat/thermostat_schlafzimmer/state → {"target": 21.0, "mode": "heat"} +abstraction | 2025-11-18 10:24:01,243 - __main__ - INFO - ← Redis PUBLISH ui:updates → {"type": "state", "device_id": "thermostat_schlafzimmer", "payload": {"target": 21.0, "mode": "heat"}, "ts": "2025-11-18T10:24:01.243641+00:00"} +abstraction | 2025-11-18 10:24:01,260 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract IN: type=thermostat, tech=max, payload=15 +abstraction | 2025-11-18 10:24:01,260 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract OUT: type=thermostat, tech=max, payload={'target': 15.0, 'mode': 'heat'} +abstraction | 2025-11-18 10:24:01,260 - __main__ - INFO - ← abstract STATE thermostat_esszimmer: home/thermostat/thermostat_esszimmer/state → {"target": 15.0, "mode": "heat"} +abstraction | 2025-11-18 10:24:01,280 - __main__ - INFO - ← Redis PUBLISH ui:updates → {"type": "state", "device_id": "thermostat_esszimmer", "payload": {"target": 15.0, "mode": "heat"}, "ts": "2025-11-18T10:24:01.280285+00:00"} +abstraction | 2025-11-18 10:24:01,296 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract IN: type=thermostat, tech=max, payload=15 +abstraction | 2025-11-18 10:24:01,296 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract OUT: type=thermostat, tech=max, payload={'target': 15.0, 'mode': 'heat'} +abstraction | 2025-11-18 10:24:01,296 - __main__ - INFO - ← abstract STATE thermostat_wohnzimmer: home/thermostat/thermostat_wohnzimmer/state → {"target": 15.0, "mode": "heat"} +abstraction | 2025-11-18 10:24:01,317 - __main__ - INFO - ← Redis PUBLISH ui:updates → {"type": "state", "device_id": "thermostat_wohnzimmer", "payload": {"target": 15.0, "mode": "heat"}, "ts": "2025-11-18T10:24:01.317708+00:00"} +abstraction | 2025-11-18 10:24:01,334 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract IN: type=thermostat, tech=max, payload=22 +abstraction | 2025-11-18 10:24:01,334 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract OUT: type=thermostat, tech=max, payload={'target': 22.0, 'mode': 'heat'} +abstraction | 2025-11-18 10:24:01,334 - __main__ - INFO - ← abstract STATE thermostat_patty: home/thermostat/thermostat_patty/state → {"target": 22.0, "mode": "heat"} +abstraction | 2025-11-18 10:24:01,357 - __main__ - INFO - ← Redis PUBLISH ui:updates → {"type": "state", "device_id": "thermostat_patty", "payload": {"target": 22.0, "mode": "heat"}, "ts": "2025-11-18T10:24:01.357082+00:00"} +abstraction | 2025-11-18 10:24:01,373 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract IN: type=thermostat, tech=max, payload=20 +abstraction | 2025-11-18 10:24:01,373 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract OUT: type=thermostat, tech=max, payload={'target': 20.0, 'mode': 'heat'} +abstraction | 2025-11-18 10:24:01,373 - __main__ - INFO - ← abstract STATE thermostat_bad_oben: home/thermostat/thermostat_bad_oben/state → {"target": 20.0, "mode": "heat"} +abstraction | 2025-11-18 10:24:01,395 - __main__ - INFO - ← Redis PUBLISH ui:updates → {"type": "state", "device_id": "thermostat_bad_oben", "payload": {"target": 20.0, "mode": "heat"}, "ts": "2025-11-18T10:24:01.395470+00:00"} +abstraction | 2025-11-18 10:24:01,411 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract IN: type=thermostat, tech=max, payload=5 +abstraction | 2025-11-18 10:24:01,411 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract OUT: type=thermostat, tech=max, payload={'target': 5.0, 'mode': 'heat'} +abstraction | 2025-11-18 10:24:01,411 - __main__ - INFO - ← abstract STATE thermostat_bad_unten: home/thermostat/thermostat_bad_unten/state → {"target": 5.0, "mode": "heat"} +abstraction | 2025-11-18 10:24:01,431 - __main__ - INFO - ← Redis PUBLISH ui:updates → {"type": "state", "device_id": "thermostat_bad_unten", "payload": {"target": 5.0, "mode": "heat"}, "ts": "2025-11-18T10:24:01.431068+00:00"} +abstraction | 2025-11-18 10:24:01,448 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract IN: type=contact, tech=max, payload=false +abstraction | 2025-11-18 10:24:01,448 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract OUT: type=contact, tech=max, payload={'contact': 'closed'} +abstraction | 2025-11-18 10:24:01,449 - __main__ - INFO - ← abstract STATE kontakt_schlafzimmer_strasse: home/contact/kontakt_schlafzimmer_strasse/state → {"contact": "closed"} +abstraction | 2025-11-18 10:24:01,472 - __main__ - INFO - ← Redis PUBLISH ui:updates → {"type": "state", "device_id": "kontakt_schlafzimmer_strasse", "payload": {"contact": "closed"}, "ts": "2025-11-18T10:24:01.472456+00:00"} +abstraction | 2025-11-18 10:24:01,491 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract IN: type=contact, tech=max, payload=false +abstraction | 2025-11-18 10:24:01,491 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract OUT: type=contact, tech=max, payload={'contact': 'closed'} +abstraction | 2025-11-18 10:24:01,491 - __main__ - INFO - ← abstract STATE kontakt_esszimmer_strasse_rechts: home/contact/kontakt_esszimmer_strasse_rechts/state → {"contact": "closed"} +abstraction | 2025-11-18 10:24:01,733 - __main__ - INFO - ← Redis PUBLISH ui:updates → {"type": "state", "device_id": "kontakt_esszimmer_strasse_rechts", "payload": {"contact": "closed"}, "ts": "2025-11-18T10:24:01.733873+00:00"} +abstraction | 2025-11-18 10:24:01,750 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract IN: type=contact, tech=max, payload=false +abstraction | 2025-11-18 10:24:01,750 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract OUT: type=contact, tech=max, payload={'contact': 'closed'} +abstraction | 2025-11-18 10:24:01,750 - __main__ - INFO - ← abstract STATE kontakt_esszimmer_strasse_links: home/contact/kontakt_esszimmer_strasse_links/state → {"contact": "closed"} +abstraction | 2025-11-18 10:24:01,771 - __main__ - INFO - ← Redis PUBLISH ui:updates → {"type": "state", "device_id": "kontakt_esszimmer_strasse_links", "payload": {"contact": "closed"}, "ts": "2025-11-18T10:24:01.771380+00:00"} +abstraction | 2025-11-18 10:24:01,788 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract IN: type=contact, tech=max, payload=false +abstraction | 2025-11-18 10:24:01,788 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract OUT: type=contact, tech=max, payload={'contact': 'closed'} +abstraction | 2025-11-18 10:24:01,788 - __main__ - INFO - ← abstract STATE kontakt_wohnzimmer_garten_rechts: home/contact/kontakt_wohnzimmer_garten_rechts/state → {"contact": "closed"} +abstraction | 2025-11-18 10:24:01,808 - __main__ - INFO - ← Redis PUBLISH ui:updates → {"type": "state", "device_id": "kontakt_wohnzimmer_garten_rechts", "payload": {"contact": "closed"}, "ts": "2025-11-18T10:24:01.808516+00:00"} +abstraction | 2025-11-18 10:24:01,825 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract IN: type=contact, tech=max, payload=false +abstraction | 2025-11-18 10:24:01,825 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract OUT: type=contact, tech=max, payload={'contact': 'closed'} +abstraction | 2025-11-18 10:24:01,825 - __main__ - INFO - ← abstract STATE kontakt_wohnzimmer_garten_links: home/contact/kontakt_wohnzimmer_garten_links/state → {"contact": "closed"} +abstraction | 2025-11-18 10:24:01,844 - __main__ - INFO - ← Redis PUBLISH ui:updates → {"type": "state", "device_id": "kontakt_wohnzimmer_garten_links", "payload": {"contact": "closed"}, "ts": "2025-11-18T10:24:01.844046+00:00"} +abstraction | 2025-11-18 10:24:01,860 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract IN: type=contact, tech=max, payload=false +abstraction | 2025-11-18 10:24:01,861 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract OUT: type=contact, tech=max, payload={'contact': 'closed'} +abstraction | 2025-11-18 10:24:01,861 - __main__ - INFO - ← abstract STATE kontakt_patty_garten_rechts: home/contact/kontakt_patty_garten_rechts/state → {"contact": "closed"} +abstraction | 2025-11-18 10:24:01,881 - __main__ - INFO - ← Redis PUBLISH ui:updates → {"type": "state", "device_id": "kontakt_patty_garten_rechts", "payload": {"contact": "closed"}, "ts": "2025-11-18T10:24:01.881922+00:00"} +abstraction | 2025-11-18 10:24:01,898 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract IN: type=contact, tech=max, payload=false +abstraction | 2025-11-18 10:24:01,898 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract OUT: type=contact, tech=max, payload={'contact': 'closed'} +abstraction | 2025-11-18 10:24:01,898 - __main__ - INFO - ← abstract STATE kontakt_patty_garten_links: home/contact/kontakt_patty_garten_links/state → {"contact": "closed"} +abstraction | 2025-11-18 10:24:01,922 - __main__ - INFO - ← Redis PUBLISH ui:updates → {"type": "state", "device_id": "kontakt_patty_garten_links", "payload": {"contact": "closed"}, "ts": "2025-11-18T10:24:01.922254+00:00"} +abstraction | 2025-11-18 10:24:01,940 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract IN: type=contact, tech=max, payload=true +abstraction | 2025-11-18 10:24:01,940 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract OUT: type=contact, tech=max, payload={'contact': 'open'} +abstraction | 2025-11-18 10:24:01,940 - __main__ - INFO - ← abstract STATE kontakt_bad_unten_strasse: home/contact/kontakt_bad_unten_strasse/state → {"contact": "open"} +abstraction | 2025-11-18 10:24:01,959 - __main__ - INFO - ← Redis PUBLISH ui:updates → {"type": "state", "device_id": "kontakt_bad_unten_strasse", "payload": {"contact": "open"}, "ts": "2025-11-18T10:24:01.959678+00:00"} +abstraction | 2025-11-18 10:24:02,354 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract IN: type=relay, tech=shelly, payload=off +abstraction | 2025-11-18 10:24:02,354 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract OUT: type=relay, tech=shelly, payload={'power': 'off'} +abstraction | 2025-11-18 10:24:02,354 - __main__ - INFO - ← abstract STATE licht_terasse: home/relay/licht_terasse/state → {"power": "off"} +abstraction | 2025-11-18 10:24:02,373 - __main__ - INFO - ← Redis PUBLISH ui:updates → {"type": "state", "device_id": "licht_terasse", "payload": {"power": "off"}, "ts": "2025-11-18T10:24:02.373461+00:00"} +ui | INFO: 127.0.0.1:49192 - "GET /health HTTP/1.1" 200 OK +api | INFO: 172.16.3.98:51450 - "GET /realtime HTTP/1.1" 200 OK +abstraction | 2025-11-18 10:24:07,440 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract IN: type=relay, tech=shelly, payload=off +abstraction | 2025-11-18 10:24:07,440 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract OUT: type=relay, tech=shelly, payload={'power': 'off'} +abstraction | 2025-11-18 10:24:07,441 - __main__ - INFO - ← abstract STATE licht_regal_wohnzimmer: home/relay/licht_regal_wohnzimmer/state → {"power": "off"} +abstraction | 2025-11-18 10:24:07,459 - __main__ - INFO - ← Redis PUBLISH ui:updates → {"type": "state", "device_id": "licht_regal_wohnzimmer", "payload": {"power": "off"}, "ts": "2025-11-18T10:24:07.459082+00:00"} +abstraction | 2025-11-18 10:24:08,817 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract IN: type=temp_humidity_sensor, tech=zigbee2mqtt, payload={'battery': 100, 'humidity': 54.37, 'linkquality': 83, 'power_outage_count': 38416, 'pressure': 1004.2, 'temperature': 22.16, 'voltage': 3015} +abstraction | 2025-11-18 10:24:08,817 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract OUT: type=temp_humidity_sensor, tech=zigbee2mqtt, payload={'battery': 100, 'humidity': 54.37, 'linkquality': 83, 'power_outage_count': 38416, 'pressure': 1004.2, 'temperature': 22.16, 'voltage': 3015} +abstraction | 2025-11-18 10:24:08,817 - __main__ - INFO - ← abstract STATE sensor_arbeitszimmer_patty: home/temp_humidity/sensor_arbeitszimmer_patty/state → {"battery": 100, "humidity": 54.37, "linkquality": 83, "power_outage_count": 38416, "pressure": 1004.2, "temperature": 22.16, "voltage": 3015} +abstraction | 2025-11-18 10:24:08,835 - __main__ - INFO - ← Redis PUBLISH ui:updates → {"type": "state", "device_id": "sensor_arbeitszimmer_patty", "payload": {"battery": 100, "humidity": 54.37, "linkquality": 83, "power_outage_count": 38416, "pressure": 1004.2, "temperature": 22.16, "voltage": 3015}, "ts": "2025-11-18T10:24:08.835488+00:00"} +abstraction | 2025-11-18 10:24:08,852 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract IN: type=temp_humidity_sensor, tech=zigbee2mqtt, payload={'battery': 100, 'humidity': 54.22, 'linkquality': 83, 'power_outage_count': 38416, 'pressure': 1004.2, 'temperature': 22.16, 'voltage': 3015} +abstraction | 2025-11-18 10:24:08,852 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract OUT: type=temp_humidity_sensor, tech=zigbee2mqtt, payload={'battery': 100, 'humidity': 54.22, 'linkquality': 83, 'power_outage_count': 38416, 'pressure': 1004.2, 'temperature': 22.16, 'voltage': 3015} +abstraction | 2025-11-18 10:24:08,852 - __main__ - INFO - ← abstract STATE sensor_arbeitszimmer_patty: home/temp_humidity/sensor_arbeitszimmer_patty/state → {"battery": 100, "humidity": 54.22, "linkquality": 83, "power_outage_count": 38416, "pressure": 1004.2, "temperature": 22.16, "voltage": 3015} +abstraction | 2025-11-18 10:24:08,870 - __main__ - INFO - ← Redis PUBLISH ui:updates → {"type": "state", "device_id": "sensor_arbeitszimmer_patty", "payload": {"battery": 100, "humidity": 54.22, "linkquality": 83, "power_outage_count": 38416, "pressure": 1004.2, "temperature": 22.16, "voltage": 3015}, "ts": "2025-11-18T10:24:08.870674+00:00"} +abstraction | 2025-11-18 10:24:08,887 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract IN: type=temp_humidity_sensor, tech=zigbee2mqtt, payload={'battery': 100, 'humidity': 54.22, 'linkquality': 83, 'power_outage_count': 38416, 'pressure': 1003.9, 'temperature': 22.16, 'voltage': 3015} +abstraction | 2025-11-18 10:24:08,887 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract OUT: type=temp_humidity_sensor, tech=zigbee2mqtt, payload={'battery': 100, 'humidity': 54.22, 'linkquality': 83, 'power_outage_count': 38416, 'pressure': 1003.9, 'temperature': 22.16, 'voltage': 3015} +abstraction | 2025-11-18 10:24:08,887 - __main__ - INFO - ← abstract STATE sensor_arbeitszimmer_patty: home/temp_humidity/sensor_arbeitszimmer_patty/state → {"battery": 100, "humidity": 54.22, "linkquality": 83, "power_outage_count": 38416, "pressure": 1003.9, "temperature": 22.16, "voltage": 3015} +abstraction | 2025-11-18 10:24:08,907 - __main__ - INFO - ← Redis PUBLISH ui:updates → {"type": "state", "device_id": "sensor_arbeitszimmer_patty", "payload": {"battery": 100, "humidity": 54.22, "linkquality": 83, "power_outage_count": 38416, "pressure": 1003.9, "temperature": 22.16, "voltage": 3015}, "ts": "2025-11-18T10:24:08.907729+00:00"} +abstraction | 2025-11-18 10:24:10,178 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract IN: type=relay, tech=shelly, payload=on +abstraction | 2025-11-18 10:24:10,178 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract OUT: type=relay, tech=shelly, payload={'power': 'on'} +abstraction | 2025-11-18 10:24:10,178 - __main__ - INFO - ← abstract STATE licht_spuele_kueche: home/relay/licht_spuele_kueche/state → {"power": "on"} +abstraction | 2025-11-18 10:24:10,196 - __main__ - INFO - ← Redis PUBLISH ui:updates → {"type": "state", "device_id": "licht_spuele_kueche", "payload": {"power": "on"}, "ts": "2025-11-18T10:24:10.196762+00:00"} +abstraction | 2025-11-18 10:24:17,815 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract IN: type=relay, tech=shelly, payload=off +abstraction | 2025-11-18 10:24:17,815 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract OUT: type=relay, tech=shelly, payload={'power': 'off'} +abstraction | 2025-11-18 10:24:17,815 - __main__ - INFO - ← abstract STATE licht_schrank_esszimmer: home/relay/licht_schrank_esszimmer/state → {"power": "off"} +abstraction | 2025-11-18 10:24:17,834 - __main__ - INFO - ← Redis PUBLISH ui:updates → {"type": "state", "device_id": "licht_schrank_esszimmer", "payload": {"power": "off"}, "ts": "2025-11-18T10:24:17.834042+00:00"} +abstraction | 2025-11-18 10:24:32,370 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract IN: type=relay, tech=shelly, payload=off +abstraction | 2025-11-18 10:24:32,370 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract OUT: type=relay, tech=shelly, payload={'power': 'off'} +abstraction | 2025-11-18 10:24:32,370 - __main__ - INFO - ← abstract STATE licht_terasse: home/relay/licht_terasse/state → {"power": "off"} +abstraction | 2025-11-18 10:24:32,405 - __main__ - INFO - ← Redis PUBLISH ui:updates → {"type": "state", "device_id": "licht_terasse", "payload": {"power": "off"}, "ts": "2025-11-18T10:24:32.405754+00:00"} +ui | INFO: 127.0.0.1:39276 - "GET /health HTTP/1.1" 200 OK +abstraction | 2025-11-18 10:24:37,447 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract IN: type=relay, tech=shelly, payload=off +abstraction | 2025-11-18 10:24:37,447 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract OUT: type=relay, tech=shelly, payload={'power': 'off'} +abstraction | 2025-11-18 10:24:37,447 - __main__ - INFO - ← abstract STATE licht_regal_wohnzimmer: home/relay/licht_regal_wohnzimmer/state → {"power": "off"} +abstraction | 2025-11-18 10:24:37,465 - __main__ - INFO - ← Redis PUBLISH ui:updates → {"type": "state", "device_id": "licht_regal_wohnzimmer", "payload": {"power": "off"}, "ts": "2025-11-18T10:24:37.465220+00:00"} +abstraction | 2025-11-18 10:24:40,188 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract IN: type=relay, tech=shelly, payload=on +abstraction | 2025-11-18 10:24:40,189 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract OUT: type=relay, tech=shelly, payload={'power': 'on'} +abstraction | 2025-11-18 10:24:40,189 - __main__ - INFO - ← abstract STATE licht_spuele_kueche: home/relay/licht_spuele_kueche/state → {"power": "on"} +abstraction | 2025-11-18 10:24:40,207 - __main__ - INFO - ← Redis PUBLISH ui:updates → {"type": "state", "device_id": "licht_spuele_kueche", "payload": {"power": "on"}, "ts": "2025-11-18T10:24:40.207222+00:00"} +abstraction | 2025-11-18 10:24:47,833 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract IN: type=relay, tech=shelly, payload=off +abstraction | 2025-11-18 10:24:47,833 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract OUT: type=relay, tech=shelly, payload={'power': 'off'} +abstraction | 2025-11-18 10:24:47,833 - __main__ - INFO - ← abstract STATE licht_schrank_esszimmer: home/relay/licht_schrank_esszimmer/state → {"power": "off"} +abstraction | 2025-11-18 10:24:47,868 - __main__ - INFO - ← Redis PUBLISH ui:updates → {"type": "state", "device_id": "licht_schrank_esszimmer", "payload": {"power": "off"}, "ts": "2025-11-18T10:24:47.868787+00:00"} +abstraction | 2025-11-18 10:25:02,363 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract IN: type=relay, tech=shelly, payload=off +abstraction | 2025-11-18 10:25:02,363 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract OUT: type=relay, tech=shelly, payload={'power': 'off'} +abstraction | 2025-11-18 10:25:02,363 - __main__ - INFO - ← abstract STATE licht_terasse: home/relay/licht_terasse/state → {"power": "off"} +abstraction | 2025-11-18 10:25:02,381 - __main__ - INFO - ← Redis PUBLISH ui:updates → {"type": "state", "device_id": "licht_terasse", "payload": {"power": "off"}, "ts": "2025-11-18T10:25:02.381792+00:00"} +ui | INFO: 127.0.0.1:37108 - "GET /health HTTP/1.1" 200 OK +abstraction | 2025-11-18 10:25:07,447 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract IN: type=relay, tech=shelly, payload=off +abstraction | 2025-11-18 10:25:07,448 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract OUT: type=relay, tech=shelly, payload={'power': 'off'} +abstraction | 2025-11-18 10:25:07,448 - __main__ - INFO - ← abstract STATE licht_regal_wohnzimmer: home/relay/licht_regal_wohnzimmer/state → {"power": "off"} +abstraction | 2025-11-18 10:25:07,465 - __main__ - INFO - ← Redis PUBLISH ui:updates → {"type": "state", "device_id": "licht_regal_wohnzimmer", "payload": {"power": "off"}, "ts": "2025-11-18T10:25:07.465566+00:00"} +abstraction | 2025-11-18 10:25:10,185 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract IN: type=relay, tech=shelly, payload=on +abstraction | 2025-11-18 10:25:10,185 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract OUT: type=relay, tech=shelly, payload={'power': 'on'} +abstraction | 2025-11-18 10:25:10,185 - __main__ - INFO - ← abstract STATE licht_spuele_kueche: home/relay/licht_spuele_kueche/state → {"power": "on"} +abstraction | 2025-11-18 10:25:10,202 - __main__ - INFO - ← Redis PUBLISH ui:updates → {"type": "state", "device_id": "licht_spuele_kueche", "payload": {"power": "on"}, "ts": "2025-11-18T10:25:10.202372+00:00"} +abstraction | 2025-11-18 10:25:17,820 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract IN: type=relay, tech=shelly, payload=off +abstraction | 2025-11-18 10:25:17,820 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract OUT: type=relay, tech=shelly, payload={'power': 'off'} +abstraction | 2025-11-18 10:25:17,820 - __main__ - INFO - ← abstract STATE licht_schrank_esszimmer: home/relay/licht_schrank_esszimmer/state → {"power": "off"} +abstraction | 2025-11-18 10:25:17,838 - __main__ - INFO - ← Redis PUBLISH ui:updates → {"type": "state", "device_id": "licht_schrank_esszimmer", "payload": {"power": "off"}, "ts": "2025-11-18T10:25:17.838140+00:00"} +api | INFO: 172.16.3.98:51763 - "GET /docs HTTP/1.1" 200 OK +api | /usr/local/lib/python3.14/site-packages/fastapi/openapi/utils.py:207: UserWarning: Duplicate Operation ID get_device_layout_devices__device_id__layout_get for function get_device_layout at /app/apps/api/main.py +api | warnings.warn(message, stacklevel=1) +api | /usr/local/lib/python3.14/site-packages/fastapi/openapi/utils.py:207: UserWarning: Duplicate Operation ID get_device_state_devices__device_id__state_get for function get_device_state at /app/apps/api/main.py +api | warnings.warn(message, stacklevel=1) +api | INFO: 172.16.3.98:51763 - "GET /openapi.json HTTP/1.1" 200 OK +api | INFO: 172.16.3.98:51763 - "GET /devices/states HTTP/1.1" 200 OK +abstraction | 2025-11-18 10:25:32,361 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract IN: type=relay, tech=shelly, payload=off +abstraction | 2025-11-18 10:25:32,361 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract OUT: type=relay, tech=shelly, payload={'power': 'off'} +abstraction | 2025-11-18 10:25:32,361 - __main__ - INFO - ← abstract STATE licht_terasse: home/relay/licht_terasse/state → {"power": "off"} +abstraction | 2025-11-18 10:25:32,379 - __main__ - INFO - ← Redis PUBLISH ui:updates → {"type": "state", "device_id": "licht_terasse", "payload": {"power": "off"}, "ts": "2025-11-18T10:25:32.379286+00:00"} +ui | INFO: 127.0.0.1:41510 - "GET /health HTTP/1.1" 200 OK +abstraction | 2025-11-18 10:25:37,455 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract IN: type=relay, tech=shelly, payload=off +abstraction | 2025-11-18 10:25:37,455 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract OUT: type=relay, tech=shelly, payload={'power': 'off'} +abstraction | 2025-11-18 10:25:37,455 - __main__ - INFO - ← abstract STATE licht_regal_wohnzimmer: home/relay/licht_regal_wohnzimmer/state → {"power": "off"} +abstraction | 2025-11-18 10:25:37,473 - __main__ - INFO - ← Redis PUBLISH ui:updates → {"type": "state", "device_id": "licht_regal_wohnzimmer", "payload": {"power": "off"}, "ts": "2025-11-18T10:25:37.473171+00:00"} +abstraction | 2025-11-18 10:25:40,193 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract IN: type=relay, tech=shelly, payload=on +abstraction | 2025-11-18 10:25:40,194 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract OUT: type=relay, tech=shelly, payload={'power': 'on'} +abstraction | 2025-11-18 10:25:40,194 - __main__ - INFO - ← abstract STATE licht_spuele_kueche: home/relay/licht_spuele_kueche/state → {"power": "on"} +abstraction | 2025-11-18 10:25:40,211 - __main__ - INFO - ← Redis PUBLISH ui:updates → {"type": "state", "device_id": "licht_spuele_kueche", "payload": {"power": "on"}, "ts": "2025-11-18T10:25:40.211493+00:00"} +abstraction | 2025-11-18 10:25:47,821 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract IN: type=relay, tech=shelly, payload=off +abstraction | 2025-11-18 10:25:47,821 - apps.abstraction.transformation - DEBUG - transform_vendor_to_abstract OUT: type=relay, tech=shelly, payload={'power': 'off'} +abstraction | 2025-11-18 10:25:47,821 - __main__ - INFO - ← abstract STATE licht_schrank_esszimmer: home/relay/licht_schrank_esszimmer/state → {"power": "off"} +abstraction | 2025-11-18 10:25:47,838 - __main__ - INFO - ← Redis PUBLISH ui:updates → {"type": "state", "device_id": "licht_schrank_esszimmer", "payload": {"power": "off"}, "ts": "2025-11-18T10:25:47.838508+00:00"} diff --git a/apps/abstraction/main.py b/apps/abstraction/main.py index 8f483e2..33451c8 100644 --- a/apps/abstraction/main.py +++ b/apps/abstraction/main.py @@ -326,46 +326,18 @@ async def mqtt_worker(config: dict[str, Any], redis_client: aioredis.Redis) -> N last_activity = asyncio.get_event_loop().time() topic = str(message.topic) payload_str = message.payload.decode() + logger.debug(f"MQTT message received on {topic}: {payload_str}") - # Determine if message is from a MAX! device (requires plain text handling) - is_max_device = False - max_device_id = None - max_device_type = None - - # Check if topic matches any MAX! device state topic - for device_id, device in devices.items(): - if device.get("technology") == "max" and topic == device["topics"]["state"]: - is_max_device = True - max_device_id = device_id - max_device_type = device["type"] - break - - # Check for Shelly relay (also sends plain text) - is_shelly_relay = False - shelly_device_id = None - shelly_device_type = None - for device_id, device in devices.items(): - if device.get("technology") == "shelly" and device.get("type") == "relay": - if topic == device["topics"]["state"]: - is_shelly_relay = True - shelly_device_id = device_id - shelly_device_type = device["type"] - break - - # Parse payload based on device technology - if is_max_device or is_shelly_relay: - # MAX! and Shelly send plain text, not JSON - payload = payload_str.strip() - else: - # All other technologies use JSON + # Check if this is an abstract SET message + if topic.startswith("home/") and topic.endswith("/set"): + + # abstract messages should have json payload try: payload = json.loads(payload_str) except json.JSONDecodeError: logger.warning(f"Invalid JSON on {topic}: {payload_str}") continue - - # Check if this is an abstract SET message - if topic.startswith("home/") and topic.endswith("/set"): + # Extract device_type and device_id from topic parts = topic.split("/") if len(parts) == 4: # home///set @@ -382,32 +354,15 @@ async def mqtt_worker(config: dict[str, Any], redis_client: aioredis.Redis) -> N # Check if this is a vendor STATE message else: - # For MAX! devices, we already identified them above - if is_max_device: - device = devices[max_device_id] - device_technology = device.get("technology", "unknown") - await handle_vendor_state( - client, redis_client, max_device_id, max_device_type, - device_technology, payload, redis_channel - ) - # For Shelly relay devices, we already identified them above - elif is_shelly_relay: - device = devices[shelly_device_id] - device_technology = device.get("technology", "unknown") - await handle_vendor_state( - client, redis_client, shelly_device_id, shelly_device_type, - device_technology, payload, redis_channel - ) - else: - # Find device by vendor state topic for other technologies - for device_id, device in devices.items(): - if topic == device["topics"]["state"]: - device_technology = device.get("technology", "unknown") - await handle_vendor_state( - client, redis_client, device_id, device["type"], - device_technology, payload, redis_channel - ) - break + # Find device by vendor state topic for other technologies + for device_id, device in devices.items(): + if topic == device["topics"]["state"]: + device_technology = device.get("technology", "unknown") + await handle_vendor_state( + client, redis_client, device_id, device["type"], + device_technology, payload_str, redis_channel + ) + break except asyncio.CancelledError: logger.info("MQTT worker cancelled") diff --git a/apps/abstraction/transformation.py b/apps/abstraction/transformation.py index d6a7619..b20bad9 100644 --- a/apps/abstraction/transformation.py +++ b/apps/abstraction/transformation.py @@ -7,6 +7,7 @@ This module implements a registry-pattern for vendor-specific transformations: """ import logging +import json from typing import Any, Callable logger = logging.getLogger(__name__) @@ -24,11 +25,14 @@ def _transform_light_simulator_to_vendor(payload: dict[str, Any]) -> dict[str, A return payload -def _transform_light_simulator_to_abstract(payload: dict[str, Any]) -> dict[str, Any]: +def _transform_light_simulator_to_abstract(payload: str) -> dict[str, Any]: """Transform simulator light payload to abstract format. Simulator uses same format as abstract protocol (no transformation needed). """ + + payload = json.loads(payload) + return payload @@ -40,11 +44,14 @@ def _transform_thermostat_simulator_to_vendor(payload: dict[str, Any]) -> dict[s return payload -def _transform_thermostat_simulator_to_abstract(payload: dict[str, Any]) -> dict[str, Any]: +def _transform_thermostat_simulator_to_abstract(payload: str) -> dict[str, Any]: """Transform simulator thermostat payload to abstract format. Simulator uses same format as abstract protocol (no transformation needed). """ + + payload = json.loads(payload) + return payload @@ -80,7 +87,7 @@ def _transform_light_zigbee2mqtt_to_vendor(payload: dict[str, Any]) -> dict[str, return vendor_payload -def _transform_light_zigbee2mqtt_to_abstract(payload: dict[str, Any]) -> dict[str, Any]: +def _transform_light_zigbee2mqtt_to_abstract(payload: str) -> dict[str, Any]: """Transform zigbee2mqtt light payload to abstract format. Transformations: @@ -91,7 +98,7 @@ def _transform_light_zigbee2mqtt_to_abstract(payload: dict[str, Any]) -> dict[st - zigbee2mqtt: {'state': 'ON', 'brightness': 254} - Abstract: {'power': 'on', 'brightness': 100} """ - abstract_payload = payload.copy() + abstract_payload = json.loads(payload) # Transform state -> power with lowercase values if "state" in abstract_payload: @@ -128,7 +135,7 @@ def _transform_thermostat_zigbee2mqtt_to_vendor(payload: dict[str, Any]) -> dict return vendor_payload -def _transform_thermostat_zigbee2mqtt_to_abstract(payload: dict[str, Any]) -> dict[str, Any]: +def _transform_thermostat_zigbee2mqtt_to_abstract(payload: str) -> dict[str, Any]: """Transform zigbee2mqtt thermostat payload to abstract format. Transformations: @@ -140,6 +147,7 @@ def _transform_thermostat_zigbee2mqtt_to_abstract(payload: dict[str, Any]) -> di - zigbee2mqtt: {'current_heating_setpoint': 15, 'local_temperature': 23, 'system_mode': 'heat'} - Abstract: {'target': 15.0, 'current': 23.0, 'mode': 'heat'} """ + payload = json.loads(payload) abstract_payload = {} # Extract target temperature @@ -173,7 +181,7 @@ def _transform_contact_sensor_zigbee2mqtt_to_vendor(payload: dict[str, Any]) -> return payload -def _transform_contact_sensor_zigbee2mqtt_to_abstract(payload: dict[str, Any]) -> dict[str, Any]: +def _transform_contact_sensor_zigbee2mqtt_to_abstract(payload: str) -> dict[str, Any]: """Transform zigbee2mqtt contact sensor payload to abstract format. Transformations: @@ -188,6 +196,7 @@ def _transform_contact_sensor_zigbee2mqtt_to_abstract(payload: dict[str, Any]) - - zigbee2mqtt: {"contact": false, "battery": 100, "linkquality": 87} - Abstract: {"contact": "open", "battery": 100, "linkquality": 87} """ + payload = json.loads(payload) abstract_payload = {} # Transform contact state (inverted logic!) @@ -226,7 +235,7 @@ def _transform_contact_sensor_max_to_vendor(payload: dict[str, Any]) -> dict[str return payload -def _transform_contact_sensor_max_to_abstract(payload: str | bool | dict[str, Any]) -> dict[str, Any]: +def _transform_contact_sensor_max_to_abstract(payload: str) -> dict[str, Any]: """Transform MAX! (Homegear) contact sensor payload to abstract format. MAX! sends "true"/"false" (string or bool) on STATE topic. @@ -240,19 +249,7 @@ def _transform_contact_sensor_max_to_abstract(payload: str | bool | dict[str, An - Abstract: {"contact": "open"} """ try: - # Handle string, bool, or dict input - if isinstance(payload, dict): - # If already a dict, extract contact field - contact_value = payload.get("contact", False) - elif isinstance(payload, str): - # Parse string to bool - contact_value = payload.strip().lower() == "true" - elif isinstance(payload, bool): - # Use bool directly - contact_value = payload - else: - logger.warning(f"MAX! contact sensor unexpected payload type: {type(payload)}, value: {payload}") - contact_value = False + contact_value = payload.strip().lower() == "true" # MAX! semantics: True = OPEN, False = CLOSED return { @@ -278,11 +275,12 @@ def _transform_temp_humidity_sensor_zigbee2mqtt_to_vendor(payload: dict[str, Any return payload -def _transform_temp_humidity_sensor_zigbee2mqtt_to_abstract(payload: dict[str, Any]) -> dict[str, Any]: +def _transform_temp_humidity_sensor_zigbee2mqtt_to_abstract(payload: str) -> dict[str, Any]: """Transform zigbee2mqtt temp/humidity sensor payload to abstract format. Passthrough - zigbee2mqtt provides temperature, humidity, battery, linkquality directly. """ + payload = json.loads(payload) return payload @@ -290,20 +288,24 @@ def _transform_temp_humidity_sensor_zigbee2mqtt_to_abstract(payload: dict[str, A # HANDLER FUNCTIONS: temp_humidity_sensor - MAX! technology # ============================================================================ -def _transform_temp_humidity_sensor_max_to_vendor(payload: dict[str, Any]) -> dict[str, Any]: +def _transform_temp_humidity_sensor_max_to_vendor(payload: str) -> dict[str, Any]: """Transform abstract temp/humidity sensor payload to MAX! format. Temp/humidity sensors are read-only, so this should not be called for SET commands. Returns payload as-is for compatibility. """ + + payload = json.loads(payload) + return payload -def _transform_temp_humidity_sensor_max_to_abstract(payload: dict[str, Any]) -> dict[str, Any]: +def _transform_temp_humidity_sensor_max_to_abstract(payload: str) -> dict[str, Any]: """Transform MAX! temp/humidity sensor payload to abstract format. Passthrough - MAX! provides temperature, humidity, battery directly. """ + payload = json.loads(payload) return payload @@ -326,12 +328,13 @@ def _transform_relay_zigbee2mqtt_to_vendor(payload: dict[str, Any]) -> dict[str, return vendor_payload -def _transform_relay_zigbee2mqtt_to_abstract(payload: dict[str, Any]) -> dict[str, Any]: +def _transform_relay_zigbee2mqtt_to_abstract(payload: str) -> dict[str, Any]: """Transform zigbee2mqtt relay payload to abstract format. Relay only has power on/off, same transformation as light. - state: 'ON'/'OFF' -> power: 'on'/'off' """ + payload = json.loads(payload) abstract_payload = payload.copy() if "state" in abstract_payload: @@ -369,12 +372,7 @@ def _transform_relay_shelly_to_abstract(payload: str) -> dict[str, Any]: - Shelly: 'on' - Abstract: {'power': 'on'} """ - # Shelly payload is a plain string, not a dict - if isinstance(payload, str): - return {"power": payload.strip()} - - # Fallback if it's already a dict (shouldn't happen) - return payload + return {"power": payload.strip()} # ============================================================================ @@ -412,7 +410,7 @@ def _transform_thermostat_max_to_vendor(payload: dict[str, Any]) -> str: return "21" -def _transform_thermostat_max_to_abstract(payload: str | int | float) -> dict[str, Any]: +def _transform_thermostat_max_to_abstract(payload: str) -> dict[str, Any]: """Transform MAX! (Homegear) thermostat payload to abstract format. MAX! sends only the integer temperature value (no JSON). @@ -428,26 +426,14 @@ def _transform_thermostat_max_to_abstract(payload: str | int | float) -> dict[st Note: MAX! doesn't send current temperature via SET_TEMPERATURE topic """ - try: - # Handle both string and numeric input - if isinstance(payload, str): - target_temp = float(payload.strip()) - elif isinstance(payload, (int, float)): - target_temp = float(payload) - else: - logger.warning(f"MAX! unexpected payload type: {type(payload)}, value: {payload}") - target_temp = 21.0 - - return { - "target": target_temp, - "mode": "heat" # MAX! is always in heating mode - } - except (ValueError, TypeError) as e: - logger.error(f"MAX! failed to parse temperature: {payload}, error: {e}") - return { - "target": 21.0, - "mode": "heat" - } + + # Handle both string and numeric input + target_temp = float(payload.strip()) + + return { + "target": target_temp, + "mode": "heat" # MAX! is always in heating mode + } # ============================================================================ @@ -564,7 +550,7 @@ def transform_abstract_to_vendor( def transform_vendor_to_abstract( device_type: str, device_technology: str, - vendor_payload: dict[str, Any] + vendor_payload: str ) -> dict[str, Any]: """Transform vendor-specific payload to abstract format.