From ac97074c47bf269cb564abd62818672d257bda5e Mon Sep 17 00:00:00 2001 From: Eelco Date: Sat, 18 Nov 2023 13:44:53 +0100 Subject: [PATCH 01/22] Update driver.compose.json --- drivers/radar_sensor/driver.compose.json | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/radar_sensor/driver.compose.json b/drivers/radar_sensor/driver.compose.json index a70178ef..a59221e1 100644 --- a/drivers/radar_sensor/driver.compose.json +++ b/drivers/radar_sensor/driver.compose.json @@ -28,15 +28,21 @@ "_TZE201_ztc6ggyl", "_TZE202_ztc6ggyl", "_TZE203_ztc6ggyl", - "_TZE204_ztc6ggyl" + "_TZE204_ztc6ggyl", + "_TZE200_2aaelwxk" ], "productId": [ - "TS0601" + "TS0601", + "TS0025" ], "endpoints": { "1": { "clusters": [0, 4, 5, 258, 61184], "bindings": [258, 61184] + }, + "2": { + "clusters": [0, 3, 1280, 57346, 61184, 60928, 57344, 1024], + "bindings": [] } }, "learnmode": { From 4b32892e34f5adc08da1cdf50e82f6189f8fe081 Mon Sep 17 00:00:00 2001 From: Eelco Date: Sat, 18 Nov 2023 13:53:03 +0100 Subject: [PATCH 02/22] Update driver.compose.json --- drivers/radar_sensor/driver.compose.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/radar_sensor/driver.compose.json b/drivers/radar_sensor/driver.compose.json index a59221e1..d6986bdd 100644 --- a/drivers/radar_sensor/driver.compose.json +++ b/drivers/radar_sensor/driver.compose.json @@ -40,8 +40,8 @@ "clusters": [0, 4, 5, 258, 61184], "bindings": [258, 61184] }, - "2": { - "clusters": [0, 3, 1280, 57346, 61184, 60928, 57344, 1024], + "242": { + "clusters": [], "bindings": [] } }, From 67e69c71c7b480fdcad69f7e640c3f17469f8095 Mon Sep 17 00:00:00 2001 From: Eelco Date: Sat, 18 Nov 2023 13:56:05 +0100 Subject: [PATCH 03/22] Update driver.compose.json --- drivers/radar_sensor/driver.compose.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/radar_sensor/driver.compose.json b/drivers/radar_sensor/driver.compose.json index d6986bdd..bd304e75 100644 --- a/drivers/radar_sensor/driver.compose.json +++ b/drivers/radar_sensor/driver.compose.json @@ -37,7 +37,7 @@ ], "endpoints": { "1": { - "clusters": [0, 4, 5, 258, 61184], + "clusters": [0, 3, 4, 5, 258, 1024, 1280, 57346, 60928, 57344, 61184,], "bindings": [258, 61184] }, "242": { From c161b8f96979fa3010038aea2b530f18c3ab00c9 Mon Sep 17 00:00:00 2001 From: Eelco Date: Sat, 18 Nov 2023 13:56:22 +0100 Subject: [PATCH 04/22] Update driver.compose.json --- drivers/radar_sensor/driver.compose.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/radar_sensor/driver.compose.json b/drivers/radar_sensor/driver.compose.json index bd304e75..c04fa97d 100644 --- a/drivers/radar_sensor/driver.compose.json +++ b/drivers/radar_sensor/driver.compose.json @@ -37,7 +37,7 @@ ], "endpoints": { "1": { - "clusters": [0, 3, 4, 5, 258, 1024, 1280, 57346, 60928, 57344, 61184,], + "clusters": [0, 3, 4, 5, 258, 1024, 1280, 57346, 60928, 57344, 61184], "bindings": [258, 61184] }, "242": { From c1323718cabb86c5b65965ad8f5e99efaed576b8 Mon Sep 17 00:00:00 2001 From: Eelco Date: Sat, 18 Nov 2023 14:22:10 +0100 Subject: [PATCH 05/22] productId typo --- drivers/radar_sensor/driver.compose.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/radar_sensor/driver.compose.json b/drivers/radar_sensor/driver.compose.json index c04fa97d..24ae70cc 100644 --- a/drivers/radar_sensor/driver.compose.json +++ b/drivers/radar_sensor/driver.compose.json @@ -33,7 +33,7 @@ ], "productId": [ "TS0601", - "TS0025" + "TS0225" ], "endpoints": { "1": { From a84ef3f60a7a4bb83a5b7b15c8448ea8f76b7613 Mon Sep 17 00:00:00 2001 From: Eelco Date: Sat, 18 Nov 2023 14:28:37 +0100 Subject: [PATCH 06/22] Update driver.compose.json --- drivers/radar_sensor/driver.compose.json | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/radar_sensor/driver.compose.json b/drivers/radar_sensor/driver.compose.json index 24ae70cc..96e1023b 100644 --- a/drivers/radar_sensor/driver.compose.json +++ b/drivers/radar_sensor/driver.compose.json @@ -37,12 +37,8 @@ ], "endpoints": { "1": { - "clusters": [0, 3, 4, 5, 258, 1024, 1280, 57346, 60928, 57344, 61184], + "clusters": [0, 4, 5, 258, 61184], "bindings": [258, 61184] - }, - "242": { - "clusters": [], - "bindings": [] } }, "learnmode": { From ea79c39d40c2fb30a21f09f14c7cd37c4d1cff1e Mon Sep 17 00:00:00 2001 From: Eelco Date: Mon, 20 Nov 2023 20:12:24 +0100 Subject: [PATCH 07/22] working readout of radar_sensor _TZE200_2aaelwxk --- .../capabilities/alarm_breathe_presence.json | 105 +++ .../capabilities/alarm_large_presence.json | 105 +++ .../capabilities/alarm_small_presence.json | 105 +++ .../capabilities/target_distance.json | 4 +- app.json | 544 ++++++++++-- drivers/radar_sensor_2/assets/icon.svg | 1 + .../assets/images/breathe_motion.svg | 51 ++ .../radar_sensor_2/assets/images/large.png | Bin 0 -> 30615 bytes .../assets/images/large_motion.svg | 40 + .../radar_sensor_2/assets/images/small.png | Bin 0 -> 2454 bytes .../assets/images/small_motion.svg | 33 + drivers/radar_sensor_2/device.js | 779 ++++++++++++++++++ drivers/radar_sensor_2/driver.compose.json | 53 ++ .../driver.settings.compose.json | 207 +++++ 14 files changed, 1979 insertions(+), 48 deletions(-) create mode 100644 .homeycompose/capabilities/alarm_breathe_presence.json create mode 100644 .homeycompose/capabilities/alarm_large_presence.json create mode 100644 .homeycompose/capabilities/alarm_small_presence.json create mode 100644 drivers/radar_sensor_2/assets/icon.svg create mode 100644 drivers/radar_sensor_2/assets/images/breathe_motion.svg create mode 100644 drivers/radar_sensor_2/assets/images/large.png create mode 100644 drivers/radar_sensor_2/assets/images/large_motion.svg create mode 100644 drivers/radar_sensor_2/assets/images/small.png create mode 100644 drivers/radar_sensor_2/assets/images/small_motion.svg create mode 100644 drivers/radar_sensor_2/device.js create mode 100644 drivers/radar_sensor_2/driver.compose.json create mode 100644 drivers/radar_sensor_2/driver.settings.compose.json diff --git a/.homeycompose/capabilities/alarm_breathe_presence.json b/.homeycompose/capabilities/alarm_breathe_presence.json new file mode 100644 index 00000000..cca9b94b --- /dev/null +++ b/.homeycompose/capabilities/alarm_breathe_presence.json @@ -0,0 +1,105 @@ +{ + "title": { + "en": "Breath presence", + "nl": "Adem aanwezigheid", + "de": "Atempräsenz", + "fr": "Présence respiratoire", + "it": "Presenza del respiro", + "sv": "Andningsnärvaro", + "no": "Åndedrettsnærvær", + "es": "Presencia de la respiración", + "da": "Åndedræt nærvær", + "ru": "Присутствие дыхания", + "pl": "Obecność oddechu" + }, + "type": "boolean", + "getable": true, + "setable": false, + "uiComponent": "sensor", + "icon": "/drivers/radar_sensor_2/assets/images/breathe_motion.svg", + "insights": true, + "options": { + "zoneActivity": true + }, + "insightsTitleTrue": { + "en": "Breath alarm turned on", + "nl": "Ademalarm ging af", + "de": "Atem-Alarm ist angegangen", + "fr": "Alarme respiratoire s'est déclenchée", + "it": "Allarme di respiro attivato", + "sv": "Andningslarm aktiverat", + "no": "Åndedrettsalarm aktivert", + "es": "Alarma de respiración activada", + "da": "Åndedrætsalarm blev aktiveret", + "ru": "Сигнал дыхания включен", + "pl": "Czujnik oddechu włączony" + }, + "insightsTitleFalse": { + "en": "Breath alarm turned off", + "nl": "Ademalarm ging uit", + "de": "Atem-Alarm ist ausgegangen", + "fr": "Alarme respiratoire s'est désactivée", + "it": "Allarme di respiro disattivato", + "sv": "Andningslarm inaktiverat", + "no": "Åndedrettsalarm deaktivert", + "es": "Alarma de respiración desactivada", + "da": "Åndedrætsalarm blev deaktiveret", + "ru": "Сигнал дыхания выключен", + "pl": "Czujnik oddechu wyłączony" + }, + "$flow": { + "triggers": [ + { + "id": "alarm_breathe_presence_true", + "highlight": true, + "title": { + "en": "The breath alarm turned on", + "nl": "De ademalarm gaat aan", + "de": "Der Atem-Alarm ist angegangen", + "fr": "L'alarme respiratoire s'est activée", + "it": "L'allarme di respiro è stato attivato", + "sv": "Andningslarmet aktiverat", + "no": "Åndedrettsalarmen aktivert", + "es": "La alarma de respiración se ha activado", + "da": "Åndedrætsalarmen blev aktiveret", + "ru": "Сигнал дыхания включен", + "pl": "Czujnik oddechu włączony" + } + }, + { + "id": "alarm_breathe_presence_false", + "title": { + "en": "The breath alarm turned off", + "nl": "De ademalarm gaat uit", + "de": "Der Atem-Alarm ist ausgegangen", + "fr": "L'alarme respiratoire s'est désactivée", + "it": "L'allarme di respiro è stato disattivato", + "sv": "Andningslarmet inaktiverat", + "no": "Åndedrettsalarmen deaktivert", + "es": "La alarma de respiración se ha desactivado", + "da": "Åndedrætsalarmen blev deaktiveret", + "ru": "Сигнал дыхания выключен", + "pl": "Czujnik oddechu wyłączony" + } + } + ], + "conditions": [ + { + "id": "alarm_breathe_presence", + "title": { + "en": "The breath alarm is !{{on|off}}", + "nl": "De ademalarm is !{{aan|uit}}", + "de": "Der Atem-Alarm ist !{{an|aus}}", + "fr": "L'alarme respiratoire est !{{en marche|arrêtée}}", + "it": "L'allarme di respiro è !{{acceso|spento}}", + "sv": "Andningslarmet är !{{på|av}}", + "no": "Åndedrettsalarmen er !{{på|av}}", + "es": "La alarma de respiración está !{{activada|desactivada}}", + "da": "Åndedrætsalarmen er !{{tændt|slukket}}", + "ru": "Сигнал дыхания !{{вкл.|выкл.}}", + "pl": "Czujnik oddechu !{{włączony|wyłączony}}" + } + } + ] + } +} diff --git a/.homeycompose/capabilities/alarm_large_presence.json b/.homeycompose/capabilities/alarm_large_presence.json new file mode 100644 index 00000000..664605d7 --- /dev/null +++ b/.homeycompose/capabilities/alarm_large_presence.json @@ -0,0 +1,105 @@ +{ + "title": { + "en": "Large Presence", + "nl": "Grote Aanwezigheid", + "de": "Große Präsenz", + "fr": "Grande Présence", + "it": "Presenza Ampia", + "sv": "Stor Närvaro", + "no": "Stor Nærvær", + "es": "Presencia Grande", + "da": "Stor Nærvær", + "ru": "Большое Присутствие", + "pl": "Duża Obecność" + }, + "type": "boolean", + "getable": true, + "setable": false, + "uiComponent": "sensor", + "icon": "/drivers/radar_sensor_2/assets/images/large_motion.svg", + "insights": true, + "options": { + "zoneActivity": true + }, + "insightsTitleTrue": { + "en": "Large Presence alarm turned on", + "nl": "Grote Aanwezigheid alarm ging af", + "de": "Große Präsenz Alarm ist angegangen", + "fr": "Alarme Grande Présence s'est déclenchée", + "it": "Allarme Presenza Ampia attivato", + "sv": "Stor Närvaro larm aktiverat", + "no": "Stor Nærvær alarm aktivert", + "es": "Alarma de Presencia Grande activada", + "da": "Stor Nærvær alarm blev aktiveret", + "ru": "Большой сигнал Присутствие включен", + "pl": "Duży czujnik Obecność włączony" + }, + "insightsTitleFalse": { + "en": "Large Presence alarm turned off", + "nl": "Grote Aanwezigheid alarm ging uit", + "de": "Große Präsenz Alarm ist ausgegangen", + "fr": "Alarme Grande Présence s'est désactivée", + "it": "Allarme Presenza Ampia disattivato", + "sv": "Stor Närvaro larm inaktiverat", + "no": "Stor Nærvær alarm deaktivert", + "es": "Alarma de Presencia Grande desactivada", + "da": "Stor Nærvær alarm blev deaktiveret", + "ru": "Большой сигнал Присутствие выключен", + "pl": "Duży czujnik Obecność wyłączony" + }, + "$flow": { + "triggers": [ + { + "id": "alarm_large_presence_true", + "highlight": true, + "title": { + "en": "The Large Presence alarm turned on", + "nl": "De grote Aanwezigheid alarm gaat aan", + "de": "Der große Präsenz Alarm ist angegangen", + "fr": "L'alarme Grande Présence s'est activée", + "it": "L'allarme Presenza Ampia è stato attivato", + "sv": "Stor Närvaro larm aktiverat", + "no": "Stor Nærvær alarm aktivert", + "es": "La alarma de Presencia Grande se ha activado", + "da": "Stor Nærvær alarm blev aktiveret", + "ru": "Большой сигнал Присутствие включен", + "pl": "Duży czujnik Obecność włączony" + } + }, + { + "id": "alarm_large_presence_false", + "title": { + "en": "The Large Presence alarm turned off", + "nl": "De grote Aanwezigheid alarm gaat uit", + "de": "Der große Präsenz Alarm ist ausgegangen", + "fr": "L'alarme Grande Présence s'est désactivée", + "it": "L'allarme Presenza Ampia è stato disattivato", + "sv": "Stor Närvaro larm inaktiverat", + "no": "Stor Nærvær alarm deaktivert", + "es": "La alarma de Presencia Grande se ha desactivado", + "da": "Stor Nærvær alarm blev deaktiveret", + "ru": "Большой сигнал Присутствие выключен", + "pl": "Duży czujnik Obecność wyłączony" + } + } + ], + "conditions": [ + { + "id": "alarm_large_presence", + "title": { + "en": "The Large Presence alarm is !{{on|off}}", + "nl": "De grote Aanwezigheid alarm is !{{aan|uit}}", + "de": "Der große Präsenz Alarm ist !{{an|aus}}", + "fr": "L'alarme Grande Présence est !{{en marche|arrêtée}}", + "it": "L'allarme Presenza Ampia è !{{acceso|spento}}", + "sv": "Stor Närvaro larm är !{{på|av}}", + "no": "Stor Nærvær alarm er !{{på|av}}", + "es": "La alarma de Presencia Grande está !{{activada|desactivada}}", + "da": "Stor Nærvær alarm er !{{tændt|slukket}}", + "ru": "Большой сигнал Присутствие !{{вкл.|выкл.}}", + "pl": "Duży czujnik Obecność !{{włączony|wyłączony}}" + } + } + ] + } +} diff --git a/.homeycompose/capabilities/alarm_small_presence.json b/.homeycompose/capabilities/alarm_small_presence.json new file mode 100644 index 00000000..5a552b0e --- /dev/null +++ b/.homeycompose/capabilities/alarm_small_presence.json @@ -0,0 +1,105 @@ +{ + "title": { + "en": "Small Presence", + "nl": "Kleine Aanwezigheid", + "de": "Kleine Präsenz", + "fr": "Petite Présence", + "it": "Presenza Piccola", + "sv": "Liten Närvaro", + "no": "Liten Nærvær", + "es": "Pequeña Presencia", + "da": "Lille Nærvær", + "ru": "Маленькое Присутствие", + "pl": "Mała Obecność" + }, + "type": "boolean", + "getable": true, + "setable": false, + "uiComponent": "sensor", + "icon": "/drivers/radar_sensor_2/assets/images/small_motion.svg", + "insights": true, + "options": { + "zoneActivity": true + }, + "insightsTitleTrue": { + "en": "Small Presence alarm turned on", + "nl": "Kleine Aanwezigheid alarm ging af", + "de": "Kleine Präsenz Alarm ist angegangen", + "fr": "Alarme Petite Présence s'est déclenchée", + "it": "Allarme Presenza Piccola attivato", + "sv": "Liten Närvaro larm aktiverat", + "no": "Liten Nærvær alarm aktivert", + "es": "La alarma de Pequeña Presencia activada", + "da": "Lille Nærvær alarm blev aktiveret", + "ru": "Маленький сигнал Присутствие включен", + "pl": "Mały czujnik Obecność włączony" + }, + "insightsTitleFalse": { + "en": "Small Presence alarm turned off", + "nl": "Kleine Aanwezigheid alarm ging uit", + "de": "Kleine Präsenz Alarm ist ausgegangen", + "fr": "Alarme Petite Présence s'est désactivée", + "it": "Allarme Presenza Piccola disattivato", + "sv": "Liten Närvaro larm inaktiverat", + "no": "Liten Nærvær alarm deaktivert", + "es": "La alarma de Pequeña Presencia se ha desactivado", + "da": "Lille Nærvær alarm blev deaktiveret", + "ru": "Маленький сигнал Присутствие выключен", + "pl": "Mały czujnik Obecność wyłączony" + }, + "$flow": { + "triggers": [ + { + "id": "alarm_small_presence_true", + "highlight": true, + "title": { + "en": "The Small Presence alarm turned on", + "nl": "De kleine Aanwezigheid alarm gaat aan", + "de": "Der kleine Präsenz Alarm ist angegangen", + "fr": "L'alarme Petite Présence s'est activée", + "it": "L'allarme Presenza Piccola è stato attivato", + "sv": "Liten Närvaro larm aktiverat", + "no": "Liten Nærvær alarm aktivert", + "es": "La alarma de Pequeña Presencia se ha activado", + "da": "Lille Nærvær alarm blev aktiveret", + "ru": "Маленький сигнал Присутствие включен", + "pl": "Mały czujnik Obecność włączony" + } + }, + { + "id": "alarm_small_presence_false", + "title": { + "en": "The Small Presence alarm turned off", + "nl": "De kleine Aanwezigheid alarm gaat uit", + "de": "Der kleine Präsenz Alarm ist ausgegangen", + "fr": "L'alarme Petite Présence s'est désactivée", + "it": "L'allarme Presenza Piccola è stato disattivato", + "sv": "Liten Närvaro larm inaktiverat", + "no": "Liten Nærvær alarm deaktivert", + "es": "La alarma de Pequeña Presencia se ha desactivado", + "da": "Lille Nærvær alarm blev deaktiveret", + "ru": "Маленький сигнал Присутствие выключен", + "pl": "Mały czujnik Obecność wyłączony" + } + } + ], + "conditions": [ + { + "id": "alarm_small_presence", + "title": { + "en": "The Small Presence alarm is !{{on|off}}", + "nl": "De kleine Aanwezigheid alarm is !{{aan|uit}}", + "de": "Der kleine Präsenz Alarm ist !{{an|aus}}", + "fr": "L'alarme Petite Présence est !{{en marche|arrêtée}}", + "it": "L'allarme Presenza Piccola è !{{acceso|spento}}", + "sv": "Liten Närvaro larm är !{{på|av}}", + "no": "Liten Nærvær alarm er !{{på|av}}", + "es": "La alarma de Pequeña Presencia está !{{activada|desactivada}}", + "da": "Lille Nærvær alarm er !{{tændt|slukket}}", + "ru": "Маленький сигнал Присутствие !{{вкл.|выкл.}}", + "pl": "Mały czujnik Obecność !{{włączony|wyłączony}}" + } + } + ] + } +} diff --git a/.homeycompose/capabilities/target_distance.json b/.homeycompose/capabilities/target_distance.json index b20c653c..46909532 100644 --- a/.homeycompose/capabilities/target_distance.json +++ b/.homeycompose/capabilities/target_distance.json @@ -1,8 +1,8 @@ { "type": "number", - "title": { "en": "Target distance" }, + "title": { "en": "Target distance", "nl": "Afstand doel" }, "uiComponent": null, "getable": true, "setable": false, - "units": { "en": "m" } + "units": { "en": "m", "nl": "m" } } diff --git a/app.json b/app.json index aa9b2be0..7065fb65 100644 --- a/app.json +++ b/app.json @@ -1746,7 +1746,8 @@ "_TZ3000_au1rjicn", "_TZ3000_4ugnzsli", "TUYATEC-7qunn4gq", - "_TZ3000_decxrtwa" + "_TZ3000_decxrtwa", + "_TZ3000_yxqnffam" ], "productId": [ "RH3001", @@ -2988,8 +2989,8 @@ { "id": "radar_sensor", "name": { - "en": "Radar Sensor", - "nl": "Radar Sensor" + "en": "Radar Sensor ZG-205Z/W", + "nl": "Radar Sensor ZG-205Z/W" }, "class": "sensor", "platforms": [ @@ -3001,6 +3002,9 @@ "capabilities": [ "measure_luminance", "alarm_motion", + "alarm_small_presence", + "alarm_large_presence", + "alarm_breathe_presence", "target_distance" ], "images": { @@ -3009,34 +3013,29 @@ }, "energy": { "approximation": { - "usageOn": 0, - "usageOff": 0 + "usageConstant": 2.5 } }, "zigbee": { "manufacturerName": [ - "_TZE200_ztc6ggyl", - "_TZE201_ztc6ggyl", - "_TZE202_ztc6ggyl", - "_TZE203_ztc6ggyl", - "_TZE204_ztc6ggyl" + "_TZE200_2aaelwxk" ], "productId": [ - "TS0601" + "TS0225" ], "endpoints": { "1": { "clusters": [ 0, - 4, - 5, - 258, - 61184 + 3, + 1280, + 57346, + 61184, + 60928, + 57344, + 1024 ], - "bindings": [ - 258, - 61184 - ] + "bindings": [] } }, "learnmode": { @@ -3049,18 +3048,22 @@ }, "settings": [ { - "id": "radar_sensitivity", + "id": "motion_detection_sensitivity", "type": "number", "label": { "en": "Radar sensitivity", "nl": "Radar sensitiviteit" }, - "value": 7, - "min": 1, - "max": 9 + "value": 6, + "min": 0, + "max": 10, + "units": { + "en": "x", + "nl": "x" + } }, { - "id": "minimum_range", + "id": "mov_minimum_distance", "type": "number", "label": { "en": "Minimum range", @@ -3068,56 +3071,216 @@ }, "value": 0, "min": 0, - "max": 9.5, + "max": 10, + "step": 1, "units": { "en": "meters", "nl": "meters" } }, { - "id": "maximum_range", + "id": "motion_detection_distance", "type": "number", "label": { - "en": "Maximum range", - "nl": "Maximale bereik" + "en": "Motion detection distance", + "nl": "Bewegingsdetectie afstand" }, - "value": 9.5, + "value": 600, "min": 0, - "max": 9.5, + "max": 1000, + "step": 1, "units": { - "en": "meters", - "nl": "meters" + "en": "centimeter", + "nl": "centimeter" } }, { - "id": "detection_delay", + "id": "fading_time", "type": "number", "label": { - "en": "Detection delay", - "nl": "Detectie vertraging" + "en": "Fading time", + "nl": "Reset tijd" }, - "value": 7, + "value": 0, "min": 0, - "max": 10, + "max": 28800, "units": { "en": "seconds", "nl": "seconden" } }, { - "id": "fading_time", + "id": "motion_false_detection", "type": "number", + "value": 1, + "min": 0, + "max": 10, + "units": { + "en": "x", + "nl": "x" + }, "label": { - "en": "Fading time", - "nl": "Reset tijd" + "en": "Breathe False detection", + "nl": "Onjuiste Adem detectie" + } + }, + { + "id": "small_motion_detection_distance", + "type": "number", + "label": { + "en": "Small Motion detection distance", + "nl": "Kleine bewegingsdetectie afstand" }, - "value": 7, + "value": 600, "min": 0, - "max": 1500, + "max": 600, + "step": 1, "units": { - "en": "seconds", - "nl": "seconden" + "en": "centimeter", + "nl": "centimeter" + } + }, + { + "id": "small_motion_detection_sensitivity", + "type": "number", + "label": { + "en": "Small Movement sensitivity", + "nl": "Kleine Beweging sensitiviteit" + }, + "value": 8, + "min": 0, + "max": 10, + "units": { + "en": "x", + "nl": "x" + } + }, + { + "id": "indicator", + "type": "checkbox", + "value": true, + "label": { + "en": "LED indicator", + "nl": "LED indicatie" + } + }, + { + "id": "static_detection_distance", + "type": "number", + "label": { + "en": "Static detection distance", + "nl": "Statische detectie afstand" + }, + "value": 600, + "min": 0, + "max": 600, + "step": 1, + "units": { + "en": "centimeter", + "nl": "centimeter" + } + }, + { + "id": "static_detection_sensitivity", + "type": "number", + "label": { + "en": "Static detection sensitivity", + "nl": "Statische detectie sensitiviteit" + }, + "value": 8, + "min": 0, + "max": 10, + "units": { + "en": "x", + "nl": "x" } + }, + { + "id": "breathe_false_detection", + "type": "checkbox", + "value": false, + "label": { + "en": "Breathe False detection", + "nl": "Onjuiste Adem detectie" + } + }, + { + "id": "alarm_volume", + "type": "dropdown", + "value": "high", + "label": { + "en": "Alarm volume", + "nl": "Alarm volume" + }, + "values": [ + { + "id": "mute", + "label": { + "en": "Mute", + "nl": "Gedempt" + } + }, + { + "id": "low", + "label": { + "en": "Low", + "nl": "Laag" + } + }, + { + "id": "medium", + "label": { + "en": "Medium", + "nl": "Middel" + } + }, + { + "id": "high", + "label": { + "en": "High", + "nl": "Hoog" + } + } + ] + }, + { + "id": "working_mode", + "type": "dropdown", + "value": "off", + "label": { + "en": "Working mode", + "nl": "Werk modus" + }, + "values": [ + { + "id": "off", + "label": { + "en": "Off", + "nl": "Uit" + } + }, + { + "id": "arm", + "label": { + "en": "Arm", + "nl": "Arm" + } + }, + { + "id": "alarm", + "label": { + "en": "Alarm", + "nl": "Alarm" + } + }, + { + "id": "doorbell", + "label": { + "en": "Doorbell", + "nl": "Deurbel" + } + } + ] } ] }, @@ -5156,6 +5319,65 @@ } } }, + { + "id": "smoke_sensor2", + "name": { + "en": "Smoke Sensor" + }, + "class": "sensor", + "platforms": [ + "local" + ], + "connectivity": [ + "zigbee" + ], + "capabilities": [ + "measure_battery", + "alarm_smoke", + "alarm_tamper", + "alarm_battery" + ], + "energy": { + "batteries": [ + "AAA", + "AAA" + ] + }, + "images": { + "large": "/drivers/smoke_sensor2/assets/images/large.png", + "small": "/drivers/smoke_sensor2/assets/images/small.png" + }, + "zigbee": { + "manufacturerName": [ + "_TZE200_ntcy3xu1" + ], + "productId": [ + "TS0601" + ], + "endpoints": { + "1": { + "clusters": [ + 0, + 4, + 5, + 61184 + ], + "bindings": [ + 4, + 5, + 61184 + ] + } + }, + "learnmode": { + "image": "/drivers/smoke_sensor2/assets/icon.svg", + "instruction": { + "en": "Press the RESET pinhole on the side of the unit for 5 seconds until LED blinks." + } + } + }, + "settings": [] + }, { "id": "socket_power_strip", "name": { @@ -8074,6 +8296,155 @@ } ], "capabilities": { + "alarm_breathe_presence": { + "title": { + "en": "Breath presence", + "nl": "Adem aanwezigheid", + "de": "Atempräsenz", + "fr": "Présence respiratoire", + "it": "Presenza del respiro", + "sv": "Andningsnärvaro", + "no": "Åndedrettsnærvær", + "es": "Presencia de la respiración", + "da": "Åndedræt nærvær", + "ru": "Присутствие дыхания", + "pl": "Obecność oddechu" + }, + "type": "boolean", + "getable": true, + "setable": false, + "uiComponent": "sensor", + "icon": "/drivers/radar_sensor/assets/images/breathe_motion.svg", + "insights": true, + "options": { + "zoneActivity": true + }, + "insightsTitleTrue": { + "en": "Breath alarm turned on", + "nl": "Ademalarm ging af", + "de": "Atem-Alarm ist angegangen", + "fr": "Alarme respiratoire s'est déclenchée", + "it": "Allarme di respiro attivato", + "sv": "Andningslarm aktiverat", + "no": "Åndedrettsalarm aktivert", + "es": "Alarma de respiración activada", + "da": "Åndedrætsalarm blev aktiveret", + "ru": "Сигнал дыхания включен", + "pl": "Czujnik oddechu włączony" + }, + "insightsTitleFalse": { + "en": "Breath alarm turned off", + "nl": "Ademalarm ging uit", + "de": "Atem-Alarm ist ausgegangen", + "fr": "Alarme respiratoire s'est désactivée", + "it": "Allarme di respiro disattivato", + "sv": "Andningslarm inaktiverat", + "no": "Åndedrettsalarm deaktivert", + "es": "Alarma de respiración desactivada", + "da": "Åndedrætsalarm blev deaktiveret", + "ru": "Сигнал дыхания выключен", + "pl": "Czujnik oddechu wyłączony" + } + }, + "alarm_large_presence": { + "title": { + "en": "Large Presence", + "nl": "Grote Aanwezigheid", + "de": "Große Präsenz", + "fr": "Grande Présence", + "it": "Presenza Ampia", + "sv": "Stor Närvaro", + "no": "Stor Nærvær", + "es": "Presencia Grande", + "da": "Stor Nærvær", + "ru": "Большое Присутствие", + "pl": "Duża Obecność" + }, + "type": "boolean", + "getable": true, + "setable": false, + "uiComponent": "sensor", + "icon": "/drivers/radar_sensor/assets/images/large_motion.svg", + "insights": true, + "options": { + "zoneActivity": true + }, + "insightsTitleTrue": { + "en": "Large Presence alarm turned on", + "nl": "Grote Aanwezigheid alarm ging af", + "de": "Große Präsenz Alarm ist angegangen", + "fr": "Alarme Grande Présence s'est déclenchée", + "it": "Allarme Presenza Ampia attivato", + "sv": "Stor Närvaro larm aktiverat", + "no": "Stor Nærvær alarm aktivert", + "es": "Alarma de Presencia Grande activada", + "da": "Stor Nærvær alarm blev aktiveret", + "ru": "Большой сигнал Присутствие включен", + "pl": "Duży czujnik Obecność włączony" + }, + "insightsTitleFalse": { + "en": "Large Presence alarm turned off", + "nl": "Grote Aanwezigheid alarm ging uit", + "de": "Große Präsenz Alarm ist ausgegangen", + "fr": "Alarme Grande Présence s'est désactivée", + "it": "Allarme Presenza Ampia disattivato", + "sv": "Stor Närvaro larm inaktiverat", + "no": "Stor Nærvær alarm deaktivert", + "es": "Alarma de Presencia Grande desactivada", + "da": "Stor Nærvær alarm blev deaktiveret", + "ru": "Большой сигнал Присутствие выключен", + "pl": "Duży czujnik Obecność wyłączony" + } + }, + "alarm_none_presence": { + "title": { + "en": "None Presence", + "nl": "Geen Aanwezigheid", + "de": "Keine Präsenz", + "fr": "Aucune Présence", + "it": "Nessuna Presenza", + "sv": "Ingen Närvaro", + "no": "Ingen Nærvær", + "es": "Ninguna Presencia", + "da": "Ingen Nærvær", + "ru": "Отсутствие Присутствия", + "pl": "Brak Obecności" + }, + "type": "boolean", + "getable": true, + "setable": false, + "uiComponent": "sensor", + "insights": true, + "options": { + "zoneActivity": true + }, + "insightsTitleTrue": { + "en": "None Presence alarm turned on", + "nl": "Geen Aanwezigheid alarm ging af", + "de": "Keine Präsenz Alarm ist angegangen", + "fr": "Alarme Aucune Présence s'est déclenchée", + "it": "Allarme Nessuna Presenza attivato", + "sv": "Ingen Närvaro larm aktiverat", + "no": "Ingen Nærvær alarm aktivert", + "es": "La alarma de Ninguna Presencia activada", + "da": "Ingen Nærvær alarm blev aktiveret", + "ru": "Сигнал Отсутствие Присутствия включен", + "pl": "Brak czujnika Obecność włączony" + }, + "insightsTitleFalse": { + "en": "None Presence alarm turned off", + "nl": "Geen Aanwezigheid alarm ging uit", + "de": "Keine Präsenz Alarm ist ausgegangen", + "fr": "Alarme Aucune Présence s'est désactivée", + "it": "Allarme Nessuna Presenza disattivato", + "sv": "Ingen Närvaro larm inaktiverat", + "no": "Ingen Nærvær alarm deaktivert", + "es": "La alarma de Ninguna Presencia se ha desactivado", + "da": "Ingen Nærvær alarm blev deaktiveret", + "ru": "Сигнал Отсутствие Присутствия выключен", + "pl": "Brak czujnika Obecność wyłączony" + } + }, "alarm_siren": { "type": "boolean", "title": { @@ -8090,6 +8461,56 @@ "getable": true, "setable": false }, + "alarm_small_presence": { + "title": { + "en": "Small Presence", + "nl": "Kleine Aanwezigheid", + "de": "Kleine Präsenz", + "fr": "Petite Présence", + "it": "Presenza Piccola", + "sv": "Liten Närvaro", + "no": "Liten Nærvær", + "es": "Pequeña Presencia", + "da": "Lille Nærvær", + "ru": "Маленькое Присутствие", + "pl": "Mała Obecność" + }, + "type": "boolean", + "getable": true, + "setable": false, + "uiComponent": "sensor", + "icon": "/drivers/radar_sensor/assets/images/small_motion.svg", + "insights": true, + "options": { + "zoneActivity": true + }, + "insightsTitleTrue": { + "en": "Small Presence alarm turned on", + "nl": "Kleine Aanwezigheid alarm ging af", + "de": "Kleine Präsenz Alarm ist angegangen", + "fr": "Alarme Petite Présence s'est déclenchée", + "it": "Allarme Presenza Piccola attivato", + "sv": "Liten Närvaro larm aktiverat", + "no": "Liten Nærvær alarm aktivert", + "es": "La alarma de Pequeña Presencia activada", + "da": "Lille Nærvær alarm blev aktiveret", + "ru": "Маленький сигнал Присутствие включен", + "pl": "Mały czujnik Obecność włączony" + }, + "insightsTitleFalse": { + "en": "Small Presence alarm turned off", + "nl": "Kleine Aanwezigheid alarm ging uit", + "de": "Kleine Präsenz Alarm ist ausgegangen", + "fr": "Alarme Petite Présence s'est désactivée", + "it": "Allarme Presenza Piccola disattivato", + "sv": "Liten Närvaro larm inaktiverat", + "no": "Liten Nærvær alarm deaktivert", + "es": "La alarma de Pequeña Presencia se ha desactivado", + "da": "Lille Nærvær alarm blev deaktiveret", + "ru": "Маленький сигнал Присутствие выключен", + "pl": "Mały czujnik Obecność wyłączony" + } + }, "lidl_xmas_mode": { "title": { "en": "Mode" @@ -8122,6 +8543,35 @@ } ] }, + "presence_type": { + "title": { + "en": "Presence Type", + "nl": "Aanwezigheidstype", + "de": "Anwesenheitstyp", + "fr": "Type de présence", + "it": "Tipo di presenza", + "sv": "Närvarotyp", + "no": "Tilstedeværelsestype", + "es": "Tipo de presencia", + "da": "Tilstedeværelsestype", + "ru": "Тип присутствия", + "pl": "Typ obecności" + }, + "type": "number", + "getable": true, + "setable": false, + "uiComponent": "sensor", + "insights": true, + "chartType": "area", + "units": { + "en": "type", + "nl": "type" + }, + "min": 0, + "max": 2, + "step": 1, + "decimals": 0 + }, "soil_moisture": { "type": "number", "title": { @@ -8152,13 +8602,15 @@ "target_distance": { "type": "number", "title": { - "en": "Target distance" + "en": "Target distance", + "nl": "Afstand doel" }, "uiComponent": null, "getable": true, "setable": false, "units": { - "en": "m" + "en": "m", + "nl": "m" } }, "temperature_unit": { diff --git a/drivers/radar_sensor_2/assets/icon.svg b/drivers/radar_sensor_2/assets/icon.svg new file mode 100644 index 00000000..6b782cde --- /dev/null +++ b/drivers/radar_sensor_2/assets/icon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/drivers/radar_sensor_2/assets/images/breathe_motion.svg b/drivers/radar_sensor_2/assets/images/breathe_motion.svg new file mode 100644 index 00000000..83c09ada --- /dev/null +++ b/drivers/radar_sensor_2/assets/images/breathe_motion.svg @@ -0,0 +1,51 @@ + + + + + + + + + + + + + diff --git a/drivers/radar_sensor_2/assets/images/large.png b/drivers/radar_sensor_2/assets/images/large.png new file mode 100644 index 0000000000000000000000000000000000000000..005c0fbfb63c8e08091d691ed7368226ff10b3c0 GIT binary patch literal 30615 zcmb@tWmH^E6fKBL&;)`uPJrOV6?lcZ_^S$?G zX3fm|H$PZhn(o_mPn|lo&)&O2Rg`40UXi?lgM-8RDEC1X4i5ej__;zu0ABfRrj`f% zB6gDg=A>o|c5*dvFoBaWwly@N{Ag`pYNBdlVC-(+Zz2o_=PK~=gM_-;a| zNEC|1o4{Q9)ZbW(P01(rO}R1P8+vmS>Svr+`xtvAd!I+|aXrRTB`c##rvJErYlO<6 zH%D~ySAp*&CSL*shtm!i;gH0W7}wJF#0fEiIKL;;E3Y)WpT^YLuA(4G;0E$asz_6! z`BQ=kfxo(r{DJEv9bDkL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E`fwc#JNwOWJLP6z_4-vmM1zv29h+Yp&|5&$w4rq2Up8O_fN5 z0zVD+*`=vhL^bIk2h3IGcvi9^t6LilBu{fMG{_=g` z-F-u^oh91fOm%m|sO^4>ivz#btCDS@ghj|CF}q@`_NA$CiTn%FFN0fE&TP6FP3xm0>8N6&b!t@ti3J~a+C@8MVT0BA0AycR?iM=YSk!($ntADP>vap0osNPe z@bTS{z8@9sLv&=RZu>BI4}+i6^}amJxLuX7DtUE37f*bpb>ks#3LaF_fn4X5aHM

!F{`csOvkYj0)Y;C!m!;o9SnY*Fu|j|<@S zs^Q__2GIZe+o!K^A9vY`L-W&i8z|Jy(OpWpevzvKV@FaQ63R`9^%b5uA^EJ?Mq Uu)tyPq+K{kF*(t4VLiY90k?%gwg3PC literal 0 HcmV?d00001 diff --git a/drivers/radar_sensor_2/assets/images/large_motion.svg b/drivers/radar_sensor_2/assets/images/large_motion.svg new file mode 100644 index 00000000..2fe42893 --- /dev/null +++ b/drivers/radar_sensor_2/assets/images/large_motion.svg @@ -0,0 +1,40 @@ + + + + + + + + + + + + diff --git a/drivers/radar_sensor_2/assets/images/small.png b/drivers/radar_sensor_2/assets/images/small.png new file mode 100644 index 0000000000000000000000000000000000000000..0cd1dea539377f17f7a5dd924ef1479a53c9ad91 GIT binary patch literal 2454 zcmV;H32F9;P)002t}0ssI2w=C_w0000PbVXQnQ*UN; zcVTj606}DLVr3vnZDD6+Qe|Oed2z{QJOBU*I7vi7RCwC#TS;@<$Qeb0BsNl9v{+p1 zOxZQbB^95O`O`BupY7A+GBt_ENy?Sfj3v<$MUfQ64aC-YK$B1lWJ73@UPdJx=oZ}Q z?$_V;z7GvTDODcyr792odPMk$@Dbr7!cTwYvvdjqKM1Jj2M8^MkVSxDQHCsj=%T5t z2A}YeARt7g%I)Knv5``Yfy z#YBAw50|caiYzyUuHBh6L-P%yP;7ZlCAzMws=5inAPA<@X}Di`E!s^vZos63Uv9td z{JHl2>UwUqX3Z3;=ed;nmSyDy!c0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4;`{>atX8X8Rx6G|moC>dbjvhki4;e1 zBoT^8lOpz7xUgb`#Q*;9SKFR50|U42^{+df%SNN#@AqH6e2J&8uDXBvg6VpJWgBN_XFv;~K{Ii))oLQbUvxUK zPgo-$F^2@oik@pTNzwi$C>PC+a8W*{iinr;yeW|%VzOqVfpxPtE}$~aW&>Vye}BK( zY)&RKu$gcE@C|yxyW%FC4f0<|{^;oN$&({AvgW%<)~ZNkz#-MjCbZR?L3DBh>BaGr zL(2;7s#>WW92_8xVDa6HvO#b(b~b>$e?Pyt8IQx9W1aeublRA%cRP;wP&TX{^x8Cy zfB)w_LOeutbaZ5zCV=rg*0ycP8JY=wX0NI76yitRGk&9-+4sms{EdP{q-;l+3BD88 zV9@{Y;Wt=jn9Hy1JKFsR3x=jxwGzj`Pw!{OXV{d zK_9vN@Rqo()?^dyj0X)9rxm$6C%Kn=CRUPNU-DUs1EOj8qk4(@A`gBQWXd5;{seL2 zDB!)DNG0tsKEk_U*?+Zeonp*uN6x~w?+ln-hKp2$NW0S2+H=aQl~w%P_$tv+VsZ9F zH15(Ai%-(0NG8-*9>2j!Gyc76$&@Q;b1VR*BgScF1C2r z^V?@1VUyKrCCp{nk%?uP+ETWQ5u(x+S5!!USGo9?bzu8G91br#oo2Ifcz7UyC#MDrfI5CA!FH{ zlEfENl&_Z2+ndoI(#0EwXtiYV|KW=|(<+zu(v677#U*<8tZ}pg$|0Q1=Fx{l3j2r) z{rwd11SpWb4 literal 0 HcmV?d00001 diff --git a/drivers/radar_sensor_2/assets/images/small_motion.svg b/drivers/radar_sensor_2/assets/images/small_motion.svg new file mode 100644 index 00000000..e9d18da8 --- /dev/null +++ b/drivers/radar_sensor_2/assets/images/small_motion.svg @@ -0,0 +1,33 @@ + + + + + + + + + + diff --git a/drivers/radar_sensor_2/device.js b/drivers/radar_sensor_2/device.js new file mode 100644 index 00000000..f4f4d618 --- /dev/null +++ b/drivers/radar_sensor_2/device.js @@ -0,0 +1,779 @@ +"use strict"; + +const { Cluster, CLUSTER } = require("zigbee-clusters"); +const TuyaSpecificCluster = require("../../lib/TuyaSpecificCluster"); +const TuyaSpecificClusterDevice = require("../../lib/TuyaSpecificClusterDevice"); + +Cluster.addCluster(TuyaSpecificCluster); + +// (cluster: 61184) +// DP, DataType, Value; +// 1, 1, 1; +// 2, 2, 6; +// 3, 2, 0; +// 4, 2, 600; +// 101, 4, 1; +// 102, 2, 60; +// 103, 2, 1; +// 104, 2, 600; +// 105, 2, 8; +// 106, 2, 2287; (lux) +// 107, 1, true; (led indicator) +// 108, 2, 600; +// 109, 2, 8; +// 110, 2, 0; +// 111, 2, 0; +// 113, 1, false; +// 115, 2, 2; +// 116, 4, 2; +// 117, 4, 1; +// 118, 1, false; +// 119, 1, false; +// 120, 1, false; + +// e.enum('presence_state', ea.STATE, ['none', 'presence']).withDescription('Presence'), +// e.enum('human_motion_state', ea.STATE, ['none', 'large', 'small', 'breathe']).withDescription('Human Motion state'), +// e.numeric('illuminance_value', ea.STATE).withDescription('Illuminance').withUnit('lux'), +// e.numeric('fading_time', ea.STATE_SET).withValueMin(0).withValueMax(28800).withValueStep(1).withUnit('s') +// .withDescription('Presence keep time'), +// e.numeric('motion_detection_distance', ea.STATE_SET).withValueMin(0).withValueMax(10).withValueStep(0.01).withUnit('m') +// .withDescription('Motion detection distance'), +// e.numeric('motion_detection_sensitivity', ea.STATE_SET).withValueMin(0).withValueMax(10).withValueStep(1).withUnit('x') +// .withDescription('Motion detection sensitivity'), +// e.numeric('small_motion_detection_distance', ea.STATE_SET).withValueMin(0).withValueMax(6).withValueStep(0.01).withUnit('m') +// .withDescription('Small motion detection distance'), +// e.numeric('small_motion_detection_sensitivity', ea.STATE_SET).withValueMin(0).withValueMax(10).withValueStep(1).withUnit('x') +// .withDescription('Small motion detection sensitivity'), +// e.numeric('static_detection_distance', ea.STATE_SET).withValueMin(0).withValueMax(6).withValueStep(0.01).withUnit('m') +// .withDescription('Static detection distance'), +// e.numeric('static_detection_sensitivity', ea.STATE_SET).withValueMin(0).withValueMax(10).withValueStep(1).withUnit('x') +// .withDescription('Static detection sensitivity'), +// e.numeric('motion_false_detection', ea.STATE_SET).withValueMin(0).withValueMax(10).withValueStep(1).withUnit('x') +// .withDescription('Motion false detection'), +// //e.enum('working_mode', ea.STATE_SET, ['off', 'arm', 'alarm']).withDescription('Alarm mode'), +// //e.enum('alarm_volume', ea.STATE_SET, ['mute', 'low', 'medium', 'high']).withDescription('Alarm volume'), +// //e.numeric('alarm_time', ea.STATE_SET).withValueMin(1).withValueMax(60).withValueStep(1).withUnit('m').withDescription('Alarm time'), +// e.binary('indicator', ea.STATE_SET, 'ON', 'OFF').withDescription('LED Indicator'), +// e.binary('breathe_false_detection', ea.STATE_SET, 'ON', 'OFF').withDescription('Breathe False Detection'), + +// //[1, 'presence_state', tuya.valueConverterBasic.lookup({'none': tuya.enum(0), 'presence': tuya.enum(1)})], +// [1, 'presence', tuya.valueConverter.trueFalse1], +// [2, 'motion_detection_sensitivity', tuya.valueConverter.raw], +// [3, 'mov_minimum_distance', tuya.valueConverter.raw], +// [4, 'motion_detection_distance', tuya.valueConverter.divideBy100], +// [101, 'human_motion_state', tuya.valueConverterBasic.lookup({'none': tuya.enum(0), 'large': tuya.enum(1), 'small': tuya.enum(2), 'breathe': tuya.enum(3)})], +// [102, 'fading_time', tuya.valueConverter.raw], +// [103, 'motion_false_detection', tuya.valueConverter.raw], +// [104, 'small_motion_detection_distance', tuya.valueConverter.divideBy100], +// [105, 'small_motion_detection_sensitivity', tuya.valueConverter.raw], +// [106, 'illuminance_value', tuya.valueConverter.raw], +// [107, 'indicator', tuya.valueConverter.onOff], +// [108, 'static_detection_distance', tuya.valueConverter.divideBy100], +// [109, 'static_detection_sensitivity', tuya.valueConverter.raw], +// [110, 'micro_minimum_distance', tuya.valueConverter.raw], +// [111, 'motionless_minimum_distance', tuya.valueConverter.raw], +// [112, 'reset_setting', tuya.valueConverter.raw], +// [113, 'breathe_false_detection', tuya.valueConverter.raw], +// [114, 'time', tuya.valueConverter.raw], +// [115, 'alarm_time', tuya.valueConverter.raw], +// [116, 'alarm_volume', tuya.valueConverterBasic.lookup({'low': tuya.enum(0), 'medium': tuya.enum(1), 'high': tuya.enum(2), 'mute': tuya.enum(3)})], +// [117, 'working_mode', tuya.valueConverterBasic.lookup({'arm': tuya.enum(0), 'off': tuya.enum(1), 'alarm': tuya.enum(2), 'doorbell': tuya.enum(3)})], +// [118, 'auto1', tuya.valueConverter.raw], +// [119, 'auto2', tuya.valueConverter.raw], +// [120, 'auto3', tuya.valueConverter.raw], + +// (cluster: 1280) +// zigbee-clusters:cluster ep: 1, cl: iasZone (1280) unknown command received: ZCLStandardHeader { +// frameControl: Bitmap [ clusterSpecific, directionToClient ], +// trxSequenceNumber: 57, +// cmdId: 0, +// data: +// } {} +1ms +// zigbee-clusters:endpoint ep: 1, cl: iasZone (1280), error while handling frame unknown_command_received { +// meta: {}, +// frame: ZCLStandardHeader { +// frameControl: Bitmap [ clusterSpecific, directionToClient ], +// trxSequenceNumber: 57, +// cmdId: 0, +// data: +// } +// } + +const setDeviceDatapoints = (fingerprint) => { + switch (fingerprint) { + case "_TZE200_2aaelwxk": + return { + presence: 1, // [0/1] + motion_detection_sensitivity: 2, // [0-10, 1, x] + mov_minimum_distance: 3, // + motion_detection_distance: 4, // [0-10, 0.01, m] + human_motion_state: 101, // [enum(0,1,2,3) none, large, small, breathe] + fading_time: 102, // [0-28800, 1, s] + motion_false_detection: 103, // [0-10, 1, x] + small_motion_detection_distance: 104, // [0-6, 0.01, m] + small_motion_detection_sensitivity: 105, // [0-10, 1, x] + illuminance_value: 106, // (lux) + indicator: 107, // LED Indicator + static_detection_distance: 108, // [0-6, 0.01, m] + static_detection_sensitivity: 109, // [0-10, 1, x] + micro_minimum_distance: 110, + motionless_minimum_distance: 111, + reset_setting: 112, + breathe_false_detection: 113, // [0/1] + time: 114, + alarm_time: 115, // [1-60, 1, m] + alarm_volume: 116, // [enum(0: low, 1: medium, 2: high, 3: mute)] + working_mode: 117, // [enum(0: arm, 1: off, 2: alarm, 3: doorbell)] + auto1: 118, + auto2: 119, + auto3: 120, + }; + break; + + default: + // return { + // tshpsPresenceState: 1, + // tshpscSensitivity: 2, + // tshpsMinimumRange: 3, + // tshpsMaximumRange: 4, + // tshpsTargetDistance: 9, + // tshpsDetectionDelay: 101, + // tshpsFadingTime: 102, + // tshpsIlluminanceLux: 104, + // }; + } +}; + +const dataTypes = { + raw: 0, // [ bytes ] + bool: 1, // [0/1] + value: 2, // [ 4 byte value ] + string: 3, // [ N byte string ] + enum: 4, // [ 0-255 ] + bitmap: 5, // [ 1,2,4 bytes ] as bits +}; + +// const presenceTypes = { +// 0: "None", +// 1: "Large", +// 2: "Small", +// 3: "Breathe", +// }; + +const convertMultiByteNumberPayloadToSingleDecimalNumber = (chunks) => { + let value = 0; + + for (let i = 0; i < chunks.length; i++) { + value = value << 8; + value += chunks[i]; + } + + return value; +}; + +const getDataValue = (dpValue) => { + switch (dpValue.datatype) { + case dataTypes.raw: + return dpValue.data; + case dataTypes.bool: + return dpValue.data[0] === 1; + case dataTypes.value: + return convertMultiByteNumberPayloadToSingleDecimalNumber(dpValue.data); + case dataTypes.string: + let dataString = ""; + for (let i = 0; i < dpValue.data.length; ++i) { + dataString += String.fromCharCode(dpValue.data[i]); + } + return dataString; + case dataTypes.enum: + return dpValue.data[0]; + case dataTypes.bitmap: + return convertMultiByteNumberPayloadToSingleDecimalNumber(dpValue.data); + } +}; + +class radarSensor extends TuyaSpecificClusterDevice { + async onNodeInit({ zclNode }) { + this.fingerprint = this.getSetting("zb_manufacturer_name"); + + this.dataPoints = setDeviceDatapoints(this.fingerprint); + + this.printNode(); + + + + await zclNode.endpoints[1].clusters.basic + .readAttributes( + "zclVersion", + "appVersion", + "stackVersion", + "hwVersion", + "manufacturerName", + "modelId", + "powerSource", + "deviceEnabled", + "swBuildId" + // "attributeReportingStatus", + ) + .catch((err) => { + this.error("Error when reading device attributes ", err); + }); + + zclNode.endpoints[1].clusters.tuya.on("response", (value) => + this.updatePosition(value) + ); + + zclNode.endpoints[1].clusters.tuya.on("reporting", (value) => + this.processReporting(value) + ); + + zclNode.endpoints[1].clusters.tuya.on("datapoint", (value) => + this.processDatapoint(value) + ); + + // zclNode.endpoints[1].clusters[CLUSTER.ILLUMINANCE_MEASUREMENT.NAME].on( + // "attr.measuredValue", + // this.onIlluminanceMeasuredAttributeReport.bind(this) + // ); + } + + processReporting(data) { + this.log("########### Reporting: ", data); + } + + processDatapoint(data) { + this.log("########### Datapoint: ", data); + } + + async updatePosition(data) { + this.log("########### UPDATE POSITION: ", data); + + const dp = data.dp; + const value = getDataValue(data); + const dataType = data.datatype; + + switch (dp) { + case this.dataPoints.presence: + this.log("presence state: ", value); + this.setCapabilityValue("alarm_motion", Boolean(value)); + break; + + case this.dataPoints.human_motion_state: + this.log("IAS Zone: ", value); + + switch (value) { + case 0: + this.log("None"); + this.setCapabilityValue("alarm_small_presence", false); + this.setCapabilityValue("alarm_large_presence", false); + this.setCapabilityValue("alarm_breathe_presence", false); + break; + case 1: + this.log("Large"); + this.setCapabilityValue("alarm_small_presence", false); + this.setCapabilityValue("alarm_large_presence", true); + this.setCapabilityValue("alarm_breathe_presence", false); + break; + case 2: + this.log("Small"); + this.setCapabilityValue("alarm_small_presence", true); + this.setCapabilityValue("alarm_large_presence", false); + this.setCapabilityValue("alarm_breathe_presence", false); + break; + case 3: + this.log("Breathe"); + this.setCapabilityValue("alarm_small_presence", false); + this.setCapabilityValue("alarm_large_presence", false); + this.setCapabilityValue("alarm_breathe_presence", true); + break; + } + break; + + case this.dataPoints.illuminance_value: + this.onIlluminanceMeasuredAttributeReport(value); + break; + + // INIT SETTINGS VALUES + case this.dataPoints.motion_detection_sensitivity: + case this.dataPoints.mov_minimum_distance: + case this.dataPoints.motion_detection_distance: + case this.dataPoints.fading_time: + case this.dataPoints.motion_false_detection: + case this.dataPoints.small_motion_detection_distance: + case this.dataPoints.small_motion_detection_sensitivity: + case this.dataPoints.indicator: + case this.dataPoints.static_detection_distance: + case this.dataPoints.static_detection_sensitivity: + case this.dataPoints.micro_minimum_distance: + case this.dataPoints.motionless_minimum_distance: + case this.dataPoints.breathe_false_detection: + case this.dataPoints.alarm_time: + case this.dataPoints.alarm_volume: + case this.dataPoints.working_mode: + case this.dataPoints.auto1: + case this.dataPoints.auto2: + case this.dataPoints.auto3: + const settings = this.getSettings(); + const dataPointKey = Object.keys(this.dataPoints).find( + (key) => this.dataPoints[key] === dp + ); + this.log("Setting value for key --> ", dataPointKey, " = ", value); + if (!dataPointKey && !settings[dataPointKey]) { + this.log("No settings for key --> ", dataPointKey); + } + if (dataPointKey && settings[dataPointKey] && this.isFirstInit()) { + await this.setSettings({ + [dataPointKey]: value, + }); + } + break; + + default: + this.log("Unknown Datapoint -->", "DP: " + dp, "Value: " + value); + } + } + + onDeleted() { + this.log("Radar sensor removed"); + } + + async onSettings({ oldSettings, newSettings, changedKeys }) { + // + changedKeys.forEach((updatedSetting) => { + this.log( + "########### Updated setting: ", + updatedSetting, + " => ", + newSettings[updatedSetting] + ); + }); + + if (changedKeys.includes("motion_detection_sensitivity")) { + this.writeData32( + this.dataPoints.motion_detection_sensitivity, + newSettings["motion_detection_sensitivity"] + ); + } + + if (changedKeys.includes("mov_minimum_distance")) { + this.writeData32( + this.dataPoints.mov_minimum_distance, + newSettings["mov_minimum_distance"] + ); + } + + if (changedKeys.includes("motion_detection_distance")) { + this.writeData32( + this.dataPoints.motion_detection_distance, + newSettings["motion_detection_distance"] + ); + } + + if (changedKeys.includes("fading_time")) { + this.writeData32(this.dataPoints.fading_time, newSettings["fading_time"]); + } + + if (changedKeys.includes("motion_false_detection")) { + this.writeData32( + this.dataPoints.motion_false_detection, + newSettings["motion_false_detection"] + ); + } + + if (changedKeys.includes("small_motion_detection_distance")) { + this.writeData32( + this.dataPoints.small_motion_detection_distance, + newSettings["small_motion_detection_distance"] + ); + } + + if (changedKeys.includes("small_motion_detection_sensitivity")) { + this.writeData32( + this.dataPoints.small_motion_detection_sensitivity, + newSettings["small_motion_detection_sensitivity"] + ); + } + + if (changedKeys.includes("indicator")) { + this.writeBool(this.dataPoints.indicator, newSettings["indicator"]); + } + + if (changedKeys.includes("static_detection_distance")) { + this.writeData32( + this.dataPoints.static_detection_distance, + newSettings["static_detection_distance"] + ); + } + + if (changedKeys.includes("static_detection_sensitivity")) { + this.writeData32( + this.dataPoints.static_detection_sensitivity, + newSettings["static_detection_sensitivity"] + ); + } + + if (changedKeys.includes("breathe_false_detection")) { + this.writeBool( + this.dataPoints.breathe_false_detection, + newSettings["breathe_false_detection"] + ); + } + + if (changedKeys.includes("alarm_volume")) { + this.writeEnum(this.dataPoints.alarm_volume, newSettings["alarm_volume"]); + } + + if (changedKeys.includes("working_mode")) { + this.writeEnum(this.dataPoints.working_mode, newSettings["working_mode"]); + } + + // if (changedKeys.includes("minimum_range")) { + // this.writeData32( + // this.dataPoints.tshpsMinimumRange, + // newSettings["minimum_range"] * 100 + // ); + // } + + // if (changedKeys.includes("maximum_range")) { + // this.writeData32( + // this.dataPoints.tshpsMaximumRange, + // newSettings["maximum_range"] * 100 + // ); + // } + + // if (changedKeys.includes("detection_delay")) { + // this.writeData32( + // this.dataPoints.tshpsDetectionDelay, + // newSettings["detection_delay"] + // ); + // } + } + + onIlluminanceMeasuredAttributeReport(measuredValue) { + this.log( + "measure_luminance | Luminance - measuredValue (lux):", + measuredValue + ); + this.setCapabilityValue("measure_luminance", measuredValue); + } + + onIASZoneStatusChangeNotification({ + zoneStatus, + extendedStatus, + zoneId, + delay, + }) { + this.log( + "IASZoneStatusChangeNotification received:", + zoneStatus, + extendedStatus, + zoneId, + delay + ); + // this.setCapabilityValue("alarm_motion", zoneStatus.alarm1); + this.setCapabilityValue("alarm_motion", zoneStatus); + } +} + +module.exports = radarSensor; + +// { +// "ids": { +// "modelId": "TS0225", +// "manufacturerName": "_TZE200_2aaelwxk" +// }, +// "endpoints": { +// "ieeeAddress": "a4:c1:38:2a:a9:fd:ca:4d", +// "networkAddress": 13130, +// "modelId": "TS0225", +// "manufacturerName": "_TZE200_2aaelwxk", +// "endpointDescriptors": [ +// { +// "status": "SUCCESS", +// "nwkAddrOfInterest": 13130, +// "_reserved": 34, +// "endpointId": 1, +// "applicationProfileId": 260, +// "applicationDeviceId": 1026, +// "applicationDeviceVersion": 0, +// "_reserved1": 1, +// "inputClusters": [ +// 0, +// 3, +// 1280, +// 57346, +// 61184, +// 60928, +// 57344, +// 1024 +// ], +// "outputClusters": [ +// 3, +// 57346, +// 61184, +// 60928, +// 57344 +// ] +// }, +// { +// "status": "SUCCESS", +// "nwkAddrOfInterest": 13130, +// "_reserved": 10, +// "endpointId": 242, +// "applicationProfileId": 41440, +// "applicationDeviceId": 97, +// "applicationDeviceVersion": 0, +// "_reserved1": 0, +// "inputClusters": [], +// "outputClusters": [ +// 33 +// ] +// } +// ], +// "deviceType": "router", +// "receiveWhenIdle": true, +// "swBuildId": "0122052017", +// "capabilities": { +// "alternatePANCoordinator": false, +// "deviceType": true, +// "powerSourceMains": true, +// "receiveWhenIdle": true, +// "security": false, +// "allocateAddress": true +// }, +// "extendedEndpointDescriptors": { +// "1": { +// "clusters": { +// "basic": { +// "attributes": [ +// { +// "acl": [ +// "readable" +// ], +// "id": 0, +// "name": "zclVersion" +// }, +// { +// "acl": [ +// "readable" +// ], +// "id": 1, +// "name": "appVersion" +// }, +// { +// "acl": [ +// "readable" +// ], +// "id": 2, +// "name": "stackVersion" +// }, +// { +// "acl": [ +// "readable" +// ], +// "id": 3, +// "name": "hwVersion" +// }, +// { +// "acl": [ +// "readable" +// ], +// "id": 4, +// "name": "manufacturerName" +// }, +// { +// "acl": [ +// "readable" +// ], +// "id": 5, +// "name": "modelId" +// }, +// { +// "acl": [ +// "readable" +// ], +// "id": 7, +// "name": "powerSource" +// }, +// { +// "acl": [ +// "readable", +// "writable" +// ], +// "id": 18, +// "name": "deviceEnabled" +// }, +// { +// "acl": [ +// "readable" +// ], +// "id": 16384, +// "name": "swBuildId" +// }, +// { +// "acl": [ +// "readable" +// ], +// "id": 65533, +// "name": "clusterRevision" +// } +// ], +// "commandsGenerated": "UNSUP_GENERAL_COMMAND", +// "commandsReceived": "UNSUP_GENERAL_COMMAND" +// }, +// "identify": { +// "attributes": [ +// { +// "acl": [ +// "readable", +// "writable" +// ], +// "id": 0, +// "name": "identifyTime", +// "value": 0 +// }, +// { +// "acl": [ +// "readable" +// ], +// "id": 65533, +// "name": "clusterRevision", +// "value": 1 +// } +// ], +// "commandsGenerated": "UNSUP_GENERAL_COMMAND", +// "commandsReceived": "UNSUP_GENERAL_COMMAND" +// }, +// "iasZone": { +// "attributes": [ +// { +// "acl": [ +// "readable" +// ], +// "id": 0, +// "name": "zoneState", +// "value": "notEnrolled" +// }, +// { +// "acl": [ +// "readable" +// ], +// "id": 1, +// "name": "zoneType", +// "value": "motionSensor" +// }, +// { +// "acl": [ +// "readable" +// ], +// "id": 2, +// "name": "zoneStatus", +// "value": { +// "type": "Buffer", +// "data": [ +// 0, +// 0 +// ] +// } +// }, +// { +// "acl": [ +// "readable", +// "writable" +// ], +// "id": 16, +// "name": "iasCIEAddress", +// "value": "5c:c7:c1:ff:fe:9b:78:80" +// }, +// { +// "acl": [ +// "readable" +// ], +// "id": 17, +// "name": "zoneId", +// "value": 6 +// }, +// { +// "acl": [ +// "readable" +// ], +// "id": 65533, +// "name": "clusterRevision", +// "value": 1 +// } +// ], +// "commandsGenerated": "UNSUP_GENERAL_COMMAND", +// "commandsReceived": "UNSUP_GENERAL_COMMAND" +// }, +// "illuminanceMeasurement": { +// "attributes": [ +// { +// "acl": [ +// "readable" +// ], +// "id": 0, +// "name": "measuredValue", +// "value": 1000 +// }, +// { +// "acl": [ +// "readable" +// ], +// "id": 1, +// "name": "minMeasuredValue", +// "value": 0 +// }, +// { +// "acl": [ +// "readable" +// ], +// "id": 2, +// "name": "maxMeasuredValue", +// "value": 4000 +// }, +// { +// "acl": [ +// "readable" +// ], +// "id": 65533, +// "name": "clusterRevision", +// "value": 1 +// } +// ], +// "commandsGenerated": "UNSUP_GENERAL_COMMAND", +// "commandsReceived": "UNSUP_GENERAL_COMMAND" +// } +// }, +// "bindings": { +// "identify": { +// "attributes": [ +// { +// "acl": [ +// "readable", +// "writable" +// ], +// "id": 0, +// "name": "identifyTime", +// "value": 0 +// }, +// { +// "acl": [ +// "readable" +// ], +// "id": 65533, +// "name": "clusterRevision", +// "value": 1 +// } +// ], +// "commandsGenerated": "UNSUP_GENERAL_COMMAND", +// "commandsReceived": "UNSUP_GENERAL_COMMAND" +// } +// } +// }, +// "242": { +// "clusters": {}, +// "bindings": {} +// } +// } +// } +// } \ No newline at end of file diff --git a/drivers/radar_sensor_2/driver.compose.json b/drivers/radar_sensor_2/driver.compose.json new file mode 100644 index 00000000..8323e603 --- /dev/null +++ b/drivers/radar_sensor_2/driver.compose.json @@ -0,0 +1,53 @@ +{ + "id": "radar_sensor", + "name": { + "en": "Radar Sensor ZG-205Z/W", + "nl": "Radar Sensor ZG-205Z/W" + }, + "class": "sensor", + "platforms": ["local"], + "connectivity": ["zigbee"], + "capabilities": [ + "measure_luminance", + "alarm_motion", + "alarm_small_presence", + "alarm_large_presence", + "alarm_breathe_presence", + "target_distance" + ], + "images": { + "large": "{{driverAssetsPath}}/images/large.png", + "small": "{{driverAssetsPath}}/images/small.png" + }, + "energy": { + "approximation": { + "usageConstant": 2.5 + } + }, + "zigbee": { + "manufacturerName": ["_TZE200_2aaelwxk"], + "productId": ["TS0225"], + "endpoints": { + "1": { + "clusters": [ + 0, + 3, + 1280, + 57346, + 61184, + 60928, + 57344, + 1024 + ], + "bindings": [] + } + }, + "learnmode": { + "image": "{{driverAssetsPath}}/icon.svg", + "instruction": { + "en": "Press and hold the reset button for 6 seconds. When the indicator light flashes it is in pairing mode.", + "nl": "Druk 6 seconden op de reset knop. Wacht tot de led gaat knipperen." + } + } + } +} diff --git a/drivers/radar_sensor_2/driver.settings.compose.json b/drivers/radar_sensor_2/driver.settings.compose.json new file mode 100644 index 00000000..9cebd5a4 --- /dev/null +++ b/drivers/radar_sensor_2/driver.settings.compose.json @@ -0,0 +1,207 @@ +[ + { + "id": "motion_detection_sensitivity", + "type": "number", + "label": { + "en": "Radar sensitivity", + "nl": "Radar sensitiviteit" + }, + "value": 6, + "min": 0, + "max": 10, + "units": { + "en": "x", + "nl": "x" + } + }, + { + "id": "mov_minimum_distance", + "type": "number", + "label": { + "en": "Minimum range", + "nl": "Minimale bereik" + }, + "value": 0, + "min": 0, + "max": 10, + "step": 1, + "units": { + "en": "meters", + "nl": "meters" + } + }, + { + "id": "motion_detection_distance", + "type": "number", + "label": { + "en": "Motion detection distance", + "nl": "Bewegingsdetectie afstand" + }, + "value": 600, + "min": 0, + "max": 1000, + "step": 1, + "units": { + "en": "centimeter", + "nl": "centimeter" + } + }, + { + "id": "fading_time", + "type": "number", + "label": { + "en": "Fading time", + "nl": "Reset tijd" + }, + "value": 0, + "min": 0, + "max": 28800, + "units": { + "en": "seconds", + "nl": "seconden" + } + }, + { + "id": "motion_false_detection", + "type": "number", + "value": 1, + "min": 0, + "max": 10, + "units": { + "en": "x", + "nl": "x" + }, + "label": { + "en": "Breathe False detection", + "nl": "Onjuiste Adem detectie" + } + }, + { + "id": "small_motion_detection_distance", + "type": "number", + "label": { + "en": "Small Motion detection distance", + "nl": "Kleine bewegingsdetectie afstand" + }, + "value": 600, + "min": 0, + "max": 600, + "step": 1, + "units": { + "en": "centimeter", + "nl": "centimeter" + } + }, + { + "id": "small_motion_detection_sensitivity", + "type": "number", + "label": { + "en": "Small Movement sensitivity", + "nl": "Kleine Beweging sensitiviteit" + }, + "value": 8, + "min": 0, + "max": 10, + "units": { + "en": "x", + "nl": "x" + } + }, + { + "id": "indicator", + "type": "checkbox", + "value": true, + "label": { + "en": "LED indicator", + "nl": "LED indicatie" + } + }, + { + "id": "static_detection_distance", + "type": "number", + "label": { + "en": "Static detection distance", + "nl": "Statische detectie afstand" + }, + "value": 600, + "min": 0, + "max": 600, + "step": 1, + "units": { + "en": "centimeter", + "nl": "centimeter" + } + }, + { + "id": "static_detection_sensitivity", + "type": "number", + "label": { + "en": "Static detection sensitivity", + "nl": "Statische detectie sensitiviteit" + }, + "value": 8, + "min": 0, + "max": 10, + "units": { + "en": "x", + "nl": "x" + } + }, + { + "id": "breathe_false_detection", + "type": "checkbox", + "value": false, + "label": { + "en": "Breathe False detection", + "nl": "Onjuiste Adem detectie" + } + }, + { + "id": "alarm_volume", + "type": "dropdown", + "value": "high", + "label": { "en": "Alarm volume", "nl": "Alarm volume" }, + "values": [ + { + "id": "mute", + "label": { "en": "Mute", "nl": "Gedempt" } + }, + { + "id": "low", + "label": { "en": "Low", "nl": "Laag" } + }, + { + "id": "medium", + "label": { "en": "Medium", "nl": "Middel" } + }, + { + "id": "high", + "label": { "en": "High", "nl": "Hoog" } + } + ] + }, + { + "id": "working_mode", + "type": "dropdown", + "value": "off", + "label": { "en": "Working mode", "nl": "Werk modus" }, + "values": [ + { + "id": "off", + "label": { "en": "Off", "nl": "Uit" } + }, + { + "id": "arm", + "label": { "en": "Arm", "nl": "Arm" } + }, + { + "id": "alarm", + "label": { "en": "Alarm", "nl": "Alarm" } + }, + { + "id": "doorbell", + "label": { "en": "Doorbell", "nl": "Deurbel" } + } + ] + } +] From eb2c3ef73a02108542f13d287d13c2806b8cc664 Mon Sep 17 00:00:00 2001 From: Eelco Date: Mon, 20 Nov 2023 20:19:05 +0100 Subject: [PATCH 08/22] updated radar sensors in readme, reverted radar_sensor driver.compose.json --- README.md | 8 + app.json | 228 ++++++++++++++--------- drivers/radar_sensor/driver.compose.json | 6 +- 3 files changed, 154 insertions(+), 88 deletions(-) diff --git a/README.md b/README.md index 5e4963da..a2d2f2bc 100644 --- a/README.md +++ b/README.md @@ -82,6 +82,14 @@ Supported devices: TUYATEC-b5g40alm / RH3040 _TZ3000_nss8amz9 / TS0202 +- Radar Sensor + _TZE200_ztc6ggyl / TS0601 + _TZE201_ztc6ggyl / TS0601 + _TZE202_ztc6ggyl / TS0601 + _TZE203_ztc6ggyl / TS0601 + _TZE204_ztc6ggyl / TS0601 + _TZE200_2aaelwxk / TS0225 + . Motion Sensor TUYATEC-bd5faf9p / RH3040 (Nedis) diff --git a/app.json b/app.json index 7065fb65..a50b0456 100644 --- a/app.json +++ b/app.json @@ -2988,6 +2988,144 @@ }, { "id": "radar_sensor", + "name": { + "en": "Radar Sensor", + "nl": "Radar Sensor" + }, + "class": "sensor", + "platforms": [ + "local" + ], + "connectivity": [ + "zigbee" + ], + "capabilities": [ + "measure_luminance", + "alarm_motion", + "target_distance" + ], + "images": { + "large": "/drivers/radar_sensor/assets/images/large.png", + "small": "/drivers/radar_sensor/assets/images/small.png" + }, + "energy": { + "approximation": { + "usageOn": 0, + "usageOff": 0 + } + }, + "zigbee": { + "manufacturerName": [ + "_TZE200_ztc6ggyl", + "_TZE201_ztc6ggyl", + "_TZE202_ztc6ggyl", + "_TZE203_ztc6ggyl", + "_TZE204_ztc6ggyl", + "_TZE200_2aaelwxk" + ], + "productId": [ + "TS0601", + "TS0225" + ], + "endpoints": { + "1": { + "clusters": [ + 0, + 4, + 5, + 258, + 61184 + ], + "bindings": [ + 258, + 61184 + ] + } + }, + "learnmode": { + "image": "/drivers/radar_sensor/assets/icon.svg", + "instruction": { + "en": "Press and hold the reset button for 6 seconds. When the indicator light flashes it is in pairing mode.", + "nl": "Druk 6 seconden op de reset knop. Wacht tot de led gaat knipperen." + } + } + }, + "settings": [ + { + "id": "radar_sensitivity", + "type": "number", + "label": { + "en": "Radar sensitivity", + "nl": "Radar sensitiviteit" + }, + "value": 7, + "min": 1, + "max": 9 + }, + { + "id": "minimum_range", + "type": "number", + "label": { + "en": "Minimum range", + "nl": "Minimale bereik" + }, + "value": 0, + "min": 0, + "max": 9.5, + "units": { + "en": "meters", + "nl": "meters" + } + }, + { + "id": "maximum_range", + "type": "number", + "label": { + "en": "Maximum range", + "nl": "Maximale bereik" + }, + "value": 9.5, + "min": 0, + "max": 9.5, + "units": { + "en": "meters", + "nl": "meters" + } + }, + { + "id": "detection_delay", + "type": "number", + "label": { + "en": "Detection delay", + "nl": "Detectie vertraging" + }, + "value": 7, + "min": 0, + "max": 10, + "units": { + "en": "seconds", + "nl": "seconden" + } + }, + { + "id": "fading_time", + "type": "number", + "label": { + "en": "Fading time", + "nl": "Reset tijd" + }, + "value": 7, + "min": 0, + "max": 1500, + "units": { + "en": "seconds", + "nl": "seconden" + } + } + ] + }, + { + "id": "radar_sensor_2", "name": { "en": "Radar Sensor ZG-205Z/W", "nl": "Radar Sensor ZG-205Z/W" @@ -3008,8 +3146,8 @@ "target_distance" ], "images": { - "large": "/drivers/radar_sensor/assets/images/large.png", - "small": "/drivers/radar_sensor/assets/images/small.png" + "large": "/drivers/radar_sensor_2/assets/images/large.png", + "small": "/drivers/radar_sensor_2/assets/images/small.png" }, "energy": { "approximation": { @@ -3039,7 +3177,7 @@ } }, "learnmode": { - "image": "/drivers/radar_sensor/assets/icon.svg", + "image": "/drivers/radar_sensor_2/assets/icon.svg", "instruction": { "en": "Press and hold the reset button for 6 seconds. When the indicator light flashes it is in pairing mode.", "nl": "Druk 6 seconden op de reset knop. Wacht tot de led gaat knipperen." @@ -8314,7 +8452,7 @@ "getable": true, "setable": false, "uiComponent": "sensor", - "icon": "/drivers/radar_sensor/assets/images/breathe_motion.svg", + "icon": "/drivers/radar_sensor_2/assets/images/breathe_motion.svg", "insights": true, "options": { "zoneActivity": true @@ -8364,7 +8502,7 @@ "getable": true, "setable": false, "uiComponent": "sensor", - "icon": "/drivers/radar_sensor/assets/images/large_motion.svg", + "icon": "/drivers/radar_sensor_2/assets/images/large_motion.svg", "insights": true, "options": { "zoneActivity": true @@ -8396,55 +8534,6 @@ "pl": "Duży czujnik Obecność wyłączony" } }, - "alarm_none_presence": { - "title": { - "en": "None Presence", - "nl": "Geen Aanwezigheid", - "de": "Keine Präsenz", - "fr": "Aucune Présence", - "it": "Nessuna Presenza", - "sv": "Ingen Närvaro", - "no": "Ingen Nærvær", - "es": "Ninguna Presencia", - "da": "Ingen Nærvær", - "ru": "Отсутствие Присутствия", - "pl": "Brak Obecności" - }, - "type": "boolean", - "getable": true, - "setable": false, - "uiComponent": "sensor", - "insights": true, - "options": { - "zoneActivity": true - }, - "insightsTitleTrue": { - "en": "None Presence alarm turned on", - "nl": "Geen Aanwezigheid alarm ging af", - "de": "Keine Präsenz Alarm ist angegangen", - "fr": "Alarme Aucune Présence s'est déclenchée", - "it": "Allarme Nessuna Presenza attivato", - "sv": "Ingen Närvaro larm aktiverat", - "no": "Ingen Nærvær alarm aktivert", - "es": "La alarma de Ninguna Presencia activada", - "da": "Ingen Nærvær alarm blev aktiveret", - "ru": "Сигнал Отсутствие Присутствия включен", - "pl": "Brak czujnika Obecność włączony" - }, - "insightsTitleFalse": { - "en": "None Presence alarm turned off", - "nl": "Geen Aanwezigheid alarm ging uit", - "de": "Keine Präsenz Alarm ist ausgegangen", - "fr": "Alarme Aucune Présence s'est désactivée", - "it": "Allarme Nessuna Presenza disattivato", - "sv": "Ingen Närvaro larm inaktiverat", - "no": "Ingen Nærvær alarm deaktivert", - "es": "La alarma de Ninguna Presencia se ha desactivado", - "da": "Ingen Nærvær alarm blev deaktiveret", - "ru": "Сигнал Отсутствие Присутствия выключен", - "pl": "Brak czujnika Obecność wyłączony" - } - }, "alarm_siren": { "type": "boolean", "title": { @@ -8479,7 +8568,7 @@ "getable": true, "setable": false, "uiComponent": "sensor", - "icon": "/drivers/radar_sensor/assets/images/small_motion.svg", + "icon": "/drivers/radar_sensor_2/assets/images/small_motion.svg", "insights": true, "options": { "zoneActivity": true @@ -8543,35 +8632,6 @@ } ] }, - "presence_type": { - "title": { - "en": "Presence Type", - "nl": "Aanwezigheidstype", - "de": "Anwesenheitstyp", - "fr": "Type de présence", - "it": "Tipo di presenza", - "sv": "Närvarotyp", - "no": "Tilstedeværelsestype", - "es": "Tipo de presencia", - "da": "Tilstedeværelsestype", - "ru": "Тип присутствия", - "pl": "Typ obecności" - }, - "type": "number", - "getable": true, - "setable": false, - "uiComponent": "sensor", - "insights": true, - "chartType": "area", - "units": { - "en": "type", - "nl": "type" - }, - "min": 0, - "max": 2, - "step": 1, - "decimals": 0 - }, "soil_moisture": { "type": "number", "title": { diff --git a/drivers/radar_sensor/driver.compose.json b/drivers/radar_sensor/driver.compose.json index 96e1023b..a70178ef 100644 --- a/drivers/radar_sensor/driver.compose.json +++ b/drivers/radar_sensor/driver.compose.json @@ -28,12 +28,10 @@ "_TZE201_ztc6ggyl", "_TZE202_ztc6ggyl", "_TZE203_ztc6ggyl", - "_TZE204_ztc6ggyl", - "_TZE200_2aaelwxk" + "_TZE204_ztc6ggyl" ], "productId": [ - "TS0601", - "TS0225" + "TS0601" ], "endpoints": { "1": { From c9d6ec6479766afb28c16e975d4253148d064249 Mon Sep 17 00:00:00 2001 From: Eelco Date: Tue, 21 Nov 2023 15:06:31 +0100 Subject: [PATCH 09/22] removed target_distance --- drivers/radar_sensor_2/driver.compose.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/radar_sensor_2/driver.compose.json b/drivers/radar_sensor_2/driver.compose.json index 8323e603..6f596713 100644 --- a/drivers/radar_sensor_2/driver.compose.json +++ b/drivers/radar_sensor_2/driver.compose.json @@ -12,8 +12,7 @@ "alarm_motion", "alarm_small_presence", "alarm_large_presence", - "alarm_breathe_presence", - "target_distance" + "alarm_breathe_presence" ], "images": { "large": "{{driverAssetsPath}}/images/large.png", From 915e229452d66781d6c7f1bdc98147628264aeeb Mon Sep 17 00:00:00 2001 From: Eelco Date: Mon, 4 Dec 2023 22:18:57 +0100 Subject: [PATCH 10/22] added conditions and triggers --- .../capabilities/alarm_breathe_presence.json | 55 - .../capabilities/alarm_large_presence.json | 57 +- .../capabilities/alarm_small_presence.json | 55 - .../conditions/the-breath-alarm-is-onoff.json | 15 + .../the-large-presence-alarm-is-onoff.json | 15 + .../the-small-presence-alarm-is-onoff.json | 15 + .../triggers/the-breath-alarm-turned-off.json | 15 + .../triggers/the-breath-alarm-turned-on.json | 15 + .../the-large-presence-alarm-turned-off.json | 15 + .../the-large-presence-alarm-turned-on.json | 15 + .../the-small-presence-alarm-turned-off.json | 15 + .../the-small-presence-alarm-turned-on.json | 15 + app.json | 1391 +++++++++-------- drivers/radar_sensor_2/device.js | 131 +- drivers/radar_sensor_2/driver.compose.json | 2 +- 15 files changed, 1017 insertions(+), 809 deletions(-) create mode 100644 .homeycompose/flow/conditions/the-breath-alarm-is-onoff.json create mode 100644 .homeycompose/flow/conditions/the-large-presence-alarm-is-onoff.json create mode 100644 .homeycompose/flow/conditions/the-small-presence-alarm-is-onoff.json create mode 100644 .homeycompose/flow/triggers/the-breath-alarm-turned-off.json create mode 100644 .homeycompose/flow/triggers/the-breath-alarm-turned-on.json create mode 100644 .homeycompose/flow/triggers/the-large-presence-alarm-turned-off.json create mode 100644 .homeycompose/flow/triggers/the-large-presence-alarm-turned-on.json create mode 100644 .homeycompose/flow/triggers/the-small-presence-alarm-turned-off.json create mode 100644 .homeycompose/flow/triggers/the-small-presence-alarm-turned-on.json diff --git a/.homeycompose/capabilities/alarm_breathe_presence.json b/.homeycompose/capabilities/alarm_breathe_presence.json index cca9b94b..d3b8c8ec 100644 --- a/.homeycompose/capabilities/alarm_breathe_presence.json +++ b/.homeycompose/capabilities/alarm_breathe_presence.json @@ -46,60 +46,5 @@ "da": "Åndedrætsalarm blev deaktiveret", "ru": "Сигнал дыхания выключен", "pl": "Czujnik oddechu wyłączony" - }, - "$flow": { - "triggers": [ - { - "id": "alarm_breathe_presence_true", - "highlight": true, - "title": { - "en": "The breath alarm turned on", - "nl": "De ademalarm gaat aan", - "de": "Der Atem-Alarm ist angegangen", - "fr": "L'alarme respiratoire s'est activée", - "it": "L'allarme di respiro è stato attivato", - "sv": "Andningslarmet aktiverat", - "no": "Åndedrettsalarmen aktivert", - "es": "La alarma de respiración se ha activado", - "da": "Åndedrætsalarmen blev aktiveret", - "ru": "Сигнал дыхания включен", - "pl": "Czujnik oddechu włączony" - } - }, - { - "id": "alarm_breathe_presence_false", - "title": { - "en": "The breath alarm turned off", - "nl": "De ademalarm gaat uit", - "de": "Der Atem-Alarm ist ausgegangen", - "fr": "L'alarme respiratoire s'est désactivée", - "it": "L'allarme di respiro è stato disattivato", - "sv": "Andningslarmet inaktiverat", - "no": "Åndedrettsalarmen deaktivert", - "es": "La alarma de respiración se ha desactivado", - "da": "Åndedrætsalarmen blev deaktiveret", - "ru": "Сигнал дыхания выключен", - "pl": "Czujnik oddechu wyłączony" - } - } - ], - "conditions": [ - { - "id": "alarm_breathe_presence", - "title": { - "en": "The breath alarm is !{{on|off}}", - "nl": "De ademalarm is !{{aan|uit}}", - "de": "Der Atem-Alarm ist !{{an|aus}}", - "fr": "L'alarme respiratoire est !{{en marche|arrêtée}}", - "it": "L'allarme di respiro è !{{acceso|spento}}", - "sv": "Andningslarmet är !{{på|av}}", - "no": "Åndedrettsalarmen er !{{på|av}}", - "es": "La alarma de respiración está !{{activada|desactivada}}", - "da": "Åndedrætsalarmen er !{{tændt|slukket}}", - "ru": "Сигнал дыхания !{{вкл.|выкл.}}", - "pl": "Czujnik oddechu !{{włączony|wyłączony}}" - } - } - ] } } diff --git a/.homeycompose/capabilities/alarm_large_presence.json b/.homeycompose/capabilities/alarm_large_presence.json index 664605d7..52e366ba 100644 --- a/.homeycompose/capabilities/alarm_large_presence.json +++ b/.homeycompose/capabilities/alarm_large_presence.json @@ -46,60 +46,5 @@ "da": "Stor Nærvær alarm blev deaktiveret", "ru": "Большой сигнал Присутствие выключен", "pl": "Duży czujnik Obecność wyłączony" - }, - "$flow": { - "triggers": [ - { - "id": "alarm_large_presence_true", - "highlight": true, - "title": { - "en": "The Large Presence alarm turned on", - "nl": "De grote Aanwezigheid alarm gaat aan", - "de": "Der große Präsenz Alarm ist angegangen", - "fr": "L'alarme Grande Présence s'est activée", - "it": "L'allarme Presenza Ampia è stato attivato", - "sv": "Stor Närvaro larm aktiverat", - "no": "Stor Nærvær alarm aktivert", - "es": "La alarma de Presencia Grande se ha activado", - "da": "Stor Nærvær alarm blev aktiveret", - "ru": "Большой сигнал Присутствие включен", - "pl": "Duży czujnik Obecność włączony" - } - }, - { - "id": "alarm_large_presence_false", - "title": { - "en": "The Large Presence alarm turned off", - "nl": "De grote Aanwezigheid alarm gaat uit", - "de": "Der große Präsenz Alarm ist ausgegangen", - "fr": "L'alarme Grande Présence s'est désactivée", - "it": "L'allarme Presenza Ampia è stato disattivato", - "sv": "Stor Närvaro larm inaktiverat", - "no": "Stor Nærvær alarm deaktivert", - "es": "La alarma de Presencia Grande se ha desactivado", - "da": "Stor Nærvær alarm blev deaktiveret", - "ru": "Большой сигнал Присутствие выключен", - "pl": "Duży czujnik Obecność wyłączony" - } - } - ], - "conditions": [ - { - "id": "alarm_large_presence", - "title": { - "en": "The Large Presence alarm is !{{on|off}}", - "nl": "De grote Aanwezigheid alarm is !{{aan|uit}}", - "de": "Der große Präsenz Alarm ist !{{an|aus}}", - "fr": "L'alarme Grande Présence est !{{en marche|arrêtée}}", - "it": "L'allarme Presenza Ampia è !{{acceso|spento}}", - "sv": "Stor Närvaro larm är !{{på|av}}", - "no": "Stor Nærvær alarm er !{{på|av}}", - "es": "La alarma de Presencia Grande está !{{activada|desactivada}}", - "da": "Stor Nærvær alarm er !{{tændt|slukket}}", - "ru": "Большой сигнал Присутствие !{{вкл.|выкл.}}", - "pl": "Duży czujnik Obecność !{{włączony|wyłączony}}" - } - } - ] - } + } } diff --git a/.homeycompose/capabilities/alarm_small_presence.json b/.homeycompose/capabilities/alarm_small_presence.json index 5a552b0e..1406f88e 100644 --- a/.homeycompose/capabilities/alarm_small_presence.json +++ b/.homeycompose/capabilities/alarm_small_presence.json @@ -46,60 +46,5 @@ "da": "Lille Nærvær alarm blev deaktiveret", "ru": "Маленький сигнал Присутствие выключен", "pl": "Mały czujnik Obecność wyłączony" - }, - "$flow": { - "triggers": [ - { - "id": "alarm_small_presence_true", - "highlight": true, - "title": { - "en": "The Small Presence alarm turned on", - "nl": "De kleine Aanwezigheid alarm gaat aan", - "de": "Der kleine Präsenz Alarm ist angegangen", - "fr": "L'alarme Petite Présence s'est activée", - "it": "L'allarme Presenza Piccola è stato attivato", - "sv": "Liten Närvaro larm aktiverat", - "no": "Liten Nærvær alarm aktivert", - "es": "La alarma de Pequeña Presencia se ha activado", - "da": "Lille Nærvær alarm blev aktiveret", - "ru": "Маленький сигнал Присутствие включен", - "pl": "Mały czujnik Obecność włączony" - } - }, - { - "id": "alarm_small_presence_false", - "title": { - "en": "The Small Presence alarm turned off", - "nl": "De kleine Aanwezigheid alarm gaat uit", - "de": "Der kleine Präsenz Alarm ist ausgegangen", - "fr": "L'alarme Petite Présence s'est désactivée", - "it": "L'allarme Presenza Piccola è stato disattivato", - "sv": "Liten Närvaro larm inaktiverat", - "no": "Liten Nærvær alarm deaktivert", - "es": "La alarma de Pequeña Presencia se ha desactivado", - "da": "Lille Nærvær alarm blev deaktiveret", - "ru": "Маленький сигнал Присутствие выключен", - "pl": "Mały czujnik Obecność wyłączony" - } - } - ], - "conditions": [ - { - "id": "alarm_small_presence", - "title": { - "en": "The Small Presence alarm is !{{on|off}}", - "nl": "De kleine Aanwezigheid alarm is !{{aan|uit}}", - "de": "Der kleine Präsenz Alarm ist !{{an|aus}}", - "fr": "L'alarme Petite Présence est !{{en marche|arrêtée}}", - "it": "L'allarme Presenza Piccola è !{{acceso|spento}}", - "sv": "Liten Närvaro larm är !{{på|av}}", - "no": "Liten Nærvær alarm er !{{på|av}}", - "es": "La alarma de Pequeña Presencia está !{{activada|desactivada}}", - "da": "Lille Nærvær alarm er !{{tændt|slukket}}", - "ru": "Маленький сигнал Присутствие !{{вкл.|выкл.}}", - "pl": "Mały czujnik Obecność !{{włączony|wyłączony}}" - } - } - ] } } diff --git a/.homeycompose/flow/conditions/the-breath-alarm-is-onoff.json b/.homeycompose/flow/conditions/the-breath-alarm-is-onoff.json new file mode 100644 index 00000000..7726abb1 --- /dev/null +++ b/.homeycompose/flow/conditions/the-breath-alarm-is-onoff.json @@ -0,0 +1,15 @@ +{ + "title": { + "en": "The breath alarm is !{{on|off}}", + "nl": "Het adem alarm is !{{aan|uit}}", + "de": "Der Atem-Alarm ist !{{an|aus}}", + "fr": "L'alarme respiratoire est !{{en marche|arrêtée}}", + "it": "L'allarme di respiro è !{{acceso|spento}}", + "sv": "Andningslarmet är !{{på|av}}", + "no": "Åndedrettsalarmen er !{{på|av}}", + "es": "La alarma de respiración está !{{activada|desactivada}}", + "da": "Åndedrætsalarmen er !{{tændt|slukket}}", + "ru": "Сигнал дыхания !{{вкл.|выкл.}}", + "pl": "Czujnik oddechu !{{włączony|wyłączony}}" + } +} \ No newline at end of file diff --git a/.homeycompose/flow/conditions/the-large-presence-alarm-is-onoff.json b/.homeycompose/flow/conditions/the-large-presence-alarm-is-onoff.json new file mode 100644 index 00000000..61164387 --- /dev/null +++ b/.homeycompose/flow/conditions/the-large-presence-alarm-is-onoff.json @@ -0,0 +1,15 @@ +{ + "title": { + "en": "The Large Presence alarm is !{{on|off}}", + "nl": "De grote Aanwezigheid alarm is !{{aan|uit}}", + "de": "Der große Präsenz Alarm ist !{{an|aus}}", + "fr": "L'alarme Grande Présence est !{{en marche|arrêtée}}", + "it": "L'allarme Presenza Ampia è !{{acceso|spento}}", + "sv": "Stor Närvaro larm är !{{på|av}}", + "no": "Stor Nærvær alarm er !{{på|av}}", + "es": "La alarma de Presencia Grande está !{{activada|desactivada}}", + "da": "Stor Nærvær alarm er !{{tændt|slukket}}", + "ru": "Большой сигнал Присутствие !{{вкл.|выкл.}}", + "pl": "Duży czujnik Obecność !{{włączony|wyłączony}}" + } +} \ No newline at end of file diff --git a/.homeycompose/flow/conditions/the-small-presence-alarm-is-onoff.json b/.homeycompose/flow/conditions/the-small-presence-alarm-is-onoff.json new file mode 100644 index 00000000..4151aadf --- /dev/null +++ b/.homeycompose/flow/conditions/the-small-presence-alarm-is-onoff.json @@ -0,0 +1,15 @@ +{ + "title": { + "en": "The Small Presence alarm is !{{on|off}}", + "nl": "De kleine Aanwezigheid alarm is !{{aan|uit}}", + "de": "Der kleine Präsenz Alarm ist !{{an|aus}}", + "fr": "L'alarme Petite Présence est !{{en marche|arrêtée}}", + "it": "L'allarme Presenza Piccola è !{{acceso|spento}}", + "sv": "Liten Närvaro larm är !{{på|av}}", + "no": "Liten Nærvær alarm er !{{på|av}}", + "es": "La alarma de Pequeña Presencia está !{{activada|desactivada}}", + "da": "Lille Nærvær alarm er !{{tændt|slukket}}", + "ru": "Маленький сигнал Присутствие !{{вкл.|выкл.}}", + "pl": "Mały czujnik Obecność !{{włączony|wyłączony}}" + } +} \ No newline at end of file diff --git a/.homeycompose/flow/triggers/the-breath-alarm-turned-off.json b/.homeycompose/flow/triggers/the-breath-alarm-turned-off.json new file mode 100644 index 00000000..48dab87d --- /dev/null +++ b/.homeycompose/flow/triggers/the-breath-alarm-turned-off.json @@ -0,0 +1,15 @@ +{ + "title": { + "en": "The breath alarm turned off", + "nl": "Het adem alarm gaat uit", + "de": "Der Atem-Alarm ist ausgegangen", + "fr": "L'alarme respiratoire s'est désactivée", + "it": "L'allarme di respiro è stato disattivato", + "sv": "Andningslarmet inaktiverat", + "no": "Åndedrettsalarmen deaktivert", + "es": "La alarma de respiración se ha desactivado", + "da": "Åndedrætsalarmen blev deaktiveret", + "ru": "Сигнал дыхания выключен", + "pl": "Czujnik oddechu wyłączony" + } +} \ No newline at end of file diff --git a/.homeycompose/flow/triggers/the-breath-alarm-turned-on.json b/.homeycompose/flow/triggers/the-breath-alarm-turned-on.json new file mode 100644 index 00000000..6b86cbea --- /dev/null +++ b/.homeycompose/flow/triggers/the-breath-alarm-turned-on.json @@ -0,0 +1,15 @@ +{ + "title": { + "en": "The breath alarm turned on", + "nl": "Het adem alarm gaat aan", + "de": "Der Atem-Alarm ist angegangen", + "fr": "L'alarme respiratoire s'est activée", + "it": "L'allarme di respiro è stato attivato", + "sv": "Andningslarmet aktiverat", + "no": "Åndedrettsalarmen aktivert", + "es": "La alarma de respiración se ha activado", + "da": "Åndedrætsalarmen blev aktiveret", + "ru": "Сигнал дыхания включен", + "pl": "Czujnik oddechu włączony" + } +} \ No newline at end of file diff --git a/.homeycompose/flow/triggers/the-large-presence-alarm-turned-off.json b/.homeycompose/flow/triggers/the-large-presence-alarm-turned-off.json new file mode 100644 index 00000000..0b842eea --- /dev/null +++ b/.homeycompose/flow/triggers/the-large-presence-alarm-turned-off.json @@ -0,0 +1,15 @@ +{ + "title": { + "en": "The Large Presence alarm turned off", + "nl": "De grote Aanwezigheid alarm gaat uit", + "de": "Der große Präsenz Alarm ist ausgegangen", + "fr": "L'alarme Grande Présence s'est désactivée", + "it": "L'allarme Presenza Ampia è stato disattivato", + "sv": "Stor Närvaro larm inaktiverat", + "no": "Stor Nærvær alarm deaktivert", + "es": "La alarma de Presencia Grande se ha desactivado", + "da": "Stor Nærvær alarm blev deaktiveret", + "ru": "Большой сигнал Присутствие выключен", + "pl": "Duży czujnik Obecność wyłączony" + } +} \ No newline at end of file diff --git a/.homeycompose/flow/triggers/the-large-presence-alarm-turned-on.json b/.homeycompose/flow/triggers/the-large-presence-alarm-turned-on.json new file mode 100644 index 00000000..6b772347 --- /dev/null +++ b/.homeycompose/flow/triggers/the-large-presence-alarm-turned-on.json @@ -0,0 +1,15 @@ +{ + "title": { + "en": "The Large Presence alarm turned on", + "nl": "Grote Aanwezigheid alarm ging af", + "de": "Große Präsenz Alarm ist angegangen", + "fr": "Alarme Grande Présence s'est déclenchée", + "it": "Allarme Presenza Ampia attivato", + "sv": "Stor Närvaro larm aktiverat", + "no": "Stor Nærvær alarm aktivert", + "es": "Alarma de Presencia Grande activada", + "da": "Stor Nærvær alarm blev aktiveret", + "ru": "Большой сигнал Присутствие включен", + "pl": "Duży czujnik Obecność włączony" + } +} \ No newline at end of file diff --git a/.homeycompose/flow/triggers/the-small-presence-alarm-turned-off.json b/.homeycompose/flow/triggers/the-small-presence-alarm-turned-off.json new file mode 100644 index 00000000..9b233375 --- /dev/null +++ b/.homeycompose/flow/triggers/the-small-presence-alarm-turned-off.json @@ -0,0 +1,15 @@ +{ + "title": { + "en": "The Small Presence alarm turned off", + "nl": "De kleine Aanwezigheid alarm gaat uit", + "de": "Der kleine Präsenz Alarm ist ausgegangen", + "fr": "L'alarme Petite Présence s'est désactivée", + "it": "L'allarme Presenza Piccola è stato disattivato", + "sv": "Liten Närvaro larm inaktiverat", + "no": "Liten Nærvær alarm deaktivert", + "es": "La alarma de Pequeña Presencia se ha desactivado", + "da": "Lille Nærvær alarm blev deaktiveret", + "ru": "Маленький сигнал Присутствие выключен", + "pl": "Mały czujnik Obecność wyłączony" + } +} \ No newline at end of file diff --git a/.homeycompose/flow/triggers/the-small-presence-alarm-turned-on.json b/.homeycompose/flow/triggers/the-small-presence-alarm-turned-on.json new file mode 100644 index 00000000..4523a67b --- /dev/null +++ b/.homeycompose/flow/triggers/the-small-presence-alarm-turned-on.json @@ -0,0 +1,15 @@ +{ + "title": { + "en": "The Small Presence alarm turned on", + "nl": "De kleine Aanwezigheid alarm gaat aan", + "de": "Der kleine Präsenz Alarm ist angegangen", + "fr": "L'alarme Petite Présence s'est activée", + "it": "L'allarme Presenza Piccola è stato attivato", + "sv": "Liten Närvaro larm aktiverat", + "no": "Liten Nærvær alarm aktivert", + "es": "La alarma de Pequeña Presencia se ha activado", + "da": "Lille Nærvær alarm blev aktiveret", + "ru": "Маленький сигнал Присутствие включен", + "pl": "Mały czujnik Obecność włączony" + } +} \ No newline at end of file diff --git a/app.json b/app.json index a50b0456..677e198b 100644 --- a/app.json +++ b/app.json @@ -98,350 +98,392 @@ ] }, "flow": { - "actions": [ + "triggers": [ { - "id": "resetEnergyMeter", "title": { - "en": "Reset Energy Meter", - "sv": "Återställ energimätaren" - }, - "args": [], - "callback": "resetEnergyMeter" + "en": "The breath alarm turned off", + "nl": "Het adem alarm gaat uit", + "de": "Der Atem-Alarm ist ausgegangen", + "fr": "L'alarme respiratoire s'est désactivée", + "it": "L'allarme di respiro è stato disattivato", + "sv": "Andningslarmet inaktiverat", + "no": "Åndedrettsalarmen deaktivert", + "es": "La alarma de respiración se ha desactivado", + "da": "Åndedrætsalarmen blev deaktiveret", + "ru": "Сигнал дыхания выключен", + "pl": "Czujnik oddechu wyłączony" + }, + "id": "the-breath-alarm-turned-off" }, { "title": { - "en": "Start effect" + "en": "The breath alarm turned on", + "nl": "Het adem alarm gaat aan", + "de": "Der Atem-Alarm ist angegangen", + "fr": "L'alarme respiratoire s'est activée", + "it": "L'allarme di respiro è stato attivato", + "sv": "Andningslarmet aktiverat", + "no": "Åndedrettsalarmen aktivert", + "es": "La alarma de respiración se ha activado", + "da": "Åndedrætsalarmen blev aktiveret", + "ru": "Сигнал дыхания включен", + "pl": "Czujnik oddechu włączony" + }, + "id": "the-breath-alarm-turned-on" + }, + { + "title": { + "en": "The Large Presence alarm turned off", + "nl": "De grote Aanwezigheid alarm gaat uit", + "de": "Der große Präsenz Alarm ist ausgegangen", + "fr": "L'alarme Grande Présence s'est désactivée", + "it": "L'allarme Presenza Ampia è stato disattivato", + "sv": "Stor Närvaro larm inaktiverat", + "no": "Stor Nærvær alarm deaktivert", + "es": "La alarma de Presencia Grande se ha desactivado", + "da": "Stor Nærvær alarm blev deaktiveret", + "ru": "Большой сигнал Присутствие выключен", + "pl": "Duży czujnik Obecność wyłączony" + }, + "id": "the-large-presence-alarm-turned-off" + }, + { + "title": { + "en": "The Large Presence alarm turned on", + "nl": "Grote Aanwezigheid alarm ging af", + "de": "Große Präsenz Alarm ist angegangen", + "fr": "Alarme Grande Présence s'est déclenchée", + "it": "Allarme Presenza Ampia attivato", + "sv": "Stor Närvaro larm aktiverat", + "no": "Stor Nærvær alarm aktivert", + "es": "Alarma de Presencia Grande activada", + "da": "Stor Nærvær alarm blev aktiveret", + "ru": "Большой сигнал Присутствие включен", + "pl": "Duży czujnik Obecność włączony" + }, + "id": "the-large-presence-alarm-turned-on" + }, + { + "title": { + "en": "The Small Presence alarm turned off", + "nl": "De kleine Aanwezigheid alarm gaat uit", + "de": "Der kleine Präsenz Alarm ist ausgegangen", + "fr": "L'alarme Petite Présence s'est désactivée", + "it": "L'allarme Presenza Piccola è stato disattivato", + "sv": "Liten Närvaro larm inaktiverat", + "no": "Liten Nærvær alarm deaktivert", + "es": "La alarma de Pequeña Presencia se ha desactivado", + "da": "Lille Nærvær alarm blev deaktiveret", + "ru": "Маленький сигнал Присутствие выключен", + "pl": "Mały czujnik Obecność wyłączony" + }, + "id": "the-small-presence-alarm-turned-off" + }, + { + "title": { + "en": "The Small Presence alarm turned on", + "nl": "De kleine Aanwezigheid alarm gaat aan", + "de": "Der kleine Präsenz Alarm ist angegangen", + "fr": "L'alarme Petite Présence s'est activée", + "it": "L'allarme Presenza Piccola è stato attivato", + "sv": "Liten Närvaro larm aktiverat", + "no": "Liten Nærvær alarm aktivert", + "es": "La alarma de Pequeña Presencia se ha activado", + "da": "Lille Nærvær alarm blev aktiveret", + "ru": "Маленький сигнал Присутствие включен", + "pl": "Mały czujnik Obecność włączony" + }, + "id": "the-small-presence-alarm-turned-on" + }, + { + "id": "alarm_siren", + "title": { + "en": "Siren Alarm", + "nl": "Sirene Alarm", + "de": "Sirenenalarm" }, "titleFormatted": { - "en": "Effect is [[effect_name]] with speed [[effect_speed]] and color(s) [[effect_color_0]], [[effect_color_1]], [[effect_color_2]], [[effect_color_3]], [[effect_color_4]], [[effect_color_5]], [[effect_color_6]], [[effect_color_7]], [[effect_color_8]]" + "en": "Siren Alarm", + "nl": "Sirene Alarm", + "de": "Sirenenalarm" }, "hint": { - "en": "Choose a light pattern and a speed for it. You can also choose what colors the pattern should have, this is not mandatory." + "en": "This card will trigger when siren is activated.", + "nl": "Deze kaart wordt alleen geactiveerd wanneer de sirene actief is.", + "de": "Diese Karte wird ausgelöst, wenn die Sirene aktiviert wird." }, "args": [ { - "name": "christmas_lights_device", "type": "device", - "filter": "driver_id=christmas_lights" + "name": "device", + "filter": "driver_id=sirentemphumidsensor" + } + ] + }, + { + "id": "smart_remote_1_button", + "title": { + "en": "Button Action" + }, + "titleFormatted": { + "en": "Button had [[action]]" + }, + "args": [ + { + "type": "device", + "name": "device", + "filter": "driver_id=smart_remote_1_button" }, { + "name": "action", "type": "dropdown", - "name": "effect_name", "title": { - "en": "Effect" + "en": "Button Action" }, "values": [ { - "id": "steady", - "label": { - "en": "Steady" - } - }, - { - "id": "snow", - "label": { - "en": "Snow" - } - }, - { - "id": "rainbow", + "id": "oneClick", "label": { - "en": "Rainbow" + "en": "1 Click" } }, { - "id": "snake", + "id": "twoClicks", "label": { - "en": "Snake" + "en": "2 Clicks" } - }, + } + ] + } + ] + }, + { + "id": "smart_remote_1_button_2", + "title": { + "en": "Button Action" + }, + "titleFormatted": { + "en": "Button had [[action]]" + }, + "args": [ + { + "type": "device", + "name": "device", + "filter": "driver_id=smart_remote_1_button_2" + }, + { + "name": "action", + "type": "dropdown", + "title": { + "en": "Button Action" + }, + "values": [ { - "id": "twinkle", + "id": "oneClick", "label": { - "en": "Twinkle" + "en": "1 Click" } }, { - "id": "firework", + "id": "twoClicks", "label": { - "en": "Firework" + "en": "2 Clicks" } - }, + } + ] + } + ] + }, + { + "id": "smart_remote_4_buttons", + "title": { + "en": "Button Action" + }, + "titleFormatted": { + "en": "The [[action]]" + }, + "args": [ + { + "type": "device", + "name": "device", + "filter": "driver_id=smart_remote_4_buttons" + }, + { + "name": "action", + "type": "dropdown", + "title": { + "en": "Button Action" + }, + "values": [ { - "id": "horizontal_flag", + "id": "leftUp", "label": { - "en": "Horizontal Flag" + "en": "Upper Left Button Pressed" } }, { - "id": "waves", + "id": "rightUp", "label": { - "en": "Waves" + "en": "Upper Right Button Pressed" } }, { - "id": "updown", + "id": "leftDown", "label": { - "en": "Up and Down" + "en": "Lower Left Button Pressed" } }, { - "id": "vintage", + "id": "rightDown", "label": { - "en": "Vintage" + "en": "Lower Right Button Pressed" } - }, + } + ] + } + ] + }, + { + "id": "wall_remote_1_gang_buttons", + "title": { + "en": "Button Action" + }, + "titleFormatted": { + "en": "Button had [[action]]" + }, + "args": [ + { + "type": "device", + "name": "device", + "filter": "driver_id=wall_remote_1_gang" + }, + { + "name": "action", + "type": "dropdown", + "title": { + "en": "Button Action" + }, + "values": [ { - "id": "fading", + "id": "oneClick", "label": { - "en": "Fading" + "en": "1 Click" } }, { - "id": "collide", + "id": "twoClicks", "label": { - "en": "Collide" + "en": "2 Clicks" } - }, + } + ] + } + ] + }, + { + "id": "wall_remote_2_gang_buttons", + "title": { + "en": "Button Action" + }, + "titleFormatted": { + "en": "The [[action]]" + }, + "args": [ + { + "type": "device", + "name": "device", + "filter": "driver_id=wall_remote_2_gang" + }, + { + "name": "action", + "type": "dropdown", + "title": { + "en": "Button Action" + }, + "values": [ { - "id": "strobe", + "id": "left-oneClick", "label": { - "en": "Strobe" + "en": "Left Button: 1 Click" } }, { - "id": "sparkles", + "id": "left-twoClicks", "label": { - "en": "Sparkles" + "en": "Left Button: 2 Clicks" } }, { - "id": "carnaval", + "id": "right-oneClick", "label": { - "en": "Carnaval" + "en": "Right Button: 1 Click" } }, { - "id": "glow", + "id": "right-twoClicks", "label": { - "en": "Glow" + "en": "Right Button: 2 Clicks" } } ] + } + ] + }, + { + "id": "wall_remote_3_gang_buttons", + "title": { + "en": "Button Action" + }, + "titleFormatted": { + "en": "The [[action]]" + }, + "args": [ + { + "type": "device", + "name": "device", + "filter": "driver_id=wall_remote_3_gang" }, { - "type": "range", - "name": "effect_speed", + "name": "action", + "type": "dropdown", "title": { - "en": "Speed" + "en": "Button Action" }, - "label": "/64", - "min": 0, - "max": 64, - "step": 1 - }, - { - "type": "color", - "name": "effect_color_0", - "title": { - "en": "color 0" - } - }, - { - "type": "color", - "name": "effect_color_1", - "title": { - "en": "color 1" - } - }, - { - "type": "color", - "name": "effect_color_2", - "title": { - "en": "color 2" - } - }, - { - "type": "color", - "name": "effect_color_3", - "title": { - "en": "color 3" - } - }, - { - "type": "color", - "name": "effect_color_4", - "title": { - "en": "color 4" - } - }, - { - "type": "color", - "name": "effect_color_5", - "title": { - "en": "color 5" - } - }, - { - "type": "color", - "name": "effect_color_6", - "title": { - "en": "color 6" - } - }, - { - "type": "color", - "name": "effect_color_7", - "title": { - "en": "color 7" - } - }, - { - "type": "color", - "name": "effect_color_8", - "title": { - "en": "color 8" - } - } - ], - "id": "start_effect" - }, - { - "id": "alarm_state", - "title": { - "en": "Change the alarm state", - "nl": "Verander de alarm toestand", - "de": "Ändern des Alarmstatus" - }, - "titleFormatted": { - "en": "Change the alarm state to [[alarm_state]]", - "nl": "Verander de alarm toestand naar [[alarm_state]]", - "de": "Ändern des Alarmstatus zu [[alarm_state]]" - }, - "hint": { - "en": "Change the alarm state; sound or silence the alarm", - "nl": "Verander de alarm toestand; luiden of uitschakelen van het alarm", - "de": "Ändern des Alarmstatus; Ein- oder ausschalten des Alarmtons." - }, - "args": [ - { - "type": "device", - "name": "device", - "filter": "driver_id=sirentemphumidsensor" - }, - { - "name": "alarm_state", - "type": "dropdown", "values": [ { - "id": "off/disable", + "id": "left-oneClick", "label": { - "en": "Silence alarm", - "nl": "Alarm stil", - "de": "Stiller Alarm" + "en": "Left Button: 1 Click" } }, { - "id": "on/enable", + "id": "left-twoClicks", "label": { - "en": "Sound alarm", - "nl": "Alarm luiden", - "de": "Akustischer Alarm" + "en": "Left Button: 2 Clicks" } - } - ] - } - ] - }, - { - "id": "alarm_duration", - "title": { - "en": "Switch on siren for X Seconds", - "de": "Sirene für X Sekunden einschalten", - "nl": "Zet sirene aan voor X seconden" - }, - "titleFormatted": { - "en": "Switch on siren for [[duration]] Seconds", - "de": "Sirene für [[duration]] Sekunden einschalten", - "nl": "Zet sirene aan voor [[duration]] seconden" - }, - "args": [ - { - "type": "device", - "name": "device", - "filter": "driver_id=sirentemphumidsensor" - }, - { - "type": "number", - "name": "duration", - "min": 0, - "max": 65535, - "step": 1, - "label": { - "en": "Seconds", - "de": "Sekunden", - "nl": "Seconden" - }, - "placeholder": { - "en": "120" - }, - "title": { - "en": "Duration of alarm in seconds", - "de": "Dauer des Alarms in Sekunden", - "nl": "Duur van het alarm in seconden" - } - } - ] - }, - { - "id": "siren_volume", - "title": { - "en": "Set volume of siren", - "nl": "Zet het volume van de sirene", - "de": "Einstellen der Lautstärke der Sirene" - }, - "titleFormatted": { - "en": "Set volume of siren to [[siren_volume]]", - "nl": "Zet het volume van de sirene naar [[siren_volume]]", - "de": "Einstellen der Lautstärke der Sirene auf [[siren_volume]]" - }, - "hint": { - "en": "Set volume of siren.", - "nl": "Zet het volume van de sirene.", - "de": "Einstellen der Lautstärke der Sirene" - }, - "args": [ - { - "type": "device", - "name": "device", - "filter": "driver_id=sirentemphumidsensor" - }, - { - "name": "siren_volume", - "type": "dropdown", - "values": [ + }, { - "id": "2", + "id": "right-oneClick", "label": { - "en": "Low", - "nl": "Laag", - "de": "Niedrig" + "en": "Right Button: 1 Click" } }, { - "id": "1", + "id": "right-twoClicks", "label": { - "en": "Midle", - "nl": "Middelmatig", - "de": "Mittel" + "en": "Right Button: 2 Clicks" } }, { - "id": "0", + "id": "center-oneClick", "label": { - "en": "High (default)", - "nl": "Hoog (standaard)", - "de": "Hoch (Standard)" + "en": "Center Button: 1 Click" + } + }, + { + "id": "center-twoClicks", + "label": { + "en": "Center Button: 2 Clicks" } } ] @@ -449,174 +491,194 @@ ] }, { - "id": "alarm_tune", + "id": "wall_remote_4_gang_buttons", "title": { - "en": "Set the alarm tune", - "nl": "Stel de alarm melodie in", - "de": "Einstellen des Alarmtons" + "en": "Button Action" }, "titleFormatted": { - "en": "Set the alarm tune to [[alarm_tune]]", - "nl": "Stel de alarm melodie in op [[alarm_tune]]", - "de": "Einstellen des Alarmtons zu [[alarm_tune]]" - }, - "hint": { - "en": "Choose the tune of the alarm sound", - "nl": "Kies de melodie die gebruikt wordt bij alarm", - "de": "Wähle die Melodie des Alarmtons aus." + "en": "The [[action]]" }, "args": [ { "type": "device", "name": "device", - "filter": "driver_id=sirentemphumidsensor" + "filter": "driver_id=wall_remote_4_gang" }, { - "name": "alarm_tune", + "name": "action", "type": "dropdown", + "title": { + "en": "Button Action" + }, "values": [ { - "id": "0", + "id": "leftUp-oneClick", "label": { - "en": "Doorbell 1", - "nl": "Doorbell 1", - "de": "Doorbell 1" + "en": "Upper Left Button: 1 Click" } }, { - "id": "1", + "id": "leftUp-twoClicks", "label": { - "en": "For Elise (default)", - "nl": "Fur Elise (standaard)", - "de": "Fur Elise (Standard)" + "en": "Upper Left Button: 2 Clicks" } }, { - "id": "2", + "id": "rightUp-oneClick", "label": { - "en": "Westminster", - "nl": "Westminster", - "de": "Westminster" + "en": "Upper Right Button: 1 Click" } }, { - "id": "3", + "id": "rightUp-twoClicks", "label": { - "en": "4 Key Chime", - "nl": "4 Key Chime", - "de": "4 Key Chime" + "en": "Upper Right Button: 2 Clicks" } }, { - "id": "4", + "id": "leftDown-oneClick", "label": { - "en": "William Tell", - "nl": "William Tell", - "de": "William Tell" + "en": "Lower Left Button: 1 Click" } }, { - "id": "5", + "id": "leftDown-twoClicks", "label": { - "en": "Mozart Piano", - "nl": "Mozart Piano", - "de": "Mozart Piano" + "en": "Lower Left Button: 2 Clicks" } }, { - "id": "6", + "id": "rightDown-oneClick", "label": { - "en": "Space Alarm", - "nl": "Space Alarm", - "de": "Space Alarm" + "en": "Lower Right Button: 1 Click" } }, { - "id": "7", + "id": "rightDown-twoClicks", "label": { - "en": "Klaxon", - "nl": "Klaxon", - "de": "Klaxon" + "en": "Lower Right Button: 2 Clicks" + } + } + ] + } + ] + }, + { + "id": "wall_remote_4_gang_buttons_2", + "title": { + "en": "Button" + }, + "titleFormatted": { + "en": "The [[button]]" + }, + "args": [ + { + "type": "device", + "name": "device", + "filter": "driver_id=wall_remote_4_gang_2" + }, + { + "name": "button", + "type": "dropdown", + "title": { + "en": "Button Pressed" + }, + "values": [ + { + "id": "leftUp", + "label": { + "en": "Upper Left Button Pressed" } }, { - "id": "8", + "id": "rightUp", "label": { - "en": "Meep meep", - "nl": "Meep meep", - "de": "Meep meep" + "en": "Upper Right Button Pressed" } }, { - "id": "9", + "id": "leftDown", "label": { - "en": "Wheep", - "nl": "Wheep", - "de": "Wheep" + "en": "Lower Left Button Pressed" } }, { - "id": "10", + "id": "rightDown", "label": { - "en": "Barking dog", - "nl": "Barking dog", - "de": "Barking dog" + "en": "Lower Right Button Pressed" + } + } + ] + } + ] + }, + { + "id": "wall_remote_4_gang_buttons_3", + "title": { + "en": "Button Action" + }, + "titleFormatted": { + "en": "The [[action]]" + }, + "args": [ + { + "type": "device", + "name": "device", + "filter": "driver_id=wall_remote_4_gang_3" + }, + { + "name": "action", + "type": "dropdown", + "title": { + "en": "Button Action" + }, + "values": [ + { + "id": "leftUp-oneClick", + "label": { + "en": "Upper Left Button: 1 Click" } }, { - "id": "11", + "id": "leftUp-twoClicks", "label": { - "en": "Alarm Siren", - "nl": "Alarm Siren", - "de": "Alarm Siren" + "en": "Upper Left Button: 2 Clicks" } }, { - "id": "12", + "id": "rightUp-oneClick", "label": { - "en": "Doorbell 2", - "nl": "Doorbell 2", - "de": "Doorbell 2" + "en": "Upper Right Button: 1 Click" } }, { - "id": "13", + "id": "rightUp-twoClicks", "label": { - "en": "Old Phone", - "nl": "Old Phone", - "de": "Old Phone" + "en": "Upper Right Button: 2 Clicks" } }, { - "id": "14", + "id": "leftDown-oneClick", "label": { - "en": "Police Siren", - "nl": "Police Siren", - "de": "Police Siren" + "en": "Lower Left Button: 1 Click" } }, { - "id": "15", + "id": "leftDown-twoClicks", "label": { - "en": "Evacuation bell", - "nl": "Evacuation bell", - "de": "Evacuation bell" + "en": "Lower Left Button: 2 Clicks" } }, { - "id": "16", + "id": "rightDown-oneClick", "label": { - "en": "Clock alarm", - "nl": "Clock alarm", - "de": "Clock alarm" + "en": "Lower Right Button: 1 Click" } }, { - "id": "17", + "id": "rightDown-twoClicks", "label": { - "en": "Fire alarm", - "nl": "Fire alarm", - "de": "Fire alarm" + "en": "Lower Right Button: 2 Clicks" } } ] @@ -624,186 +686,305 @@ ] } ], - "triggers": [ + "conditions": [ { - "id": "alarm_siren", "title": { - "en": "Siren Alarm", - "nl": "Sirene Alarm", - "de": "Sirenenalarm" - }, - "titleFormatted": { - "en": "Siren Alarm", - "nl": "Sirene Alarm", - "de": "Sirenenalarm" - }, - "hint": { - "en": "This card will trigger when siren is activated.", - "nl": "Deze kaart wordt alleen geactiveerd wanneer de sirene actief is.", - "de": "Diese Karte wird ausgelöst, wenn die Sirene aktiviert wird." + "en": "The breath alarm is !{{on|off}}", + "nl": "Het adem alarm is !{{aan|uit}}", + "de": "Der Atem-Alarm ist !{{an|aus}}", + "fr": "L'alarme respiratoire est !{{en marche|arrêtée}}", + "it": "L'allarme di respiro è !{{acceso|spento}}", + "sv": "Andningslarmet är !{{på|av}}", + "no": "Åndedrettsalarmen er !{{på|av}}", + "es": "La alarma de respiración está !{{activada|desactivada}}", + "da": "Åndedrætsalarmen er !{{tændt|slukket}}", + "ru": "Сигнал дыхания !{{вкл.|выкл.}}", + "pl": "Czujnik oddechu !{{włączony|wyłączony}}" + }, + "id": "the-breath-alarm-is-onoff" + }, + { + "title": { + "en": "The Large Presence alarm is !{{on|off}}", + "nl": "De grote Aanwezigheid alarm is !{{aan|uit}}", + "de": "Der große Präsenz Alarm ist !{{an|aus}}", + "fr": "L'alarme Grande Présence est !{{en marche|arrêtée}}", + "it": "L'allarme Presenza Ampia è !{{acceso|spento}}", + "sv": "Stor Närvaro larm är !{{på|av}}", + "no": "Stor Nærvær alarm er !{{på|av}}", + "es": "La alarma de Presencia Grande está !{{activada|desactivada}}", + "da": "Stor Nærvær alarm er !{{tændt|slukket}}", + "ru": "Большой сигнал Присутствие !{{вкл.|выкл.}}", + "pl": "Duży czujnik Obecność !{{włączony|wyłączony}}" + }, + "id": "the-large-presence-alarm-is-onoff" + }, + { + "title": { + "en": "The Small Presence alarm is !{{on|off}}", + "nl": "De kleine Aanwezigheid alarm is !{{aan|uit}}", + "de": "Der kleine Präsenz Alarm ist !{{an|aus}}", + "fr": "L'alarme Petite Présence est !{{en marche|arrêtée}}", + "it": "L'allarme Presenza Piccola è !{{acceso|spento}}", + "sv": "Liten Närvaro larm är !{{på|av}}", + "no": "Liten Nærvær alarm er !{{på|av}}", + "es": "La alarma de Pequeña Presencia está !{{activada|desactivada}}", + "da": "Lille Nærvær alarm er !{{tændt|slukket}}", + "ru": "Маленький сигнал Присутствие !{{вкл.|выкл.}}", + "pl": "Mały czujnik Obecność !{{włączony|wyłączony}}" + }, + "id": "the-small-presence-alarm-is-onoff" + } + ], + "actions": [ + { + "id": "resetEnergyMeter", + "title": { + "en": "Reset Energy Meter", + "sv": "Återställ energimätaren" }, - "args": [ - { - "type": "device", - "name": "device", - "filter": "driver_id=sirentemphumidsensor" - } - ] + "args": [], + "callback": "resetEnergyMeter" }, { - "id": "smart_remote_1_button", "title": { - "en": "Button Action" + "en": "Start effect" }, "titleFormatted": { - "en": "Button had [[action]]" + "en": "Effect is [[effect_name]] with speed [[effect_speed]] and color(s) [[effect_color_0]], [[effect_color_1]], [[effect_color_2]], [[effect_color_3]], [[effect_color_4]], [[effect_color_5]], [[effect_color_6]], [[effect_color_7]], [[effect_color_8]]" + }, + "hint": { + "en": "Choose a light pattern and a speed for it. You can also choose what colors the pattern should have, this is not mandatory." }, "args": [ { + "name": "christmas_lights_device", "type": "device", - "name": "device", - "filter": "driver_id=smart_remote_1_button" + "filter": "driver_id=christmas_lights" }, { - "name": "action", "type": "dropdown", + "name": "effect_name", "title": { - "en": "Button Action" + "en": "Effect" }, "values": [ { - "id": "oneClick", + "id": "steady", + "label": { + "en": "Steady" + } + }, + { + "id": "snow", + "label": { + "en": "Snow" + } + }, + { + "id": "rainbow", + "label": { + "en": "Rainbow" + } + }, + { + "id": "snake", + "label": { + "en": "Snake" + } + }, + { + "id": "twinkle", + "label": { + "en": "Twinkle" + } + }, + { + "id": "firework", + "label": { + "en": "Firework" + } + }, + { + "id": "horizontal_flag", + "label": { + "en": "Horizontal Flag" + } + }, + { + "id": "waves", + "label": { + "en": "Waves" + } + }, + { + "id": "updown", "label": { - "en": "1 Click" + "en": "Up and Down" } }, { - "id": "twoClicks", + "id": "vintage", "label": { - "en": "2 Clicks" + "en": "Vintage" } - } - ] - } - ] - }, - { - "id": "smart_remote_1_button_2", - "title": { - "en": "Button Action" - }, - "titleFormatted": { - "en": "Button had [[action]]" - }, - "args": [ - { - "type": "device", - "name": "device", - "filter": "driver_id=smart_remote_1_button_2" - }, - { - "name": "action", - "type": "dropdown", - "title": { - "en": "Button Action" - }, - "values": [ + }, { - "id": "oneClick", + "id": "fading", "label": { - "en": "1 Click" + "en": "Fading" } }, { - "id": "twoClicks", + "id": "collide", "label": { - "en": "2 Clicks" + "en": "Collide" } - } - ] - } - ] - }, - { - "id": "smart_remote_4_buttons", - "title": { - "en": "Button Action" - }, - "titleFormatted": { - "en": "The [[action]]" - }, - "args": [ - { - "type": "device", - "name": "device", - "filter": "driver_id=smart_remote_4_buttons" - }, - { - "name": "action", - "type": "dropdown", - "title": { - "en": "Button Action" - }, - "values": [ + }, { - "id": "leftUp", + "id": "strobe", "label": { - "en": "Upper Left Button Pressed" + "en": "Strobe" } }, { - "id": "rightUp", + "id": "sparkles", "label": { - "en": "Upper Right Button Pressed" + "en": "Sparkles" } }, { - "id": "leftDown", + "id": "carnaval", "label": { - "en": "Lower Left Button Pressed" + "en": "Carnaval" } }, { - "id": "rightDown", + "id": "glow", "label": { - "en": "Lower Right Button Pressed" + "en": "Glow" } } ] + }, + { + "type": "range", + "name": "effect_speed", + "title": { + "en": "Speed" + }, + "label": "/64", + "min": 0, + "max": 64, + "step": 1 + }, + { + "type": "color", + "name": "effect_color_0", + "title": { + "en": "color 0" + } + }, + { + "type": "color", + "name": "effect_color_1", + "title": { + "en": "color 1" + } + }, + { + "type": "color", + "name": "effect_color_2", + "title": { + "en": "color 2" + } + }, + { + "type": "color", + "name": "effect_color_3", + "title": { + "en": "color 3" + } + }, + { + "type": "color", + "name": "effect_color_4", + "title": { + "en": "color 4" + } + }, + { + "type": "color", + "name": "effect_color_5", + "title": { + "en": "color 5" + } + }, + { + "type": "color", + "name": "effect_color_6", + "title": { + "en": "color 6" + } + }, + { + "type": "color", + "name": "effect_color_7", + "title": { + "en": "color 7" + } + }, + { + "type": "color", + "name": "effect_color_8", + "title": { + "en": "color 8" + } } - ] + ], + "id": "start_effect" }, { - "id": "wall_remote_1_gang_buttons", + "id": "alarm_state", "title": { - "en": "Button Action" + "en": "Change the alarm state", + "nl": "Verander de alarm toestand", + "de": "Ändern des Alarmstatus" }, "titleFormatted": { - "en": "Button had [[action]]" + "en": "Change the alarm state to [[alarm_state]]", + "nl": "Verander de alarm toestand naar [[alarm_state]]", + "de": "Ändern des Alarmstatus zu [[alarm_state]]" + }, + "hint": { + "en": "Change the alarm state; sound or silence the alarm", + "nl": "Verander de alarm toestand; luiden of uitschakelen van het alarm", + "de": "Ändern des Alarmstatus; Ein- oder ausschalten des Alarmtons." }, "args": [ { "type": "device", "name": "device", - "filter": "driver_id=wall_remote_1_gang" + "filter": "driver_id=sirentemphumidsensor" }, { - "name": "action", + "name": "alarm_state", "type": "dropdown", - "title": { - "en": "Button Action" - }, "values": [ { - "id": "oneClick", + "id": "off/disable", "label": { - "en": "1 Click" + "en": "Silence alarm", + "nl": "Alarm stil", + "de": "Stiller Alarm" } }, { - "id": "twoClicks", + "id": "on/enable", "label": { - "en": "2 Clicks" + "en": "Sound alarm", + "nl": "Alarm luiden", + "de": "Akustischer Alarm" } } ] @@ -811,109 +992,94 @@ ] }, { - "id": "wall_remote_2_gang_buttons", + "id": "alarm_duration", "title": { - "en": "Button Action" + "en": "Switch on siren for X Seconds", + "de": "Sirene für X Sekunden einschalten", + "nl": "Zet sirene aan voor X seconden" }, "titleFormatted": { - "en": "The [[action]]" + "en": "Switch on siren for [[duration]] Seconds", + "de": "Sirene für [[duration]] Sekunden einschalten", + "nl": "Zet sirene aan voor [[duration]] seconden" }, "args": [ { "type": "device", "name": "device", - "filter": "driver_id=wall_remote_2_gang" + "filter": "driver_id=sirentemphumidsensor" }, { - "name": "action", - "type": "dropdown", - "title": { - "en": "Button Action" + "type": "number", + "name": "duration", + "min": 0, + "max": 65535, + "step": 1, + "label": { + "en": "Seconds", + "de": "Sekunden", + "nl": "Seconden" }, - "values": [ - { - "id": "left-oneClick", - "label": { - "en": "Left Button: 1 Click" - } - }, - { - "id": "left-twoClicks", - "label": { - "en": "Left Button: 2 Clicks" - } - }, - { - "id": "right-oneClick", - "label": { - "en": "Right Button: 1 Click" - } - }, - { - "id": "right-twoClicks", - "label": { - "en": "Right Button: 2 Clicks" - } - } - ] + "placeholder": { + "en": "120" + }, + "title": { + "en": "Duration of alarm in seconds", + "de": "Dauer des Alarms in Sekunden", + "nl": "Duur van het alarm in seconden" + } } ] }, { - "id": "wall_remote_3_gang_buttons", + "id": "siren_volume", "title": { - "en": "Button Action" + "en": "Set volume of siren", + "nl": "Zet het volume van de sirene", + "de": "Einstellen der Lautstärke der Sirene" }, "titleFormatted": { - "en": "The [[action]]" + "en": "Set volume of siren to [[siren_volume]]", + "nl": "Zet het volume van de sirene naar [[siren_volume]]", + "de": "Einstellen der Lautstärke der Sirene auf [[siren_volume]]" + }, + "hint": { + "en": "Set volume of siren.", + "nl": "Zet het volume van de sirene.", + "de": "Einstellen der Lautstärke der Sirene" }, "args": [ { "type": "device", "name": "device", - "filter": "driver_id=wall_remote_3_gang" + "filter": "driver_id=sirentemphumidsensor" }, { - "name": "action", + "name": "siren_volume", "type": "dropdown", - "title": { - "en": "Button Action" - }, "values": [ { - "id": "left-oneClick", - "label": { - "en": "Left Button: 1 Click" - } - }, - { - "id": "left-twoClicks", - "label": { - "en": "Left Button: 2 Clicks" - } - }, - { - "id": "right-oneClick", - "label": { - "en": "Right Button: 1 Click" - } - }, - { - "id": "right-twoClicks", + "id": "2", "label": { - "en": "Right Button: 2 Clicks" + "en": "Low", + "nl": "Laag", + "de": "Niedrig" } }, { - "id": "center-oneClick", + "id": "1", "label": { - "en": "Center Button: 1 Click" + "en": "Midle", + "nl": "Middelmatig", + "de": "Mittel" } }, { - "id": "center-twoClicks", + "id": "0", "label": { - "en": "Center Button: 2 Clicks" + "en": "High (default)", + "nl": "Hoog (standaard)", + "de": "Hoch (Standard)" } } ] @@ -921,194 +1087,174 @@ ] }, { - "id": "wall_remote_4_gang_buttons", + "id": "alarm_tune", "title": { - "en": "Button Action" + "en": "Set the alarm tune", + "nl": "Stel de alarm melodie in", + "de": "Einstellen des Alarmtons" }, "titleFormatted": { - "en": "The [[action]]" + "en": "Set the alarm tune to [[alarm_tune]]", + "nl": "Stel de alarm melodie in op [[alarm_tune]]", + "de": "Einstellen des Alarmtons zu [[alarm_tune]]" + }, + "hint": { + "en": "Choose the tune of the alarm sound", + "nl": "Kies de melodie die gebruikt wordt bij alarm", + "de": "Wähle die Melodie des Alarmtons aus." }, "args": [ { "type": "device", "name": "device", - "filter": "driver_id=wall_remote_4_gang" + "filter": "driver_id=sirentemphumidsensor" }, { - "name": "action", + "name": "alarm_tune", "type": "dropdown", - "title": { - "en": "Button Action" - }, "values": [ { - "id": "leftUp-oneClick", + "id": "0", "label": { - "en": "Upper Left Button: 1 Click" + "en": "Doorbell 1", + "nl": "Doorbell 1", + "de": "Doorbell 1" } }, { - "id": "leftUp-twoClicks", + "id": "1", "label": { - "en": "Upper Left Button: 2 Clicks" + "en": "For Elise (default)", + "nl": "Fur Elise (standaard)", + "de": "Fur Elise (Standard)" } }, { - "id": "rightUp-oneClick", + "id": "2", "label": { - "en": "Upper Right Button: 1 Click" + "en": "Westminster", + "nl": "Westminster", + "de": "Westminster" } }, { - "id": "rightUp-twoClicks", + "id": "3", "label": { - "en": "Upper Right Button: 2 Clicks" + "en": "4 Key Chime", + "nl": "4 Key Chime", + "de": "4 Key Chime" } }, { - "id": "leftDown-oneClick", + "id": "4", "label": { - "en": "Lower Left Button: 1 Click" + "en": "William Tell", + "nl": "William Tell", + "de": "William Tell" } }, { - "id": "leftDown-twoClicks", + "id": "5", "label": { - "en": "Lower Left Button: 2 Clicks" + "en": "Mozart Piano", + "nl": "Mozart Piano", + "de": "Mozart Piano" } }, { - "id": "rightDown-oneClick", + "id": "6", "label": { - "en": "Lower Right Button: 1 Click" + "en": "Space Alarm", + "nl": "Space Alarm", + "de": "Space Alarm" } }, { - "id": "rightDown-twoClicks", - "label": { - "en": "Lower Right Button: 2 Clicks" - } - } - ] - } - ] - }, - { - "id": "wall_remote_4_gang_buttons_2", - "title": { - "en": "Button" - }, - "titleFormatted": { - "en": "The [[button]]" - }, - "args": [ - { - "type": "device", - "name": "device", - "filter": "driver_id=wall_remote_4_gang_2" - }, - { - "name": "button", - "type": "dropdown", - "title": { - "en": "Button Pressed" - }, - "values": [ - { - "id": "leftUp", + "id": "7", "label": { - "en": "Upper Left Button Pressed" + "en": "Klaxon", + "nl": "Klaxon", + "de": "Klaxon" } }, { - "id": "rightUp", + "id": "8", "label": { - "en": "Upper Right Button Pressed" + "en": "Meep meep", + "nl": "Meep meep", + "de": "Meep meep" } }, { - "id": "leftDown", + "id": "9", "label": { - "en": "Lower Left Button Pressed" + "en": "Wheep", + "nl": "Wheep", + "de": "Wheep" } }, { - "id": "rightDown", - "label": { - "en": "Lower Right Button Pressed" - } - } - ] - } - ] - }, - { - "id": "wall_remote_4_gang_buttons_3", - "title": { - "en": "Button Action" - }, - "titleFormatted": { - "en": "The [[action]]" - }, - "args": [ - { - "type": "device", - "name": "device", - "filter": "driver_id=wall_remote_4_gang_3" - }, - { - "name": "action", - "type": "dropdown", - "title": { - "en": "Button Action" - }, - "values": [ - { - "id": "leftUp-oneClick", + "id": "10", "label": { - "en": "Upper Left Button: 1 Click" + "en": "Barking dog", + "nl": "Barking dog", + "de": "Barking dog" } }, { - "id": "leftUp-twoClicks", + "id": "11", "label": { - "en": "Upper Left Button: 2 Clicks" + "en": "Alarm Siren", + "nl": "Alarm Siren", + "de": "Alarm Siren" } }, { - "id": "rightUp-oneClick", + "id": "12", "label": { - "en": "Upper Right Button: 1 Click" + "en": "Doorbell 2", + "nl": "Doorbell 2", + "de": "Doorbell 2" } }, { - "id": "rightUp-twoClicks", + "id": "13", "label": { - "en": "Upper Right Button: 2 Clicks" + "en": "Old Phone", + "nl": "Old Phone", + "de": "Old Phone" } }, { - "id": "leftDown-oneClick", + "id": "14", "label": { - "en": "Lower Left Button: 1 Click" + "en": "Police Siren", + "nl": "Police Siren", + "de": "Police Siren" } }, { - "id": "leftDown-twoClicks", + "id": "15", "label": { - "en": "Lower Left Button: 2 Clicks" + "en": "Evacuation bell", + "nl": "Evacuation bell", + "de": "Evacuation bell" } }, { - "id": "rightDown-oneClick", + "id": "16", "label": { - "en": "Lower Right Button: 1 Click" + "en": "Clock alarm", + "nl": "Clock alarm", + "de": "Clock alarm" } }, { - "id": "rightDown-twoClicks", + "id": "17", "label": { - "en": "Lower Right Button: 2 Clicks" + "en": "Fire alarm", + "nl": "Fire alarm", + "de": "Fire alarm" } } ] @@ -3020,12 +3166,10 @@ "_TZE201_ztc6ggyl", "_TZE202_ztc6ggyl", "_TZE203_ztc6ggyl", - "_TZE204_ztc6ggyl", - "_TZE200_2aaelwxk" + "_TZE204_ztc6ggyl" ], "productId": [ - "TS0601", - "TS0225" + "TS0601" ], "endpoints": { "1": { @@ -3142,8 +3286,7 @@ "alarm_motion", "alarm_small_presence", "alarm_large_presence", - "alarm_breathe_presence", - "target_distance" + "alarm_breathe_presence" ], "images": { "large": "/drivers/radar_sensor_2/assets/images/large.png", diff --git a/drivers/radar_sensor_2/device.js b/drivers/radar_sensor_2/device.js index f4f4d618..63f8f9a0 100644 --- a/drivers/radar_sensor_2/device.js +++ b/drivers/radar_sensor_2/device.js @@ -99,8 +99,8 @@ Cluster.addCluster(TuyaSpecificCluster); // } // } -const setDeviceDatapoints = (fingerprint) => { - switch (fingerprint) { +const setDeviceDatapoints = (manufacturerName) => { + switch (manufacturerName) { case "_TZE200_2aaelwxk": return { presence: 1, // [0/1] @@ -171,6 +171,42 @@ const convertMultiByteNumberPayloadToSingleDecimalNumber = (chunks) => { return value; }; +const convertDecimalValueTo4ByteHexArray = (value) => { + const hexValue = Number(value).toString(16).padStart(8, "0"); + const chunk1 = hexValue.substring(0, 2); + const chunk2 = hexValue.substring(2, 4); + const chunk3 = hexValue.substring(4, 6); + const chunk4 = hexValue.substring(6); + return [chunk1, chunk2, chunk3, chunk4].map((hexVal) => parseInt(hexVal, 16)); +}; + +const convertDecimalValueTo2ByteHexArray = (value) => { + const hexValue = Number(value).toString(16).padStart(4, "0"); + const chunk1 = hexValue.substring(0, 2); + const chunk2 = hexValue.substring(2); + return [chunk1, chunk2].map((hexVal) => parseInt(hexVal, 16)); +}; + +const decimalToBuffer = (decimalValue) => { + // Determine the byte length needed for the decimal value + let byteLength = 1; + while (decimalValue >> (8 * byteLength) > 0) { + byteLength++; + } + + // Create a new buffer with the determined byte length + const buffer = Buffer.alloc(byteLength); + + // Write the decimal value to the buffer based on the byte length + for (let i = 0; i < byteLength; i++) { + const byte = decimalValue & 0xff; // Get the lowest byte + buffer.writeUInt8(byte, i); + decimalValue >>= 8; // Shift right by 8 bits to get the next byte + } + + return buffer; +}; + const getDataValue = (dpValue) => { switch (dpValue.datatype) { case dataTypes.raw: @@ -194,13 +230,50 @@ const getDataValue = (dpValue) => { class radarSensor extends TuyaSpecificClusterDevice { async onNodeInit({ zclNode }) { - this.fingerprint = this.getSetting("zb_manufacturer_name"); + this.manufacturerName = this.getSetting("zb_manufacturer_name"); - this.dataPoints = setDeviceDatapoints(this.fingerprint); + this.dataPoints = setDeviceDatapoints(this.manufacturerName); - this.printNode(); + const breathAlarmOffTrigger = this.homey.flow.getTriggerCard( + "the-breath-alarm-turned-off" + ); + const breathAlarmOnTrigger = this.homey.flow.getTriggerCard( + "the-breath-alarm-turned-on" + ); + const smallAlarmOffTrigger = this.homey.flow.getTriggerCard( + "the-small-presence-alarm-turned-off" + ); + const smallAlarmOnTrigger = this.homey.flow.getTriggerCard( + "the-small-presence-alarm-turned-on" + ); + const largeAlarmOffTrigger = this.homey.flow.getTriggerCard( + "the-large-presence-alarm-turned-off" + ); + const largeAlarmOnTrigger = this.homey.flow.getTriggerCard( + "the-large-presence-alarm-turned-on" + ); + + const breathCondition = this.homey.flow.getConditionCard( + "the-breath-alarm-is-onoff" + ); + const smallCondition = this.homey.flow.getConditionCard( + "the-small-presence-alarm-is-onoff" + ); + const largeCondition = this.homey.flow.getConditionCard( + "the-small-presence-alarm-is-onoff" + ); - + breathCondition.registerRunListener(async (args, state) => { + return this.getCapabilityValue("alarm_breathe_presence"); + }); + smallCondition.registerRunListener(async (args, state) => { + return this.getCapabilityValue("alarm_small_presence"); + }); + largeCondition.registerRunListener(async (args, state) => { + return this.getCapabilityValue("alarm_large_presence"); + }); + + this.printNode(); await zclNode.endpoints[1].clusters.basic .readAttributes( @@ -212,8 +285,8 @@ class radarSensor extends TuyaSpecificClusterDevice { "modelId", "powerSource", "deviceEnabled", - "swBuildId" - // "attributeReportingStatus", + "swBuildId", + "attributeReportingStatus" ) .catch((err) => { this.error("Error when reading device attributes ", err); @@ -235,6 +308,14 @@ class radarSensor extends TuyaSpecificClusterDevice { // "attr.measuredValue", // this.onIlluminanceMeasuredAttributeReport.bind(this) // ); + + zclNode.endpoints[1].clusters[CLUSTER.IDENTIFY.NAME].on( + "attr.identifyTime", + + (e) => { + this.log("Identify Time: ", e); + } + ); } processReporting(data) { @@ -246,7 +327,7 @@ class radarSensor extends TuyaSpecificClusterDevice { } async updatePosition(data) { - this.log("########### UPDATE POSITION: ", data); + this.log("########### UPDATE POSITION: ", data); const dp = data.dp; const value = getDataValue(data); @@ -267,24 +348,38 @@ class radarSensor extends TuyaSpecificClusterDevice { this.setCapabilityValue("alarm_small_presence", false); this.setCapabilityValue("alarm_large_presence", false); this.setCapabilityValue("alarm_breathe_presence", false); + breathAlarmOffTrigger.trigger(); + smallAlarmOffTrigger.trigger(); + largeAlarmOffTrigger.trigger(); + break; case 1: this.log("Large"); this.setCapabilityValue("alarm_small_presence", false); this.setCapabilityValue("alarm_large_presence", true); this.setCapabilityValue("alarm_breathe_presence", false); + breathAlarmOffTrigger.trigger(); + smallAlarmOffTrigger.trigger(); + largeAlarmOnTrigger.trigger(); break; case 2: this.log("Small"); this.setCapabilityValue("alarm_small_presence", true); this.setCapabilityValue("alarm_large_presence", false); this.setCapabilityValue("alarm_breathe_presence", false); + + breathAlarmOffTrigger.trigger(); + smallAlarmOnTrigger.trigger(); + largeAlarmOffTrigger.trigger(); break; case 3: this.log("Breathe"); this.setCapabilityValue("alarm_small_presence", false); this.setCapabilityValue("alarm_large_presence", false); this.setCapabilityValue("alarm_breathe_presence", true); + breathAlarmOnTrigger.trigger(); + smallAlarmOffTrigger.trigger(); + largeAlarmOffTrigger.trigger(); break; } break; @@ -339,14 +434,14 @@ class radarSensor extends TuyaSpecificClusterDevice { async onSettings({ oldSettings, newSettings, changedKeys }) { // - changedKeys.forEach((updatedSetting) => { - this.log( - "########### Updated setting: ", - updatedSetting, - " => ", - newSettings[updatedSetting] - ); - }); + changedKeys.forEach((updatedSetting) => { + this.log( + "########### Updated setting: ", + updatedSetting, + " => ", + newSettings[updatedSetting] + ); + }); if (changedKeys.includes("motion_detection_sensitivity")) { this.writeData32( @@ -776,4 +871,4 @@ module.exports = radarSensor; // } // } // } -// } \ No newline at end of file +// } diff --git a/drivers/radar_sensor_2/driver.compose.json b/drivers/radar_sensor_2/driver.compose.json index 6f596713..21022d6f 100644 --- a/drivers/radar_sensor_2/driver.compose.json +++ b/drivers/radar_sensor_2/driver.compose.json @@ -29,7 +29,7 @@ "endpoints": { "1": { "clusters": [ - 0, + 0, 3, 1280, 57346, From 6ebefc16e731ea7b6030c5f95dbae60e27db8099 Mon Sep 17 00:00:00 2001 From: Eelco Date: Mon, 4 Dec 2023 22:21:35 +0100 Subject: [PATCH 11/22] scope issue --- drivers/radar_sensor_2/device.js | 53 ++++++++++++++++---------------- 1 file changed, 27 insertions(+), 26 deletions(-) diff --git a/drivers/radar_sensor_2/device.js b/drivers/radar_sensor_2/device.js index 63f8f9a0..d9cf456f 100644 --- a/drivers/radar_sensor_2/device.js +++ b/drivers/radar_sensor_2/device.js @@ -234,47 +234,48 @@ class radarSensor extends TuyaSpecificClusterDevice { this.dataPoints = setDeviceDatapoints(this.manufacturerName); - const breathAlarmOffTrigger = this.homey.flow.getTriggerCard( + this.printNode(); + + this.breathAlarmOffTrigger = this.homey.flow.getTriggerCard( "the-breath-alarm-turned-off" ); - const breathAlarmOnTrigger = this.homey.flow.getTriggerCard( + this.breathAlarmOnTrigger = this.homey.flow.getTriggerCard( "the-breath-alarm-turned-on" ); - const smallAlarmOffTrigger = this.homey.flow.getTriggerCard( + this.smallAlarmOffTrigger = this.homey.flow.getTriggerCard( "the-small-presence-alarm-turned-off" ); - const smallAlarmOnTrigger = this.homey.flow.getTriggerCard( + this.smallAlarmOnTrigger = this.homey.flow.getTriggerCard( "the-small-presence-alarm-turned-on" ); - const largeAlarmOffTrigger = this.homey.flow.getTriggerCard( + this.largeAlarmOffTrigger = this.homey.flow.getTriggerCard( "the-large-presence-alarm-turned-off" ); - const largeAlarmOnTrigger = this.homey.flow.getTriggerCard( + this.largeAlarmOnTrigger = this.homey.flow.getTriggerCard( "the-large-presence-alarm-turned-on" ); - const breathCondition = this.homey.flow.getConditionCard( + this.breathCondition = this.homey.flow.getConditionCard( "the-breath-alarm-is-onoff" ); - const smallCondition = this.homey.flow.getConditionCard( + this.smallCondition = this.homey.flow.getConditionCard( "the-small-presence-alarm-is-onoff" ); - const largeCondition = this.homey.flow.getConditionCard( + this.largeCondition = this.homey.flow.getConditionCard( "the-small-presence-alarm-is-onoff" ); - breathCondition.registerRunListener(async (args, state) => { + this.breathCondition.registerRunListener(async (args, state) => { return this.getCapabilityValue("alarm_breathe_presence"); }); - smallCondition.registerRunListener(async (args, state) => { + this.smallCondition.registerRunListener(async (args, state) => { return this.getCapabilityValue("alarm_small_presence"); }); - largeCondition.registerRunListener(async (args, state) => { + this.largeCondition.registerRunListener(async (args, state) => { return this.getCapabilityValue("alarm_large_presence"); }); - this.printNode(); - + await zclNode.endpoints[1].clusters.basic .readAttributes( "zclVersion", @@ -348,9 +349,9 @@ class radarSensor extends TuyaSpecificClusterDevice { this.setCapabilityValue("alarm_small_presence", false); this.setCapabilityValue("alarm_large_presence", false); this.setCapabilityValue("alarm_breathe_presence", false); - breathAlarmOffTrigger.trigger(); - smallAlarmOffTrigger.trigger(); - largeAlarmOffTrigger.trigger(); + this.breathAlarmOffTrigger.trigger(); + this.smallAlarmOffTrigger.trigger(); + this.largeAlarmOffTrigger.trigger(); break; case 1: @@ -358,9 +359,9 @@ class radarSensor extends TuyaSpecificClusterDevice { this.setCapabilityValue("alarm_small_presence", false); this.setCapabilityValue("alarm_large_presence", true); this.setCapabilityValue("alarm_breathe_presence", false); - breathAlarmOffTrigger.trigger(); - smallAlarmOffTrigger.trigger(); - largeAlarmOnTrigger.trigger(); + this.breathAlarmOffTrigger.trigger(); + this.smallAlarmOffTrigger.trigger(); + this.largeAlarmOnTrigger.trigger(); break; case 2: this.log("Small"); @@ -368,18 +369,18 @@ class radarSensor extends TuyaSpecificClusterDevice { this.setCapabilityValue("alarm_large_presence", false); this.setCapabilityValue("alarm_breathe_presence", false); - breathAlarmOffTrigger.trigger(); - smallAlarmOnTrigger.trigger(); - largeAlarmOffTrigger.trigger(); + this.breathAlarmOffTrigger.trigger(); + this.smallAlarmOnTrigger.trigger(); + this.largeAlarmOffTrigger.trigger(); break; case 3: this.log("Breathe"); this.setCapabilityValue("alarm_small_presence", false); this.setCapabilityValue("alarm_large_presence", false); this.setCapabilityValue("alarm_breathe_presence", true); - breathAlarmOnTrigger.trigger(); - smallAlarmOffTrigger.trigger(); - largeAlarmOffTrigger.trigger(); + this.breathAlarmOnTrigger.trigger(); + this.smallAlarmOffTrigger.trigger(); + this.largeAlarmOffTrigger.trigger(); break; } break; From 2ef3bda703d942efe75042c570b2d702d7f97934 Mon Sep 17 00:00:00 2001 From: Eelco Date: Thu, 2 May 2024 16:37:54 +0200 Subject: [PATCH 12/22] added first working version of ZY-M100-24G _TZE204_7gclukjs --- .../capabilities/target_distance.json | 7 +- app.json | 15 +- .../radar_sensor/assets/images/measure.svg | 62 ++++++ drivers/radar_sensor/device.js | 176 +++++++++++++----- drivers/radar_sensor/driver.compose.json | 3 +- drivers/radar_sensor_2/device.js | 6 +- drivers/radar_sensor_2/driver.compose.json | 4 +- lib/TuyaSpecificClusterDevice.js | 175 ++++++++++------- 8 files changed, 320 insertions(+), 128 deletions(-) create mode 100644 drivers/radar_sensor/assets/images/measure.svg diff --git a/.homeycompose/capabilities/target_distance.json b/.homeycompose/capabilities/target_distance.json index 46909532..f11a0443 100644 --- a/.homeycompose/capabilities/target_distance.json +++ b/.homeycompose/capabilities/target_distance.json @@ -1,8 +1,13 @@ { "type": "number", "title": { "en": "Target distance", "nl": "Afstand doel" }, - "uiComponent": null, + "uiComponent": "sensor", "getable": true, "setable": false, + "insights": true, + "options": { + "zoneActivity": true + }, + "icon": "/drivers/radar_sensor/assets/images/measure.svg", "units": { "en": "m", "nl": "m" } } diff --git a/app.json b/app.json index 677e198b..0b162944 100644 --- a/app.json +++ b/app.json @@ -3166,7 +3166,8 @@ "_TZE201_ztc6ggyl", "_TZE202_ztc6ggyl", "_TZE203_ztc6ggyl", - "_TZE204_ztc6ggyl" + "_TZE204_ztc6ggyl", + "_TZE204_7gclukjs" ], "productId": [ "TS0601" @@ -3316,7 +3317,10 @@ 57344, 1024 ], - "bindings": [] + "bindings": [ + 258, + 61148 + ] } }, "learnmode": { @@ -8808,9 +8812,14 @@ "en": "Target distance", "nl": "Afstand doel" }, - "uiComponent": null, + "uiComponent": "sensor", "getable": true, "setable": false, + "insights": true, + "options": { + "zoneActivity": true + }, + "icon": "/drivers/radar_sensor/assets/images/measure.svg", "units": { "en": "m", "nl": "m" diff --git a/drivers/radar_sensor/assets/images/measure.svg b/drivers/radar_sensor/assets/images/measure.svg new file mode 100644 index 00000000..fdb55e54 --- /dev/null +++ b/drivers/radar_sensor/assets/images/measure.svg @@ -0,0 +1,62 @@ + + + + + + + + + + + + diff --git a/drivers/radar_sensor/device.js b/drivers/radar_sensor/device.js index 6ba5d845..c4638d23 100644 --- a/drivers/radar_sensor/device.js +++ b/drivers/radar_sensor/device.js @@ -1,21 +1,56 @@ -'use strict'; +"use strict"; -const {Cluster} = require('zigbee-clusters'); -const TuyaSpecificCluster = require('../../lib/TuyaSpecificCluster'); -const TuyaSpecificClusterDevice = require('../../lib/TuyaSpecificClusterDevice'); +const { Cluster } = require("zigbee-clusters"); +const TuyaSpecificCluster = require("../../lib/TuyaSpecificCluster"); +const TuyaSpecificClusterDevice = require("../../lib/TuyaSpecificClusterDevice"); Cluster.addCluster(TuyaSpecificCluster); -const dataPoints = { - tshpsPresenceState: 1, - tshpscSensitivity: 2, - tshpsMinimumRange: 3, - tshpsMaximumRange: 4, - tshpsTargetDistance: 9, - tshpsDetectionDelay: 101, - tshpsFadingTime: 102, - tshpsIlluminanceLux: 104, -} +const setDeviceDatapoints = (manufacturerName) => { + switch (manufacturerName) { + case "_TZE200_ztc6ggyl": + case "_TZE201_ztc6ggyl": + case "_TZE202_ztc6ggyl": + case "_TZE203_ztc6ggyl": + case "_TZE204_ztc6ggyl": + return { + tshpsPresenceState: 1, + tshpscSensitivity: 2, + tshpsMinimumRange: 3, + tshpsMaximumRange: 4, + tshpsTargetDistance: 9, + tshpsDetectionDelay: 101, + tshpsFadingTime: 102, + tshpsIlluminanceLux: 104, + }; + break; + + case "_TZE204_7gclukjs": + return { + tshpsPresenceState: 1, // {'none': 0, 'Presence': 1, 'Move and presence': 2} + tshpscSensitivity: 2, + tshpsMinimumRange: 3, + tshpsMaximumRange: 4, + tshpsTargetDistance: 9, + tshpsIlluminanceLux: 103, + tshpsPresence: 104, // true/false + tshpsDetectionDelay: 105, + }; + break; + + default: + return { + shpsPresenceState: 1, + tshpscSensitivity: 2, + tshpsMinimumRange: 3, + tshpsMaximumRange: 4, + tshpsTargetDistance: 9, + tshpsDetectionDelay: 101, + tshpsFadingTime: 102, + tshpsIlluminanceLux: 104, + }; + } +}; const dataTypes = { raw: 0, // [ bytes ] @@ -46,7 +81,7 @@ const getDataValue = (dpValue) => { case dataTypes.value: return convertMultiByteNumberPayloadToSingleDecimalNumber(dpValue.data); case dataTypes.string: - let dataString = ''; + let dataString = ""; for (let i = 0; i < dpValue.data.length; ++i) { dataString += String.fromCharCode(dpValue.data[i]); } @@ -56,82 +91,125 @@ const getDataValue = (dpValue) => { case dataTypes.bitmap: return convertMultiByteNumberPayloadToSingleDecimalNumber(dpValue.data); } -} +}; class radarSensor extends TuyaSpecificClusterDevice { - async onNodeInit({zclNode}) { + async onNodeInit({ zclNode }) { + this.manufacturerName = this.getSetting("zb_manufacturer_name"); + + this.dataPoints = setDeviceDatapoints(this.manufacturerName); - zclNode.endpoints[1].clusters.tuya.on("response", value => this.updatePosition(value)); + zclNode.endpoints[1].clusters.tuya.on("response", (value) => + this.updatePosition(value) + ); } async updatePosition(data) { const dp = data.dp; const value = getDataValue(data); + + this.log("dp value", dp, value); + switch (dp) { - case dataPoints.tshpsPresenceState: - this.log("presence state: "+ value) - this.setCapabilityValue('alarm_motion', Boolean(value)) + case this.dataPoints.tshpsPresenceState: + this.log("presence state: " + value); + this.setCapabilityValue("alarm_motion", Boolean(value)); break; - case dataPoints.tshpscSensitivity: - this.log("sensitivity state: "+ value) + case this.dataPoints.tshpscSensitivity: + this.log("sensitivity state: " + value); break; - case dataPoints.tshpsIlluminanceLux: - this.log("lux value: "+ value) - this.onIlluminanceMeasuredAttributeReport(value) + case this.dataPoints.tshpsIlluminanceLux: + this.log("lux value: " + value); + this.onIlluminanceMeasuredAttributeReport(value); break; - case dataPoints.tshpsTargetDistance: - if (new Date().getSeconds() % 10 === 0) { - this.setCapabilityValue('target_distance', value/100); + case this.dataPoints.tshpsTargetDistance: + this.log("target distance: " + value) + switch (this.manufacturerName) { + case "_TZE204_7gclukjs": + this.setCapabilityValue("target_distance", value / 10); + break; + default: + if (new Date().getSeconds() % 10 === 0) { + this.setCapabilityValue("target_distance", value / 100); + } } + break; default: - this.log('dp value', dp, value) + // this.log("dp value", dp, value); } } onDeleted() { - this.log("Radar sensor removed") + this.log("Radar sensor removed"); } - async onSettings({newSettings, changedKeys}) { - if (changedKeys.includes('radar_sensitivity')) { - this.writeData32(dataPoints.tshpscSensitivity, newSettings['radar_sensitivity']) + async onSettings({ newSettings, changedKeys }) { + if (changedKeys.includes("radar_sensitivity")) { + this.writeData32( + this.dataPoints.tshpscSensitivity, + newSettings["radar_sensitivity"] + ); } - if (changedKeys.includes('minimum_range')) { - this.writeData32(dataPoints.tshpsMinimumRange, newSettings['minimum_range']*100) + if (changedKeys.includes("minimum_range")) { + this.writeData32( + this.dataPoints.tshpsMinimumRange, + newSettings["minimum_range"] * 100 + ); } - if (changedKeys.includes('maximum_range')) { - this.writeData32(dataPoints.tshpsMaximumRange, newSettings['maximum_range']*100) + if (changedKeys.includes("maximum_range")) { + this.writeData32( + this.dataPoints.tshpsMaximumRange, + newSettings["maximum_range"] * 100 + ); } - if (changedKeys.includes('detection_delay')) { - this.writeData32(dataPoints.tshpsDetectionDelay, newSettings['detection_delay']) + if (changedKeys.includes("detection_delay")) { + this.writeData32( + this.dataPoints.tshpsDetectionDelay, + newSettings["detection_delay"] + ); } - if (changedKeys.includes('fading_time')) { - this.writeData32(dataPoints.tshpsFadingTime, newSettings['fading_time']) + if (changedKeys.includes("fading_time")) { + this.writeData32( + this.dataPoints.tshpsFadingTime, + newSettings["fading_time"] + ); } } onIlluminanceMeasuredAttributeReport(measuredValue) { - this.log('measure_luminance | Luminance - measuredValue (lux):', measuredValue); - this.setCapabilityValue('measure_luminance', measuredValue); + this.log( + "measure_luminance | Luminance - measuredValue (lux):", + measuredValue + ); + this.setCapabilityValue("measure_luminance", measuredValue); } - onIASZoneStatusChangeNotification({zoneStatus, extendedStatus, zoneId, delay,}) { - this.log('IASZoneStatusChangeNotification received:', zoneStatus, extendedStatus, zoneId, delay); - this.setCapabilityValue('alarm_motion', zoneStatus.alarm1); + onIASZoneStatusChangeNotification({ + zoneStatus, + extendedStatus, + zoneId, + delay, + }) { + this.log( + "IASZoneStatusChangeNotification received:", + zoneStatus, + extendedStatus, + zoneId, + delay + ); + this.setCapabilityValue("alarm_motion", zoneStatus.alarm1); } - } module.exports = radarSensor; - // "ids": { // "modelId": "TS0601", // "manufacturerName": "_TZE200_ztc6ggyl" diff --git a/drivers/radar_sensor/driver.compose.json b/drivers/radar_sensor/driver.compose.json index a70178ef..821b3b2e 100644 --- a/drivers/radar_sensor/driver.compose.json +++ b/drivers/radar_sensor/driver.compose.json @@ -28,7 +28,8 @@ "_TZE201_ztc6ggyl", "_TZE202_ztc6ggyl", "_TZE203_ztc6ggyl", - "_TZE204_ztc6ggyl" + "_TZE204_ztc6ggyl", + "_TZE204_7gclukjs" ], "productId": [ "TS0601" diff --git a/drivers/radar_sensor_2/device.js b/drivers/radar_sensor_2/device.js index d9cf456f..b72635fd 100644 --- a/drivers/radar_sensor_2/device.js +++ b/drivers/radar_sensor_2/device.js @@ -228,7 +228,7 @@ const getDataValue = (dpValue) => { } }; -class radarSensor extends TuyaSpecificClusterDevice { +class radarSensor_2 extends TuyaSpecificClusterDevice { async onNodeInit({ zclNode }) { this.manufacturerName = this.getSetting("zb_manufacturer_name"); @@ -433,7 +433,7 @@ class radarSensor extends TuyaSpecificClusterDevice { this.log("Radar sensor removed"); } - async onSettings({ oldSettings, newSettings, changedKeys }) { + async onSettings({newSettings, changedKeys }) { // changedKeys.forEach((updatedSetting) => { this.log( @@ -571,7 +571,7 @@ class radarSensor extends TuyaSpecificClusterDevice { } } -module.exports = radarSensor; +module.exports = radarSensor_2; // { // "ids": { diff --git a/drivers/radar_sensor_2/driver.compose.json b/drivers/radar_sensor_2/driver.compose.json index 21022d6f..c1277cbb 100644 --- a/drivers/radar_sensor_2/driver.compose.json +++ b/drivers/radar_sensor_2/driver.compose.json @@ -1,5 +1,5 @@ { - "id": "radar_sensor", + "id": "radar_sensor_2", "name": { "en": "Radar Sensor ZG-205Z/W", "nl": "Radar Sensor ZG-205Z/W" @@ -38,7 +38,7 @@ 57344, 1024 ], - "bindings": [] + "bindings": [258, 61148] } }, "learnmode": { diff --git a/lib/TuyaSpecificClusterDevice.js b/lib/TuyaSpecificClusterDevice.js index 9924de50..057b1525 100644 --- a/lib/TuyaSpecificClusterDevice.js +++ b/lib/TuyaSpecificClusterDevice.js @@ -3,88 +3,125 @@ const {ZigBeeDevice} = require("homey-zigbeedriver"); class TuyaSpecificClusterDevice extends ZigBeeDevice { + // Tuya Datapoint Functions + _transactionID = 0; + set transactionID(val) { + this._transactionID = val % 256; + } + get transactionID() { + return this._transactionID; + } - // Tuya Datapoint Functions - _transactionID = 0; - set transactionID(val) { - this._transactionID = val % 256; - } - get transactionID() { - return this._transactionID; - } + // Boolean + async writeBool(dp, value) { + const data = Buffer.alloc(1); + data.writeUInt8(value ? 0x01 : 0x00, 0); + return this.zclNode.endpoints[1].clusters.tuya.datapoint({ + status: 0, + transid: this.transactionID++, + dp, + datatype: 1, + length: 1, + data, + }); + } - // Boolean - async writeBool(dp, value) { - const data = Buffer.alloc(1); - data.writeUInt8(value ? 0x01 : 0x00,0); - return this.zclNode.endpoints[1].clusters.tuya.datapoint({ - status: 0, - transid: this.transactionID++, - dp, - datatype: 1, - length: 1, - data - }); - } + // int type value + async writeData32(dp, value) { + const data = Buffer.alloc(4); + data.writeUInt32BE(value, 0); + return this.zclNode.endpoints[1].clusters.tuya.datapoint({ + status: 0, + transid: this.transactionID++, + dp, + datatype: 2, + length: 4, + data, + }); + } - // int type value - async writeData32 (dp, value) { - const data = Buffer.alloc(4); - data.writeUInt32BE(value,0); - return this.zclNode.endpoints[1].clusters.tuya.datapoint({ - status: 0, - transid: this.transactionID++, - dp, - datatype: 2, - length: 4, - data - }); - } + // string + async writeString(dp, value) { + const data = Buffer.from(String(value), "latin1"); + return this.zclNode.endpoints[1].clusters.tuya.datapoint({ + status: 0, + transid: this.transactionID++, + dp, + datatype: 3, + length: value.length, + data, + }); + } - // string - async writeString(dp, value) { - const data = Buffer.from(String(value),'latin1'); - return this.zclNode.endpoints[1].clusters.tuya.datapoint({ - status: 0, - transid: this.transactionID++, - dp, - datatype: 3, - length: value.length, - data - }); - } + // enum + async writeEnum(dp, value) { + const data = Buffer.alloc(1); + data.writeUInt8(value, 0); + return this.zclNode.endpoints[1].clusters.tuya.datapoint({ + status: 0, + transid: this.transactionID++, + dp, + datatype: 4, + length: 1, + data, + }); + } - // enum - async writeEnum(dp, value) { - const data = Buffer.alloc(1); - data.writeUInt8(value, 0); - return this.zclNode.endpoints[1].clusters.tuya.datapoint({ - status: 0, - transid: this.transactionID++, - dp, - datatype: 4, - length: 1, - data - }); - } + // Int + async writeInteger(dp, value) { + const data = Buffer.alloc(4); + data.writeUInt32BE(value, 0); + return this.zclNode.endpoints[1].clusters.tuya.datapoint({ + status: 0, + transid: this.transactionID++, + dp, + datatype: 2, + length: 4, + data, + }); + } + + // raw data + async writeRaw(dp, data) { + return this.zclNode.endpoints[1].clusters.tuya.datapoint({ + status: 0, + transid: this.transactionID++, + dp, + datatype: 0, + length: data.length, + data, + }); + } - // Radiator Actuator - // --------------------------------------------- - // dp 0x0101 On / Off > [off = off, on = heat] - // data 0 or 1 (off/on) - // - // dp 0x0203 Heating setpoint - // data temperature (in degrees Celsius) * 10 + // bitmap + async writeBitmap(dp, data) { + const value = new Bitmap(data); + return this.zclNode.endpoints[1].clusters.tuya.datapoint({ + status: 0, + transid: this.transactionID++, + dp, + datatype: 5, + length: value.length, + value, + }); + } - // Radiator Actuator Functions -/* async setRadiatorActuatorOn(value) { + // Radiator Actuator + // --------------------------------------------- + // dp 0x0101 On / Off > [off = off, on = heat] + // data 0 or 1 (off/on) + // + // dp 0x0203 Heating setpoint + // data temperature (in degrees Celsius) * 10 + + // Radiator Actuator Functions + /* async setRadiatorActuatorOn(value) { return this.writeEnum(0x0101, value ? 1 : 0); } async setRadiatorActuatorTemperature(value) { return this.writeData32(0x0203, value * 10); } */ - } module.exports = TuyaSpecificClusterDevice; \ No newline at end of file From f5bb0edd3fef0a61ff313484321e28935f38f8a5 Mon Sep 17 00:00:00 2001 From: Eelco Date: Thu, 2 May 2024 22:03:11 +0200 Subject: [PATCH 13/22] first work on QT-05M smart water timer --- .../capabilities/last_watering_time.json | 14 + .../capabilities/measure_water_flow.json | 112 ++++++++ .../capabilities/meter_valve_state.json | 31 ++ .../capabilities/remaining_watering_time.json | 18 ++ .../capabilities/shutdown_timer.json | 16 ++ .../valve_state_auto_shutdown.json | 21 ++ app.json | 269 ++++++++++++++++++ drivers/radar_sensor/device.js | 7 +- drivers/radar_sensor_2/device.js | 62 ++-- drivers/smart_water_timer/assets/icon.svg | 82 ++++++ .../smart_water_timer/assets/images/large.jpg | Bin 0 -> 22308 bytes .../assets/images/nighttime.svg | 48 ++++ .../assets/images/pressure-gauge.svg | 36 +++ .../smart_water_timer/assets/images/small.png | Bin 0 -> 4912 bytes .../assets/images/sprinklers.svg | 103 +++++++ drivers/smart_water_timer/device.js | 250 ++++++++++++++++ drivers/smart_water_timer/driver.compose.json | 57 ++++ .../driver.settings.compose.json | 51 ++++ 18 files changed, 1142 insertions(+), 35 deletions(-) create mode 100644 .homeycompose/capabilities/last_watering_time.json create mode 100644 .homeycompose/capabilities/measure_water_flow.json create mode 100644 .homeycompose/capabilities/meter_valve_state.json create mode 100644 .homeycompose/capabilities/remaining_watering_time.json create mode 100644 .homeycompose/capabilities/shutdown_timer.json create mode 100644 .homeycompose/capabilities/valve_state_auto_shutdown.json create mode 100644 drivers/smart_water_timer/assets/icon.svg create mode 100644 drivers/smart_water_timer/assets/images/large.jpg create mode 100644 drivers/smart_water_timer/assets/images/nighttime.svg create mode 100644 drivers/smart_water_timer/assets/images/pressure-gauge.svg create mode 100644 drivers/smart_water_timer/assets/images/small.png create mode 100644 drivers/smart_water_timer/assets/images/sprinklers.svg create mode 100644 drivers/smart_water_timer/device.js create mode 100644 drivers/smart_water_timer/driver.compose.json create mode 100644 drivers/smart_water_timer/driver.settings.compose.json diff --git a/.homeycompose/capabilities/last_watering_time.json b/.homeycompose/capabilities/last_watering_time.json new file mode 100644 index 00000000..0bd51816 --- /dev/null +++ b/.homeycompose/capabilities/last_watering_time.json @@ -0,0 +1,14 @@ +{ + "type": "number", + "title": { "en": "Last Watering Time", "nl": "Laatste tijd bewatering" }, + "uiComponent": "sensor", + "getable": true, + "setable": false, + "insights": true, + "options": { + "zoneActivity": true + }, + "min": 0, + "icon": "/drivers/smart_water_timer/assets/images/pressure-gauge.svg", + "units": { "en": "sec", "nl": "sec" } +} diff --git a/.homeycompose/capabilities/measure_water_flow.json b/.homeycompose/capabilities/measure_water_flow.json new file mode 100644 index 00000000..97a35ac9 --- /dev/null +++ b/.homeycompose/capabilities/measure_water_flow.json @@ -0,0 +1,112 @@ +{ + "type": "number", + "title": { + "en": "Valve Water Flow", + "nl": "Kraan Water Flow" + }, + "desc": { + "en": "Set the position of Water Valve. 0% is closed, 100% is open" + }, + "icon": "/drivers/smart_water_timer/assets/images/sprinklers.svg", + "units": "%", + "getable": true, + "setable": true, + "chartType": "stepLine", + "uiComponent": "slider", + "min": 0, + "max": 1, + "step": 0.05, + "value": 0.5, + "decimals": 2, + "$flow": { + "triggers": [ + { + "id": "water_flow_changed", + "title": { + "en": "water_flow-level changed", + "nl": "water_flow-niveau veranderd", + "de": "water_flowm-Niveau geändert", + "fr": "Intensité lumineuse a été modifiée", + "it": "Intensità luminosa modificata", + "sv": "water_flowningsnivå ändrades", + "no": "Dempingsnivå ble endret", + "es": "La intensidad de la luz ha cambiado", + "da": "Lysniveau ændret", + "ru": "Уровень яркости изменен", + "pl": "Zmiana poziomu przygaszenia" + }, + "tokens": [ + { + "name": "water_flow", + "type": "number", + "title": { + "en": "Level", + "nl": "Niveau", + "de": "Niveau", + "fr": "Niveau", + "it": "Livello", + "sv": "Nivå", + "no": "Nivå", + "es": "Nivel", + "da": "Niveau", + "ru": "Уровень", + "pl": "Poziom" + }, + "example": 0.5 + } + ] + } + ], + "actions": [ + { + "id": "water_flow", + "highlight": true, + "title": { + "en": "waterflow to", + "nl": "waterflow naar", + "de": "waterflow auf" + }, + "args": [ + { + "name": "water_flow", + "type": "range", + "min": 0, + "max": 1, + "step": 0.01, + "value": 0.5, + "label": "%", + "labelMultiplier": 100, + "labelDecimals": 0 + } + ] + }, + { + "id": "water_flow_relative", + "title": { + "en": "Set relative water flow-level", + "nl": "Zet relatief water flow-niveau", + "de": "Relatives waterflow Niveau setzen" + }, + "hint": { + "en": "decrease or increase with respect to the device's current waterflow level.", + "nl": "Verhoog of verlaag de waterflow ten opzichte van het huidige waterflow niveau van het apparaat.", + "ru": "Уменьшите или увеличьте яркость относительно текущего уровня яркости устройства.", + "pl": "Przygaś lub rozjaśnij względem obecnego poziomu przygaszenia urządzenia." + }, + "args": [ + { + "name": "water_flow", + "type": "range", + "min": 0, + "max": 1, + "step": 0.01, + "value": 0.5, + "label": "%", + "labelMultiplier": 100, + "labelDecimals": 0 + } + ] + } + ] + } +} diff --git a/.homeycompose/capabilities/meter_valve_state.json b/.homeycompose/capabilities/meter_valve_state.json new file mode 100644 index 00000000..838746d3 --- /dev/null +++ b/.homeycompose/capabilities/meter_valve_state.json @@ -0,0 +1,31 @@ +{ + "type": "number", + "title": { + "en": "Valve State", + "nl": "Kraanstatus" + }, + "units": { + "en": "%", + "nl": "%" + }, + "icon": "/drivers/smart_water_timer/assets/images/sprinklers.svg", + "getable": true, + "setable": false, + "chartType": "area", + "uiComponent": "sensor", + "min": 0, + "max": 100, + "steps": 5, + "decimals": 0, + "capabilitiesOptions": { + "titleTrue": { + "en": "Open", + "nl": "Open" + }, + "titleFalse": { + "en": "Closed", + "nl": "Gesloten" + } + } +} + \ No newline at end of file diff --git a/.homeycompose/capabilities/remaining_watering_time.json b/.homeycompose/capabilities/remaining_watering_time.json new file mode 100644 index 00000000..2f08fcf7 --- /dev/null +++ b/.homeycompose/capabilities/remaining_watering_time.json @@ -0,0 +1,18 @@ +{ + "type": "number", + "title": { + "en": "Remaining Watering Time", + "nl": "Resterende tijd bewatering" + }, + "uiComponent": "sensor", + "getable": true, + "setable": false, + "insights": true, + "options": { + "zoneActivity": true + }, + "icon": "/drivers/smart_water_timer/assets/images/pressure-gauge.svg", + "units": { "en": "sec", "nl": "sec" }, + "min": 0, + "decimals": 0 +} diff --git a/.homeycompose/capabilities/shutdown_timer.json b/.homeycompose/capabilities/shutdown_timer.json new file mode 100644 index 00000000..98017bb6 --- /dev/null +++ b/.homeycompose/capabilities/shutdown_timer.json @@ -0,0 +1,16 @@ +{ + "type": "number", + "title": { "en": "Auto Shutdown % Valve", "nl": "Auto Stop % Waarde" }, + "uiComponent": "sensor", + "getable": true, + "setable": false, + "insights": true, + "options": { + "zoneActivity": true + }, + "icon": "/drivers/smart_water_timer/assets/images/nighttime.svg", + "units": { "en": "sec", "nl": "sec" }, + "min": 0, + "max": 1440, + "decimals": 0 +} diff --git a/.homeycompose/capabilities/valve_state_auto_shutdown.json b/.homeycompose/capabilities/valve_state_auto_shutdown.json new file mode 100644 index 00000000..ecf1d7eb --- /dev/null +++ b/.homeycompose/capabilities/valve_state_auto_shutdown.json @@ -0,0 +1,21 @@ +{ + "type": "number", + "title": { + "en": "Valve State @ autoshutdown", + "nl": "Kraanstatus @ auto stop" + }, + "units": { + "en": "%", + "nl": "%" + }, + "icon": "/drivers/smart_water_timer/assets/images/nighttime.svg", + "getable": true, + "setable": false, + "chartType": "area", + "uiComponent": "sensor", + "min": 0, + "max": 100, + "steps": 5, + "decimals": 0 +} + \ No newline at end of file diff --git a/app.json b/app.json index 0b162944..858eb1de 100644 --- a/app.json +++ b/app.json @@ -5051,6 +5051,141 @@ }, "settings": [] }, + { + "id": "smart_water_timer", + "name": { + "en": "QT-05M - Smart Water Timer" + }, + "class": "other", + "platforms": [ + "local" + ], + "connectivity": [ + "zigbee" + ], + "capabilities": [ + "onoff", + "alarm_battery", + "measure_battery", + "measure_water_flow", + "meter_valve_state", + "last_watering_time", + "remaining_watering_time", + "shutdown_timer", + "valve_state_auto_shutdown" + ], + "capabilitiesOptions": { + "onoff": { + "opts": { + "duration": true + } + }, + "measure_water_flow": { + "opts": { + "duration": true + }, + "preventInsights": true + } + }, + "energy": { + "batteries": [ + "AA", + "AA", + "AA", + "AA" + ] + }, + "images": { + "small": "/drivers/smart_water_timer/assets/images/small.jpg", + "large": "/drivers/smart_water_timer/assets/images/large.jpg" + }, + "zigbee": { + "manufacturerName": [ + "_TZE200_arge1ptm" + ], + "productId": [ + "TS0601" + ], + "endpoints": { + "1": { + "clusters": [ + 0, + 1, + 4, + 5, + 6, + 10, + 25, + 61184 + ], + "bindings": [ + 1, + 6, + 10, + 25 + ] + } + }, + "learnmode": { + "image": "/drivers/smart_water_timer/assets/icon.svg", + "instruction": { + "en": "Ensure the indicator light is flashing. If the indicatore light isn't flashing: press and hold the reset button for 5 seconds until the indicator light starts to flashing.", + "it": "Assicurarsi che l'indicatore lampeggi. Se l'indicatore non lampegga: tenere premuto il pulsante di reset per 5 secondi finchè l'indicatore non inizia a lampeggiare." + } + } + }, + "settings": [ + { + "id": "batteryThreshold", + "type": "number", + "label": { + "en": "Battery Low Alarm Voltage Threshold (%)", + "it": "Soglia dell'allarme di batteria scarica " + }, + "hint": { + "en": "This setting determines the threshold before a battery alarm is given.", + "it": "Quest'impostazione determina la soglia alla quale l'allarme di batteria scarica viene dato" + }, + "value": 20, + "attr": { + "step": 1, + "min": 1, + "max": 99 + } + }, + { + "id": "shutdown_timer", + "type": "number", + "label": { + "en": "Maximum open percentage", + "nl": "Maximale open percentage" + }, + "hint": { + "en": "Auto shutdown in seconds.", + "nl": "Automatische stop in seconden" + }, + "value": 120, + "min": 0, + "max": 14400 + }, + { + "id": "valve_state_auto_shutdown", + "type": "number", + "label": { + "en": "Valve open in % after auto shutdown.", + "nl": "Kraan open in % na automatische stop." + }, + "hint": { + "en": "Set valve to % with auto shutdown.", + "nl": "Zet kraan op % met automatische stop." + }, + "value": 100, + "min": 0, + "step": 5, + "max": 100 + } + ] + }, { "id": "smartplug", "name": { @@ -8747,6 +8882,26 @@ "pl": "Mały czujnik Obecność wyłączony" } }, + "last_watering_time": { + "type": "number", + "title": { + "en": "Last Watering Time", + "nl": "Laatste tijd bewatering" + }, + "uiComponent": "sensor", + "getable": true, + "setable": false, + "insights": true, + "options": { + "zoneActivity": true + }, + "min": 0, + "icon": "/drivers/smart_water_timer/assets/images/pressure-gauge.svg", + "units": { + "en": "sec", + "nl": "sec" + } + }, "lidl_xmas_mode": { "title": { "en": "Mode" @@ -8779,6 +8934,100 @@ } ] }, + "measure_water_flow": { + "type": "number", + "title": { + "en": "Valve Water Flow", + "nl": "Kraan Water Flow" + }, + "desc": { + "en": "Set the position of Water Valve. 0% is closed, 100% is open" + }, + "icon": "/drivers/smart_water_timer/assets/images/sprinklers.svg", + "units": "%", + "getable": true, + "setable": true, + "chartType": "stepLine", + "uiComponent": "slider", + "min": 0, + "max": 1, + "step": 0.05, + "value": 0.5, + "decimals": 2 + }, + "meter_valve_state": { + "type": "number", + "title": { + "en": "Valve State", + "nl": "Kraanstatus" + }, + "units": { + "en": "%", + "nl": "%" + }, + "icon": "/drivers/smart_water_timer/assets/images/sprinklers.svg", + "getable": true, + "setable": false, + "chartType": "area", + "uiComponent": "sensor", + "min": 0, + "max": 100, + "steps": 5, + "decimals": 0, + "capabilitiesOptions": { + "titleTrue": { + "en": "Open", + "nl": "Open" + }, + "titleFalse": { + "en": "Closed", + "nl": "Gesloten" + } + } + }, + "remaining_watering_time": { + "type": "number", + "title": { + "en": "Remaining Watering Time", + "nl": "Resterende tijd bewatering" + }, + "uiComponent": "sensor", + "getable": true, + "setable": false, + "insights": true, + "options": { + "zoneActivity": true + }, + "icon": "/drivers/smart_water_timer/assets/images/pressure-gauge.svg", + "units": { + "en": "sec", + "nl": "sec" + }, + "min": 0, + "decimals": 0 + }, + "shutdown_timer": { + "type": "number", + "title": { + "en": "Auto Shutdown % Valve", + "nl": "Auto Stop % Waarde" + }, + "uiComponent": "sensor", + "getable": true, + "setable": false, + "insights": true, + "options": { + "zoneActivity": true + }, + "icon": "/drivers/smart_water_timer/assets/images/nighttime.svg", + "units": { + "en": "sec", + "nl": "sec" + }, + "min": 0, + "max": 1440, + "decimals": 0 + }, "soil_moisture": { "type": "number", "title": { @@ -8850,6 +9099,26 @@ "getable": true, "setable": true, "capabilitiesOptions": {} + }, + "valve_state_auto_shutdown": { + "type": "number", + "title": { + "en": "Valve State @ autoshutdown", + "nl": "Kraanstatus @ auto stop" + }, + "units": { + "en": "%", + "nl": "%" + }, + "icon": "/drivers/smart_water_timer/assets/images/nighttime.svg", + "getable": true, + "setable": false, + "chartType": "area", + "uiComponent": "sensor", + "min": 0, + "max": 100, + "steps": 5, + "decimals": 0 } } } \ No newline at end of file diff --git a/drivers/radar_sensor/device.js b/drivers/radar_sensor/device.js index c4638d23..a8402600 100644 --- a/drivers/radar_sensor/device.js +++ b/drivers/radar_sensor/device.js @@ -129,11 +129,10 @@ class radarSensor extends TuyaSpecificClusterDevice { this.setCapabilityValue("target_distance", value / 10); break; default: - if (new Date().getSeconds() % 10 === 0) { - this.setCapabilityValue("target_distance", value / 100); - } + if (new Date().getSeconds() % 10 === 0) { + this.setCapabilityValue("target_distance", value / 100); + } } - break; diff --git a/drivers/radar_sensor_2/device.js b/drivers/radar_sensor_2/device.js index b72635fd..ec8a92f0 100644 --- a/drivers/radar_sensor_2/device.js +++ b/drivers/radar_sensor_2/device.js @@ -314,21 +314,21 @@ class radarSensor_2 extends TuyaSpecificClusterDevice { "attr.identifyTime", (e) => { - this.log("Identify Time: ", e); + // this.log("Identify Time: ", e); } ); } processReporting(data) { - this.log("########### Reporting: ", data); + // this.log("########### Reporting: ", data); } processDatapoint(data) { - this.log("########### Datapoint: ", data); + // this.log("########### Datapoint: ", data); } async updatePosition(data) { - this.log("########### UPDATE POSITION: ", data); + // this.log("########### UPDATE POSITION: ", data); const dp = data.dp; const value = getDataValue(data); @@ -336,16 +336,16 @@ class radarSensor_2 extends TuyaSpecificClusterDevice { switch (dp) { case this.dataPoints.presence: - this.log("presence state: ", value); + // this.log("presence state: ", value); this.setCapabilityValue("alarm_motion", Boolean(value)); break; case this.dataPoints.human_motion_state: - this.log("IAS Zone: ", value); + // this.log("IAS Zone: ", value); switch (value) { case 0: - this.log("None"); + // this.log("None"); this.setCapabilityValue("alarm_small_presence", false); this.setCapabilityValue("alarm_large_presence", false); this.setCapabilityValue("alarm_breathe_presence", false); @@ -355,7 +355,7 @@ class radarSensor_2 extends TuyaSpecificClusterDevice { break; case 1: - this.log("Large"); + // this.log("Large"); this.setCapabilityValue("alarm_small_presence", false); this.setCapabilityValue("alarm_large_presence", true); this.setCapabilityValue("alarm_breathe_presence", false); @@ -364,7 +364,7 @@ class radarSensor_2 extends TuyaSpecificClusterDevice { this.largeAlarmOnTrigger.trigger(); break; case 2: - this.log("Small"); + // this.log("Small"); this.setCapabilityValue("alarm_small_presence", true); this.setCapabilityValue("alarm_large_presence", false); this.setCapabilityValue("alarm_breathe_presence", false); @@ -374,7 +374,7 @@ class radarSensor_2 extends TuyaSpecificClusterDevice { this.largeAlarmOffTrigger.trigger(); break; case 3: - this.log("Breathe"); + // this.log("Breathe"); this.setCapabilityValue("alarm_small_presence", false); this.setCapabilityValue("alarm_large_presence", false); this.setCapabilityValue("alarm_breathe_presence", true); @@ -413,9 +413,9 @@ class radarSensor_2 extends TuyaSpecificClusterDevice { const dataPointKey = Object.keys(this.dataPoints).find( (key) => this.dataPoints[key] === dp ); - this.log("Setting value for key --> ", dataPointKey, " = ", value); + // this.log("Setting value for key --> ", dataPointKey, " = ", value); if (!dataPointKey && !settings[dataPointKey]) { - this.log("No settings for key --> ", dataPointKey); + // this.log("No settings for key --> ", dataPointKey); } if (dataPointKey && settings[dataPointKey] && this.isFirstInit()) { await this.setSettings({ @@ -425,23 +425,23 @@ class radarSensor_2 extends TuyaSpecificClusterDevice { break; default: - this.log("Unknown Datapoint -->", "DP: " + dp, "Value: " + value); + // this.log("Unknown Datapoint -->", "DP: " + dp, "Value: " + value); } } onDeleted() { - this.log("Radar sensor removed"); + // this.log("Radar sensor removed"); } async onSettings({newSettings, changedKeys }) { // changedKeys.forEach((updatedSetting) => { - this.log( - "########### Updated setting: ", - updatedSetting, - " => ", - newSettings[updatedSetting] - ); + // this.log( + // "########### Updated setting: ", + // updatedSetting, + // " => ", + // newSettings[updatedSetting] + // ); }); if (changedKeys.includes("motion_detection_sensitivity")) { @@ -546,10 +546,10 @@ class radarSensor_2 extends TuyaSpecificClusterDevice { } onIlluminanceMeasuredAttributeReport(measuredValue) { - this.log( - "measure_luminance | Luminance - measuredValue (lux):", - measuredValue - ); + // this.log( + // "measure_luminance | Luminance - measuredValue (lux):", + // measuredValue + // ); this.setCapabilityValue("measure_luminance", measuredValue); } @@ -559,13 +559,13 @@ class radarSensor_2 extends TuyaSpecificClusterDevice { zoneId, delay, }) { - this.log( - "IASZoneStatusChangeNotification received:", - zoneStatus, - extendedStatus, - zoneId, - delay - ); + // this.log( + // "IASZoneStatusChangeNotification received:", + // zoneStatus, + // extendedStatus, + // zoneId, + // delay + // ); // this.setCapabilityValue("alarm_motion", zoneStatus.alarm1); this.setCapabilityValue("alarm_motion", zoneStatus); } diff --git a/drivers/smart_water_timer/assets/icon.svg b/drivers/smart_water_timer/assets/icon.svg new file mode 100644 index 00000000..76bae1ea --- /dev/null +++ b/drivers/smart_water_timer/assets/icon.svg @@ -0,0 +1,82 @@ + +image/svg+xml + + + + diff --git a/drivers/smart_water_timer/assets/images/large.jpg b/drivers/smart_water_timer/assets/images/large.jpg new file mode 100644 index 0000000000000000000000000000000000000000..13a1a7c4d6c680d2dda20f002196cd5917ac3c07 GIT binary patch literal 22308 zcmce-WmFtpw=UWQ51!zj;KAJ?9TFOMw*(q@Xj}s6CJ+*w;MTaiySux)ySp9szUQ1D z@3-$5@BMS1s!>&AtW~pCjhbssd+K@Sc?EzgBPlHjKtOl}Ab;5a&+`BY0OG4x|FypW z>19VoLqiX3|vB7ytnuS1O%8kM8t&n#BcBk z@c&B)0^-X(NXY2O$msZ37+CoKpYhxRz(Yf5LkL4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vPI z75_TIqIp89m@K8#O-E`yKQa%Blb__IfgD=GKPwD0-d-E)sdQg`_|<8E^#}D zPFo;1j;}LB-X$`&8QZ}{hK5Dc_*bf4tjr;p+nXrig)w7g%vTmDCLGtMlmzkwc?z*` zvGD%K4+iNpYzHvh)Rq#pX9=jI)|Z$bQb2`u<1be$rP zfQa|_8TIh? zad4E{PK?KJ6p(zN@uT2J{tkPf56Q%{Q%!te?B0u~3lR4(J|tV-ttkyY^!>iD`F3;q zh}OM}%wk+K|C$}H_WVc8J4;2*5|(d)a)qALJwFPirh)`{kAt@V5Muo|#2y=K_IYRC zc;Z=Y>NHynmnBBo3crLo!@;MK7RFhA+uHFFu{9$WBV?SBxWO+pHHdb9CT>=IOgT}7XO zT1{~JX4m#wh+AG^70(nGJ2D^X8`E0I{$iEISb5FxHnhE$gadS6zI+CBKWO*XoHjUW zXd&~t0QgP+!3iVGFDCTByIsq*5FB87ok>f+A155Jc}@B%{omi?|94T1-=qHn + + + + + + + + + + diff --git a/drivers/smart_water_timer/assets/images/pressure-gauge.svg b/drivers/smart_water_timer/assets/images/pressure-gauge.svg new file mode 100644 index 00000000..774ea45f --- /dev/null +++ b/drivers/smart_water_timer/assets/images/pressure-gauge.svg @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + diff --git a/drivers/smart_water_timer/assets/images/small.png b/drivers/smart_water_timer/assets/images/small.png new file mode 100644 index 0000000000000000000000000000000000000000..8749bd6b80dde8c96b715c4df6a2ed4c266b343c GIT binary patch literal 4912 zcmV-06VL34P)002t}1^@s6I8J)%0004mX+uL$Nkc;* zaB^>EX>4Tx04R}tkv&MmKpe$iQ>9W`9GXGIAwzYtAXdatt5Adrp;l}?mh0_0bHx5Xjb0@py{@m zO{au>VO0pdB8(WKNP?FX%a{|z41CAeJpydKORy~ebAOJgTC@}(AP~eSad^gZEa<4bO1wgWnpw> zWFU8GbZ8()Nlj2!fese{01*gDL_t(|+SQzSj3ifm$3O4As_J8|o!OmZ?LBSp;%j%j zUY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93 zhyMEyKA0|(OVVdH{OH+dh_Y3y%j~4;e`4JiHI$XazPO<2Joc(6b;XKI@l~tU@w~M9 z>>0!1BQNBiwIcf*Y>|}P@1tk*`XW|c{q1W3XC-xPo$m%Jv6d_LUCGgxPtdG4D3wcG zf9-X6o>zG0R@WndT4QxQ)aL&atQODP2Vhn@cFqySF=rPR2!epI(NUCA%+JpgXOBfF zN@XuDtRHPief5TG2@SeI> + + + + + + + + + + + + + + + + + + + + + + + diff --git a/drivers/smart_water_timer/device.js b/drivers/smart_water_timer/device.js new file mode 100644 index 00000000..30cc7b50 --- /dev/null +++ b/drivers/smart_water_timer/device.js @@ -0,0 +1,250 @@ +'use strict'; + +const Homey = require('homey'); +const { Cluster, debug, CLUSTER } = require('zigbee-clusters'); +const TuyaSpecificClusterDevice = require("../../lib/TuyaSpecificClusterDevice"); + +const TuyaSpecificCluster = require('../../lib/TuyaSpecificCluster'); + +Cluster.addCluster(TuyaSpecificCluster); + +const DEFAULT_ONOFF_DURATION = 1000 + +/* +reversesd engineered DP's from Tuya: +==================================== + +1 - Switch +2 - Regulating water volume +3 - Flow state +10 - Weather Delay +11 - Irrigation time + +101 - 倒计时剩余时间 countdown time remaining +102 - 倒计时剩余时间设置 countdown remaining time setting +103 - 开到底状态 open to the end +104 - 故障告警 fault alarm +105 - 默认倒计时开启 by default countdown is on +106 - 默认倒计时设置 default countdown settings +107 - 月使用时长 monthly usage time +108 - 月使用水容量 monthly water capacity +109 - 定时灌溉 regular irrigation +110 - 电池电量 battery power + +Tuya developer GUI sends: +========================= + +switch | Boolean | "{true,false}" +percent_control | Integer | { "unit": "%", "min": 0, "max": 100, "scale": 0, "step": 5 } +weather_delay | Enum | { "range": [ "cancel", "24h", "48h", "72h" ] } +countdown | Integer | { "unit": "s", "min": 0, "max": 86400, "scale": 0, "step": 1 +*/ + +const setDeviceDatapoints = (manufacturerName) => { + switch (manufacturerName) { + case "_TZE200_arge1ptm": + return { + valve_state_auto_shutdown: 2, + water_flow: 3, + + shutdown_timer: 11, + remaining_watering_time: 101, + valve_state: 102, // countdown | Integer | { "unit": "s", "min": 0, "max": 86400, "scale": 0, "step": 1 + + last_watering_time: 107, + battery: 110, + + // DP received but not usefull for Homey + error: 104, + max_min: 108, + }; + break; + } +}; + +const dataTypes = { + raw: 0, // [ bytes ] + bool: 1, // [0/1] + value: 2, // [ 4 byte value ] + string: 3, // [ N byte string ] + enum: 4, // [ 0-255 ] + bitmap: 5, // [ 1,2,4 bytes ] as bits +}; + +const convertMultiByteNumberPayloadToSingleDecimalNumber = (chunks) => { + let value = 0; + + for (let i = 0; i < chunks.length; i++) { + value = value << 8; + value += chunks[i]; + } + + return value; +}; + +const getDataValue = (dpValue) => { + switch (dpValue.datatype) { + case dataTypes.raw: + return dpValue.data; + case dataTypes.bool: + return dpValue.data[0] === 1; + case dataTypes.value: + return convertMultiByteNumberPayloadToSingleDecimalNumber(dpValue.data); + case dataTypes.string: + let dataString = ""; + for (let i = 0; i < dpValue.data.length; ++i) { + dataString += String.fromCharCode(dpValue.data[i]); + } + return dataString; + case dataTypes.enum: + return dpValue.data[0]; + case dataTypes.bitmap: + return convertMultiByteNumberPayloadToSingleDecimalNumber(dpValue.data); + } +}; + +class SmartWaterTimer extends TuyaSpecificClusterDevice { + async onNodeInit({ zclNode }) { + this.printNode(); + + this.manufacturerName = this.getSetting("zb_manufacturer_name"); + this.dataPoints = setDeviceDatapoints(this.manufacturerName); + + zclNode.endpoints[1].clusters.tuya.on("response", (value) => + this.updateInformation(value) + ); + + this.registerCapability("onoff", CLUSTER.ON_OFF); + + this.registerCapabilityListener("onoff", async (value, options) => { + this.log("value " + value); + this.log("options " + options.duration); + + if (value == false) { + value = 0; + } else { + value = 100; + } + this.writeInteger(this.dataPoints.valve_state, value); + }); + + // Handler for waterflow + this.registerCapability("measure_water_flow", CLUSTER.SCENES); + this.registerCapabilityListener("measure_water_flow", async (value, options) => { + this.log("measure_water_flow value: " + value * 100); + this.writeInteger(this.dataPoints.valve_state, value * 100); + if(value <= 0) { + this.setCapabilityValue("onoff", false); + } else { + this.setCapabilityValue("onoff", true); + } + }); + + // measure_battery // alarm_battery + zclNode.endpoints[1].clusters[CLUSTER.POWER_CONFIGURATION.NAME].on( + "attr.batteryPercentageRemaining", + this.onBatteryPercentageRemainingAttributeReport.bind(this) + ); + } + + async updateInformation(data) { + const dp = data.dp; + const value = getDataValue(data); + + switch (dp) { + case this.dataPoints.water_flow: + this.log("Current water flow in %: " + value); + this.setCapabilityValue("meter_valve_state", value ).catch( + this.error + ); + // this.setCapabilityValue("water_flow", Boolean(value)); + break; + + case this.dataPoints.last_watering_time: + this.log("Duration of the last watering in seconds: " + value); + this.setCapabilityValue("last_watering_time", value).catch(this.error); + // this.setCapabilityValue("last_watering_time", value); + break; + + case this.dataPoints.remaining_watering_time: + this.log("remaining_watering_time: " + value); + this.setCapabilityValue("remaining_watering_time", value).catch( + this.error + ); + break; + + // case this.dataPoints.valve_state: + // this.log("Set valve to %: " + value/100); + // this.setCapabilityValue("meter_valve_state", value/100).catch(this.error); + // // this.setCapabilityValue("valve_state", value); + // break; + + case this.dataPoints.shutdown_timer: + this.log("Auto shutdown in seconds.: " + value); + this.setCapabilityValue("shutdown_timer", value).catch(this.error); + break; + + case this.dataPoints.valve_state_auto_shutdown: + this.log("Set valve to % with auto shutdown: " + value); + this.setCapabilityValue("valve_state_auto_shutdown", value).catch( + this.error + ); + break; + + case this.dataPoints.battery: + this.log("battery_level: " + value); + this.setCapabilityValue( + "measure_battery", + value + ).catch(this.error); + break; + + default: + this.log("dp value", dp, value); + } + } + + async onDeleted() { + this.log("Smart Water Timer removed"); + } + + async onSettings({ newSettings, changedKeys }) { + if (changedKeys.includes("valve_state")) { + this.writeData32(this.dataPoints.valve_state, newSettings["valve_state"]); + } + + if (changedKeys.includes("shutdown_timer")) { + this.writeData32( + this.dataPoints.shutdown_timer, + newSettings["shutdown_timer"] + ); + } + + if (changedKeys.includes("valve_state_auto_shutdown")) { + this.writeData32( + this.dataPoints.valve_state_auto_shutdown, + newSettings["valve_state_auto_shutdown"] + ); + } + } + + onBatteryPercentageRemainingAttributeReport(batteryPercentageRemaining) { + const batteryThreshold = this.getSetting("batteryThreshold") || 20; + //override batteryPercentageRemaining... + batteryPercentageRemaining = this.dataPoints.battery; + this.log( + "measure_battery | powerConfiguration - batteryPercentageRemaining (%): ", + batteryPercentageRemaining + ); + this.setCapabilityValue( + "measure_battery", + batteryPercentageRemaining + ).catch(this.error); + this.setCapabilityValue( + "alarm_battery", + batteryPercentageRemaining < batteryThreshold ? true : false + ).catch(this.error); + } +} + +module.exports = SmartWaterTimer; diff --git a/drivers/smart_water_timer/driver.compose.json b/drivers/smart_water_timer/driver.compose.json new file mode 100644 index 00000000..b1a52f43 --- /dev/null +++ b/drivers/smart_water_timer/driver.compose.json @@ -0,0 +1,57 @@ +{ + "id": "SmartWaterTimer", + "name": { + "en": "QT-05M - Smart Water Timer" + }, + "class": "other", + "platforms": ["local"], + "connectivity": ["zigbee"], + "capabilities": [ + "onoff", + "alarm_battery", + "measure_battery", + "measure_water_flow", + "meter_valve_state", + "last_watering_time", + "remaining_watering_time", + "shutdown_timer", + "valve_state_auto_shutdown" + ], + "capabilitiesOptions": { + "onoff": { + "opts": { + "duration": true + } + }, + "measure_water_flow": { + "opts": { + "duration": true + }, + "preventInsights": true + } + }, + "energy": { + "batteries": ["AA", "AA", "AA", "AA"] + }, + "images": { + "small": "{{driverAssetsPath}}/images/small.jpg", + "large": "{{driverAssetsPath}}/images/large.jpg" + }, + "zigbee": { + "manufacturerName": ["_TZE200_arge1ptm"], + "productId": ["TS0601"], + "endpoints": { + "1": { + "clusters": [0, 1, 4, 5, 6, 10, 25, 61184], + "bindings": [1, 6, 10, 25] + } + }, + "learnmode": { + "image": "{{driverAssetsPath}}/icon.svg", + "instruction": { + "en": "Ensure the indicator light is flashing. If the indicatore light isn't flashing: press and hold the reset button for 5 seconds until the indicator light starts to flashing.", + "it": "Assicurarsi che l'indicatore lampeggi. Se l'indicatore non lampegga: tenere premuto il pulsante di reset per 5 secondi finchè l'indicatore non inizia a lampeggiare." + } + } + } +} diff --git a/drivers/smart_water_timer/driver.settings.compose.json b/drivers/smart_water_timer/driver.settings.compose.json new file mode 100644 index 00000000..cab88fe6 --- /dev/null +++ b/drivers/smart_water_timer/driver.settings.compose.json @@ -0,0 +1,51 @@ +[ + { + "id": "batteryThreshold", + "type": "number", + "label": { + "en": "Battery Low Alarm Voltage Threshold (%)", + "it": "Soglia dell'allarme di batteria scarica " + }, + "hint": { + "en": "This setting determines the threshold before a battery alarm is given.", + "it": "Quest'impostazione determina la soglia alla quale l'allarme di batteria scarica viene dato" + }, + "value": 20, + "attr": { + "step": 1, + "min": 1, + "max": 99 + } + }, + { + "id": "shutdown_timer", + "type": "number", + "label": { + "en": "Maximum open percentage", + "nl": "Maximale open percentage" + }, + "hint": { + "en": "Auto shutdown in seconds.", + "nl": "Automatische stop in seconden" + }, + "value": 120, + "min": 0, + "max": 14400 + }, + { + "id": "valve_state_auto_shutdown", + "type": "number", + "label": { + "en": "Valve open in % after auto shutdown.", + "nl": "Kraan open in % na automatische stop." + }, + "hint": { + "en": "Set valve to % with auto shutdown.", + "nl": "Zet kraan op % met automatische stop." + }, + "value": 100, + "min": 0, + "step": 5, + "max": 100 + } + ] \ No newline at end of file From f07cc24287bfb8880b7efb60ac92e5dabfb719c9 Mon Sep 17 00:00:00 2001 From: Eelco Date: Thu, 2 May 2024 22:04:04 +0200 Subject: [PATCH 14/22] reverted this.log for radar_sensor_2 --- drivers/radar_sensor_2/device.js | 62 ++++++++++++++++---------------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/drivers/radar_sensor_2/device.js b/drivers/radar_sensor_2/device.js index ec8a92f0..b72635fd 100644 --- a/drivers/radar_sensor_2/device.js +++ b/drivers/radar_sensor_2/device.js @@ -314,21 +314,21 @@ class radarSensor_2 extends TuyaSpecificClusterDevice { "attr.identifyTime", (e) => { - // this.log("Identify Time: ", e); + this.log("Identify Time: ", e); } ); } processReporting(data) { - // this.log("########### Reporting: ", data); + this.log("########### Reporting: ", data); } processDatapoint(data) { - // this.log("########### Datapoint: ", data); + this.log("########### Datapoint: ", data); } async updatePosition(data) { - // this.log("########### UPDATE POSITION: ", data); + this.log("########### UPDATE POSITION: ", data); const dp = data.dp; const value = getDataValue(data); @@ -336,16 +336,16 @@ class radarSensor_2 extends TuyaSpecificClusterDevice { switch (dp) { case this.dataPoints.presence: - // this.log("presence state: ", value); + this.log("presence state: ", value); this.setCapabilityValue("alarm_motion", Boolean(value)); break; case this.dataPoints.human_motion_state: - // this.log("IAS Zone: ", value); + this.log("IAS Zone: ", value); switch (value) { case 0: - // this.log("None"); + this.log("None"); this.setCapabilityValue("alarm_small_presence", false); this.setCapabilityValue("alarm_large_presence", false); this.setCapabilityValue("alarm_breathe_presence", false); @@ -355,7 +355,7 @@ class radarSensor_2 extends TuyaSpecificClusterDevice { break; case 1: - // this.log("Large"); + this.log("Large"); this.setCapabilityValue("alarm_small_presence", false); this.setCapabilityValue("alarm_large_presence", true); this.setCapabilityValue("alarm_breathe_presence", false); @@ -364,7 +364,7 @@ class radarSensor_2 extends TuyaSpecificClusterDevice { this.largeAlarmOnTrigger.trigger(); break; case 2: - // this.log("Small"); + this.log("Small"); this.setCapabilityValue("alarm_small_presence", true); this.setCapabilityValue("alarm_large_presence", false); this.setCapabilityValue("alarm_breathe_presence", false); @@ -374,7 +374,7 @@ class radarSensor_2 extends TuyaSpecificClusterDevice { this.largeAlarmOffTrigger.trigger(); break; case 3: - // this.log("Breathe"); + this.log("Breathe"); this.setCapabilityValue("alarm_small_presence", false); this.setCapabilityValue("alarm_large_presence", false); this.setCapabilityValue("alarm_breathe_presence", true); @@ -413,9 +413,9 @@ class radarSensor_2 extends TuyaSpecificClusterDevice { const dataPointKey = Object.keys(this.dataPoints).find( (key) => this.dataPoints[key] === dp ); - // this.log("Setting value for key --> ", dataPointKey, " = ", value); + this.log("Setting value for key --> ", dataPointKey, " = ", value); if (!dataPointKey && !settings[dataPointKey]) { - // this.log("No settings for key --> ", dataPointKey); + this.log("No settings for key --> ", dataPointKey); } if (dataPointKey && settings[dataPointKey] && this.isFirstInit()) { await this.setSettings({ @@ -425,23 +425,23 @@ class radarSensor_2 extends TuyaSpecificClusterDevice { break; default: - // this.log("Unknown Datapoint -->", "DP: " + dp, "Value: " + value); + this.log("Unknown Datapoint -->", "DP: " + dp, "Value: " + value); } } onDeleted() { - // this.log("Radar sensor removed"); + this.log("Radar sensor removed"); } async onSettings({newSettings, changedKeys }) { // changedKeys.forEach((updatedSetting) => { - // this.log( - // "########### Updated setting: ", - // updatedSetting, - // " => ", - // newSettings[updatedSetting] - // ); + this.log( + "########### Updated setting: ", + updatedSetting, + " => ", + newSettings[updatedSetting] + ); }); if (changedKeys.includes("motion_detection_sensitivity")) { @@ -546,10 +546,10 @@ class radarSensor_2 extends TuyaSpecificClusterDevice { } onIlluminanceMeasuredAttributeReport(measuredValue) { - // this.log( - // "measure_luminance | Luminance - measuredValue (lux):", - // measuredValue - // ); + this.log( + "measure_luminance | Luminance - measuredValue (lux):", + measuredValue + ); this.setCapabilityValue("measure_luminance", measuredValue); } @@ -559,13 +559,13 @@ class radarSensor_2 extends TuyaSpecificClusterDevice { zoneId, delay, }) { - // this.log( - // "IASZoneStatusChangeNotification received:", - // zoneStatus, - // extendedStatus, - // zoneId, - // delay - // ); + this.log( + "IASZoneStatusChangeNotification received:", + zoneStatus, + extendedStatus, + zoneId, + delay + ); // this.setCapabilityValue("alarm_motion", zoneStatus.alarm1); this.setCapabilityValue("alarm_motion", zoneStatus); } From 8880042b08ad94d4829724fdd5b6286aa6433e27 Mon Sep 17 00:00:00 2001 From: Eelco Date: Thu, 9 May 2024 13:34:59 +0200 Subject: [PATCH 15/22] added other version of manufacturer _TZE200_xlppj4f5 --- drivers/smart_water_timer/device.js | 1 + drivers/smart_water_timer/driver.compose.json | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/smart_water_timer/device.js b/drivers/smart_water_timer/device.js index 30cc7b50..f89c3801 100644 --- a/drivers/smart_water_timer/device.js +++ b/drivers/smart_water_timer/device.js @@ -43,6 +43,7 @@ countdown | Integer | { "unit": "s", "min": 0, "max": 86400, "scale": 0, const setDeviceDatapoints = (manufacturerName) => { switch (manufacturerName) { case "_TZE200_arge1ptm": + case "_TZE200_xlppj4f5": return { valve_state_auto_shutdown: 2, water_flow: 3, diff --git a/drivers/smart_water_timer/driver.compose.json b/drivers/smart_water_timer/driver.compose.json index b1a52f43..5416cd53 100644 --- a/drivers/smart_water_timer/driver.compose.json +++ b/drivers/smart_water_timer/driver.compose.json @@ -38,7 +38,7 @@ "large": "{{driverAssetsPath}}/images/large.jpg" }, "zigbee": { - "manufacturerName": ["_TZE200_arge1ptm"], + "manufacturerName": ["_TZE200_arge1ptm", "_TZE200_xlppj4f5"], "productId": ["TS0601"], "endpoints": { "1": { From 5192614cdecbd3912c03148b1370b6b4266f43dd Mon Sep 17 00:00:00 2001 From: Eelco Date: Thu, 9 May 2024 13:48:11 +0200 Subject: [PATCH 16/22] updated readme supported devices --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a2d2f2bc..b0fdee7b 100644 --- a/README.md +++ b/README.md @@ -482,7 +482,11 @@ Supported devices: - Smart Garden Irrigation Controller _TZ3210_eymunffl / TS0101 (Woox) - + +- Smart Garden Irrigation With Timer + _TZE200_arge1ptm / TS0601 (QOTO QT-05M) + _TZE200_xlppj4f5 / TS0601 (Neo QT-05M) + - Zigbee Repeater _TZ3000_m0vaazab / TS0207 _TZ3000_5k5vh43t / TS0207 From 685846977c928b0fc6f6d528208f5bba3beabe79 Mon Sep 17 00:00:00 2001 From: Eelco Date: Thu, 9 May 2024 13:58:46 +0200 Subject: [PATCH 17/22] added new supported devices --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b0fdee7b..02e88f88 100644 --- a/README.md +++ b/README.md @@ -485,7 +485,7 @@ Supported devices: - Smart Garden Irrigation With Timer _TZE200_arge1ptm / TS0601 (QOTO QT-05M) - _TZE200_xlppj4f5 / TS0601 (Neo QT-05M) + _TZE200_xlppj4f5 / TS0601 (Immax Neo QT-05M) - Zigbee Repeater _TZ3000_m0vaazab / TS0207 From 7e7fad8b7ccad05f7d812d45d0fbbaf7cfa20325 Mon Sep 17 00:00:00 2001 From: Eelco Date: Thu, 9 May 2024 14:56:38 +0200 Subject: [PATCH 18/22] added test version of TS0001 / _TZ3000_w0ypwa1f Valve Controller --- drivers/valvecontroller/driver.compose.json | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/valvecontroller/driver.compose.json b/drivers/valvecontroller/driver.compose.json index 0b3f1851..26335123 100644 --- a/drivers/valvecontroller/driver.compose.json +++ b/drivers/valvecontroller/driver.compose.json @@ -26,12 +26,14 @@ "_TYZB01_4tlksk8a", "_TZ3000_tvuarksa", "_TZ3000_j9568h44", - "_TZ3000_iedbgyxt" + "_TZ3000_iedbgyxt", + "_TZ3000_w0ypwa1f" ], "productId": [ "TS0111", "TS0001", - "TS011F" + "TS011F", + "TS0001" ], "endpoints": { "1": { @@ -47,4 +49,4 @@ } } -} \ No newline at end of file +} From 78295f334530d5178e7047277115c3208ed29a2f Mon Sep 17 00:00:00 2001 From: Eelco Date: Thu, 9 May 2024 15:49:30 +0200 Subject: [PATCH 19/22] updated package-lock file --- app.json | 1336 +++++++++++++++++++-------------------------- package-lock.json | 2 +- 2 files changed, 570 insertions(+), 768 deletions(-) diff --git a/app.json b/app.json index 48378e1b..c6b66e3f 100644 --- a/app.json +++ b/app.json @@ -205,6 +205,82 @@ }, "id": "the-small-presence-alarm-turned-on" }, + { + "id": "handheld_remote_4_buttons", + "title": { + "en": "Button was pressed" + }, + "titleFormatted": { + "en": "[[button]] button was pressed [[action]]" + }, + "args": [ + { + "type": "device", + "name": "device", + "filter": "driver_id=handheld_remote_4_buttons" + }, + { + "name": "button", + "type": "dropdown", + "title": { + "en": "Button" + }, + "values": [ + { + "id": "button1", + "label": { + "en": "Button 1" + } + }, + { + "id": "button2", + "label": { + "en": "Button 2" + } + }, + { + "id": "button3", + "label": { + "en": "Button 3" + } + }, + { + "id": "button4", + "label": { + "en": "Button 4" + } + } + ] + }, + { + "name": "action", + "type": "dropdown", + "title": { + "en": "Action" + }, + "values": [ + { + "id": "single", + "label": { + "en": "once" + } + }, + { + "id": "double", + "label": { + "en": "twice" + } + }, + { + "id": "long", + "label": { + "en": "long" + } + } + ] + } + ] + }, { "id": "alarm_siren", "title": { @@ -744,6 +820,19 @@ "pl": "Mały czujnik Obecność !{{włączony|wyłączony}}" }, "id": "the-small-presence-alarm-is-onoff" + }, + { + "id": "window_open_status_get", + "title": { + "en": "Window !{{is|is not}} open" + }, + "args": [ + { + "type": "device", + "name": "device", + "filter": "driver_id=thermostatic_radiator_valve" + } + ] } ], "actions": [ @@ -1224,684 +1313,101 @@ } }, { - "id": "9", - "label": { - "en": "Wheep", - "nl": "Wheep", - "de": "Wheep" - } - }, - { - "id": "10", - "label": { - "en": "Barking dog", - "nl": "Barking dog", - "de": "Barking dog" - } - }, - { - "id": "11", - "label": { - "en": "Alarm Siren", - "nl": "Alarm Siren", - "de": "Alarm Siren" - } - }, - { - "id": "12", - "label": { - "en": "Doorbell 2", - "nl": "Doorbell 2", - "de": "Doorbell 2" - } - }, - { - "id": "13", - "label": { - "en": "Old Phone", - "nl": "Old Phone", - "de": "Old Phone" - } - }, - { - "id": "14", - "label": { - "en": "Police Siren", - "nl": "Police Siren", - "de": "Police Siren" - } - }, - { - "id": "15", - "label": { - "en": "Evacuation bell", - "nl": "Evacuation bell", - "de": "Evacuation bell" - } - }, - { - "id": "16", - "label": { - "en": "Clock alarm", - "nl": "Clock alarm", - "de": "Clock alarm" - } - }, - { - "id": "17", - "label": { - "en": "Fire alarm", - "nl": "Fire alarm", - "de": "Fire alarm" - } - } - ] - } - ] - }, - { - "id": "window_open_status_set", - "title": { - "en": "Set window open status" - }, - "titleFormatted": { - "en": "Set window open status to [[window_open_status]]" - }, - "args": [ - { - "type": "device", - "name": "device", - "filter": "driver_id=thermostatic_radiator_valve" - }, - { - "type": "checkbox", - "name": "window_open_status", - "title": { - "en": "Open" - } - } - ] - } - ], - "triggers": [ - { - "id": "handheld_remote_4_buttons", - "title": { - "en": "Button was pressed" - }, - "titleFormatted": { - "en": "[[button]] button was pressed [[action]]" - }, - "args": [ - { - "type": "device", - "name": "device", - "filter": "driver_id=handheld_remote_4_buttons" - }, - { - "name": "button", - "type": "dropdown", - "title": { - "en": "Button" - }, - "values": [ - { - "id": "button1", - "label": { - "en": "Button 1" - } - }, - { - "id": "button2", - "label": { - "en": "Button 2" - } - }, - { - "id": "button3", - "label": { - "en": "Button 3" - } - }, - { - "id": "button4", - "label": { - "en": "Button 4" - } - } - ] - }, - { - "name": "action", - "type": "dropdown", - "title": { - "en": "Action" - }, - "values": [ - { - "id": "single", - "label": { - "en": "once" - } - }, - { - "id": "double", - "label": { - "en": "twice" - } - }, - { - "id": "long", - "label": { - "en": "long" - } - } - ] - } - ] - }, - { - "id": "alarm_siren", - "title": { - "en": "Siren Alarm", - "nl": "Sirene Alarm", - "de": "Sirenenalarm" - }, - "titleFormatted": { - "en": "Siren Alarm", - "nl": "Sirene Alarm", - "de": "Sirenenalarm" - }, - "hint": { - "en": "This card will trigger when siren is activated.", - "nl": "Deze kaart wordt alleen geactiveerd wanneer de sirene actief is.", - "de": "Diese Karte wird ausgelöst, wenn die Sirene aktiviert wird." - }, - "args": [ - { - "type": "device", - "name": "device", - "filter": "driver_id=sirentemphumidsensor" - } - ] - }, - { - "id": "smart_remote_1_button", - "title": { - "en": "Button Action" - }, - "titleFormatted": { - "en": "Button had [[action]]" - }, - "args": [ - { - "type": "device", - "name": "device", - "filter": "driver_id=smart_remote_1_button" - }, - { - "name": "action", - "type": "dropdown", - "title": { - "en": "Button Action" - }, - "values": [ - { - "id": "oneClick", - "label": { - "en": "1 Click" - } - }, - { - "id": "twoClicks", - "label": { - "en": "2 Clicks" - } - } - ] - } - ] - }, - { - "id": "smart_remote_1_button_2", - "title": { - "en": "Button Action" - }, - "titleFormatted": { - "en": "Button had [[action]]" - }, - "args": [ - { - "type": "device", - "name": "device", - "filter": "driver_id=smart_remote_1_button_2" - }, - { - "name": "action", - "type": "dropdown", - "title": { - "en": "Button Action" - }, - "values": [ - { - "id": "oneClick", - "label": { - "en": "1 Click" - } - }, - { - "id": "twoClicks", - "label": { - "en": "2 Clicks" - } - } - ] - } - ] - }, - { - "id": "smart_remote_4_buttons", - "title": { - "en": "Button Action" - }, - "titleFormatted": { - "en": "The [[action]]" - }, - "args": [ - { - "type": "device", - "name": "device", - "filter": "driver_id=smart_remote_4_buttons" - }, - { - "name": "action", - "type": "dropdown", - "title": { - "en": "Button Action" - }, - "values": [ - { - "id": "leftUp", - "label": { - "en": "Upper Left Button Pressed" - } - }, - { - "id": "rightUp", - "label": { - "en": "Upper Right Button Pressed" - } - }, - { - "id": "leftDown", - "label": { - "en": "Lower Left Button Pressed" - } - }, - { - "id": "rightDown", - "label": { - "en": "Lower Right Button Pressed" - } - } - ] - } - ] - }, - { - "id": "wall_remote_1_gang_buttons", - "title": { - "en": "Button Action" - }, - "titleFormatted": { - "en": "Button had [[action]]" - }, - "args": [ - { - "type": "device", - "name": "device", - "filter": "driver_id=wall_remote_1_gang" - }, - { - "name": "action", - "type": "dropdown", - "title": { - "en": "Button Action" - }, - "values": [ - { - "id": "oneClick", - "label": { - "en": "1 Click" - } - }, - { - "id": "twoClicks", - "label": { - "en": "2 Clicks" - } - } - ] - } - ] - }, - { - "id": "wall_remote_2_gang_buttons", - "title": { - "en": "Button Action" - }, - "titleFormatted": { - "en": "The [[action]]" - }, - "args": [ - { - "type": "device", - "name": "device", - "filter": "driver_id=wall_remote_2_gang" - }, - { - "name": "action", - "type": "dropdown", - "title": { - "en": "Button Action" - }, - "values": [ - { - "id": "left-oneClick", - "label": { - "en": "Left Button: 1 Click" - } - }, - { - "id": "left-twoClicks", - "label": { - "en": "Left Button: 2 Clicks" - } - }, - { - "id": "right-oneClick", - "label": { - "en": "Right Button: 1 Click" - } - }, - { - "id": "right-twoClicks", - "label": { - "en": "Right Button: 2 Clicks" - } - } - ] - } - ] - }, - { - "id": "wall_remote_3_gang_buttons", - "title": { - "en": "Button Action" - }, - "titleFormatted": { - "en": "The [[action]]" - }, - "args": [ - { - "type": "device", - "name": "device", - "filter": "driver_id=wall_remote_3_gang" - }, - { - "name": "action", - "type": "dropdown", - "title": { - "en": "Button Action" - }, - "values": [ - { - "id": "left-oneClick", - "label": { - "en": "Left Button: 1 Click" - } - }, - { - "id": "left-twoClicks", - "label": { - "en": "Left Button: 2 Clicks" - } - }, - { - "id": "right-oneClick", - "label": { - "en": "Right Button: 1 Click" - } - }, - { - "id": "right-twoClicks", - "label": { - "en": "Right Button: 2 Clicks" - } - }, - { - "id": "center-oneClick", - "label": { - "en": "Center Button: 1 Click" - } - }, - { - "id": "center-twoClicks", - "label": { - "en": "Center Button: 2 Clicks" - } - } - ] - } - ] - }, - { - "id": "wall_remote_4_gang_buttons", - "title": { - "en": "Button Action" - }, - "titleFormatted": { - "en": "The [[action]]" - }, - "args": [ - { - "type": "device", - "name": "device", - "filter": "driver_id=wall_remote_4_gang" - }, - { - "name": "action", - "type": "dropdown", - "title": { - "en": "Button Action" - }, - "values": [ - { - "id": "leftUp-oneClick", - "label": { - "en": "Upper Left Button: 1 Click" - } - }, - { - "id": "leftUp-twoClicks", - "label": { - "en": "Upper Left Button: 2 Clicks" - } - }, - { - "id": "rightUp-oneClick", - "label": { - "en": "Upper Right Button: 1 Click" - } - }, - { - "id": "rightUp-twoClicks", - "label": { - "en": "Upper Right Button: 2 Clicks" - } - }, - { - "id": "leftDown-oneClick", - "label": { - "en": "Lower Left Button: 1 Click" - } - }, - { - "id": "leftDown-twoClicks", - "label": { - "en": "Lower Left Button: 2 Clicks" - } - }, - { - "id": "rightDown-oneClick", - "label": { - "en": "Lower Right Button: 1 Click" - } - }, - { - "id": "rightDown-twoClicks", - "label": { - "en": "Lower Right Button: 2 Clicks" - } - } - ] - } - ] - }, - { - "id": "wall_remote_4_gang_buttons_2", - "title": { - "en": "Button" - }, - "titleFormatted": { - "en": "The [[button]]" - }, - "args": [ - { - "type": "device", - "name": "device", - "filter": "driver_id=wall_remote_4_gang_2" - }, - { - "name": "button", - "type": "dropdown", - "title": { - "en": "Button Pressed" - }, - "values": [ - { - "id": "leftUp", - "label": { - "en": "Upper Left Button Pressed" - } - }, - { - "id": "rightUp", - "label": { - "en": "Upper Right Button Pressed" - } - }, - { - "id": "leftDown", - "label": { - "en": "Lower Left Button Pressed" - } - }, - { - "id": "rightDown", - "label": { - "en": "Lower Right Button Pressed" - } - } - ] - } - ] - }, - { - "id": "wall_remote_4_gang_buttons_3", - "title": { - "en": "Button Action" - }, - "titleFormatted": { - "en": "The [[action]]" - }, - "args": [ - { - "type": "device", - "name": "device", - "filter": "driver_id=wall_remote_4_gang_3" - }, - { - "name": "action", - "type": "dropdown", - "title": { - "en": "Button Action" - }, - "values": [ - { - "id": "leftUp-oneClick", + "id": "9", "label": { - "en": "Upper Left Button: 1 Click" + "en": "Wheep", + "nl": "Wheep", + "de": "Wheep" } }, { - "id": "leftUp-twoClicks", + "id": "10", "label": { - "en": "Upper Left Button: 2 Clicks" + "en": "Barking dog", + "nl": "Barking dog", + "de": "Barking dog" } }, { - "id": "rightUp-oneClick", + "id": "11", "label": { - "en": "Upper Right Button: 1 Click" + "en": "Alarm Siren", + "nl": "Alarm Siren", + "de": "Alarm Siren" } }, { - "id": "rightUp-twoClicks", + "id": "12", "label": { - "en": "Upper Right Button: 2 Clicks" + "en": "Doorbell 2", + "nl": "Doorbell 2", + "de": "Doorbell 2" } }, { - "id": "leftDown-oneClick", + "id": "13", "label": { - "en": "Lower Left Button: 1 Click" + "en": "Old Phone", + "nl": "Old Phone", + "de": "Old Phone" } }, { - "id": "leftDown-twoClicks", + "id": "14", "label": { - "en": "Lower Left Button: 2 Clicks" + "en": "Police Siren", + "nl": "Police Siren", + "de": "Police Siren" } }, { - "id": "rightDown-oneClick", + "id": "15", "label": { - "en": "Lower Right Button: 1 Click" + "en": "Evacuation bell", + "nl": "Evacuation bell", + "de": "Evacuation bell" } }, { - "id": "rightDown-twoClicks", + "id": "16", "label": { - "en": "Lower Right Button: 2 Clicks" + "en": "Clock alarm", + "nl": "Clock alarm", + "de": "Clock alarm" + } + }, + { + "id": "17", + "label": { + "en": "Fire alarm", + "nl": "Fire alarm", + "de": "Fire alarm" } } ] } ] - } - ], - "conditions": [ + }, { - "id": "window_open_status_get", + "id": "window_open_status_set", "title": { - "en": "Window !{{is|is not}} open" + "en": "Set window open status" + }, + "titleFormatted": { + "en": "Set window open status to [[window_open_status]]" }, "args": [ { "type": "device", "name": "device", "filter": "driver_id=thermostatic_radiator_valve" + }, + { + "type": "checkbox", + "name": "window_open_status", + "title": { + "en": "Open" + } } ] } @@ -4174,10 +3680,10 @@ "_TZE202_ztc6ggyl", "_TZE203_ztc6ggyl", "_TZE204_ztc6ggyl", + "_TZE204_7gclukjs", "_TZE204_qasjif9e", "_TZE204_ijxvkhd0", - "_TZE204_sxm7l9xa", - "_TZE204_7gclukjs" + "_TZE204_sxm7l9xa" ], "productId": [ "TS0601" @@ -4218,79 +3724,379 @@ "max": 9 }, { - "id": "minimum_range", + "id": "minimum_range", + "type": "number", + "label": { + "en": "Minimum range", + "nl": "Minimale bereik" + }, + "value": 0, + "min": 0, + "max": 9.5, + "units": { + "en": "meters", + "nl": "meters" + } + }, + { + "id": "maximum_range", + "type": "number", + "label": { + "en": "Maximum range", + "nl": "Maximale bereik" + }, + "value": 9.5, + "min": 0, + "max": 9.5, + "units": { + "en": "meters", + "nl": "meters" + } + }, + { + "id": "detection_delay", + "type": "number", + "label": { + "en": "Detection delay", + "nl": "Detectie vertraging" + }, + "value": 7, + "min": 0, + "max": 10, + "units": { + "en": "seconds", + "nl": "seconden" + } + }, + { + "id": "fading_time", + "type": "number", + "label": { + "en": "Fading time", + "nl": "Reset tijd" + }, + "value": 7, + "min": 0, + "max": 1500, + "units": { + "en": "seconds", + "nl": "seconden" + } + }, + { + "id": "distance_update_interval", + "type": "number", + "label": { + "en": "Distance update interval", + "nl": "Afstand update interval" + }, + "value": 10, + "min": 3, + "max": 60, + "units": { + "en": "seconds", + "nl": "seconden" + } + } + ] + }, + { + "id": "radar_sensor_2", + "name": { + "en": "Radar Sensor ZG-205Z/W", + "nl": "Radar Sensor ZG-205Z/W" + }, + "class": "sensor", + "platforms": [ + "local" + ], + "connectivity": [ + "zigbee" + ], + "capabilities": [ + "measure_luminance", + "alarm_motion", + "alarm_small_presence", + "alarm_large_presence", + "alarm_breathe_presence" + ], + "images": { + "large": "/drivers/radar_sensor_2/assets/images/large.png", + "small": "/drivers/radar_sensor_2/assets/images/small.png" + }, + "energy": { + "approximation": { + "usageConstant": 2.5 + } + }, + "zigbee": { + "manufacturerName": [ + "_TZE200_2aaelwxk" + ], + "productId": [ + "TS0225" + ], + "endpoints": { + "1": { + "clusters": [ + 0, + 3, + 1280, + 57346, + 61184, + 60928, + 57344, + 1024 + ], + "bindings": [ + 258, + 61148 + ] + } + }, + "learnmode": { + "image": "/drivers/radar_sensor_2/assets/icon.svg", + "instruction": { + "en": "Press and hold the reset button for 6 seconds. When the indicator light flashes it is in pairing mode.", + "nl": "Druk 6 seconden op de reset knop. Wacht tot de led gaat knipperen." + } + } + }, + "settings": [ + { + "id": "motion_detection_sensitivity", + "type": "number", + "label": { + "en": "Radar sensitivity", + "nl": "Radar sensitiviteit" + }, + "value": 6, + "min": 0, + "max": 10, + "units": { + "en": "x", + "nl": "x" + } + }, + { + "id": "mov_minimum_distance", + "type": "number", + "label": { + "en": "Minimum range", + "nl": "Minimale bereik" + }, + "value": 0, + "min": 0, + "max": 10, + "step": 1, + "units": { + "en": "meters", + "nl": "meters" + } + }, + { + "id": "motion_detection_distance", + "type": "number", + "label": { + "en": "Motion detection distance", + "nl": "Bewegingsdetectie afstand" + }, + "value": 600, + "min": 0, + "max": 1000, + "step": 1, + "units": { + "en": "centimeter", + "nl": "centimeter" + } + }, + { + "id": "fading_time", + "type": "number", + "label": { + "en": "Fading time", + "nl": "Reset tijd" + }, + "value": 0, + "min": 0, + "max": 28800, + "units": { + "en": "seconds", + "nl": "seconden" + } + }, + { + "id": "motion_false_detection", + "type": "number", + "value": 1, + "min": 0, + "max": 10, + "units": { + "en": "x", + "nl": "x" + }, + "label": { + "en": "Breathe False detection", + "nl": "Onjuiste Adem detectie" + } + }, + { + "id": "small_motion_detection_distance", "type": "number", "label": { - "en": "Minimum range", - "nl": "Minimale bereik" + "en": "Small Motion detection distance", + "nl": "Kleine bewegingsdetectie afstand" }, - "value": 0, + "value": 600, "min": 0, - "max": 9.5, + "max": 600, + "step": 1, "units": { - "en": "meters", - "nl": "meters" + "en": "centimeter", + "nl": "centimeter" } }, { - "id": "maximum_range", + "id": "small_motion_detection_sensitivity", "type": "number", "label": { - "en": "Maximum range", - "nl": "Maximale bereik" + "en": "Small Movement sensitivity", + "nl": "Kleine Beweging sensitiviteit" }, - "value": 9.5, + "value": 8, "min": 0, - "max": 9.5, + "max": 10, "units": { - "en": "meters", - "nl": "meters" + "en": "x", + "nl": "x" } }, { - "id": "detection_delay", + "id": "indicator", + "type": "checkbox", + "value": true, + "label": { + "en": "LED indicator", + "nl": "LED indicatie" + } + }, + { + "id": "static_detection_distance", "type": "number", "label": { - "en": "Detection delay", - "nl": "Detectie vertraging" + "en": "Static detection distance", + "nl": "Statische detectie afstand" }, - "value": 7, + "value": 600, "min": 0, - "max": 10, + "max": 600, + "step": 1, "units": { - "en": "seconds", - "nl": "seconden" + "en": "centimeter", + "nl": "centimeter" } }, { - "id": "fading_time", + "id": "static_detection_sensitivity", "type": "number", "label": { - "en": "Fading time", - "nl": "Reset tijd" + "en": "Static detection sensitivity", + "nl": "Statische detectie sensitiviteit" }, - "value": 7, + "value": 8, "min": 0, - "max": 1500, + "max": 10, "units": { - "en": "seconds", - "nl": "seconden" + "en": "x", + "nl": "x" } }, { - "id": "distance_update_interval", - "type": "number", + "id": "breathe_false_detection", + "type": "checkbox", + "value": false, "label": { - "en": "Distance update interval", - "nl": "Afstand update interval" - }, - "value": 10, - "min": 3, - "max": 60, - "units": { - "en": "seconds", - "nl": "seconden" + "en": "Breathe False detection", + "nl": "Onjuiste Adem detectie" } + }, + { + "id": "alarm_volume", + "type": "dropdown", + "value": "high", + "label": { + "en": "Alarm volume", + "nl": "Alarm volume" + }, + "values": [ + { + "id": "mute", + "label": { + "en": "Mute", + "nl": "Gedempt" + } + }, + { + "id": "low", + "label": { + "en": "Low", + "nl": "Laag" + } + }, + { + "id": "medium", + "label": { + "en": "Medium", + "nl": "Middel" + } + }, + { + "id": "high", + "label": { + "en": "High", + "nl": "Hoog" + } + } + ] + }, + { + "id": "working_mode", + "type": "dropdown", + "value": "off", + "label": { + "en": "Working mode", + "nl": "Werk modus" + }, + "values": [ + { + "id": "off", + "label": { + "en": "Off", + "nl": "Uit" + } + }, + { + "id": "arm", + "label": { + "en": "Arm", + "nl": "Arm" + } + }, + { + "id": "alarm", + "label": { + "en": "Alarm", + "nl": "Alarm" + } + }, + { + "id": "doorbell", + "label": { + "en": "Doorbell", + "nl": "Deurbel" + } + } + ] } ] }, @@ -5885,7 +5691,8 @@ }, "zigbee": { "manufacturerName": [ - "_TZE200_arge1ptm" + "_TZE200_arge1ptm", + "_TZE200_xlppj4f5" ], "productId": [ "TS0601" @@ -6585,65 +6392,6 @@ }, "settings": [] }, - { - "id": "smoke_sensor2", - "name": { - "en": "Smoke Sensor" - }, - "class": "sensor", - "platforms": [ - "local" - ], - "connectivity": [ - "zigbee" - ], - "capabilities": [ - "measure_battery", - "alarm_smoke", - "alarm_tamper", - "alarm_battery" - ], - "energy": { - "batteries": [ - "AAA", - "AAA" - ] - }, - "images": { - "large": "/drivers/smoke_sensor2/assets/images/large.png", - "small": "/drivers/smoke_sensor2/assets/images/small.png" - }, - "zigbee": { - "manufacturerName": [ - "_TZE200_ntcy3xu1" - ], - "productId": [ - "TS0601" - ], - "endpoints": { - "1": { - "clusters": [ - 0, - 4, - 5, - 61184 - ], - "bindings": [ - 4, - 5, - 61184 - ] - } - }, - "learnmode": { - "image": "/drivers/smoke_sensor2/assets/icon.svg", - "instruction": { - "en": "Press the RESET pinhole on the side of the unit for 5 seconds until LED blinks." - } - } - }, - "settings": [] - }, { "id": "socket_power_strip", "name": { @@ -8640,12 +8388,14 @@ "_TYZB01_4tlksk8a", "_TZ3000_tvuarksa", "_TZ3000_j9568h44", - "_TZ3000_iedbgyxt" + "_TZ3000_iedbgyxt", + "_TZ3000_w0ypwa1f" ], "productId": [ "TS0111", "TS0001", - "TS011F" + "TS011F", + "TS0001" ], "endpoints": { "1": { @@ -9253,6 +9003,7 @@ "_TZ3000_oex7egmt", "_TZ3000_hafsqare", "_TZ3000_oaq83gqc", + "_TZ3000_hhiodade", "_TZ3000_6eyydfyg" ], "productId": [ @@ -9263,6 +9014,9 @@ "1": { "clusters": [ 0, + 3, + 4, + 5, 6 ], "bindings": [ @@ -9273,11 +9027,40 @@ "learnmode": { "image": "/drivers/wall_switch_1_gang/assets/icon.svg", "instruction": { - "en": "Press the button for 10 seconds (the LED should start blinking)." + "en": "Press the button for 7 seconds (until LED starts blinking)." } } }, - "settings": [] + "settings": [ + { + "id": "indicator_mode", + "type": "radio", + "label": { + "en": "Indicator mode" + }, + "value": "1", + "values": [ + { + "id": "0", + "label": { + "en": "Light Off" + } + }, + { + "id": "1", + "label": { + "en": "Light on when switch turned on." + } + }, + { + "id": "2", + "label": { + "en": "Light on when the switch is turned off." + } + } + ] + } + ] }, { "id": "wall_switch_1_gang_tuya", @@ -10050,6 +9833,24 @@ "pl": "Mały czujnik Obecność wyłączony" } }, + "away_mode": { + "type": "boolean", + "title": { + "en": "Away Mode" + }, + "uiComponent": "toggle", + "getable": true, + "setable": true + }, + "child_lock": { + "type": "boolean", + "title": { + "en": "Child Lock" + }, + "uiComponent": "toggle", + "getable": true, + "setable": true + }, "last_watering_time": { "type": "number", "title": { @@ -10070,24 +9871,6 @@ "nl": "sec" } }, - "away_mode": { - "type": "boolean", - "title": { - "en": "Away Mode" - }, - "uiComponent": "toggle", - "getable": true, - "setable": true - }, - "child_lock": { - "type": "boolean", - "title": { - "en": "Child Lock" - }, - "uiComponent": "toggle", - "getable": true, - "setable": true - }, "lidl_xmas_mode": { "title": { "en": "Mode" @@ -10247,19 +10030,18 @@ "en": "Target distance", "nl": "Afstand doel" }, + "icon": "/drivers/radar_sensor/assets/images/measure.svg", + "units": { + "en": "m", + "nl": "m" + }, "uiComponent": "sensor", "getable": true, "setable": false, "insights": true, "options": { "zoneActivity": true - }, - "icon": "/drivers/radar_sensor/assets/images/measure.svg", - "units": { - "en": "m", - "nl": "m" - }, - "icon": "/drivers/radar_sensor/assets/distance.svg" + } }, "temp_calibration": { "type": "number", @@ -10334,6 +10116,26 @@ "setable": true, "uiComponent": "picker" }, + "valve_state_auto_shutdown": { + "type": "number", + "title": { + "en": "Valve State @ autoshutdown", + "nl": "Kraanstatus @ auto stop" + }, + "units": { + "en": "%", + "nl": "%" + }, + "icon": "/drivers/smart_water_timer/assets/images/nighttime.svg", + "getable": true, + "setable": false, + "chartType": "area", + "uiComponent": "sensor", + "min": 0, + "max": 100, + "steps": 5, + "decimals": 0 + }, "window_open": { "type": "boolean", "title": { @@ -10349,4 +10151,4 @@ "setable": true } } -} +} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 393159eb..e60fe3ee 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6,7 +6,7 @@ "packages": { "": { "name": "com.tuya.zigbee", - "version": "0.2.25", + "version": "0.2.26", "license": "MIT", "dependencies": { "homey-zigbeedriver": "^1.6.12", From 7d9e737761ce9753d30246bf3b3f7571d415e464 Mon Sep 17 00:00:00 2001 From: Eelco Date: Fri, 24 May 2024 09:28:02 +0200 Subject: [PATCH 20/22] added device specific flows for radar and smart_water_timer --- .../capabilities/meter_valve_state.json | 53 ++++--- .../capabilities/remaining_watering_time.json | 32 ++--- .../valve_state_auto_shutdown.json | 37 +++-- .../radar_sensor_2/driver.flow.compose.json | 130 ++++++++++++++++++ .../driver.flow.compose.json | 91 ++++++++++++ 5 files changed, 281 insertions(+), 62 deletions(-) create mode 100644 drivers/radar_sensor_2/driver.flow.compose.json create mode 100644 drivers/smart_water_timer/driver.flow.compose.json diff --git a/.homeycompose/capabilities/meter_valve_state.json b/.homeycompose/capabilities/meter_valve_state.json index 838746d3..4fb92722 100644 --- a/.homeycompose/capabilities/meter_valve_state.json +++ b/.homeycompose/capabilities/meter_valve_state.json @@ -1,31 +1,30 @@ { - "type": "number", - "title": { - "en": "Valve State", - "nl": "Kraanstatus" - }, - "units": { - "en": "%", - "nl": "%" - }, - "icon": "/drivers/smart_water_timer/assets/images/sprinklers.svg", - "getable": true, - "setable": false, - "chartType": "area", - "uiComponent": "sensor", - "min": 0, - "max": 100, - "steps": 5, - "decimals": 0, - "capabilitiesOptions": { - "titleTrue": { - "en": "Open", - "nl": "Open" + "type": "number", + "title": { + "en": "Valve State", + "nl": "Kraanstatus" }, - "titleFalse": { - "en": "Closed", - "nl": "Gesloten" + "units": { + "en": "%", + "nl": "%" + }, + "icon": "/drivers/smart_water_timer/assets/images/sprinklers.svg", + "getable": true, + "setable": false, + "chartType": "area", + "uiComponent": "sensor", + "min": 0, + "max": 100, + "steps": 5, + "decimals": 0, + "capabilitiesOptions": { + "titleTrue": { + "en": "Open", + "nl": "Open" + }, + "titleFalse": { + "en": "Closed", + "nl": "Gesloten" + } } - } } - \ No newline at end of file diff --git a/.homeycompose/capabilities/remaining_watering_time.json b/.homeycompose/capabilities/remaining_watering_time.json index 2f08fcf7..53dc94a3 100644 --- a/.homeycompose/capabilities/remaining_watering_time.json +++ b/.homeycompose/capabilities/remaining_watering_time.json @@ -1,18 +1,18 @@ { - "type": "number", - "title": { - "en": "Remaining Watering Time", - "nl": "Resterende tijd bewatering" - }, - "uiComponent": "sensor", - "getable": true, - "setable": false, - "insights": true, - "options": { - "zoneActivity": true - }, - "icon": "/drivers/smart_water_timer/assets/images/pressure-gauge.svg", - "units": { "en": "sec", "nl": "sec" }, - "min": 0, - "decimals": 0 + "type": "number", + "title": { + "en": "Remaining Watering Time", + "nl": "Resterende tijd bewatering" + }, + "uiComponent": "sensor", + "getable": true, + "setable": false, + "insights": true, + "options": { + "zoneActivity": true + }, + "icon": "/drivers/smart_water_timer/assets/images/pressure-gauge.svg", + "units": { "en": "sec", "nl": "sec" }, + "min": 0, + "decimals": 0 } diff --git a/.homeycompose/capabilities/valve_state_auto_shutdown.json b/.homeycompose/capabilities/valve_state_auto_shutdown.json index ecf1d7eb..c7d260b4 100644 --- a/.homeycompose/capabilities/valve_state_auto_shutdown.json +++ b/.homeycompose/capabilities/valve_state_auto_shutdown.json @@ -1,21 +1,20 @@ { - "type": "number", - "title": { - "en": "Valve State @ autoshutdown", - "nl": "Kraanstatus @ auto stop" - }, - "units": { - "en": "%", - "nl": "%" - }, - "icon": "/drivers/smart_water_timer/assets/images/nighttime.svg", - "getable": true, - "setable": false, - "chartType": "area", - "uiComponent": "sensor", - "min": 0, - "max": 100, - "steps": 5, - "decimals": 0 + "type": "number", + "title": { + "en": "Valve State @ autoshutdown", + "nl": "Kraanstatus @ auto stop" + }, + "units": { + "en": "%", + "nl": "%" + }, + "icon": "/drivers/smart_water_timer/assets/images/nighttime.svg", + "getable": true, + "setable": false, + "chartType": "area", + "uiComponent": "sensor", + "min": 0, + "max": 100, + "steps": 5, + "decimals": 0 } - \ No newline at end of file diff --git a/drivers/radar_sensor_2/driver.flow.compose.json b/drivers/radar_sensor_2/driver.flow.compose.json new file mode 100644 index 00000000..c6d5a14e --- /dev/null +++ b/drivers/radar_sensor_2/driver.flow.compose.json @@ -0,0 +1,130 @@ +{ + "triggers": [ + { + "id": "alarm_breathe_presence", + "title": { + "en": "Breath presence", + "nl": "Adem aanwezigheid", + "de": "Atempräsenz", + "fr": "Présence respiratoire", + "it": "Presenza del respiro", + "sv": "Andningsnärvaro", + "no": "Åndedrettsnærvær", + "es": "Presencia de la respiración", + "da": "Åndedræt nærvær", + "ru": "Присутствие дыхания", + "pl": "Obecność oddechu" + }, + "titleFormatted": { + "en": "Breath presence", + "nl": "Adem aanwezigheid", + "de": "Atempräsenz", + "fr": "Présence respiratoire", + "it": "Presenza del respiro", + "sv": "Andningsnärvaro", + "no": "Åndedrettsnærvær", + "es": "Presencia de la respiración", + "da": "Åndedræt nærvær", + "ru": "Присутствие дыхания", + "pl": "Obecność oddechu" + }, + "hint": { + "en": "This card will trigger when Breath Presence is activated.", + "nl": "Deze kaart wordt alleen geactiveerd wanneer de Adem aanwezigheid actief is.", + "de": "Diese Karte wird ausgelöst, wenn die Atempräsenz aktiviert wird." + }, + "args": [] + }, + { + "id": "alarm_small_presence", + "title": { + "en": "Small Presence", + "nl": "Kleine Aanwezigheid", + "de": "Kleine Präsenz", + "fr": "Petite Présence", + "it": "Presenza Piccola", + "sv": "Liten Närvaro", + "no": "Liten Nærvær", + "es": "Pequeña Presencia", + "da": "Lille Nærvær", + "ru": "Маленькое Присутствие", + "pl": "Mała Obecność" + }, + "titleFormatted": { + "en": "Small Presence", + "nl": "Kleine Aanwezigheid", + "de": "Kleine Präsenz", + "fr": "Petite Présence", + "it": "Presenza Piccola", + "sv": "Liten Närvaro", + "no": "Liten Nærvær", + "es": "Pequeña Presencia", + "da": "Lille Nærvær", + "ru": "Маленькое Присутствие", + "pl": "Mała Obecność" + }, + "hint": { + "en": "This card will trigger when Small Presence is activated.", + "nl": "Deze kaart wordt alleen geactiveerd wanneer de Kleine aanwezigheid actief is.", + "de": "Diese Karte wird ausgelöst, wenn die Kleine Präsenz aktiviert wird." + }, + "args": [] + }, + { + "id": "large_small_presence", + "title": { + "en": "Large Presence", + "nl": "Grote Aanwezigheid", + "de": "Große Präsenz", + "fr": "Grande Présence", + "it": "Presenza Ampia", + "sv": "Stor Närvaro", + "no": "Stor Nærvær", + "es": "Presencia Grande", + "da": "Stor Nærvær", + "ru": "Большое Присутствие", + "pl": "Duża Obecność" + }, + "titleFormatted": { + "en": "Large Presence", + "nl": "Grote Aanwezigheid", + "de": "Große Präsenz", + "fr": "Grande Présence", + "it": "Presenza Ampia", + "sv": "Stor Närvaro", + "no": "Stor Nærvær", + "es": "Presencia Grande", + "da": "Stor Nærvær", + "ru": "Большое Присутствие", + "pl": "Duża Obecność" + }, + "hint": { + "en": "This card will trigger when Large Presence is activated.", + "nl": "Deze kaart wordt alleen geactiveerd wanneer de Grote aanwezigheid actief is.", + "de": "Diese Karte wird ausgelöst, wenn die Große Präsenz aktiviert wird." + }, + "args": [] + } + ], + "conditions": [ + { + "id": "alarm_breathe_presence", + "title": { + "en": "Breath Presence alarm {{is|is not}} on" + } + }, + { + "id": "alarm_small_presence", + "title": { + "en": "Small Presence alarm !{{is|is not}} on" + } + }, + { + "id": "alarm_large_presence", + "title": { + "en": "Large Presence alarm !{{is|is not}} on" + } + } + ], + "actions": [] +} diff --git a/drivers/smart_water_timer/driver.flow.compose.json b/drivers/smart_water_timer/driver.flow.compose.json new file mode 100644 index 00000000..6e467e98 --- /dev/null +++ b/drivers/smart_water_timer/driver.flow.compose.json @@ -0,0 +1,91 @@ +{ + "triggers": [ + { + "id": "water_flow_changed", + "title": { + "en": "water_flow-level changed", + "nl": "water_flow-niveau veranderd", + "de": "water_flowm-Niveau geändert", + "fr": "Intensité lumineuse a été modifiée", + "it": "Intensità luminosa modificata", + "sv": "water_flowningsnivå ändrades", + "no": "Dempingsnivå ble endret", + "es": "La intensidad de la luz ha cambiado", + "da": "Lysniveau ændret", + "ru": "Уровень яркости изменен", + "pl": "Zmiana poziomu przygaszenia" + }, + "tokens": [ + { + "name": "water_flow", + "type": "number", + "title": { + "en": "Level", + "nl": "Niveau", + "de": "Niveau", + "fr": "Niveau", + "it": "Livello", + "sv": "Nivå", + "no": "Nivå", + "es": "Nivel", + "da": "Niveau", + "ru": "Уровень", + "pl": "Poziom" + }, + "example": 0.5 + } + ] + } + ], + "actions": [ + { + "id": "water_flow", + "highlight": true, + "title": { + "en": "waterflow to", + "nl": "waterflow naar", + "de": "waterflow auf" + }, + "args": [ + { + "name": "water_flow", + "type": "range", + "min": 0, + "max": 1, + "step": 0.01, + "value": 0.5, + "label": "%", + "labelMultiplier": 100, + "labelDecimals": 0 + } + ] + }, + { + "id": "water_flow_relative", + "title": { + "en": "Set relative water flow-level", + "nl": "Zet relatief water flow-niveau", + "de": "Relatives waterflow Niveau setzen" + }, + "hint": { + "en": "decrease or increase with respect to the device's current waterflow level.", + "nl": "Verhoog of verlaag de waterflow ten opzichte van het huidige waterflow niveau van het apparaat.", + "ru": "Уменьшите или увеличьте яркость относительно текущего уровня яркости устройства.", + "pl": "Przygaś lub rozjaśnij względem obecnego poziomu przygaszenia urządzenia." + }, + "args": [ + { + "name": "water_flow", + "type": "range", + "min": 0, + "max": 1, + "step": 0.01, + "value": 0.5, + "label": "%", + "labelMultiplier": 100, + "labelDecimals": 0 + } + ] + } + ] +} From edf32ba38fd1fba54505e52e6e9ebac9b6435fa6 Mon Sep 17 00:00:00 2001 From: Eelco Date: Fri, 24 May 2024 09:42:18 +0200 Subject: [PATCH 21/22] small parameter syntax fix --- drivers/radar_sensor_2/driver.flow.compose.json | 9 ++++++--- drivers/sirentemphumidsensor/driver.flow.compose.json | 4 ++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/drivers/radar_sensor_2/driver.flow.compose.json b/drivers/radar_sensor_2/driver.flow.compose.json index c6d5a14e..96cbb42a 100644 --- a/drivers/radar_sensor_2/driver.flow.compose.json +++ b/drivers/radar_sensor_2/driver.flow.compose.json @@ -110,19 +110,22 @@ { "id": "alarm_breathe_presence", "title": { - "en": "Breath Presence alarm {{is|is not}} on" + "en": "Breath Presence alarm !{{is|is not}} on", + "nl": "Adem aanwezigheidsalarm !{{is|is niet}} aan" } }, { "id": "alarm_small_presence", "title": { - "en": "Small Presence alarm !{{is|is not}} on" + "en": "Small Presence alarm !{{is|is not}} on", + "nl": "Kleine aanwezigheidsalarm !{{is|is niet}} aan" } }, { "id": "alarm_large_presence", "title": { - "en": "Large Presence alarm !{{is|is not}} on" + "en": "Large Presence alarm !{{is|is not}} on", + "nl": "Groot aanwezigheidsalarm !{{is|is niet}} aan" } } ], diff --git a/drivers/sirentemphumidsensor/driver.flow.compose.json b/drivers/sirentemphumidsensor/driver.flow.compose.json index 0b300812..ff9825f6 100644 --- a/drivers/sirentemphumidsensor/driver.flow.compose.json +++ b/drivers/sirentemphumidsensor/driver.flow.compose.json @@ -32,7 +32,7 @@ "en": "Change the alarm state to [[alarm_state]]", "nl": "Verander de alarm toestand naar [[alarm_state]]", "de": "Ändern des Alarmstatus zu [[alarm_state]]" - }, + }, "hint": { "en": "Change the alarm state; sound or silence the alarm", "nl": "Verander de alarm toestand; luiden of uitschakelen van het alarm", @@ -319,4 +319,4 @@ ] } ] -} \ No newline at end of file +} From 47a1cc4a683d50cd0b8a70516c29368705697834 Mon Sep 17 00:00:00 2001 From: Eelco Date: Fri, 24 May 2024 09:42:45 +0200 Subject: [PATCH 22/22] generated app.json version added --- app.json | 267 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 267 insertions(+) diff --git a/app.json b/app.json index c6b66e3f..8ffc05e4 100644 --- a/app.json +++ b/app.json @@ -281,6 +281,129 @@ } ] }, + { + "id": "alarm_breathe_presence", + "title": { + "en": "Breath presence", + "nl": "Adem aanwezigheid", + "de": "Atempräsenz", + "fr": "Présence respiratoire", + "it": "Presenza del respiro", + "sv": "Andningsnärvaro", + "no": "Åndedrettsnærvær", + "es": "Presencia de la respiración", + "da": "Åndedræt nærvær", + "ru": "Присутствие дыхания", + "pl": "Obecność oddechu" + }, + "titleFormatted": { + "en": "Breath presence", + "nl": "Adem aanwezigheid", + "de": "Atempräsenz", + "fr": "Présence respiratoire", + "it": "Presenza del respiro", + "sv": "Andningsnärvaro", + "no": "Åndedrettsnærvær", + "es": "Presencia de la respiración", + "da": "Åndedræt nærvær", + "ru": "Присутствие дыхания", + "pl": "Obecność oddechu" + }, + "hint": { + "en": "This card will trigger when Breath Presence is activated.", + "nl": "Deze kaart wordt alleen geactiveerd wanneer de Adem aanwezigheid actief is.", + "de": "Diese Karte wird ausgelöst, wenn die Atempräsenz aktiviert wird." + }, + "args": [ + { + "type": "device", + "name": "device", + "filter": "driver_id=radar_sensor_2" + } + ] + }, + { + "id": "alarm_small_presence", + "title": { + "en": "Small Presence", + "nl": "Kleine Aanwezigheid", + "de": "Kleine Präsenz", + "fr": "Petite Présence", + "it": "Presenza Piccola", + "sv": "Liten Närvaro", + "no": "Liten Nærvær", + "es": "Pequeña Presencia", + "da": "Lille Nærvær", + "ru": "Маленькое Присутствие", + "pl": "Mała Obecność" + }, + "titleFormatted": { + "en": "Small Presence", + "nl": "Kleine Aanwezigheid", + "de": "Kleine Präsenz", + "fr": "Petite Présence", + "it": "Presenza Piccola", + "sv": "Liten Närvaro", + "no": "Liten Nærvær", + "es": "Pequeña Presencia", + "da": "Lille Nærvær", + "ru": "Маленькое Присутствие", + "pl": "Mała Obecność" + }, + "hint": { + "en": "This card will trigger when Small Presence is activated.", + "nl": "Deze kaart wordt alleen geactiveerd wanneer de Kleine aanwezigheid actief is.", + "de": "Diese Karte wird ausgelöst, wenn die Kleine Präsenz aktiviert wird." + }, + "args": [ + { + "type": "device", + "name": "device", + "filter": "driver_id=radar_sensor_2" + } + ] + }, + { + "id": "large_small_presence", + "title": { + "en": "Large Presence", + "nl": "Grote Aanwezigheid", + "de": "Große Präsenz", + "fr": "Grande Présence", + "it": "Presenza Ampia", + "sv": "Stor Närvaro", + "no": "Stor Nærvær", + "es": "Presencia Grande", + "da": "Stor Nærvær", + "ru": "Большое Присутствие", + "pl": "Duża Obecność" + }, + "titleFormatted": { + "en": "Large Presence", + "nl": "Grote Aanwezigheid", + "de": "Große Präsenz", + "fr": "Grande Présence", + "it": "Presenza Ampia", + "sv": "Stor Närvaro", + "no": "Stor Nærvær", + "es": "Presencia Grande", + "da": "Stor Nærvær", + "ru": "Большое Присутствие", + "pl": "Duża Obecność" + }, + "hint": { + "en": "This card will trigger when Large Presence is activated.", + "nl": "Deze kaart wordt alleen geactiveerd wanneer de Grote aanwezigheid actief is.", + "de": "Diese Karte wird ausgelöst, wenn die Große Präsenz aktiviert wird." + }, + "args": [ + { + "type": "device", + "name": "device", + "filter": "driver_id=radar_sensor_2" + } + ] + }, { "id": "alarm_siren", "title": { @@ -429,6 +552,49 @@ } ] }, + { + "id": "water_flow_changed", + "title": { + "en": "water_flow-level changed", + "nl": "water_flow-niveau veranderd", + "de": "water_flowm-Niveau geändert", + "fr": "Intensité lumineuse a été modifiée", + "it": "Intensità luminosa modificata", + "sv": "water_flowningsnivå ändrades", + "no": "Dempingsnivå ble endret", + "es": "La intensidad de la luz ha cambiado", + "da": "Lysniveau ændret", + "ru": "Уровень яркости изменен", + "pl": "Zmiana poziomu przygaszenia" + }, + "tokens": [ + { + "name": "water_flow", + "type": "number", + "title": { + "en": "Level", + "nl": "Niveau", + "de": "Niveau", + "fr": "Niveau", + "it": "Livello", + "sv": "Nivå", + "no": "Nivå", + "es": "Nivel", + "da": "Niveau", + "ru": "Уровень", + "pl": "Poziom" + }, + "example": 0.5 + } + ], + "args": [ + { + "type": "device", + "name": "device", + "filter": "driver_id=smart_water_timer" + } + ] + }, { "id": "wall_remote_1_gang_buttons", "title": { @@ -821,6 +987,48 @@ }, "id": "the-small-presence-alarm-is-onoff" }, + { + "id": "alarm_breathe_presence", + "title": { + "en": "Breath Presence alarm !{{is|is not}} on", + "nl": "Adem aanwezigheidsalarm !{{is|is niet}} aan" + }, + "args": [ + { + "type": "device", + "name": "device", + "filter": "driver_id=radar_sensor_2" + } + ] + }, + { + "id": "alarm_small_presence", + "title": { + "en": "Small Presence alarm !{{is|is not}} on", + "nl": "Kleine aanwezigheidsalarm !{{is|is niet}} aan" + }, + "args": [ + { + "type": "device", + "name": "device", + "filter": "driver_id=radar_sensor_2" + } + ] + }, + { + "id": "alarm_large_presence", + "title": { + "en": "Large Presence alarm !{{is|is not}} on", + "nl": "Groot aanwezigheidsalarm !{{is|is niet}} aan" + }, + "args": [ + { + "type": "device", + "name": "device", + "filter": "driver_id=radar_sensor_2" + } + ] + }, { "id": "window_open_status_get", "title": { @@ -1388,6 +1596,65 @@ } ] }, + { + "id": "water_flow", + "highlight": true, + "title": { + "en": "waterflow to", + "nl": "waterflow naar", + "de": "waterflow auf" + }, + "args": [ + { + "type": "device", + "name": "device", + "filter": "driver_id=smart_water_timer" + }, + { + "name": "water_flow", + "type": "range", + "min": 0, + "max": 1, + "step": 0.01, + "value": 0.5, + "label": "%", + "labelMultiplier": 100, + "labelDecimals": 0 + } + ] + }, + { + "id": "water_flow_relative", + "title": { + "en": "Set relative water flow-level", + "nl": "Zet relatief water flow-niveau", + "de": "Relatives waterflow Niveau setzen" + }, + "hint": { + "en": "decrease or increase with respect to the device's current waterflow level.", + "nl": "Verhoog of verlaag de waterflow ten opzichte van het huidige waterflow niveau van het apparaat.", + "ru": "Уменьшите или увеличьте яркость относительно текущего уровня яркости устройства.", + "pl": "Przygaś lub rozjaśnij względem obecnego poziomu przygaszenia urządzenia." + }, + "args": [ + { + "type": "device", + "name": "device", + "filter": "driver_id=smart_water_timer" + }, + { + "name": "water_flow", + "type": "range", + "min": 0, + "max": 1, + "step": 0.01, + "value": 0.5, + "label": "%", + "labelMultiplier": 100, + "labelDecimals": 0 + } + ] + }, { "id": "window_open_status_set", "title": {