From 6b1d8f086a4464de9ae1f65dcd93e6bdec7e7658 Mon Sep 17 00:00:00 2001 From: JcDenis Date: Sun, 19 May 2024 12:24:39 +0200 Subject: [PATCH] add Tuya TS0044 models --- flows/P.Zigbee.json | 1037 +++++++++++++++++++++++++++++++++++++++--- flows/R.Parents.json | 946 ++++++++++++++++++++++++++++++++++---- 2 files changed, 1835 insertions(+), 148 deletions(-) diff --git a/flows/P.Zigbee.json b/flows/P.Zigbee.json index 525f12c..ffe42eb 100644 --- a/flows/P.Zigbee.json +++ b/flows/P.Zigbee.json @@ -46,7 +46,7 @@ "573db46bbc14f6e9" ], "x": 68, - "y": 1673, + "y": 1373, "w": 2114, "h": 254 }, @@ -236,7 +236,7 @@ "4d1cd88e584eca79" ], "x": 68, - "y": 1373, + "y": 2093, "w": 2154, "h": 254 }, @@ -278,7 +278,7 @@ "33b6641b09b8c982" ], "x": 68, - "y": 1965.5, + "y": 1665.5, "w": 2934, "h": 381.5 }, @@ -375,7 +375,7 @@ "da66f64898772e28" ], "x": 1474, - "y": 1699, + "y": 1399, "w": 682, "h": 142 }, @@ -400,7 +400,7 @@ "cff5883034f77cb0" ], "x": 534, - "y": 1699, + "y": 1399, "w": 842, "h": 202 }, @@ -775,7 +775,7 @@ "13199e203383201a" ], "x": 534, - "y": 1399, + "y": 2119, "w": 882, "h": 202 }, @@ -799,7 +799,7 @@ "81d1299edeeec856" ], "x": 1514, - "y": 1399, + "y": 2119, "w": 682, "h": 142 }, @@ -925,7 +925,7 @@ "4eb7f83fca4bcb34" ], "x": 94, - "y": 1699, + "y": 1399, "w": 342, "h": 82 }, @@ -968,7 +968,7 @@ "f26c156abc555775" ], "x": 94, - "y": 1399, + "y": 2119, "w": 342, "h": 82 }, @@ -1057,7 +1057,7 @@ "4975550378291448" ], "x": 94, - "y": 1999, + "y": 1699, "w": 342, "h": 82 }, @@ -1084,7 +1084,7 @@ "66ba7737ec70b545" ], "x": 534, - "y": 1999, + "y": 1699, "w": 842, "h": 322 }, @@ -1107,7 +1107,7 @@ "1f491e6a49821d0e" ], "x": 1474, - "y": 1999, + "y": 1699, "w": 682, "h": 82 }, @@ -1130,10 +1130,110 @@ "23cb7e24572f04c1" ], "x": 2254, - "y": 1991.5, + "y": 1691.5, "w": 722, "h": 97 }, + { + "id": "616054c1e71be9b5", + "type": "group", + "z": "0cd436e03cba5cb6", + "name": "Tuya - TS0044", + "style": { + "fill": "#777777", + "fill-opacity": "0.05", + "label": true + }, + "nodes": [ + "bf3eb49f6340b632", + "60ffb41c372ca788", + "d95368da0fc1acec", + "04fc27259c1f44bf" + ], + "x": 68, + "y": 2393, + "w": 2554, + "h": 614 + }, + { + "id": "bf3eb49f6340b632", + "type": "group", + "z": "0cd436e03cba5cb6", + "g": "616054c1e71be9b5", + "name": "zigbee - TS0044 - device", + "style": { + "fill": "#ffC000", + "fill-opacity": "0.05", + "label": true + }, + "nodes": [ + "9ff7f0e7a1fb4788", + "9fc01637c5eca7b2", + "4b0831a713ce8dc0", + "bd13245a76f322a9", + "b1e5a947b2346874", + "fa5bb014ac36141b", + "d5a5cd657c117207" + ], + "x": 534, + "y": 2419, + "w": 882, + "h": 202 + }, + { + "id": "60ffb41c372ca788", + "type": "group", + "z": "0cd436e03cba5cb6", + "g": "616054c1e71be9b5", + "name": "zigbee - TS0044 - source", + "style": { + "fill": "#0070c0", + "fill-opacity": "0.05", + "label": true + }, + "nodes": [ + "89cc34a307fc8230", + "e46d811a29ddc59e", + "a21a4595db80d35a", + "dd0e8d1d231bdd94", + "dd58c47d1106a4bf", + "30432e164675548f", + "2225245917b7a345", + "13489fb2d737e51c", + "7aeeeaf39212aa00", + "ef8d2d2fb12b659b", + "e32b80f9df4fe606", + "aa62981bca11ac74", + "1309d7af15e1fc3b", + "4482952c7504d00d", + "48beece72436149c" + ], + "x": 1514, + "y": 2419, + "w": 1082, + "h": 562 + }, + { + "id": "d95368da0fc1acec", + "type": "group", + "z": "0cd436e03cba5cb6", + "g": "616054c1e71be9b5", + "name": "zigbee - TS0044 - model", + "style": { + "fill": "#001f60", + "fill-opacity": "0.05", + "label": true + }, + "nodes": [ + "11ec7020f389b20d", + "eb509cc252ef4416", + "cfb8b7f11b653349" + ], + "x": 94, + "y": 2419, + "w": 342, + "h": 82 + }, { "id": "19b13887fb6925d7", "type": "switch", @@ -1727,7 +1827,7 @@ "to": "", "reg": false, "x": 1970, - "y": 1800, + "y": 1500, "wires": [ [ "8f6759a268add92e" @@ -1755,7 +1855,7 @@ "to": "", "reg": false, "x": 1980, - "y": 1740, + "y": 1440, "wires": [ [ "8f6759a268add92e" @@ -1772,7 +1872,7 @@ "24058eec92534b27" ], "x": 1515, - "y": 1740, + "y": 1440, "wires": [ [ "6a57d40dff357bfa" @@ -1798,7 +1898,7 @@ "repair": false, "outputs": 1, "x": 1650, - "y": 1740, + "y": 1440, "wires": [ [ "da66f64898772e28" @@ -1816,7 +1916,7 @@ "14a0a0839924964f" ], "x": 2115, - "y": 1740, + "y": 1440, "wires": [] }, { @@ -1838,7 +1938,7 @@ "repair": false, "outputs": 1, "x": 1810, - "y": 1740, + "y": 1440, "wires": [ [ "eb2dea648ab3cbf3", @@ -1865,7 +1965,7 @@ "repair": false, "outputs": 1, "x": 710, - "y": 1740, + "y": 1440, "wires": [ [ "3ceac0cbe91463c5", @@ -1916,7 +2016,7 @@ "to": "", "reg": false, "x": 950, - "y": 1800, + "y": 1500, "wires": [ [ "0cdcc7d5d4b9c579" @@ -1965,7 +2065,7 @@ "to": "", "reg": false, "x": 940, - "y": 1860, + "y": 1560, "wires": [ [ "0cdcc7d5d4b9c579" @@ -1982,7 +2082,7 @@ "546f190f3ec0c90d" ], "x": 575, - "y": 1740, + "y": 1440, "wires": [ [ "2743e40bf657513e" @@ -2000,7 +2100,7 @@ "3e1b4213132404be" ], "x": 1335, - "y": 1740, + "y": 1440, "wires": [] }, { @@ -2024,7 +2124,7 @@ "to": "", "reg": false, "x": 1200, - "y": 1740, + "y": 1440, "wires": [ [ "4f9f216ecca80280" @@ -2066,7 +2166,7 @@ "to": "", "reg": false, "x": 950, - "y": 1740, + "y": 1440, "wires": [ [ "0cdcc7d5d4b9c579" @@ -2081,7 +2181,7 @@ "name": "aperture / door", "info": "", "x": 200, - "y": 1820, + "y": 1520, "wires": [] }, { @@ -5005,7 +5105,7 @@ "repair": false, "outputs": 1, "x": 710, - "y": 1440, + "y": 2160, "wires": [ [ "ac0a600ca52f9c3e", @@ -5056,7 +5156,7 @@ "to": "", "reg": false, "x": 960, - "y": 1500, + "y": 2220, "wires": [ [ "f739db440f3d79b1" @@ -5073,7 +5173,7 @@ "546f190f3ec0c90d" ], "x": 575, - "y": 1440, + "y": 2160, "wires": [ [ "dfbbe93ed61d87b2" @@ -5115,7 +5215,7 @@ "to": "", "reg": false, "x": 970, - "y": 1440, + "y": 2160, "wires": [ [ "f739db440f3d79b1" @@ -5143,7 +5243,7 @@ "to": "", "reg": false, "x": 1240, - "y": 1440, + "y": 2160, "wires": [ [ "22ef5d09e03d19e0" @@ -5161,7 +5261,7 @@ "3e1b4213132404be" ], "x": 1375, - "y": 1440, + "y": 2160, "wires": [] }, { @@ -5172,7 +5272,7 @@ "name": "power / electric meter", "info": "", "x": 220, - "y": 1520, + "y": 2240, "wires": [] }, { @@ -5203,7 +5303,7 @@ "to": "", "reg": false, "x": 2010, - "y": 1440, + "y": 2160, "wires": [ [ "81d1299edeeec856" @@ -5238,7 +5338,7 @@ "to": "", "reg": false, "x": 2020, - "y": 1500, + "y": 2220, "wires": [ [ "81d1299edeeec856" @@ -5255,7 +5355,7 @@ "24058eec92534b27" ], "x": 1555, - "y": 1440, + "y": 2160, "wires": [ [ "a26d34138e9e5ac9" @@ -5281,7 +5381,7 @@ "repair": false, "outputs": 1, "x": 1690, - "y": 1440, + "y": 2160, "wires": [ [ "f60ae365fb4e2024" @@ -5307,7 +5407,7 @@ "repair": false, "outputs": 1, "x": 1850, - "y": 1440, + "y": 2160, "wires": [ [ "6bf24cfdfefb1bb7", @@ -5326,7 +5426,7 @@ "14a0a0839924964f" ], "x": 2155, - "y": 1440, + "y": 2160, "wires": [] }, { @@ -5371,7 +5471,7 @@ "to": "", "reg": false, "x": 960, - "y": 1560, + "y": 2280, "wires": [ [ "f739db440f3d79b1" @@ -5893,7 +5993,7 @@ "9cb906bf8066d37e" ], "x": 135, - "y": 1740, + "y": 1440, "wires": [ [ "df0e7a06d243f473" @@ -5963,7 +6063,7 @@ "to": "", "reg": false, "x": 270, - "y": 1740, + "y": 1440, "wires": [ [ "4eb7f83fca4bcb34" @@ -5981,7 +6081,7 @@ "94aa726ce8973d2c" ], "x": 395, - "y": 1740, + "y": 1440, "wires": [] }, { @@ -6166,7 +6266,7 @@ "9cb906bf8066d37e" ], "x": 135, - "y": 1440, + "y": 2160, "wires": [ [ "9ea62fd7b38d5c2a" @@ -6236,7 +6336,7 @@ "to": "", "reg": false, "x": 270, - "y": 1440, + "y": 2160, "wires": [ [ "f26c156abc555775" @@ -6254,7 +6354,7 @@ "94aa726ce8973d2c" ], "x": 395, - "y": 1440, + "y": 2160, "wires": [] }, { @@ -6667,7 +6767,7 @@ "9cb906bf8066d37e" ], "x": 135, - "y": 2040, + "y": 1740, "wires": [ [ "c54192a41990cf11" @@ -6737,7 +6837,7 @@ "to": "", "reg": false, "x": 270, - "y": 2040, + "y": 1740, "wires": [ [ "4975550378291448" @@ -6755,7 +6855,7 @@ "94aa726ce8973d2c" ], "x": 395, - "y": 2040, + "y": 1740, "wires": [] }, { @@ -6777,7 +6877,7 @@ "repair": false, "outputs": 1, "x": 710, - "y": 2040, + "y": 1740, "wires": [ [ "7290c49c75ecae94", @@ -6830,7 +6930,7 @@ "to": "", "reg": false, "x": 940, - "y": 2160, + "y": 1860, "wires": [ [ "d66b347f3bce5f3d" @@ -6847,7 +6947,7 @@ "546f190f3ec0c90d" ], "x": 575, - "y": 2040, + "y": 1740, "wires": [ [ "f06ba18faf97032b" @@ -6865,7 +6965,7 @@ "3e1b4213132404be" ], "x": 1335, - "y": 2040, + "y": 1740, "wires": [] }, { @@ -6889,7 +6989,7 @@ "to": "", "reg": false, "x": 1200, - "y": 2040, + "y": 1740, "wires": [ [ "32d00a16ef133893" @@ -6931,7 +7031,7 @@ "to": "", "reg": false, "x": 930, - "y": 2040, + "y": 1740, "wires": [ [ "d66b347f3bce5f3d" @@ -6959,7 +7059,7 @@ "to": "", "reg": false, "x": 1970, - "y": 2040, + "y": 1740, "wires": [ [ "facc68a5ef39eb24" @@ -6976,7 +7076,7 @@ "24058eec92534b27" ], "x": 1515, - "y": 2040, + "y": 1740, "wires": [ [ "011799cd3edec2dc" @@ -7002,7 +7102,7 @@ "repair": false, "outputs": 1, "x": 1650, - "y": 2040, + "y": 1740, "wires": [ [ "1f491e6a49821d0e" @@ -7020,7 +7120,7 @@ "14a0a0839924964f" ], "x": 2115, - "y": 2040, + "y": 1740, "wires": [] }, { @@ -7042,7 +7142,7 @@ "repair": false, "outputs": 1, "x": 1810, - "y": 2040, + "y": 1740, "wires": [ [ "ee79788fa0dd99e5" @@ -7091,7 +7191,7 @@ "to": "", "reg": false, "x": 940, - "y": 2100, + "y": 1800, "wires": [ [ "d66b347f3bce5f3d" @@ -7164,7 +7264,7 @@ "to": "", "reg": false, "x": 2810, - "y": 2040, + "y": 1740, "wires": [ [ "23cb7e24572f04c1" @@ -7181,7 +7281,7 @@ "637b84024e725f38" ], "x": 2295, - "y": 2040, + "y": 1740, "wires": [ [ "83ba7411866b2702" @@ -7207,7 +7307,7 @@ "repair": false, "outputs": 1, "x": 2430, - "y": 2040, + "y": 1740, "wires": [ [ "1df2f73158e97776" @@ -7243,7 +7343,7 @@ "repair": false, "outputs": 3, "x": 2620, - "y": 2040, + "y": 1740, "wires": [ [ "aff9c7b218c52ff1" @@ -7267,7 +7367,7 @@ "e93e8daa30075ae6" ], "x": 2935, - "y": 2040, + "y": 1740, "wires": [] }, { @@ -7312,7 +7412,7 @@ "to": "", "reg": false, "x": 940, - "y": 2220, + "y": 1920, "wires": [ [ "d66b347f3bce5f3d" @@ -7361,11 +7461,810 @@ "to": "", "reg": false, "x": 950, - "y": 2280, + "y": 1980, "wires": [ [ "d66b347f3bce5f3d" ] ] + }, + { + "id": "9ff7f0e7a1fb4788", + "type": "switch", + "z": "0cd436e03cba5cb6", + "g": "bf3eb49f6340b632", + "name": "model", + "property": "model", + "propertyType": "msg", + "rules": [ + { + "t": "eq", + "v": "TS0044", + "vt": "str" + } + ], + "checkall": "false", + "repair": false, + "outputs": 1, + "x": 710, + "y": 2460, + "wires": [ + [ + "9fc01637c5eca7b2", + "bd13245a76f322a9", + "d5a5cd657c117207" + ] + ] + }, + { + "id": "9fc01637c5eca7b2", + "type": "change", + "z": "0cd436e03cba5cb6", + "g": "bf3eb49f6340b632", + "name": "command / remote* / number / 0", + "rules": [ + { + "t": "set", + "p": "measurement", + "pt": "msg", + "to": "command", + "tot": "str" + }, + { + "t": "set", + "p": "field", + "pt": "msg", + "to": "msg.field?msg.field:'remote'", + "tot": "jsonata" + }, + { + "t": "set", + "p": "format", + "pt": "msg", + "to": "number", + "tot": "str" + }, + { + "t": "set", + "p": "default", + "pt": "msg", + "to": "0", + "tot": "num" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 950, + "y": 2520, + "wires": [ + [ + "b1e5a947b2346874" + ] + ] + }, + { + "id": "4b0831a713ce8dc0", + "type": "link in", + "z": "0cd436e03cba5cb6", + "g": "bf3eb49f6340b632", + "name": "zigbee - TS0044 - device", + "links": [ + "546f190f3ec0c90d" + ], + "x": 575, + "y": 2460, + "wires": [ + [ + "9ff7f0e7a1fb4788" + ] + ] + }, + { + "id": "bd13245a76f322a9", + "type": "change", + "z": "0cd436e03cba5cb6", + "g": "bf3eb49f6340b632", + "name": "brand: tuya /. command / remote*", + "rules": [ + { + "t": "set", + "p": "brand", + "pt": "msg", + "to": "tuya", + "tot": "str" + }, + { + "t": "set", + "p": "measurement", + "pt": "msg", + "to": "command", + "tot": "str" + }, + { + "t": "set", + "p": "field", + "pt": "msg", + "to": "msg.field?msg.field:'remote'", + "tot": "jsonata" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 960, + "y": 2460, + "wires": [ + [ + "b1e5a947b2346874" + ] + ] + }, + { + "id": "b1e5a947b2346874", + "type": "change", + "z": "0cd436e03cba5cb6", + "g": "bf3eb49f6340b632", + "name": "protocol", + "rules": [ + { + "t": "set", + "p": "protocol", + "pt": "msg", + "to": "zigbee", + "tot": "str" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 1240, + "y": 2460, + "wires": [ + [ + "fa5bb014ac36141b" + ] + ] + }, + { + "id": "fa5bb014ac36141b", + "type": "link out", + "z": "0cd436e03cba5cb6", + "g": "bf3eb49f6340b632", + "name": "zigbee - TS0044 - device", + "mode": "link", + "links": [ + "3e1b4213132404be" + ], + "x": 1375, + "y": 2460, + "wires": [] + }, + { + "id": "89cc34a307fc8230", + "type": "change", + "z": "0cd436e03cba5cb6", + "g": "60ffb41c372ca788", + "name": "battery", + "rules": [ + { + "t": "set", + "p": "measurement", + "pt": "msg", + "to": "battery", + "tot": "str" + }, + { + "t": "set", + "p": "payload", + "pt": "msg", + "to": "payload.battery", + "tot": "msg" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 2410, + "y": 2460, + "wires": [ + [ + "dd58c47d1106a4bf" + ] + ] + }, + { + "id": "e46d811a29ddc59e", + "type": "link in", + "z": "0cd436e03cba5cb6", + "g": "60ffb41c372ca788", + "name": "zigbee - TS0044 - source", + "links": [ + "24058eec92534b27" + ], + "x": 1555, + "y": 2460, + "wires": [ + [ + "a21a4595db80d35a" + ] + ] + }, + { + "id": "a21a4595db80d35a", + "type": "switch", + "z": "0cd436e03cba5cb6", + "g": "60ffb41c372ca788", + "name": "model", + "property": "model", + "propertyType": "msg", + "rules": [ + { + "t": "eq", + "v": "TS0044", + "vt": "str" + } + ], + "checkall": "false", + "repair": false, + "outputs": 1, + "x": 1690, + "y": 2460, + "wires": [ + [ + "dd0e8d1d231bdd94" + ] + ] + }, + { + "id": "dd0e8d1d231bdd94", + "type": "switch", + "z": "0cd436e03cba5cb6", + "g": "60ffb41c372ca788", + "name": "topic", + "property": "topic", + "propertyType": "msg", + "rules": [ + { + "t": "eq", + "v": "prefix", + "vt": "msg" + } + ], + "checkall": "false", + "repair": false, + "outputs": 1, + "x": 1850, + "y": 2460, + "wires": [ + [ + "89cc34a307fc8230", + "30432e164675548f" + ] + ] + }, + { + "id": "dd58c47d1106a4bf", + "type": "link out", + "z": "0cd436e03cba5cb6", + "g": "60ffb41c372ca788", + "name": "zigbee - TS0044 - source", + "mode": "link", + "links": [ + "14a0a0839924964f" + ], + "x": 2555, + "y": 2460, + "wires": [] + }, + { + "id": "11ec7020f389b20d", + "type": "link in", + "z": "0cd436e03cba5cb6", + "g": "d95368da0fc1acec", + "name": "zigbee - TS0044 - model", + "links": [ + "9cb906bf8066d37e" + ], + "x": 135, + "y": 2460, + "wires": [ + [ + "eb509cc252ef4416" + ] + ] + }, + { + "id": "eb509cc252ef4416", + "type": "change", + "z": "0cd436e03cba5cb6", + "g": "d95368da0fc1acec", + "name": "model", + "rules": [ + { + "t": "set", + "p": "brand", + "pt": "msg", + "to": "tuya", + "tot": "str" + }, + { + "t": "set", + "p": "model", + "pt": "msg", + "to": "TS0044", + "tot": "str" + }, + { + "t": "set", + "p": "protocol", + "pt": "msg", + "to": "zigbee", + "tot": "str" + }, + { + "t": "set", + "p": "measurement", + "pt": "msg", + "to": "command", + "tot": "str" + }, + { + "t": "set", + "p": "field", + "pt": "msg", + "to": "remote", + "tot": "str" + }, + { + "t": "set", + "p": "format", + "pt": "msg", + "to": "number", + "tot": "str" + }, + { + "t": "set", + "p": "default", + "pt": "msg", + "to": "0", + "tot": "num" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 270, + "y": 2460, + "wires": [ + [ + "cfb8b7f11b653349" + ] + ] + }, + { + "id": "cfb8b7f11b653349", + "type": "link out", + "z": "0cd436e03cba5cb6", + "g": "d95368da0fc1acec", + "name": "zigbee - TS0044 - model", + "mode": "link", + "links": [ + "94aa726ce8973d2c" + ], + "x": 395, + "y": 2460, + "wires": [] + }, + { + "id": "04fc27259c1f44bf", + "type": "comment", + "z": "0cd436e03cba5cb6", + "g": "616054c1e71be9b5", + "name": "command / remote", + "info": "", + "x": 210, + "y": 2540, + "wires": [] + }, + { + "id": "d5a5cd657c117207", + "type": "change", + "z": "0cd436e03cba5cb6", + "g": "bf3eb49f6340b632", + "name": "battery / remote* / percent / 99", + "rules": [ + { + "t": "set", + "p": "measurement", + "pt": "msg", + "to": "battery", + "tot": "str" + }, + { + "t": "set", + "p": "field", + "pt": "msg", + "to": "msg.field?msg.field:'remote'", + "tot": "jsonata" + }, + { + "t": "set", + "p": "format", + "pt": "msg", + "to": "percent", + "tot": "str" + }, + { + "t": "set", + "p": "default", + "pt": "msg", + "to": "99", + "tot": "num" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 950, + "y": 2580, + "wires": [ + [ + "b1e5a947b2346874" + ] + ] + }, + { + "id": "30432e164675548f", + "type": "switch", + "z": "0cd436e03cba5cb6", + "g": "60ffb41c372ca788", + "name": "", + "property": "payload.action", + "propertyType": "msg", + "rules": [ + { + "t": "eq", + "v": "1_single", + "vt": "str" + }, + { + "t": "eq", + "v": "1_double", + "vt": "str" + }, + { + "t": "eq", + "v": "2_single", + "vt": "str" + }, + { + "t": "eq", + "v": "2_double", + "vt": "str" + }, + { + "t": "eq", + "v": "3_single", + "vt": "str" + }, + { + "t": "eq", + "v": "3_double", + "vt": "str" + }, + { + "t": "eq", + "v": "4_single", + "vt": "str" + }, + { + "t": "eq", + "v": "4_double", + "vt": "str" + } + ], + "checkall": "false", + "repair": false, + "outputs": 8, + "x": 2020, + "y": 2580, + "wires": [ + [ + "2225245917b7a345" + ], + [ + "13489fb2d737e51c" + ], + [ + "7aeeeaf39212aa00" + ], + [ + "ef8d2d2fb12b659b" + ], + [ + "e32b80f9df4fe606" + ], + [ + "aa62981bca11ac74" + ], + [ + "1309d7af15e1fc3b" + ], + [ + "4482952c7504d00d" + ] + ] + }, + { + "id": "2225245917b7a345", + "type": "change", + "z": "0cd436e03cba5cb6", + "g": "60ffb41c372ca788", + "name": "1 single = 11", + "rules": [ + { + "t": "set", + "p": "payload", + "pt": "msg", + "to": "11", + "tot": "num" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 2210, + "y": 2520, + "wires": [ + [ + "48beece72436149c" + ] + ] + }, + { + "id": "13489fb2d737e51c", + "type": "change", + "z": "0cd436e03cba5cb6", + "g": "60ffb41c372ca788", + "name": "1 double = 12", + "rules": [ + { + "t": "set", + "p": "payload", + "pt": "msg", + "to": "12", + "tot": "num" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 2220, + "y": 2580, + "wires": [ + [ + "48beece72436149c" + ] + ] + }, + { + "id": "7aeeeaf39212aa00", + "type": "change", + "z": "0cd436e03cba5cb6", + "g": "60ffb41c372ca788", + "name": "2 single = 21", + "rules": [ + { + "t": "set", + "p": "payload", + "pt": "msg", + "to": "21", + "tot": "num" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 2210, + "y": 2640, + "wires": [ + [ + "48beece72436149c" + ] + ] + }, + { + "id": "ef8d2d2fb12b659b", + "type": "change", + "z": "0cd436e03cba5cb6", + "g": "60ffb41c372ca788", + "name": "2 double = 22", + "rules": [ + { + "t": "set", + "p": "payload", + "pt": "msg", + "to": "22", + "tot": "num" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 2220, + "y": 2700, + "wires": [ + [ + "48beece72436149c" + ] + ] + }, + { + "id": "e32b80f9df4fe606", + "type": "change", + "z": "0cd436e03cba5cb6", + "g": "60ffb41c372ca788", + "name": "3 single = 31", + "rules": [ + { + "t": "set", + "p": "payload", + "pt": "msg", + "to": "31", + "tot": "num" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 2210, + "y": 2760, + "wires": [ + [ + "48beece72436149c" + ] + ] + }, + { + "id": "aa62981bca11ac74", + "type": "change", + "z": "0cd436e03cba5cb6", + "g": "60ffb41c372ca788", + "name": "3 double = 32", + "rules": [ + { + "t": "set", + "p": "payload", + "pt": "msg", + "to": "32", + "tot": "num" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 2220, + "y": 2820, + "wires": [ + [ + "48beece72436149c" + ] + ] + }, + { + "id": "1309d7af15e1fc3b", + "type": "change", + "z": "0cd436e03cba5cb6", + "g": "60ffb41c372ca788", + "name": "4 single = 41", + "rules": [ + { + "t": "set", + "p": "payload", + "pt": "msg", + "to": "41", + "tot": "num" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 2210, + "y": 2880, + "wires": [ + [ + "48beece72436149c" + ] + ] + }, + { + "id": "4482952c7504d00d", + "type": "change", + "z": "0cd436e03cba5cb6", + "g": "60ffb41c372ca788", + "name": "4 double = 42", + "rules": [ + { + "t": "set", + "p": "payload", + "pt": "msg", + "to": "42", + "tot": "num" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 2220, + "y": 2940, + "wires": [ + [ + "48beece72436149c" + ] + ] + }, + { + "id": "48beece72436149c", + "type": "change", + "z": "0cd436e03cba5cb6", + "g": "60ffb41c372ca788", + "name": "command", + "rules": [ + { + "t": "set", + "p": "measurement", + "pt": "msg", + "to": "command", + "tot": "str" + }, + { + "t": "set", + "p": "repeat", + "pt": "msg", + "to": "true", + "tot": "bool" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 2420, + "y": 2520, + "wires": [ + [ + "dd58c47d1106a4bf" + ] + ] } ] \ No newline at end of file diff --git a/flows/R.Parents.json b/flows/R.Parents.json index 545dacd..cbd3c3e 100644 --- a/flows/R.Parents.json +++ b/flows/R.Parents.json @@ -64,7 +64,7 @@ "7675dd03f941bc9a" ], "x": 68, - "y": 905.5, + "y": 1365.5, "w": 934, "h": 149 }, @@ -82,12 +82,13 @@ "0b5e3bfbf0fb13c7", "e3da4219d2723996", "bf5fb6e0ee73d142", - "6c31c5a2c83b0cc9" + "6c31c5a2c83b0cc9", + "8f721526b1bd8e11" ], "x": 68, "y": 233, "w": 1714, - "h": 634 + "h": 1094 }, { "id": "b2aabcf1a98113d2", @@ -108,7 +109,7 @@ "b674665f8dd964b7" ], "x": 68, - "y": 1093, + "y": 1553, "w": 1494, "h": 734 }, @@ -153,7 +154,7 @@ "10dddc528a72d52c" ], "x": 94, - "y": 931.5, + "y": 1391.5, "w": 882, "h": 97 }, @@ -198,12 +199,14 @@ "94ae75b4ddf5cc3a", "3330543761d78e58", "2de6256021c37086", - "b1e863424ff2705e" + "b1e863424ff2705e", + "331b6dc245510fd9", + "a7519d9f19c4c34d" ], "x": 694, - "y": 684, + "y": 739, "w": 1022, - "h": 157 + "h": 202 }, { "id": "bf5fb6e0ee73d142", @@ -222,12 +225,14 @@ "2c27e193b70e02a1", "15367243a010781c", "6c3ccae58cdb8180", - "124b22b5f5e84b4a" + "124b22b5f5e84b4a", + "0a21f1c3c8c31ff9", + "70a7e504ff1a46bb" ], "x": 694, - "y": 491.5, - "w": 1042, - "h": 149.5 + "y": 499, + "w": 1062, + "h": 202 }, { "id": "6c31c5a2c83b0cc9", @@ -246,12 +251,14 @@ "0f438cecf3747714", "feef715d3f66ac99", "f418d5018c521e07", - "feb01b6b528eca0b" + "feb01b6b528eca0b", + "5dbc953c7bf31694", + "f4f3e9824b0a85b8" ], "x": 694, - "y": 311.5, + "y": 259, "w": 1062, - "h": 149.5 + "h": 202 }, { "id": "a0fb7feea30116c9", @@ -274,7 +281,7 @@ "4a9c3f3e6824d0f3" ], "x": 94, - "y": 1119, + "y": 1579, "w": 1442, "h": 82 }, @@ -299,7 +306,7 @@ "3c3c58dfa896a7a9" ], "x": 94, - "y": 1239, + "y": 1699, "w": 1422, "h": 82 }, @@ -324,7 +331,7 @@ "17fa49462f1cd0d0" ], "x": 94, - "y": 1359, + "y": 1819, "w": 1402, "h": 82 }, @@ -347,7 +354,7 @@ "c979677403c2fc22" ], "x": 94, - "y": 1479, + "y": 1939, "w": 1052, "h": 82 }, @@ -370,7 +377,7 @@ "abc61cd9f3d45c52" ], "x": 94, - "y": 1599, + "y": 2059, "w": 992, "h": 82 }, @@ -393,10 +400,39 @@ "f46d58cad61a3af9" ], "x": 94, - "y": 1719, + "y": 2179, "w": 992, "h": 82 }, + { + "id": "8f721526b1bd8e11", + "type": "group", + "z": "4ae92a5d07f513ee", + "g": "28edba1c5e66d39d", + "name": "parents - scene - lighting leds", + "style": { + "fill": "#92d04f", + "fill-opacity": "0.05", + "label": true + }, + "nodes": [ + "8e100ef9757cbc9a", + "bb050db7168b02f5", + "33998200e1925e5e", + "956bdcf315610791", + "c729f7835ec2ea89", + "33361db30f7155ac", + "6fcd8d2982928436", + "bab1296d2f16c5fa", + "d7378c576ca6583b", + "65d1aae873b7206a", + "c57984f9ea96ac0d" + ], + "x": 694, + "y": 979, + "w": 902, + "h": 322 + }, { "id": "9c97074ceef682a8", "type": "change", @@ -573,7 +609,7 @@ "cc68069930b2479b" ], "x": 135, - "y": 980, + "y": 1440, "wires": [ [ "ab8f732932d99b17" @@ -601,7 +637,7 @@ "to": "", "reg": false, "x": 430, - "y": 980, + "y": 1440, "wires": [ [ "10dddc528a72d52c" @@ -619,7 +655,7 @@ "d1c7f4810b12afe2" ], "x": 935, - "y": 980, + "y": 1440, "wires": [] }, { @@ -643,7 +679,7 @@ "to": "", "reg": false, "x": 810, - "y": 980, + "y": 1440, "wires": [ [ "377374bc3cc49bc5" @@ -669,7 +705,7 @@ "allowrate": false, "outputs": 1, "x": 270, - "y": 980, + "y": 1440, "wires": [ [ "663171ca016f7dc9" @@ -802,7 +838,7 @@ "odd": false, "even": false, "x": 620, - "y": 980, + "y": 1440, "wires": [ [], [ @@ -1051,7 +1087,7 @@ "031a6afd8300356a" ], "x": 735, - "y": 740, + "y": 840, "wires": [ [ "94ae75b4ddf5cc3a" @@ -1121,7 +1157,7 @@ "to": "", "reg": false, "x": 1470, - "y": 740, + "y": 780, "wires": [ [ "3330543761d78e58" @@ -1156,13 +1192,18 @@ "t": "eq", "v": "parents/command/left remote", "vt": "str" + }, + { + "t": "eq", + "v": "parents/command/remote", + "vt": "str" } ], "checkall": "false", "repair": false, - "outputs": 4, + "outputs": 5, "x": 870, - "y": 740, + "y": 840, "wires": [ [ "859ec44e839237d7" @@ -1175,6 +1216,9 @@ ], [ "2de6256021c37086" + ], + [ + "331b6dc245510fd9" ] ] }, @@ -1189,7 +1233,7 @@ "abdf34b12a5dd88d" ], "x": 1675, - "y": 740, + "y": 780, "wires": [] }, { @@ -1213,7 +1257,7 @@ "repair": false, "outputs": 1, "x": 1040, - "y": 800, + "y": 840, "wires": [ [ "b1e863424ff2705e" @@ -1241,7 +1285,7 @@ "to": "", "reg": false, "x": 1220, - "y": 800, + "y": 840, "wires": [ [ "859ec44e839237d7" @@ -1258,7 +1302,7 @@ "031a6afd8300356a" ], "x": 735, - "y": 540, + "y": 600, "wires": [ [ "2c27e193b70e02a1" @@ -1358,13 +1402,18 @@ "t": "eq", "v": "parents/command/left remote", "vt": "str" + }, + { + "t": "eq", + "v": "parents/command/remote", + "vt": "str" } ], "checkall": "false", "repair": false, - "outputs": 3, + "outputs": 4, "x": 870, - "y": 540, + "y": 600, "wires": [ [ "e019588e48011a10" @@ -1374,6 +1423,9 @@ ], [ "6c3ccae58cdb8180" + ], + [ + "0a21f1c3c8c31ff9" ] ] }, @@ -1387,7 +1439,7 @@ "links": [ "abdf34b12a5dd88d" ], - "x": 1695, + "x": 1715, "y": 540, "wires": [] }, @@ -1527,7 +1579,7 @@ "to": "", "reg": false, "x": 1490, - "y": 360, + "y": 300, "wires": [ [ "feef715d3f66ac99" @@ -1557,11 +1609,16 @@ "t": "eq", "v": "parents/command/left remote", "vt": "str" + }, + { + "t": "eq", + "v": "parents/command/remote", + "vt": "str" } ], "checkall": "false", "repair": false, - "outputs": 3, + "outputs": 4, "x": 870, "y": 360, "wires": [ @@ -1573,6 +1630,9 @@ ], [ "f418d5018c521e07" + ], + [ + "5dbc953c7bf31694" ] ] }, @@ -1587,7 +1647,7 @@ "abdf34b12a5dd88d" ], "x": 1715, - "y": 360, + "y": 300, "wires": [] }, { @@ -1611,7 +1671,7 @@ "repair": false, "outputs": 1, "x": 1040, - "y": 420, + "y": 360, "wires": [ [ "feb01b6b528eca0b" @@ -1639,7 +1699,7 @@ "to": "", "reg": false, "x": 1220, - "y": 420, + "y": 360, "wires": [ [ "c873fafacd9c4dee" @@ -1737,7 +1797,7 @@ "df6a69e3a774eebc" ], "x": 1495, - "y": 1160, + "y": 1620, "wires": [] }, { @@ -1750,7 +1810,7 @@ "abd3bb3b24dd961a" ], "x": 135, - "y": 1160, + "y": 1620, "wires": [ [ "5588600e048bb7ec" @@ -1776,7 +1836,7 @@ "repair": false, "outputs": 1, "x": 430, - "y": 1160, + "y": 1620, "wires": [ [ "c10f9df1d2567205" @@ -1802,7 +1862,7 @@ "repair": false, "outputs": 1, "x": 270, - "y": 1160, + "y": 1620, "wires": [ [ "153d6c79ddb6a61b" @@ -1826,7 +1886,7 @@ "filterTopic": false, "plan": "free", "x": 970, - "y": 1160, + "y": 1620, "wires": [ [ "4a9c3f3e6824d0f3" @@ -1845,7 +1905,7 @@ "linkType": "static", "timeout": "30", "x": 660, - "y": 1160, + "y": 1620, "wires": [ [ "cb2c15acf0d304bf" @@ -1864,7 +1924,7 @@ "linkType": "static", "timeout": "30", "x": 1290, - "y": 1160, + "y": 1620, "wires": [ [ "03f7513bc15a7970" @@ -1882,7 +1942,7 @@ "df6a69e3a774eebc" ], "x": 1475, - "y": 1280, + "y": 1740, "wires": [] }, { @@ -1895,7 +1955,7 @@ "abd3bb3b24dd961a" ], "x": 135, - "y": 1280, + "y": 1740, "wires": [ [ "582b6a7ea3b56bca" @@ -1921,7 +1981,7 @@ "repair": false, "outputs": 1, "x": 430, - "y": 1280, + "y": 1740, "wires": [ [ "768e9d23bb8da222" @@ -1947,7 +2007,7 @@ "repair": false, "outputs": 1, "x": 270, - "y": 1280, + "y": 1740, "wires": [ [ "059867e6b2a77ca8" @@ -1971,7 +2031,7 @@ "filterTopic": false, "plan": "free", "x": 960, - "y": 1280, + "y": 1740, "wires": [ [ "3c3c58dfa896a7a9" @@ -1990,7 +2050,7 @@ "linkType": "static", "timeout": "30", "x": 660, - "y": 1280, + "y": 1740, "wires": [ [ "6c48c7a61c0d093a" @@ -2009,7 +2069,7 @@ "linkType": "static", "timeout": "30", "x": 1270, - "y": 1280, + "y": 1740, "wires": [ [ "2d23c818628833ec" @@ -2027,7 +2087,7 @@ "df6a69e3a774eebc" ], "x": 1455, - "y": 1400, + "y": 1860, "wires": [] }, { @@ -2040,7 +2100,7 @@ "abd3bb3b24dd961a" ], "x": 135, - "y": 1400, + "y": 1860, "wires": [ [ "41ba9594faf12ef2" @@ -2066,7 +2126,7 @@ "repair": false, "outputs": 1, "x": 430, - "y": 1400, + "y": 1860, "wires": [ [ "29c94887623c7f17" @@ -2092,7 +2152,7 @@ "repair": false, "outputs": 1, "x": 270, - "y": 1400, + "y": 1860, "wires": [ [ "c10bfa259d445594" @@ -2116,7 +2176,7 @@ "filterTopic": false, "plan": "free", "x": 950, - "y": 1400, + "y": 1860, "wires": [ [ "17fa49462f1cd0d0" @@ -2135,7 +2195,7 @@ "linkType": "static", "timeout": "30", "x": 660, - "y": 1400, + "y": 1860, "wires": [ [ "ad3fd833430ad4f8" @@ -2154,7 +2214,7 @@ "linkType": "static", "timeout": "30", "x": 1250, - "y": 1400, + "y": 1860, "wires": [ [ "9f90b3631947d4a8" @@ -2171,7 +2231,7 @@ "a66c6d1f8e271921" ], "x": 135, - "y": 1520, + "y": 1980, "wires": [ [ "fc0429db9ca2e788" @@ -2197,7 +2257,7 @@ "repair": false, "outputs": 1, "x": 270, - "y": 1520, + "y": 1980, "wires": [ [ "2d3c55726a3b4596" @@ -2216,7 +2276,7 @@ "linkType": "static", "timeout": "30", "x": 650, - "y": 1520, + "y": 1980, "wires": [ [ "c979677403c2fc22" @@ -2244,7 +2304,7 @@ "to": "", "reg": false, "x": 430, - "y": 1520, + "y": 1980, "wires": [ [ "fe0b88b5a3708f00" @@ -2268,7 +2328,7 @@ "filterTopic": false, "plan": "free", "x": 970, - "y": 1520, + "y": 1980, "wires": [ [] ] @@ -2283,7 +2343,7 @@ "c961c347fd2d14b5" ], "x": 135, - "y": 1640, + "y": 2100, "wires": [ [ "75b658a5c36bf6d2" @@ -2309,7 +2369,7 @@ "repair": false, "outputs": 1, "x": 270, - "y": 1640, + "y": 2100, "wires": [ [ "0724c54c1d040bed" @@ -2335,7 +2395,7 @@ "repair": false, "outputs": 1, "x": 430, - "y": 1640, + "y": 2100, "wires": [ [ "abc61cd9f3d45c52" @@ -2359,7 +2419,7 @@ "filterTopic": false, "plan": "free", "x": 930, - "y": 1640, + "y": 2100, "wires": [ [] ] @@ -2376,7 +2436,7 @@ "linkType": "static", "timeout": "30", "x": 640, - "y": 1640, + "y": 2100, "wires": [ [ "2414f4d2a325c335" @@ -2393,7 +2453,7 @@ "c961c347fd2d14b5" ], "x": 135, - "y": 1760, + "y": 2220, "wires": [ [ "48ccea69f6924811" @@ -2419,7 +2479,7 @@ "repair": false, "outputs": 1, "x": 270, - "y": 1760, + "y": 2220, "wires": [ [ "55c079be3de2c0a7" @@ -2445,7 +2505,7 @@ "repair": false, "outputs": 1, "x": 430, - "y": 1760, + "y": 2220, "wires": [ [ "f46d58cad61a3af9" @@ -2469,7 +2529,7 @@ "filterTopic": false, "plan": "free", "x": 930, - "y": 1760, + "y": 2220, "wires": [ [] ] @@ -2486,7 +2546,7 @@ "linkType": "static", "timeout": "30", "x": 640, - "y": 1760, + "y": 2220, "wires": [ [ "fe8f81fd4f0f21c5" @@ -2550,5 +2610,733 @@ "x": 915, "y": 60, "wires": [] + }, + { + "id": "8e100ef9757cbc9a", + "type": "link in", + "z": "4ae92a5d07f513ee", + "g": "8f721526b1bd8e11", + "name": "parents - scene - lighting leds", + "links": [ + "031a6afd8300356a" + ], + "x": 735, + "y": 1140, + "wires": [ + [ + "bb050db7168b02f5" + ] + ] + }, + { + "id": "bb050db7168b02f5", + "type": "switch", + "z": "4ae92a5d07f513ee", + "g": "8f721526b1bd8e11", + "name": "trigger", + "property": "path", + "propertyType": "msg", + "rules": [ + { + "t": "eq", + "v": "parents/cible/leds", + "vt": "str" + }, + { + "t": "eq", + "v": "parents/command/remote", + "vt": "str" + } + ], + "checkall": "false", + "repair": false, + "outputs": 2, + "x": 870, + "y": 1140, + "wires": [ + [ + "65d1aae873b7206a" + ], + [ + "33998200e1925e5e" + ] + ] + }, + { + "id": "33998200e1925e5e", + "type": "switch", + "z": "4ae92a5d07f513ee", + "g": "8f721526b1bd8e11", + "name": "button", + "property": "payload", + "propertyType": "msg", + "rules": [ + { + "t": "eq", + "v": "31", + "vt": "num" + }, + { + "t": "eq", + "v": "32", + "vt": "num" + }, + { + "t": "eq", + "v": "41", + "vt": "num" + }, + { + "t": "eq", + "v": "42", + "vt": "num" + } + ], + "checkall": "false", + "repair": false, + "outputs": 4, + "x": 1030, + "y": 1140, + "wires": [ + [ + "956bdcf315610791" + ], + [ + "d7378c576ca6583b" + ], + [ + "6fcd8d2982928436" + ], + [ + "bab1296d2f16c5fa" + ] + ] + }, + { + "id": "956bdcf315610791", + "type": "change", + "z": "4ae92a5d07f513ee", + "g": "8f721526b1bd8e11", + "name": "on/off", + "rules": [ + { + "t": "set", + "p": "scene.bucket", + "pt": "msg", + "to": "bucket", + "tot": "flow" + }, + { + "t": "set", + "p": "measurement", + "pt": "msg", + "to": "cible", + "tot": "str" + }, + { + "t": "set", + "p": "state", + "pt": "msg", + "to": "metrics[msg.bucket]light.leds", + "tot": "global" + }, + { + "t": "set", + "p": "payload", + "pt": "msg", + "to": "msg.state?false:true", + "tot": "jsonata" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 1200, + "y": 1080, + "wires": [ + [ + "c729f7835ec2ea89" + ] + ] + }, + { + "id": "c729f7835ec2ea89", + "type": "change", + "z": "4ae92a5d07f513ee", + "g": "8f721526b1bd8e11", + "name": "set metric", + "rules": [ + { + "t": "set", + "p": "bucket", + "pt": "msg", + "to": "scene.bucket", + "tot": "msg" + }, + { + "t": "set", + "p": "field", + "pt": "msg", + "to": "leds", + "tot": "str" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 1400, + "y": 1140, + "wires": [ + [ + "33361db30f7155ac" + ] + ] + }, + { + "id": "33361db30f7155ac", + "type": "link out", + "z": "4ae92a5d07f513ee", + "g": "8f721526b1bd8e11", + "name": "parents - scene - lighting leds", + "mode": "link", + "links": [ + "206c1fb4a48067df" + ], + "x": 1555, + "y": 1140, + "wires": [] + }, + { + "id": "6fcd8d2982928436", + "type": "change", + "z": "4ae92a5d07f513ee", + "g": "8f721526b1bd8e11", + "name": "brightness +", + "rules": [ + { + "t": "set", + "p": "scene.bucket", + "pt": "msg", + "to": "bucket", + "tot": "flow" + }, + { + "t": "set", + "p": "measurement", + "pt": "msg", + "to": "brightness", + "tot": "str" + }, + { + "t": "set", + "p": "state", + "pt": "msg", + "to": "metrics[msg.bucket]brightness.leds", + "tot": "global" + }, + { + "t": "set", + "p": "payload", + "pt": "msg", + "to": "msg.state>194?250:(msg.state+50)", + "tot": "jsonata" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 1220, + "y": 1200, + "wires": [ + [ + "c729f7835ec2ea89" + ] + ] + }, + { + "id": "bab1296d2f16c5fa", + "type": "change", + "z": "4ae92a5d07f513ee", + "g": "8f721526b1bd8e11", + "name": "brightness -", + "rules": [ + { + "t": "set", + "p": "scene.bucket", + "pt": "msg", + "to": "bucket", + "tot": "flow" + }, + { + "t": "set", + "p": "measurement", + "pt": "msg", + "to": "brightness", + "tot": "str" + }, + { + "t": "set", + "p": "state", + "pt": "msg", + "to": "metrics[msg.bucket]brightness.leds", + "tot": "global" + }, + { + "t": "set", + "p": "payload", + "pt": "msg", + "to": "msg.state<60?10:(msg.state-50)", + "tot": "jsonata" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 1220, + "y": 1260, + "wires": [ + [ + "c729f7835ec2ea89" + ] + ] + }, + { + "id": "d7378c576ca6583b", + "type": "change", + "z": "4ae92a5d07f513ee", + "g": "8f721526b1bd8e11", + "name": "color", + "rules": [ + { + "t": "set", + "p": "scene.bucket", + "pt": "msg", + "to": "bucket", + "tot": "flow" + }, + { + "t": "set", + "p": "measurement", + "pt": "msg", + "to": "color", + "tot": "str" + }, + { + "t": "set", + "p": "colors", + "pt": "msg", + "to": "{\t '#FFFFFF':'#FF0018',\t '#FF0018':'#FFFF41',\t '#FFFF41':'#008018',\t '#008018':'#0000F9',\t '#0000F9':'#86007D',\t '#86007D':'#FFFFFF'\t}", + "tot": "jsonata" + }, + { + "t": "set", + "p": "state", + "pt": "msg", + "to": "metrics[msg.scene.bucket]color.leds", + "tot": "global" + }, + { + "t": "set", + "p": "color", + "pt": "msg", + "to": "colors[msg.state]", + "tot": "msg" + }, + { + "t": "set", + "p": "payload", + "pt": "msg", + "to": "msg.color?msg.color:'#FFFFFF'", + "tot": "jsonata" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 1200, + "y": 1140, + "wires": [ + [ + "c729f7835ec2ea89" + ] + ] + }, + { + "id": "5dbc953c7bf31694", + "type": "switch", + "z": "4ae92a5d07f513ee", + "g": "6c31c5a2c83b0cc9", + "name": "remote", + "property": "payload", + "propertyType": "msg", + "rules": [ + { + "t": "eq", + "v": "11", + "vt": "num" + } + ], + "checkall": "false", + "repair": false, + "outputs": 1, + "x": 1040, + "y": 420, + "wires": [ + [ + "f4f3e9824b0a85b8" + ] + ] + }, + { + "id": "f4f3e9824b0a85b8", + "type": "change", + "z": "4ae92a5d07f513ee", + "g": "6c31c5a2c83b0cc9", + "name": "toggle", + "rules": [ + { + "t": "set", + "p": "scene.bucket", + "pt": "msg", + "to": "bucket", + "tot": "flow" + }, + { + "t": "set", + "p": "state", + "pt": "msg", + "to": "metrics[msg.bucket]light['right bedside']", + "tot": "global" + }, + { + "t": "set", + "p": "payload", + "pt": "msg", + "to": "msg.state?false:true", + "tot": "jsonata" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 1210, + "y": 420, + "wires": [ + [ + "c873fafacd9c4dee" + ] + ] + }, + { + "id": "0a21f1c3c8c31ff9", + "type": "switch", + "z": "4ae92a5d07f513ee", + "g": "bf5fb6e0ee73d142", + "name": "remote", + "property": "payload", + "propertyType": "msg", + "rules": [ + { + "t": "eq", + "v": "21", + "vt": "num" + } + ], + "checkall": "false", + "repair": false, + "outputs": 1, + "x": 1040, + "y": 660, + "wires": [ + [ + "70a7e504ff1a46bb" + ] + ] + }, + { + "id": "70a7e504ff1a46bb", + "type": "change", + "z": "4ae92a5d07f513ee", + "g": "bf5fb6e0ee73d142", + "name": "toggle", + "rules": [ + { + "t": "set", + "p": "scene.bucket", + "pt": "msg", + "to": "bucket", + "tot": "flow" + }, + { + "t": "set", + "p": "state", + "pt": "msg", + "to": "metrics[msg.bucket]light['left bedside']", + "tot": "global" + }, + { + "t": "set", + "p": "payload", + "pt": "msg", + "to": "msg.state?false:true", + "tot": "jsonata" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 1210, + "y": 660, + "wires": [ + [ + "e019588e48011a10" + ] + ] + }, + { + "id": "65d1aae873b7206a", + "type": "change", + "z": "4ae92a5d07f513ee", + "g": "8f721526b1bd8e11", + "name": "scene lighting / leds / boolean", + "rules": [ + { + "t": "set", + "p": "scene.bucket", + "pt": "msg", + "to": "bucket", + "tot": "flow" + }, + { + "t": "set", + "p": "scene.measurement", + "pt": "msg", + "to": "light", + "tot": "str" + }, + { + "t": "set", + "p": "scene.field", + "pt": "msg", + "to": "leds", + "tot": "str" + }, + { + "t": "set", + "p": "scene.format", + "pt": "msg", + "to": "boolean", + "tot": "str" + }, + { + "t": "set", + "p": "scene.type", + "pt": "msg", + "to": "lighting", + "tot": "str" + }, + { + "t": "set", + "p": "scene.on", + "pt": "msg", + "to": "true", + "tot": "bool" + }, + { + "t": "set", + "p": "scene.off", + "pt": "msg", + "to": "false", + "tot": "bool" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 1110, + "y": 1020, + "wires": [ + [ + "c57984f9ea96ac0d" + ] + ] + }, + { + "id": "c57984f9ea96ac0d", + "type": "link out", + "z": "4ae92a5d07f513ee", + "g": "8f721526b1bd8e11", + "name": "parents - scene - lighting leds", + "mode": "link", + "links": [ + "abdf34b12a5dd88d" + ], + "x": 1555, + "y": 1020, + "wires": [] + }, + { + "id": "331b6dc245510fd9", + "type": "switch", + "z": "4ae92a5d07f513ee", + "g": "e3da4219d2723996", + "name": "remote", + "property": "payload", + "propertyType": "msg", + "rules": [ + { + "t": "eq", + "v": "12", + "vt": "num" + } + ], + "checkall": "false", + "repair": false, + "outputs": 1, + "x": 1040, + "y": 900, + "wires": [ + [ + "a7519d9f19c4c34d" + ] + ] + }, + { + "id": "a7519d9f19c4c34d", + "type": "change", + "z": "4ae92a5d07f513ee", + "g": "e3da4219d2723996", + "name": "toggle", + "rules": [ + { + "t": "set", + "p": "scene.bucket", + "pt": "msg", + "to": "bucket", + "tot": "flow" + }, + { + "t": "set", + "p": "state", + "pt": "msg", + "to": "metrics[msg.bucket]light.ceiling", + "tot": "global" + }, + { + "t": "set", + "p": "payload", + "pt": "msg", + "to": "msg.state?false:true", + "tot": "jsonata" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 1210, + "y": 900, + "wires": [ + [ + "859ec44e839237d7" + ] + ] + }, + { + "id": "1203dd4a94f48276", + "type": "comment", + "z": "4ae92a5d07f513ee", + "name": "parents / command / remote 1 single : right bedside toggle", + "info": "", + "x": 2050, + "y": 360, + "wires": [] + }, + { + "id": "e2ecba6aed6b6aeb", + "type": "comment", + "z": "4ae92a5d07f513ee", + "name": "parents / command / remote 2 single : left bedside toggle", + "info": "", + "x": 2050, + "y": 440, + "wires": [] + }, + { + "id": "715af9136699d378", + "type": "comment", + "z": "4ae92a5d07f513ee", + "name": "parents / command / remote 1 double : ceiling toggle", + "info": "", + "x": 2030, + "y": 400, + "wires": [] + }, + { + "id": "757c3d9ab9d0959d", + "type": "comment", + "z": "4ae92a5d07f513ee", + "name": "parents / command / remote 2 double : ceiling toggle", + "info": "", + "x": 2030, + "y": 480, + "wires": [] + }, + { + "id": "57931bd357455424", + "type": "comment", + "z": "4ae92a5d07f513ee", + "name": "parents / command / remote 3 single : leds toggle", + "info": "", + "x": 2020, + "y": 520, + "wires": [] + }, + { + "id": "e09ed41400ba1f5b", + "type": "comment", + "z": "4ae92a5d07f513ee", + "name": "parents / command / remote 3 double : leds color", + "info": "", + "x": 2020, + "y": 560, + "wires": [] + }, + { + "id": "17eda99bebc9ddc6", + "type": "comment", + "z": "4ae92a5d07f513ee", + "name": "parents / command / remote 4 double : leds brightness -", + "info": "", + "x": 2040, + "y": 640, + "wires": [] + }, + { + "id": "a34eb58b749615b6", + "type": "comment", + "z": "4ae92a5d07f513ee", + "name": "parents / command / remote 4 single : leds brightness +", + "info": "", + "x": 2040, + "y": 600, + "wires": [] } ] \ No newline at end of file