From 1ea929592b7d81e0bb75de1cf1905769c3dfd298 Mon Sep 17 00:00:00 2001 From: BabaIsYou <85300265+BabaIsYou@users.noreply.github.com> Date: Fri, 21 Apr 2023 09:25:27 -0400 Subject: [PATCH 1/5] Combine two Tuya water leak sensors DDF Combine _TZ3000_TS0207_water_leak_sensor.json and _TZ3000_water_sensor.json in a unique DDF. --- .../_TZ3000_TS0207_water_leak_sensor.json | 38 ++++++++++--------- 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/devices/tuya/_TZ3000_TS0207_water_leak_sensor.json b/devices/tuya/_TZ3000_TS0207_water_leak_sensor.json index db21d0af83..347df2d2e9 100644 --- a/devices/tuya/_TZ3000_TS0207_water_leak_sensor.json +++ b/devices/tuya/_TZ3000_TS0207_water_leak_sensor.json @@ -1,11 +1,14 @@ { "schema": "devcap1.schema.json", - "manufacturername": ["_TZ3000_kyb656no","_TZ3000_fxvjhdyl","_TZ3000_eit7p838","_TZ3000_t6jriawg","_TZ3000_85czd6fy","_TYZB01_sqmd19i1","_TYZB01_o63ssaah"], - "modelid": ["TS0207","TS0207","TS0207","TS0207","TS0207","TS0207","TS0207"], - "vendor": "TuYa", - "product": "Tuya based Flooding detector", + "manufacturername": ["_TZ3000_d16y6col", "_TZ3000_ww9i3e0y", "_TZ3000_qhozxs2b", "_TZ3000_85czd6fy", "_TZ3000_ocjlo4ea", + "_TZ3000_kyb656no","_TZ3000_fxvjhdyl","_TZ3000_eit7p838","_TZ3000_t6jriawg","_TZ3000_85czd6fy","_TYZB01_sqmd19i1", + "_TYZB01_o63ssaah","_TZ3000_it1hm1cr","_TZ3000_upgcbody"], + "modelid": ["TS0207","TS0207","TS0207","TS0207","TS0207","TS0207","TS0207","TS0207", "TS0207", "TS0207","TS0207", "TS0207", + "TS0207", "TS0207"], + "vendor": "Tuya", + "product": "Tuya water leak sensor", "sleeper": true, - "status": "Silver", + "status": "Gold", "subdevices": [ { "type": "$TYPE_WATER_LEAK_SENSOR", @@ -43,14 +46,13 @@ "name": "attr/manufacturername" }, { - "name": "attr/modelid", - "awake": true + "name": "attr/modelid" }, { "name": "attr/name" }, { - "name": "attr/swversion", + "name": "attr/swversion", "parse": {"fn": "zcl", "ep": 1, "cl": "0x0000", "at": "0x0001", "script": "tuya_swversion.js"}, "read": {"fn": "zcl", "ep": 1, "cl": "0x0000", "at": "0x0001"} }, @@ -62,22 +64,15 @@ }, { "name": "config/battery", - "awake": true, "parse": { "at": "0x0021", "cl": "0x0001", "ep": 1, - "eval": "Item.val = Attr.val / 2", - "fn": "zcl" + "eval": "Item.val = Attr.val / 2" } }, { - "name": "config/checkin", - "awake": true - }, - { - "name": "config/enrolled", - "public": true + "name": "config/enrolled" }, { "name": "config/on" @@ -91,9 +86,14 @@ { "name": "state/lastupdated" }, + { + "name": "state/lowbattery", + }, + { + "name": "state/tampered", + }, { "name": "state/water", - "awake": true } ] } @@ -102,6 +102,7 @@ { "bind": "unicast", "src.ep": 1, + "dst.ep": 1, "cl": "0x0001", "report": [ { @@ -116,6 +117,7 @@ { "bind": "unicast", "src.ep": 1, + "dst.ep": 1, "cl": "0x0500" } ] From 22a6176f92dd50bdc9b28c6728fb6e07afe9e0e7 Mon Sep 17 00:00:00 2001 From: BabaIsYou <85300265+BabaIsYou@users.noreply.github.com> Date: Fri, 21 Apr 2023 09:25:48 -0400 Subject: [PATCH 2/5] Delete _TZ3000_water_sensor.json --- devices/tuya/_TZ3000_water_sensor.json | 123 ------------------------- 1 file changed, 123 deletions(-) delete mode 100644 devices/tuya/_TZ3000_water_sensor.json diff --git a/devices/tuya/_TZ3000_water_sensor.json b/devices/tuya/_TZ3000_water_sensor.json deleted file mode 100644 index 9c304de3ec..0000000000 --- a/devices/tuya/_TZ3000_water_sensor.json +++ /dev/null @@ -1,123 +0,0 @@ -{ - "schema": "devcap1.schema.json", - "manufacturername": ["_TZ3000_d16y6col", "_TZ3000_ww9i3e0y", "_TZ3000_qhozxs2b", "_TZ3000_85czd6fy", "_TZ3000_ocjlo4ea"], - "modelid": ["TS0207", "TS0207", "TS0207", "TS0207", "TS0207"], - "vendor": "Tuya", - "product": "Tuya water sensor", - "sleeper": true, - "status": "Gold", - "subdevices": [ - { - "type": "ZHAWater", - "restapi": "/sensors", - "uuid": [ - "$address.ext", - "0x01", - "0x0500" - ], - "fingerprint": { - "profile": "0x0104", - "device": "0x0402", - "endpoint": "0x01", - "in": [ - "0x0000", - "0x0001", - "0x0500" - ] - }, - "items": [ - { - "name": "attr/id" - }, - { - "name": "attr/lastannounced" - }, - { - "name": "attr/lastseen" - }, - { - "name": "attr/manufacturername" - }, - { - "name": "attr/modelid" - }, - { - "name": "attr/name" - }, - { - "name": "attr/swversion", - "refresh.interval": 86400, - "parse": {"fn": "zcl", "ep": 1, "cl": "0x0000", "at": "0x0001", "script": "tuya_swversion.js"}, - "read": {"fn": "zcl", "ep": 1, "cl": "0x0000", "at": "0x0001"} - }, - { - "name": "attr/type" - }, - { - "name": "attr/uniqueid" - }, - { - "name": "config/battery", - "refresh.interval": 84000, - "awake": true, - "parse": { - "at": "0x0021", - "cl": "0x0001", - "ep": 1, - "eval": "Item.val = Attr.val / 2" - } - }, - { - "name": "config/enrolled" - }, - { - "name": "config/on" - }, - { - "name": "config/pending" - }, - { - "name": "config/reachable" - }, - { - "name": "state/lastupdated" - }, - { - "name": "state/lowbattery", - "awake": true - }, - { - "name": "state/tampered", - "awake": true - }, - { - "name": "state/water", - "awake": true - } - ] - } - ], - "bindings": [ - { - "bind": "unicast", - "src.ep": 1, - "dst.ep": 1, - "cl": "0x0001", - "report": [ - { - "at": "0x0021", - "dt": "0x20", - "min": 60, - "max": 3600, - "change": "0x00000001" - } - ] - }, - { - "bind": "unicast", - "src.ep": 1, - "dst.ep": 1, - "cl": "0x0500" - } - ] -} From 2036dde960b5c3d24663d92fc040b2d16c9e894d Mon Sep 17 00:00:00 2001 From: BabaIsYou <85300265+BabaIsYou@users.noreply.github.com> Date: Fri, 21 Apr 2023 09:35:16 -0400 Subject: [PATCH 3/5] Update _TZ3000_TS0207_water_leak_sensor.json --- devices/tuya/_TZ3000_TS0207_water_leak_sensor.json | 1 + 1 file changed, 1 insertion(+) diff --git a/devices/tuya/_TZ3000_TS0207_water_leak_sensor.json b/devices/tuya/_TZ3000_TS0207_water_leak_sensor.json index 347df2d2e9..2c9b9ee6c6 100644 --- a/devices/tuya/_TZ3000_TS0207_water_leak_sensor.json +++ b/devices/tuya/_TZ3000_TS0207_water_leak_sensor.json @@ -74,6 +74,7 @@ { "name": "config/enrolled" }, + "name": "config/checkin", { "name": "config/on" }, From 95924c407b3181e77af02bcaf0b35cadce358e59 Mon Sep 17 00:00:00 2001 From: BabaIsYou <85300265+BabaIsYou@users.noreply.github.com> Date: Fri, 21 Apr 2023 09:39:28 -0400 Subject: [PATCH 4/5] Update _TZ3000_TS0207_water_leak_sensor.json --- devices/tuya/_TZ3000_TS0207_water_leak_sensor.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/devices/tuya/_TZ3000_TS0207_water_leak_sensor.json b/devices/tuya/_TZ3000_TS0207_water_leak_sensor.json index 2c9b9ee6c6..92f489567e 100644 --- a/devices/tuya/_TZ3000_TS0207_water_leak_sensor.json +++ b/devices/tuya/_TZ3000_TS0207_water_leak_sensor.json @@ -74,7 +74,9 @@ { "name": "config/enrolled" }, + { "name": "config/checkin", + }, { "name": "config/on" }, From fe2aaae3acca6b4972cc4feb02df6a63cf72d7ba Mon Sep 17 00:00:00 2001 From: BabaIsYou <85300265+BabaIsYou@users.noreply.github.com> Date: Fri, 21 Apr 2023 09:41:58 -0400 Subject: [PATCH 5/5] Update _TZ3000_TS0207_water_leak_sensor.json --- .../_TZ3000_TS0207_water_leak_sensor.json | 257 +++++++++--------- 1 file changed, 132 insertions(+), 125 deletions(-) diff --git a/devices/tuya/_TZ3000_TS0207_water_leak_sensor.json b/devices/tuya/_TZ3000_TS0207_water_leak_sensor.json index 92f489567e..5e56b9a45c 100644 --- a/devices/tuya/_TZ3000_TS0207_water_leak_sensor.json +++ b/devices/tuya/_TZ3000_TS0207_water_leak_sensor.json @@ -1,127 +1,134 @@ { - "schema": "devcap1.schema.json", - "manufacturername": ["_TZ3000_d16y6col", "_TZ3000_ww9i3e0y", "_TZ3000_qhozxs2b", "_TZ3000_85czd6fy", "_TZ3000_ocjlo4ea", - "_TZ3000_kyb656no","_TZ3000_fxvjhdyl","_TZ3000_eit7p838","_TZ3000_t6jriawg","_TZ3000_85czd6fy","_TYZB01_sqmd19i1", - "_TYZB01_o63ssaah","_TZ3000_it1hm1cr","_TZ3000_upgcbody"], - "modelid": ["TS0207","TS0207","TS0207","TS0207","TS0207","TS0207","TS0207","TS0207", "TS0207", "TS0207","TS0207", "TS0207", - "TS0207", "TS0207"], - "vendor": "Tuya", - "product": "Tuya water leak sensor", - "sleeper": true, - "status": "Gold", - "subdevices": [ - { - "type": "$TYPE_WATER_LEAK_SENSOR", - "restapi": "/sensors", - "uuid": [ - "$address.ext", - "0x01", - "0x0500" - ], - "fingerprint": { - "profile": "0x0104", - "device": "0x0402", - "endpoint": "0x01", - "in": [ - "0x0000", - "0x0001", - "0x0003", - "0x0500" - ], - "out": [ - "0x0019" - ] - }, - "items": [ - { - "name": "attr/id" - }, - { - "name": "attr/lastannounced" - }, - { - "name": "attr/lastseen" - }, - { - "name": "attr/manufacturername" - }, - { - "name": "attr/modelid" - }, - { - "name": "attr/name" - }, - { - "name": "attr/swversion", - "parse": {"fn": "zcl", "ep": 1, "cl": "0x0000", "at": "0x0001", "script": "tuya_swversion.js"}, - "read": {"fn": "zcl", "ep": 1, "cl": "0x0000", "at": "0x0001"} - }, - { - "name": "attr/type" - }, - { - "name": "attr/uniqueid" - }, - { - "name": "config/battery", - "parse": { - "at": "0x0021", - "cl": "0x0001", - "ep": 1, - "eval": "Item.val = Attr.val / 2" - } - }, - { - "name": "config/enrolled" - }, - { - "name": "config/checkin", - }, - { - "name": "config/on" - }, - { - "name": "config/pending" - }, - { - "name": "config/reachable" - }, - { - "name": "state/lastupdated" - }, - { - "name": "state/lowbattery", - }, - { - "name": "state/tampered", - }, - { - "name": "state/water", - } - ] - } - ], - "bindings": [ - { - "bind": "unicast", - "src.ep": 1, - "dst.ep": 1, - "cl": "0x0001", - "report": [ - { - "at": "0x0021", - "dt": "0x20", - "min": 3600, - "max": 14400, - "change": "0x00000001" - } - ] - }, - { - "bind": "unicast", - "src.ep": 1, - "dst.ep": 1, - "cl": "0x0500" - } - ] + "schema": "devcap1.schema.json", + "manufacturername": ["_TZ3000_d16y6col", "_TZ3000_ww9i3e0y", "_TZ3000_qhozxs2b", "_TZ3000_85czd6fy", "_TZ3000_ocjlo4ea", + "_TZ3000_kyb656no", "_TZ3000_fxvjhdyl", "_TZ3000_eit7p838", "_TZ3000_t6jriawg", "_TZ3000_85czd6fy", "_TYZB01_sqmd19i1", + "_TYZB01_o63ssaah", "_TZ3000_it1hm1cr", "_TZ3000_upgcbody" + ], + "modelid": ["TS0207", "TS0207", "TS0207", "TS0207", "TS0207", "TS0207", "TS0207", "TS0207", "TS0207", "TS0207", "TS0207", "TS0207", + "TS0207", "TS0207" + ], + "vendor": "Tuya", + "product": "Tuya water leak sensor", + "sleeper": true, + "status": "Gold", + "subdevices": [{ + "type": "$TYPE_WATER_LEAK_SENSOR", + "restapi": "/sensors", + "uuid": [ + "$address.ext", + "0x01", + "0x0500" + ], + "fingerprint": { + "profile": "0x0104", + "device": "0x0402", + "endpoint": "0x01", + "in": [ + "0x0000", + "0x0001", + "0x0003", + "0x0500" + ], + "out": [ + "0x0019" + ] + }, + "items": [{ + "name": "attr/id" + }, + { + "name": "attr/lastannounced" + }, + { + "name": "attr/lastseen" + }, + { + "name": "attr/manufacturername" + }, + { + "name": "attr/modelid" + }, + { + "name": "attr/name" + }, + { + "name": "attr/swversion", + "parse": { + "fn": "zcl", + "ep": 1, + "cl": "0x0000", + "at": "0x0001", + "script": "tuya_swversion.js" + }, + "read": { + "fn": "zcl", + "ep": 1, + "cl": "0x0000", + "at": "0x0001" + } + }, + { + "name": "attr/type" + }, + { + "name": "attr/uniqueid" + }, + { + "name": "config/battery", + "parse": { + "at": "0x0021", + "cl": "0x0001", + "ep": 1, + "eval": "Item.val = Attr.val / 2" + } + }, + { + "name": "config/enrolled" + }, + { + "name": "config/checkin" + }, + { + "name": "config/on" + }, + { + "name": "config/pending" + }, + { + "name": "config/reachable" + }, + { + "name": "state/lastupdated" + }, + { + "name": "state/lowbattery" + }, + { + "name": "state/tampered" + }, + { + "name": "state/water" + } + ] + }], + "bindings": [{ + "bind": "unicast", + "src.ep": 1, + "dst.ep": 1, + "cl": "0x0001", + "report": [{ + "at": "0x0021", + "dt": "0x20", + "min": 3600, + "max": 14400, + "change": "0x00000001" + }] + }, + { + "bind": "unicast", + "src.ep": 1, + "dst.ep": 1, + "cl": "0x0500" + } + ] }