iotredloop/flows/K.Scene.json
2024-08-10 16:54:49 +02:00

5729 lines
No EOL
104 KiB
JSON

[
{
"id": "68ee181e9defa139",
"type": "tab",
"label": "K.Scene",
"disabled": false,
"info": "",
"env": []
},
{
"id": "fed2a5ee0a71e88f",
"type": "group",
"z": "68ee181e9defa139",
"name": "scene - reset daily",
"style": {
"fill": "#92d04f",
"fill-opacity": "0.05",
"label": true
},
"nodes": [
"2f88f0a1be78ca59",
"213f3332bd5e75c6",
"04a2a3c2efe76a2e",
"1864089149dd1020",
"3d78b859e586fa91",
"9cb403d67f5020f4",
"0365c97a2f5bfd4a",
"3f3b9ea1c2157e30"
],
"x": 94,
"y": 199,
"w": 1352,
"h": 82
},
{
"id": "6b28d5f0aa7b2318",
"type": "group",
"z": "68ee181e9defa139",
"name": "catch error",
"style": {
"fill": "#ff0000",
"fill-opacity": "0.05",
"label": true,
"stroke": "#ff0000"
},
"nodes": [
"d9ad2029c6cc7096",
"2f804afe437414b9",
"8437dc846be5af12"
],
"x": 534,
"y": 19,
"w": 422,
"h": 82
},
{
"id": "9fed22b2831a8c22",
"type": "group",
"z": "68ee181e9defa139",
"name": "scene - write",
"style": {
"fill": "#92d04f",
"fill-opacity": "0.05",
"label": true
},
"nodes": [
"1b1e4074f6d9749c",
"fb4b4e2a3fb029df",
"d873539070943718",
"2623289b88a15e8c",
"941bac341d0a675c",
"ca2cf5afce064ad1",
"d05f93f2e9f3cbdb",
"633e93007ad7359e",
"f57a3d0eaf07945a",
"85ac6855ecab60c4",
"4abd6ee3b969ce9b",
"d2e269a6af2dfb1c",
"564fec2392c7191d",
"8f0ff756ad2dce52"
],
"x": 94,
"y": 319,
"w": 1632,
"h": 202
},
{
"id": "796ef41c1dd2380c",
"type": "group",
"z": "68ee181e9defa139",
"name": "scene - lighting",
"style": {
"fill": "#92d04f",
"fill-opacity": "0.05",
"label": true
},
"nodes": [
"abdf34b12a5dd88d",
"0dce2c644348616c",
"1e475c1be1dba2cd",
"3b9ded82962309a3",
"eabf5fc19efa675a",
"6e799ecb83c4920e",
"bee342e3eb1d1f39",
"e08e83753e727848",
"556fd5f1e5d631d9",
"3783da8f96cfca80",
"e3db60d3d55e1a82",
"05713976186ba442",
"585814f2cbaf139f",
"9e47c40faa28271b",
"8c14a3d77196d0aa",
"034c93c5f54aaa15",
"e9387364f390f805",
"e3a86e68e388729d",
"85d5d5e5b6c9beac",
"435b7ba53d3b3f3d",
"5cf10abb34d2afd9",
"de95eb8bc9cedb87",
"7af2f9f85dfa9434",
"9f7db667a3e5cce9",
"9c4f5df3df617722",
"08ab0de6523813f1"
],
"x": 94,
"y": 1399,
"w": 3432,
"h": 322
},
{
"id": "53babb398943f380",
"type": "group",
"z": "68ee181e9defa139",
"name": "scene - fire",
"style": {
"fill": "#92d04f",
"fill-opacity": "0.05",
"label": true
},
"nodes": [
"07d45bb35ac762c9",
"2856d3bff393f9fc",
"f4e114d534bc63d0",
"d5aa33c47a8c4347",
"7fcd9ac436f62e8a",
"975a84254ad7876b"
],
"x": 94,
"y": 919,
"w": 922,
"h": 82
},
{
"id": "cec3ab5a35c60f2d",
"type": "group",
"z": "68ee181e9defa139",
"name": "scene - trigger",
"style": {
"fill": "#92d04f",
"fill-opacity": "0.05",
"label": true
},
"nodes": [
"6e5d97fd5f511366",
"2ea571ad93364449",
"8f1009a9502a5516",
"3d54b31ec68172cf",
"b0a067f702405dd8",
"56cb9892b5febb14",
"ba1ad3b1c11760c5",
"a205fd735ab69076",
"c0b5773a6bf24fa0",
"56aeeccb6faf8480",
"b7b4f3e199cff4e1",
"b3e6c30cb9035dee",
"e9f918d732ed4390",
"7660a519a43dca38",
"e3935a8921558315",
"05cb38d49efdd621",
"e4a851ee51659fbe",
"5aaa598948695182",
"df48aef72bf72d15",
"828954124f9d5f18",
"6d05765c48afd703",
"ee316a30d7d76949",
"0cd574bde14391d4",
"4b76b340559fb347",
"e61e9d413554539f",
"1ea871e1ad0c448e",
"3ada84cb46c4cf59",
"7e60e1c2ce2b33b5",
"0bba3390b421b942",
"437450dbe9e8f9d5"
],
"x": 94,
"y": 3679,
"w": 2192,
"h": 682
},
{
"id": "3e2b5d0f1dd7c70c",
"type": "group",
"z": "68ee181e9defa139",
"name": "scene - toggle",
"style": {
"fill": "#92d04f",
"fill-opacity": "0.05",
"label": true
},
"nodes": [
"4e5dc7fe86199d6d",
"da742d7b236d74e9",
"0b8cfb72bb0f3e13",
"b15b9bb27e18cc28"
],
"x": 94,
"y": 2419,
"w": 512,
"h": 142
},
{
"id": "152a1afefb8c6055",
"type": "group",
"z": "68ee181e9defa139",
"name": "scene - shutter shading",
"style": {
"fill": "#92d04f",
"fill-opacity": "0.05",
"label": true
},
"nodes": [
"6ea014398476684e",
"85772c505d998011",
"4ddccddf03e3d4d4",
"a07d6dd6d1c29a6a",
"eeb585f11f6823ce",
"ce174d9aa3f86e80",
"81521b1b53a011cf",
"a5ccd36e26d9f6d9",
"0e492506da218846",
"37da6809fc64b9e4",
"db475389de188a0c",
"7fd8ffaab7b5e644",
"e4bcc2150345266e",
"d104d5773963a340",
"1acc8b4f519da72e",
"bb270d49658a693f",
"b0cca198cd40b4b7",
"57ab09d50f789b03",
"174cc227ba703f1c",
"f1475eafde58ef48",
"fe15947cd1dee943",
"bebe5c9f233bc014",
"decfc56647d266cf",
"36fedc6b0be804e7",
"4ba20a57285906e1"
],
"x": 94,
"y": 1039,
"w": 2792,
"h": 322
},
{
"id": "1d10dc102aa4bd1a",
"type": "group",
"z": "68ee181e9defa139",
"name": "scene - clone",
"style": {
"fill-opacity": "0.05",
"label": true,
"fill": "#92d04f"
},
"nodes": [
"0afac8df8c0ad593",
"d39803577094b080",
"102eb508957fee9a",
"99f3818ae330dad4",
"394846d13b3f3ad5",
"d8f45ef2a1ef83db"
],
"x": 94,
"y": 2599,
"w": 1112,
"h": 142
},
{
"id": "241e58e3b15dd775",
"type": "group",
"z": "68ee181e9defa139",
"name": "scene - custom color",
"style": {
"fill": "#92d04f",
"fill-opacity": "0.05",
"label": true
},
"nodes": [
"a1e311e659c0a082",
"0a11184001fe0640",
"5391e717f6dca308",
"906b6acddcc68024",
"82aa18736b702cd8"
],
"x": 94,
"y": 2779,
"w": 912,
"h": 142
},
{
"id": "282f949a47889a3f",
"type": "group",
"z": "68ee181e9defa139",
"name": "scene - custom level",
"style": {
"fill": "#92d04f",
"fill-opacity": "0.05",
"label": true
},
"nodes": [
"2ff1d9f7d0cd1e1c",
"309b17151899bda1",
"6ffbc9731bd5e6ae",
"3d8af1903f187678",
"deed3da8baf03817",
"9909e92faf9def23",
"22d518d36e04716c",
"a1ef7c28be93a984"
],
"x": 94,
"y": 2959,
"w": 1252,
"h": 142
},
{
"id": "ca328d57424013a3",
"type": "group",
"z": "68ee181e9defa139",
"name": "scene - airflow",
"style": {
"fill": "#92d04f",
"fill-opacity": "0.05",
"label": true
},
"nodes": [
"08678fd952d0718b",
"75bb87ae3f2c0e0a",
"ab4fc8c6e09cc5c2",
"a0fa2c85acd788b9",
"6790e3c9c69ca682",
"d15334a68d41f0c1",
"82b63e4a511b74b1",
"406126819aeb6e7a",
"9824552e3d00a585",
"e1f16ee8824ca937",
"0f4579886aba5d44",
"5d63e702c0356933",
"e2b5d164394915e1",
"222a2cb866b5d927"
],
"x": 94,
"y": 1759,
"w": 1462,
"h": 202
},
{
"id": "c9e818a567724ec0",
"type": "group",
"z": "68ee181e9defa139",
"name": "scene - cumulus",
"style": {
"fill": "#92d04f",
"fill-opacity": "0.05",
"label": true
},
"nodes": [
"f4ad016915b58f34",
"1b526a505cca4b38",
"05d83797479be408",
"ff50da859f9ab394",
"9d69c9b73ed6d46a",
"42352296ba1a9b8f",
"ac52cc5b1a310d97",
"a7985c79389939ee",
"35328fc67036b0b7",
"aab05884f02c9ae5",
"c24662116bd8d039",
"d87d6edb5c6df065",
"ee2f9913c385850b",
"fee856239ffcf41d",
"092fe634cc63515f",
"6b28323c8b96ebdb",
"179270593d4a9213",
"029a7d6759da4e71",
"3db7c0647f6f3b27",
"f800de19b190bb45",
"66144194d3248dab",
"aa6fd304e5255f29",
"e80f200967e6e92e",
"8a6e80bb7690df1a",
"154ca07785fc4a03",
"32abed02d0722808"
],
"x": 94,
"y": 1999,
"w": 2482,
"h": 382
},
{
"id": "7ad8c7d614a6550d",
"type": "group",
"z": "68ee181e9defa139",
"name": "scene - snapshot",
"style": {
"fill": "#92d04f",
"fill-opacity": "0.05",
"label": true
},
"nodes": [
"d7a5fb49638d61c7",
"07a2f1dafbf1361b",
"2ac3ee9cfd871785",
"cf9bb9f13aa683ed",
"b1d8ee0c1293ac1d",
"a246dabb539abf36",
"0f6fdddafa87cee7",
"ee662244b88ac05c",
"c47576e23f709bb0",
"1b0cbe0fc795ac63",
"3be19cd8f49a0c90",
"3b1fb9312071cef4",
"dc2fab4bf098df8c"
],
"x": 94,
"y": 3319,
"w": 2032,
"h": 142
},
{
"id": "4f3050e222b9d901",
"type": "group",
"z": "68ee181e9defa139",
"name": "scene - custom volume",
"style": {
"fill": "#92d04f",
"fill-opacity": "0.05",
"label": true
},
"nodes": [
"588b2a84691acfcc",
"779a7ca67f93706e",
"75552a6e9aeabca1",
"30505f159e3df7fb",
"057d3226a76029a3",
"086c6a1d782a1f2b"
],
"x": 94,
"y": 3139,
"w": 1092,
"h": 142
},
{
"id": "b211976dfc18123b",
"type": "group",
"z": "68ee181e9defa139",
"name": "scene - overload",
"style": {
"fill": "#92d04f",
"fill-opacity": "0.05",
"label": true
},
"nodes": [
"cb1e39e2071036cb",
"c7cc959fe94dc6ec",
"4bb9a5575ff72468",
"a2ca81a4a0f17f2b",
"ac34f353008f720b",
"cc0c27e2ec0f27c3",
"077d26e64b31245a",
"f1253a4898076087",
"979e5dadb00816e2",
"345bfad057c2239b",
"5e4211383e41daf1",
"46f096fb26163aaf",
"dbf634344f4eb19d",
"b784f74024662869"
],
"x": 94,
"y": 3499,
"w": 2112,
"h": 142
},
{
"id": "2f88f0a1be78ca59",
"type": "link in",
"z": "68ee181e9defa139",
"g": "fed2a5ee0a71e88f",
"name": "scene - reset daily",
"links": [
"031a6afd8300356a"
],
"x": 135,
"y": 240,
"wires": [
[
"213f3332bd5e75c6"
]
]
},
{
"id": "213f3332bd5e75c6",
"type": "switch",
"z": "68ee181e9defa139",
"g": "fed2a5ee0a71e88f",
"name": "trigger",
"property": "path",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "system/mode/nycthemer",
"vt": "str"
}
],
"checkall": "false",
"repair": false,
"outputs": 1,
"x": 270,
"y": 240,
"wires": [
[
"04a2a3c2efe76a2e"
]
]
},
{
"id": "04a2a3c2efe76a2e",
"type": "switch",
"z": "68ee181e9defa139",
"g": "fed2a5ee0a71e88f",
"name": "day",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "day",
"vt": "str"
}
],
"checkall": "false",
"repair": false,
"outputs": 1,
"x": 430,
"y": 240,
"wires": [
[
"1864089149dd1020"
]
]
},
{
"id": "d9ad2029c6cc7096",
"type": "catch",
"z": "68ee181e9defa139",
"g": "6b28d5f0aa7b2318",
"name": "catch error",
"scope": null,
"uncaught": false,
"x": 620,
"y": 60,
"wires": [
[
"2f804afe437414b9"
]
]
},
{
"id": "1b1e4074f6d9749c",
"type": "link out",
"z": "68ee181e9defa139",
"g": "9fed22b2831a8c22",
"name": "scene - write",
"mode": "link",
"links": [
"206c1fb4a48067df"
],
"x": 1555,
"y": 420,
"wires": []
},
{
"id": "fb4b4e2a3fb029df",
"type": "link in",
"z": "68ee181e9defa139",
"g": "9fed22b2831a8c22",
"name": "scene - write",
"links": [
"7fcd9ac436f62e8a",
"c6a33fe34a5837ef",
"cf3ba5e22164d0c7",
"e3db60d3d55e1a82",
"d508dae06ba6ea5f",
"5fef774a053c6a26",
"06c1934cb35fe252",
"9379409dd3374a57",
"7110eb15cfddfcf3",
"371da4ba2aa94afb",
"45b8cc265f3cddf8",
"6a36741a719e6e4d",
"843601335db31104",
"b15b9bb27e18cc28",
"6ea014398476684e",
"75bb87ae3f2c0e0a",
"9d69c9b73ed6d46a"
],
"x": 135,
"y": 420,
"wires": [
[
"f57a3d0eaf07945a",
"941bac341d0a675c"
]
]
},
{
"id": "d873539070943718",
"type": "switch",
"z": "68ee181e9defa139",
"g": "9fed22b2831a8c22",
"name": "compare payload to existing value",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "existing",
"vt": "msg"
},
{
"t": "else"
}
],
"checkall": "false",
"repair": false,
"outputs": 2,
"x": 560,
"y": 420,
"wires": [
[
"ca2cf5afce064ad1"
],
[
"d05f93f2e9f3cbdb"
]
]
},
{
"id": "2623289b88a15e8c",
"type": "delay",
"z": "68ee181e9defa139",
"g": "9fed22b2831a8c22",
"name": "2 msg / s / topic",
"pauseType": "queue",
"timeout": "350",
"timeoutUnits": "milliseconds",
"rate": "2",
"nbRateUnits": "1",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": true,
"allowrate": false,
"outputs": 1,
"x": 1240,
"y": 420,
"wires": [
[
"d2e269a6af2dfb1c"
]
]
},
{
"id": "941bac341d0a675c",
"type": "switch",
"z": "68ee181e9defa139",
"g": "9fed22b2831a8c22",
"name": "request update daily",
"property": "scene.update_daily",
"propertyType": "msg",
"rules": [
{
"t": "true"
}
],
"checkall": "false",
"repair": false,
"outputs": 1,
"x": 320,
"y": 480,
"wires": [
[
"564fec2392c7191d"
]
]
},
{
"id": "ca2cf5afce064ad1",
"type": "switch",
"z": "68ee181e9defa139",
"g": "9fed22b2831a8c22",
"name": "requedst repeat",
"property": "scene.repeat",
"propertyType": "msg",
"rules": [
{
"t": "true"
}
],
"checkall": "false",
"repair": false,
"outputs": 1,
"x": 840,
"y": 360,
"wires": [
[
"d05f93f2e9f3cbdb"
]
]
},
{
"id": "d05f93f2e9f3cbdb",
"type": "change",
"z": "68ee181e9defa139",
"g": "9fed22b2831a8c22",
"name": "set metric",
"rules": [
{
"t": "set",
"p": "bucket",
"pt": "msg",
"to": "scene.bucket",
"tot": "msg"
},
{
"t": "set",
"p": "measurement",
"pt": "msg",
"to": "cible",
"tot": "str"
},
{
"t": "set",
"p": "field",
"pt": "msg",
"to": "scene.field",
"tot": "msg"
},
{
"t": "set",
"p": "old_topic",
"pt": "msg",
"to": "topic",
"tot": "msg"
},
{
"t": "set",
"p": "topic",
"pt": "msg",
"to": "msg.bucket&msg.measurement&msg.field",
"tot": "jsonata"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1040,
"y": 420,
"wires": [
[
"2623289b88a15e8c"
]
]
},
{
"id": "633e93007ad7359e",
"type": "comment",
"z": "68ee181e9defa139",
"g": "9fed22b2831a8c22",
"name": "prevent infinite loop on slow device",
"info": "",
"x": 1120,
"y": 360,
"wires": []
},
{
"id": "f57a3d0eaf07945a",
"type": "change",
"z": "68ee181e9defa139",
"g": "9fed22b2831a8c22",
"name": "from global",
"rules": [
{
"t": "set",
"p": "existing",
"pt": "msg",
"to": "metrics[msg.scene.bucket][msg.scene.measurement][msg.scene.field]",
"tot": "global"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 290,
"y": 420,
"wires": [
[
"d873539070943718"
]
]
},
{
"id": "85ac6855ecab60c4",
"type": "debug",
"z": "68ee181e9defa139",
"g": "9fed22b2831a8c22",
"name": "scene - write",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 1610,
"y": 360,
"wires": []
},
{
"id": "4abd6ee3b969ce9b",
"type": "debug",
"z": "68ee181e9defa139",
"g": "9fed22b2831a8c22",
"name": "scene - update daily",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 1000,
"y": 480,
"wires": []
},
{
"id": "abdf34b12a5dd88d",
"type": "link in",
"z": "68ee181e9defa139",
"g": "796ef41c1dd2380c",
"name": "scene - lighting",
"links": [
"31d14fe33ea1b7b2",
"82f016c6bec5fe59",
"938e3b8f717989d7",
"2b30160f07c7d626",
"d95f2ca72214b098",
"0fa2ffecb9982cf5",
"f08fe7b4b871821b",
"41c0a6ba4a34abdc",
"61afa8c6a05d66c5",
"912556577f30a22e",
"846814ea1666f8b1",
"52b59fc8ef0553fe",
"c7cf50bce96c5614",
"5bc5a072069c9a6f",
"d5e508f404ff4666",
"77c776cd9ef0cb9d",
"a5d16e445fcf58a5",
"df53fc8e041f623d",
"3330543761d78e58",
"15367243a010781c",
"feef715d3f66ac99",
"37b076f40502ae57",
"c57984f9ea96ac0d",
"a205fd735ab69076"
],
"x": 135,
"y": 1620,
"wires": [
[
"435b7ba53d3b3f3d"
]
]
},
{
"id": "0dce2c644348616c",
"type": "switch",
"z": "68ee181e9defa139",
"g": "796ef41c1dd2380c",
"name": "measurement",
"property": "measurement",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "motion",
"vt": "str"
},
{
"t": "eq",
"v": "aperture",
"vt": "str"
},
{
"t": "eq",
"v": "command",
"vt": "str"
},
{
"t": "else"
}
],
"checkall": "false",
"repair": false,
"outputs": 4,
"x": 520,
"y": 1620,
"wires": [
[
"585814f2cbaf139f"
],
[
"05713976186ba442"
],
[
"05713976186ba442"
],
[
"bee342e3eb1d1f39"
]
]
},
{
"id": "1e475c1be1dba2cd",
"type": "link call",
"z": "68ee181e9defa139",
"g": "796ef41c1dd2380c",
"name": "",
"links": [
"6d71d5859b10c11e"
],
"linkType": "static",
"timeout": "30",
"x": 1140,
"y": 1560,
"wires": [
[
"3b9ded82962309a3"
]
]
},
{
"id": "3b9ded82962309a3",
"type": "switch",
"z": "68ee181e9defa139",
"g": "796ef41c1dd2380c",
"name": "rsp",
"property": "routine.response",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "1",
"vt": "num"
},
{
"t": "else"
}
],
"checkall": "false",
"repair": false,
"outputs": 2,
"x": 1330,
"y": 1560,
"wires": [
[
"eabf5fc19efa675a"
],
[
"8c14a3d77196d0aa"
]
]
},
{
"id": "eabf5fc19efa675a",
"type": "link call",
"z": "68ee181e9defa139",
"g": "796ef41c1dd2380c",
"name": "",
"links": [
"3abf64e6a345da67"
],
"linkType": "static",
"timeout": "30",
"x": 1910,
"y": 1560,
"wires": [
[
"6e799ecb83c4920e"
]
]
},
{
"id": "6e799ecb83c4920e",
"type": "switch",
"z": "68ee181e9defa139",
"g": "796ef41c1dd2380c",
"name": "rsp",
"property": "routine.response",
"propertyType": "msg",
"rules": [
{
"t": "neq",
"v": "-1",
"vt": "num"
}
],
"checkall": "false",
"repair": false,
"outputs": 1,
"x": 2110,
"y": 1560,
"wires": [
[
"bee342e3eb1d1f39"
]
]
},
{
"id": "bee342e3eb1d1f39",
"type": "link call",
"z": "68ee181e9defa139",
"g": "796ef41c1dd2380c",
"name": "",
"links": [
"587236e6160da46c"
],
"linkType": "static",
"timeout": "30",
"x": 2290,
"y": 1680,
"wires": [
[
"e08e83753e727848"
]
]
},
{
"id": "e08e83753e727848",
"type": "switch",
"z": "68ee181e9defa139",
"g": "796ef41c1dd2380c",
"name": "rsp",
"property": "routine.response",
"propertyType": "msg",
"rules": [
{
"t": "neq",
"v": "0",
"vt": "num"
}
],
"checkall": "false",
"repair": false,
"outputs": 1,
"x": 2470,
"y": 1680,
"wires": [
[
"e3db60d3d55e1a82",
"e9387364f390f805",
"556fd5f1e5d631d9"
]
]
},
{
"id": "556fd5f1e5d631d9",
"type": "link call",
"z": "68ee181e9defa139",
"g": "796ef41c1dd2380c",
"name": "",
"links": [
"834ce9850cdb0a72"
],
"linkType": "static",
"timeout": "30",
"x": 2650,
"y": 1560,
"wires": [
[
"3783da8f96cfca80"
]
]
},
{
"id": "3783da8f96cfca80",
"type": "switch",
"z": "68ee181e9defa139",
"g": "796ef41c1dd2380c",
"name": "rsp",
"property": "routine.response",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "1",
"vt": "num"
}
],
"checkall": "false",
"repair": false,
"outputs": 1,
"x": 2850,
"y": 1560,
"wires": [
[
"e3a86e68e388729d"
]
]
},
{
"id": "e3db60d3d55e1a82",
"type": "link out",
"z": "68ee181e9defa139",
"g": "796ef41c1dd2380c",
"name": "scene - lighting",
"mode": "link",
"links": [
"fb4b4e2a3fb029df"
],
"x": 3335,
"y": 1680,
"wires": []
},
{
"id": "05713976186ba442",
"type": "change",
"z": "68ee181e9defa139",
"g": "796ef41c1dd2380c",
"name": "payload as scene on/off",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "msg.payload?msg.scene.on:msg.scene.off",
"tot": "jsonata"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 770,
"y": 1620,
"wires": [
[
"bee342e3eb1d1f39"
]
]
},
{
"id": "585814f2cbaf139f",
"type": "link call",
"z": "68ee181e9defa139",
"g": "796ef41c1dd2380c",
"name": "",
"links": [
"dfec2e7efb555d4d"
],
"linkType": "static",
"timeout": "30",
"x": 750,
"y": 1560,
"wires": [
[
"9e47c40faa28271b"
]
]
},
{
"id": "9e47c40faa28271b",
"type": "switch",
"z": "68ee181e9defa139",
"g": "796ef41c1dd2380c",
"name": "rsp",
"property": "routine.response",
"propertyType": "msg",
"rules": [
{
"t": "neq",
"v": "-1",
"vt": "num"
}
],
"checkall": "false",
"repair": false,
"outputs": 1,
"x": 950,
"y": 1560,
"wires": [
[
"1e475c1be1dba2cd"
]
]
},
{
"id": "8c14a3d77196d0aa",
"type": "link call",
"z": "68ee181e9defa139",
"g": "796ef41c1dd2380c",
"name": "",
"links": [
"cae336906ea60890"
],
"linkType": "static",
"timeout": "30",
"x": 1520,
"y": 1620,
"wires": [
[
"034c93c5f54aaa15"
]
]
},
{
"id": "034c93c5f54aaa15",
"type": "switch",
"z": "68ee181e9defa139",
"g": "796ef41c1dd2380c",
"name": "rsp",
"property": "routine.response",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "1",
"vt": "num"
}
],
"checkall": "false",
"repair": false,
"outputs": 1,
"x": 1710,
"y": 1620,
"wires": [
[
"eabf5fc19efa675a"
]
]
},
{
"id": "e9387364f390f805",
"type": "debug",
"z": "68ee181e9defa139",
"g": "796ef41c1dd2380c",
"name": "scene - lighting",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 3400,
"y": 1620,
"wires": []
},
{
"id": "e3a86e68e388729d",
"type": "link call",
"z": "68ee181e9defa139",
"g": "796ef41c1dd2380c",
"name": "",
"links": [
"c1a22098f4c6b607"
],
"linkType": "static",
"timeout": "30",
"x": 3030,
"y": 1560,
"wires": [
[
"85d5d5e5b6c9beac"
]
]
},
{
"id": "85d5d5e5b6c9beac",
"type": "switch",
"z": "68ee181e9defa139",
"g": "796ef41c1dd2380c",
"name": "rsp",
"property": "routine.response",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "1",
"vt": "num"
}
],
"checkall": "false",
"repair": false,
"outputs": 1,
"x": 3210,
"y": 1560,
"wires": [
[
"e9387364f390f805",
"e3db60d3d55e1a82"
]
]
},
{
"id": "07d45bb35ac762c9",
"type": "switch",
"z": "68ee181e9defa139",
"g": "53babb398943f380",
"name": "trigger",
"property": "path",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "system/mode/fire",
"vt": "str"
}
],
"checkall": "false",
"repair": false,
"outputs": 1,
"x": 270,
"y": 960,
"wires": [
[
"d5aa33c47a8c4347"
]
]
},
{
"id": "2856d3bff393f9fc",
"type": "switch",
"z": "68ee181e9defa139",
"g": "53babb398943f380",
"name": "mode master",
"property": "metrics.system.mode.master",
"propertyType": "global",
"rules": [
{
"t": "eq",
"v": "about.automate",
"vt": "global"
}
],
"checkall": "false",
"repair": false,
"outputs": 1,
"x": 610,
"y": 960,
"wires": [
[
"f4e114d534bc63d0"
]
]
},
{
"id": "f4e114d534bc63d0",
"type": "switch",
"z": "68ee181e9defa139",
"g": "53babb398943f380",
"name": "mode automate",
"property": "metrics.system.mode.automate",
"propertyType": "global",
"rules": [
{
"t": "eq",
"v": "automatic",
"vt": "str"
}
],
"checkall": "false",
"repair": false,
"outputs": 1,
"x": 820,
"y": 960,
"wires": [
[
"7fcd9ac436f62e8a"
]
]
},
{
"id": "d5aa33c47a8c4347",
"type": "switch",
"z": "68ee181e9defa139",
"g": "53babb398943f380",
"name": "fire",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "fire",
"vt": "str"
}
],
"checkall": "false",
"repair": false,
"outputs": 1,
"x": 430,
"y": 960,
"wires": [
[
"2856d3bff393f9fc"
]
]
},
{
"id": "7fcd9ac436f62e8a",
"type": "link out",
"z": "68ee181e9defa139",
"g": "53babb398943f380",
"name": "scene - fire",
"mode": "link",
"links": [
"fb4b4e2a3fb029df"
],
"x": 975,
"y": 960,
"wires": []
},
{
"id": "975a84254ad7876b",
"type": "link in",
"z": "68ee181e9defa139",
"g": "53babb398943f380",
"name": "scene - fire",
"links": [],
"x": 135,
"y": 960,
"wires": [
[
"07d45bb35ac762c9"
]
]
},
{
"id": "2f804afe437414b9",
"type": "change",
"z": "68ee181e9defa139",
"g": "6b28d5f0aa7b2318",
"name": "topic",
"rules": [
{
"t": "set",
"p": "topic",
"pt": "msg",
"to": "scene",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 790,
"y": 60,
"wires": [
[
"8437dc846be5af12"
]
]
},
{
"id": "8437dc846be5af12",
"type": "link out",
"z": "68ee181e9defa139",
"g": "6b28d5f0aa7b2318",
"name": "catch error",
"mode": "link",
"links": [
"a52f0e788cd4dca3"
],
"x": 915,
"y": 60,
"wires": []
},
{
"id": "d2e269a6af2dfb1c",
"type": "change",
"z": "68ee181e9defa139",
"g": "9fed22b2831a8c22",
"name": "move",
"rules": [
{
"t": "set",
"p": "topic",
"pt": "msg",
"to": "old_topic",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1430,
"y": 420,
"wires": [
[
"85ac6855ecab60c4",
"1b1e4074f6d9749c"
]
]
},
{
"id": "6e5d97fd5f511366",
"type": "link in",
"z": "68ee181e9defa139",
"g": "cec3ab5a35c60f2d",
"name": "scene - trigger",
"links": [
"031a6afd8300356a",
"427c0a5a050502e2"
],
"x": 135,
"y": 3780,
"wires": [
[
"437450dbe9e8f9d5"
]
]
},
{
"id": "2ea571ad93364449",
"type": "switch",
"z": "68ee181e9defa139",
"g": "cec3ab5a35c60f2d",
"name": "path",
"property": "triggers",
"propertyType": "global",
"rules": [
{
"t": "hask",
"v": "path",
"vt": "msg"
}
],
"checkall": "false",
"repair": false,
"outputs": 1,
"x": 480,
"y": 3780,
"wires": [
[
"8f1009a9502a5516"
]
]
},
{
"id": "8f1009a9502a5516",
"type": "change",
"z": "68ee181e9defa139",
"g": "cec3ab5a35c60f2d",
"name": "move",
"rules": [
{
"t": "set",
"p": "trigger_payload",
"pt": "msg",
"to": "payload",
"tot": "msg"
},
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "triggers[msg.path]",
"tot": "global"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 640,
"y": 3780,
"wires": [
[
"3d54b31ec68172cf"
]
]
},
{
"id": "3d54b31ec68172cf",
"type": "split",
"z": "68ee181e9defa139",
"g": "cec3ab5a35c60f2d",
"name": "scene md5",
"splt": "\\n",
"spltType": "str",
"arraySplt": 1,
"arraySpltType": "len",
"stream": false,
"addname": "",
"property": "payload",
"x": 820,
"y": 3780,
"wires": [
[
"b3e6c30cb9035dee",
"7660a519a43dca38",
"e4a851ee51659fbe"
]
]
},
{
"id": "b0a067f702405dd8",
"type": "debug",
"z": "68ee181e9defa139",
"g": "cec3ab5a35c60f2d",
"name": "trigger - path",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 1940,
"y": 3720,
"wires": []
},
{
"id": "56cb9892b5febb14",
"type": "change",
"z": "68ee181e9defa139",
"g": "cec3ab5a35c60f2d",
"name": "scene",
"rules": [
{
"t": "set",
"p": "scene",
"pt": "msg",
"to": "payload",
"tot": "msg"
},
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "trigger_payload",
"tot": "msg"
},
{
"t": "delete",
"p": "trigger_payload",
"pt": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1560,
"y": 3780,
"wires": [
[
"0cd574bde14391d4"
]
]
},
{
"id": "ba1ad3b1c11760c5",
"type": "switch",
"z": "68ee181e9defa139",
"g": "cec3ab5a35c60f2d",
"name": "scene type",
"property": "scene.type",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "lighting",
"vt": "str"
},
{
"t": "eq",
"v": "toggle",
"vt": "str"
},
{
"t": "eq",
"v": "shading",
"vt": "str"
},
{
"t": "eq",
"v": "clone",
"vt": "str"
},
{
"t": "eq",
"v": "airflow",
"vt": "str"
},
{
"t": "eq",
"v": "cumulus",
"vt": "str"
},
{
"t": "eq",
"v": "snapshot",
"vt": "str"
},
{
"t": "eq",
"v": "overload",
"vt": "str"
},
{
"t": "eq",
"v": "custom color",
"vt": "str"
},
{
"t": "eq",
"v": "custom level",
"vt": "str"
},
{
"t": "eq",
"v": "custom volume",
"vt": "str"
}
],
"checkall": "false",
"repair": false,
"outputs": 11,
"x": 2100,
"y": 3840,
"wires": [
[
"a205fd735ab69076"
],
[
"5aaa598948695182"
],
[
"df48aef72bf72d15"
],
[
"828954124f9d5f18"
],
[
"e61e9d413554539f"
],
[
"1ea871e1ad0c448e"
],
[
"3ada84cb46c4cf59"
],
[
"0bba3390b421b942"
],
[
"6d05765c48afd703"
],
[
"ee316a30d7d76949"
],
[
"7e60e1c2ce2b33b5"
]
]
},
{
"id": "a205fd735ab69076",
"type": "link out",
"z": "68ee181e9defa139",
"g": "cec3ab5a35c60f2d",
"name": "scene - trigger - lighting",
"mode": "link",
"links": [
"abdf34b12a5dd88d"
],
"x": 2245,
"y": 3720,
"wires": []
},
{
"id": "c0b5773a6bf24fa0",
"type": "switch",
"z": "68ee181e9defa139",
"g": "cec3ab5a35c60f2d",
"name": "on other",
"property": "payload.on",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "trigger_payload",
"vt": "msg"
}
],
"checkall": "false",
"repair": false,
"outputs": 1,
"x": 1210,
"y": 3900,
"wires": [
[
"56aeeccb6faf8480"
]
]
},
{
"id": "56aeeccb6faf8480",
"type": "change",
"z": "68ee181e9defa139",
"g": "cec3ab5a35c60f2d",
"name": "value",
"rules": [
{
"t": "set",
"p": "trigger_payload",
"pt": "msg",
"to": "true",
"tot": "bool"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1400,
"y": 3840,
"wires": [
[
"56cb9892b5febb14"
]
]
},
{
"id": "b7b4f3e199cff4e1",
"type": "change",
"z": "68ee181e9defa139",
"g": "cec3ab5a35c60f2d",
"name": "value",
"rules": [
{
"t": "set",
"p": "trigger_payload",
"pt": "msg",
"to": "false",
"tot": "bool"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1400,
"y": 3960,
"wires": [
[
"56cb9892b5febb14"
]
]
},
{
"id": "b3e6c30cb9035dee",
"type": "switch",
"z": "68ee181e9defa139",
"g": "cec3ab5a35c60f2d",
"name": "state on type",
"property": "payload.on",
"propertyType": "msg",
"rules": [
{
"t": "istype",
"v": "number",
"vt": "number"
},
{
"t": "istype",
"v": "boolean",
"vt": "boolean"
},
{
"t": "istype",
"v": "string",
"vt": "string"
}
],
"checkall": "false",
"repair": false,
"outputs": 3,
"x": 1020,
"y": 3840,
"wires": [
[
"e9f918d732ed4390"
],
[
"c0b5773a6bf24fa0"
],
[
"c0b5773a6bf24fa0"
]
]
},
{
"id": "e9f918d732ed4390",
"type": "switch",
"z": "68ee181e9defa139",
"g": "cec3ab5a35c60f2d",
"name": "on number",
"property": "payload.on",
"propertyType": "msg",
"rules": [
{
"t": "lte",
"v": "trigger_payload",
"vt": "msg"
}
],
"checkall": "false",
"repair": false,
"outputs": 1,
"x": 1220,
"y": 3840,
"wires": [
[
"56aeeccb6faf8480"
]
]
},
{
"id": "7660a519a43dca38",
"type": "switch",
"z": "68ee181e9defa139",
"g": "cec3ab5a35c60f2d",
"name": "state off type",
"property": "payload.off",
"propertyType": "msg",
"rules": [
{
"t": "istype",
"v": "number",
"vt": "number"
},
{
"t": "istype",
"v": "boolean",
"vt": "boolean"
},
{
"t": "istype",
"v": "string",
"vt": "string"
}
],
"checkall": "false",
"repair": false,
"outputs": 3,
"x": 1020,
"y": 3960,
"wires": [
[
"e3935a8921558315"
],
[
"05cb38d49efdd621"
],
[
"05cb38d49efdd621"
]
]
},
{
"id": "e3935a8921558315",
"type": "switch",
"z": "68ee181e9defa139",
"g": "cec3ab5a35c60f2d",
"name": "off number",
"property": "payload.off",
"propertyType": "msg",
"rules": [
{
"t": "gte",
"v": "trigger_payload",
"vt": "msg"
}
],
"checkall": "false",
"repair": false,
"outputs": 1,
"x": 1220,
"y": 3960,
"wires": [
[
"b7b4f3e199cff4e1"
]
]
},
{
"id": "05cb38d49efdd621",
"type": "switch",
"z": "68ee181e9defa139",
"g": "cec3ab5a35c60f2d",
"name": "off other",
"property": "payload.off",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "trigger_payload",
"vt": "msg"
}
],
"checkall": "false",
"repair": false,
"outputs": 1,
"x": 1210,
"y": 4020,
"wires": [
[
"b7b4f3e199cff4e1"
]
]
},
{
"id": "435b7ba53d3b3f3d",
"type": "switch",
"z": "68ee181e9defa139",
"g": "796ef41c1dd2380c",
"name": "nightlight actif",
"property": "routine.nightlight",
"propertyType": "msg",
"rules": [
{
"t": "true"
},
{
"t": "else"
}
],
"checkall": "false",
"repair": false,
"outputs": 2,
"x": 300,
"y": 1620,
"wires": [
[
"5cf10abb34d2afd9"
],
[
"0dce2c644348616c"
]
]
},
{
"id": "5cf10abb34d2afd9",
"type": "switch",
"z": "68ee181e9defa139",
"g": "796ef41c1dd2380c",
"name": "nycthemer",
"property": "metrics.system.mode.nycthemer",
"propertyType": "global",
"rules": [
{
"t": "eq",
"v": "night",
"vt": "str"
},
{
"t": "eq",
"v": "day",
"vt": "str"
}
],
"checkall": "false",
"repair": false,
"outputs": 2,
"x": 510,
"y": 1500,
"wires": [
[
"de95eb8bc9cedb87"
],
[
"08ab0de6523813f1"
]
]
},
{
"id": "de95eb8bc9cedb87",
"type": "switch",
"z": "68ee181e9defa139",
"g": "796ef41c1dd2380c",
"name": "measurement",
"property": "measurement",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "light",
"vt": "str"
},
{
"t": "eq",
"v": "mode",
"vt": "str"
}
],
"checkall": "false",
"repair": false,
"outputs": 2,
"x": 720,
"y": 1440,
"wires": [
[
"7af2f9f85dfa9434"
],
[
"08ab0de6523813f1"
]
]
},
{
"id": "7af2f9f85dfa9434",
"type": "switch",
"z": "68ee181e9defa139",
"g": "796ef41c1dd2380c",
"name": "field",
"property": "field",
"propertyType": "msg",
"rules": [
{
"t": "neq",
"v": "scene.field",
"vt": "msg"
}
],
"checkall": "false",
"repair": false,
"outputs": 1,
"x": 910,
"y": 1440,
"wires": [
[
"9f7db667a3e5cce9"
]
]
},
{
"id": "9f7db667a3e5cce9",
"type": "change",
"z": "68ee181e9defa139",
"g": "796ef41c1dd2380c",
"name": "invert",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "$number(msg.payload)=0",
"tot": "jsonata"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 3030,
"y": 1440,
"wires": [
[
"9c4f5df3df617722"
]
]
},
{
"id": "9c4f5df3df617722",
"type": "change",
"z": "68ee181e9defa139",
"g": "796ef41c1dd2380c",
"name": "payload",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "msg.payload?msg.scene.on:msg.scene.off",
"tot": "jsonata"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 3200,
"y": 1500,
"wires": [
[
"e3db60d3d55e1a82",
"e9387364f390f805"
]
]
},
{
"id": "08ab0de6523813f1",
"type": "change",
"z": "68ee181e9defa139",
"g": "796ef41c1dd2380c",
"name": "payload",
"rules": [
{
"t": "set",
"p": "nycthemer",
"pt": "msg",
"to": "metrics.system.mode.nycthemer",
"tot": "global"
},
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "msg.nycthemer='night'",
"tot": "jsonata"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 920,
"y": 1500,
"wires": [
[
"9c4f5df3df617722"
]
]
},
{
"id": "e4a851ee51659fbe",
"type": "switch",
"z": "68ee181e9defa139",
"g": "cec3ab5a35c60f2d",
"name": "no state",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "hask",
"v": "on",
"vt": "str"
},
{
"t": "hask",
"v": "off",
"vt": "str"
},
{
"t": "else"
}
],
"checkall": "false",
"repair": false,
"outputs": 3,
"x": 1010,
"y": 3780,
"wires": [
[],
[],
[
"56cb9892b5febb14"
]
]
},
{
"id": "5aaa598948695182",
"type": "link out",
"z": "68ee181e9defa139",
"g": "cec3ab5a35c60f2d",
"name": "scene - trigger - toggle",
"mode": "link",
"links": [
"4e5dc7fe86199d6d"
],
"x": 2245,
"y": 3780,
"wires": []
},
{
"id": "4e5dc7fe86199d6d",
"type": "link in",
"z": "68ee181e9defa139",
"g": "3e2b5d0f1dd7c70c",
"name": "scene - toggle",
"links": [
"5aaa598948695182"
],
"x": 135,
"y": 2520,
"wires": [
[
"0b8cfb72bb0f3e13"
]
]
},
{
"id": "da742d7b236d74e9",
"type": "debug",
"z": "68ee181e9defa139",
"g": "3e2b5d0f1dd7c70c",
"name": "scene - toggle",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 480,
"y": 2460,
"wires": []
},
{
"id": "0b8cfb72bb0f3e13",
"type": "change",
"z": "68ee181e9defa139",
"g": "3e2b5d0f1dd7c70c",
"name": "get global",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "metrics[msg.scene.bucket][msg.scene.measurement][msg.scene.field]",
"tot": "global"
},
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "msg.payload=msg.scene.off?msg.scene.on:msg.scene.off",
"tot": "jsonata"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 280,
"y": 2520,
"wires": [
[
"b15b9bb27e18cc28",
"da742d7b236d74e9"
]
]
},
{
"id": "b15b9bb27e18cc28",
"type": "link out",
"z": "68ee181e9defa139",
"g": "3e2b5d0f1dd7c70c",
"name": "scene - toggle",
"mode": "link",
"links": [
"fb4b4e2a3fb029df"
],
"x": 415,
"y": 2520,
"wires": []
},
{
"id": "df48aef72bf72d15",
"type": "link out",
"z": "68ee181e9defa139",
"g": "cec3ab5a35c60f2d",
"name": "scene - trigger - shading",
"mode": "link",
"links": [
"d104d5773963a340"
],
"x": 2245,
"y": 3840,
"wires": []
},
{
"id": "6ea014398476684e",
"type": "link out",
"z": "68ee181e9defa139",
"g": "152a1afefb8c6055",
"name": "scene - shutter shading",
"mode": "link",
"links": [
"fb4b4e2a3fb029df"
],
"x": 2635,
"y": 1320,
"wires": []
},
{
"id": "85772c505d998011",
"type": "link call",
"z": "68ee181e9defa139",
"g": "152a1afefb8c6055",
"name": "",
"links": [
"c63c05889184c3bc"
],
"linkType": "static",
"timeout": "30",
"x": 1630,
"y": 1200,
"wires": [
[
"4ddccddf03e3d4d4"
]
]
},
{
"id": "4ddccddf03e3d4d4",
"type": "switch",
"z": "68ee181e9defa139",
"g": "152a1afefb8c6055",
"name": "rsp",
"property": "routine.response",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "1",
"vt": "num"
}
],
"checkall": "false",
"repair": false,
"outputs": 1,
"x": 1810,
"y": 1200,
"wires": [
[
"db475389de188a0c"
]
]
},
{
"id": "a07d6dd6d1c29a6a",
"type": "switch",
"z": "68ee181e9defa139",
"g": "152a1afefb8c6055",
"name": "type",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "true"
},
{
"t": "false"
},
{
"t": "else"
}
],
"checkall": "false",
"repair": false,
"outputs": 3,
"x": 2330,
"y": 1260,
"wires": [
[
"eeb585f11f6823ce"
],
[
"ce174d9aa3f86e80"
],
[
"81521b1b53a011cf"
]
]
},
{
"id": "eeb585f11f6823ce",
"type": "change",
"z": "68ee181e9defa139",
"g": "152a1afefb8c6055",
"name": "99",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "scene.on",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 2490,
"y": 1200,
"wires": [
[
"6ea014398476684e",
"1acc8b4f519da72e"
]
]
},
{
"id": "ce174d9aa3f86e80",
"type": "change",
"z": "68ee181e9defa139",
"g": "152a1afefb8c6055",
"name": "0",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "scene.off",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 2490,
"y": 1260,
"wires": [
[
"6ea014398476684e",
"1acc8b4f519da72e"
]
]
},
{
"id": "81521b1b53a011cf",
"type": "change",
"z": "68ee181e9defa139",
"g": "152a1afefb8c6055",
"name": "number",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "$abs($number(msg.payload))",
"tot": "jsonata"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 2500,
"y": 1320,
"wires": [
[
"6ea014398476684e",
"1acc8b4f519da72e"
]
]
},
{
"id": "a5ccd36e26d9f6d9",
"type": "link call",
"z": "68ee181e9defa139",
"g": "152a1afefb8c6055",
"name": "",
"links": [
"89bf9e5c676a419c"
],
"linkType": "static",
"timeout": "30",
"x": 530,
"y": 1080,
"wires": [
[
"0e492506da218846"
]
]
},
{
"id": "0e492506da218846",
"type": "switch",
"z": "68ee181e9defa139",
"g": "152a1afefb8c6055",
"name": "rsp",
"property": "routine.response",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "1",
"vt": "num"
}
],
"checkall": "false",
"repair": false,
"outputs": 1,
"x": 730,
"y": 1080,
"wires": [
[
"37da6809fc64b9e4"
]
]
},
{
"id": "37da6809fc64b9e4",
"type": "change",
"z": "68ee181e9defa139",
"g": "152a1afefb8c6055",
"name": "openwork",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "scene.openwork",
"tot": "msg"
},
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "$number(msg.payload)",
"tot": "jsonata"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1800,
"y": 1080,
"wires": [
[
"db475389de188a0c"
]
]
},
{
"id": "db475389de188a0c",
"type": "switch",
"z": "68ee181e9defa139",
"g": "152a1afefb8c6055",
"name": "right bay",
"property": "metrics[msg.scene.bucket]aperture['right bay']",
"propertyType": "global",
"rules": [
{
"t": "false"
}
],
"checkall": "false",
"repair": false,
"outputs": 1,
"x": 1980,
"y": 1200,
"wires": [
[
"7fd8ffaab7b5e644"
]
]
},
{
"id": "7fd8ffaab7b5e644",
"type": "switch",
"z": "68ee181e9defa139",
"g": "152a1afefb8c6055",
"name": "left bay",
"property": "metrics[msg.scene.bucket]aperture['left bay']",
"propertyType": "global",
"rules": [
{
"t": "false"
}
],
"checkall": "false",
"repair": false,
"outputs": 1,
"x": 2160,
"y": 1200,
"wires": [
[
"a07d6dd6d1c29a6a"
]
]
},
{
"id": "e4bcc2150345266e",
"type": "link call",
"z": "68ee181e9defa139",
"g": "152a1afefb8c6055",
"name": "",
"links": [
"c63c05889184c3bc"
],
"linkType": "static",
"timeout": "30",
"x": 850,
"y": 1320,
"wires": [
[
"b0cca198cd40b4b7"
]
]
},
{
"id": "d104d5773963a340",
"type": "link in",
"z": "68ee181e9defa139",
"g": "152a1afefb8c6055",
"name": "scene - shutter shading",
"links": [
"df48aef72bf72d15"
],
"x": 135,
"y": 1260,
"wires": [
[
"57ab09d50f789b03"
]
]
},
{
"id": "1acc8b4f519da72e",
"type": "debug",
"z": "68ee181e9defa139",
"g": "152a1afefb8c6055",
"name": "scene - shutter shading",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 2730,
"y": 1260,
"wires": []
},
{
"id": "bb270d49658a693f",
"type": "change",
"z": "68ee181e9defa139",
"g": "152a1afefb8c6055",
"name": "nycthemer",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "metrics.system.mode.nycthemer",
"tot": "global"
},
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "msg.payload='day'",
"tot": "jsonata"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1430,
"y": 1200,
"wires": [
[
"85772c505d998011"
]
]
},
{
"id": "b0cca198cd40b4b7",
"type": "switch",
"z": "68ee181e9defa139",
"g": "152a1afefb8c6055",
"name": "rsp",
"property": "routine.response",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "1",
"vt": "num"
}
],
"checkall": "false",
"repair": false,
"outputs": 1,
"x": 2170,
"y": 1320,
"wires": [
[
"a07d6dd6d1c29a6a"
]
]
},
{
"id": "57ab09d50f789b03",
"type": "switch",
"z": "68ee181e9defa139",
"g": "152a1afefb8c6055",
"name": "measurement",
"property": "measurement",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "luminosity",
"vt": "str"
},
{
"t": "eq",
"v": "mode",
"vt": "str"
},
{
"t": "eq",
"v": "aperture",
"vt": "str"
},
{
"t": "else"
}
],
"checkall": "false",
"repair": false,
"outputs": 4,
"x": 300,
"y": 1260,
"wires": [
[
"a5ccd36e26d9f6d9"
],
[
"174cc227ba703f1c"
],
[
"fe15947cd1dee943"
],
[
"e4bcc2150345266e"
]
]
},
{
"id": "174cc227ba703f1c",
"type": "switch",
"z": "68ee181e9defa139",
"g": "152a1afefb8c6055",
"name": "field",
"property": "field",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "nycthemer",
"vt": "str"
}
],
"checkall": "false",
"repair": false,
"outputs": 1,
"x": 490,
"y": 1140,
"wires": [
[
"decfc56647d266cf"
]
]
},
{
"id": "f1475eafde58ef48",
"type": "trigger",
"z": "68ee181e9defa139",
"g": "152a1afefb8c6055",
"name": "wait 3 s",
"op1": "",
"op2": "",
"op1type": "nul",
"op2type": "payl",
"duration": "3",
"extend": false,
"overrideDelay": false,
"units": "s",
"reset": "",
"bytopic": "topic",
"topic": "scene.bucket",
"outputs": 1,
"x": 1240,
"y": 1140,
"wires": [
[
"bb270d49658a693f"
]
]
},
{
"id": "fe15947cd1dee943",
"type": "switch",
"z": "68ee181e9defa139",
"g": "152a1afefb8c6055",
"name": "field",
"property": "field",
"propertyType": "msg",
"rules": [
{
"t": "neq",
"v": "scene.field",
"vt": "msg"
},
{
"t": "else"
}
],
"checkall": "false",
"repair": false,
"outputs": 2,
"x": 490,
"y": 1200,
"wires": [
[
"bb270d49658a693f"
],
[
"bebe5c9f233bc014"
]
]
},
{
"id": "bebe5c9f233bc014",
"type": "trigger",
"z": "68ee181e9defa139",
"g": "152a1afefb8c6055",
"name": "wait 30 s",
"op1": "",
"op2": "",
"op1type": "nul",
"op2type": "payl",
"duration": "30",
"extend": true,
"overrideDelay": false,
"units": "s",
"reset": "",
"bytopic": "topic",
"topic": "scene.bucket",
"outputs": 1,
"x": 660,
"y": 1260,
"wires": [
[
"e4bcc2150345266e"
]
]
},
{
"id": "decfc56647d266cf",
"type": "change",
"z": "68ee181e9defa139",
"g": "152a1afefb8c6055",
"name": "set delay",
"rules": [
{
"t": "set",
"p": "delay",
"pt": "msg",
"to": "msg.routine.delay>0?msg.routine.delay:1",
"tot": "jsonata"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 660,
"y": 1140,
"wires": [
[
"4ba20a57285906e1"
]
]
},
{
"id": "0afac8df8c0ad593",
"type": "link out",
"z": "68ee181e9defa139",
"g": "1d10dc102aa4bd1a",
"name": "scene - clone",
"mode": "link",
"links": [
"206c1fb4a48067df"
],
"x": 615,
"y": 2700,
"wires": []
},
{
"id": "d39803577094b080",
"type": "debug",
"z": "68ee181e9defa139",
"g": "1d10dc102aa4bd1a",
"name": "scene - clone",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 670,
"y": 2640,
"wires": []
},
{
"id": "102eb508957fee9a",
"type": "change",
"z": "68ee181e9defa139",
"g": "1d10dc102aa4bd1a",
"name": "split metric",
"rules": [
{
"t": "set",
"p": "tmp",
"pt": "msg",
"to": "$split(msg.scene.path,'/')",
"tot": "jsonata"
},
{
"t": "set",
"p": "target.bucket",
"pt": "msg",
"to": "tmp[0]",
"tot": "msg"
},
{
"t": "set",
"p": "target.measurement",
"pt": "msg",
"to": "tmp[1]",
"tot": "msg"
},
{
"t": "set",
"p": "target.field",
"pt": "msg",
"to": "tmp[2]",
"tot": "msg"
},
{
"t": "set",
"p": "target.payload",
"pt": "msg",
"to": "payload",
"tot": "msg"
},
{
"t": "set",
"p": "target.repeat",
"pt": "msg",
"to": "true",
"tot": "bool"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 290,
"y": 2700,
"wires": [
[
"99f3818ae330dad4"
]
]
},
{
"id": "99f3818ae330dad4",
"type": "function",
"z": "68ee181e9defa139",
"g": "1d10dc102aa4bd1a",
"name": "set metric",
"func": "// script var\nvar msg = msg;\n\nreturn msg.target;",
"outputs": 1,
"timeout": "",
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 480,
"y": 2700,
"wires": [
[
"d39803577094b080",
"0afac8df8c0ad593"
]
]
},
{
"id": "394846d13b3f3ad5",
"type": "link in",
"z": "68ee181e9defa139",
"g": "1d10dc102aa4bd1a",
"name": "scene - clone",
"links": [
"828954124f9d5f18"
],
"x": 135,
"y": 2700,
"wires": [
[
"102eb508957fee9a"
]
]
},
{
"id": "828954124f9d5f18",
"type": "link out",
"z": "68ee181e9defa139",
"g": "cec3ab5a35c60f2d",
"name": "scene - trigger - clone",
"mode": "link",
"links": [
"394846d13b3f3ad5"
],
"x": 2245,
"y": 3900,
"wires": []
},
{
"id": "a1e311e659c0a082",
"type": "change",
"z": "68ee181e9defa139",
"g": "241e58e3b15dd775",
"name": "set metric",
"rules": [
{
"t": "set",
"p": "bucket",
"pt": "msg",
"to": "scene.bucket",
"tot": "msg"
},
{
"t": "set",
"p": "measurement",
"pt": "msg",
"to": "scene.measurement",
"tot": "msg"
},
{
"t": "set",
"p": "field",
"pt": "msg",
"to": "scene.field",
"tot": "msg"
},
{
"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.bucket][msg.measurement][msg.field]",
"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"
},
{
"t": "set",
"p": "repeat",
"pt": "msg",
"to": "true",
"tot": "bool"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 280,
"y": 2880,
"wires": [
[
"5391e717f6dca308",
"906b6acddcc68024"
]
]
},
{
"id": "6d05765c48afd703",
"type": "link out",
"z": "68ee181e9defa139",
"g": "cec3ab5a35c60f2d",
"name": "scene - trigger - custom color",
"mode": "link",
"links": [
"0a11184001fe0640"
],
"x": 2245,
"y": 4200,
"wires": []
},
{
"id": "0a11184001fe0640",
"type": "link in",
"z": "68ee181e9defa139",
"g": "241e58e3b15dd775",
"name": "scene - custom color",
"links": [
"6d05765c48afd703"
],
"x": 135,
"y": 2880,
"wires": [
[
"a1e311e659c0a082"
]
]
},
{
"id": "5391e717f6dca308",
"type": "debug",
"z": "68ee181e9defa139",
"g": "241e58e3b15dd775",
"name": "scene - custom color",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 500,
"y": 2820,
"wires": []
},
{
"id": "906b6acddcc68024",
"type": "link out",
"z": "68ee181e9defa139",
"g": "241e58e3b15dd775",
"name": "scene - custom color",
"mode": "link",
"links": [
"206c1fb4a48067df"
],
"x": 415,
"y": 2880,
"wires": []
},
{
"id": "2ff1d9f7d0cd1e1c",
"type": "change",
"z": "68ee181e9defa139",
"g": "282f949a47889a3f",
"name": "level +",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "(msg.state+msg.routine.step)>msg.routine.higher?msg.routine.higher:(msg.state+msg.routine.step)",
"tot": "jsonata"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 630,
"y": 3000,
"wires": [
[
"6ffbc9731bd5e6ae",
"3d8af1903f187678"
]
]
},
{
"id": "309b17151899bda1",
"type": "link in",
"z": "68ee181e9defa139",
"g": "282f949a47889a3f",
"name": "scene - custom level",
"links": [
"ee316a30d7d76949"
],
"x": 135,
"y": 3060,
"wires": [
[
"9909e92faf9def23"
]
]
},
{
"id": "6ffbc9731bd5e6ae",
"type": "debug",
"z": "68ee181e9defa139",
"g": "282f949a47889a3f",
"name": "scene - custom level",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 840,
"y": 3000,
"wires": []
},
{
"id": "3d8af1903f187678",
"type": "link out",
"z": "68ee181e9defa139",
"g": "282f949a47889a3f",
"name": "scene - custom level",
"mode": "link",
"links": [
"206c1fb4a48067df"
],
"x": 755,
"y": 3060,
"wires": []
},
{
"id": "ee316a30d7d76949",
"type": "link out",
"z": "68ee181e9defa139",
"g": "cec3ab5a35c60f2d",
"name": "scene - trigger - custom level",
"mode": "link",
"links": [
"309b17151899bda1"
],
"x": 2245,
"y": 4260,
"wires": []
},
{
"id": "deed3da8baf03817",
"type": "switch",
"z": "68ee181e9defa139",
"g": "282f949a47889a3f",
"name": "payload",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "true"
},
{
"t": "else"
}
],
"checkall": "false",
"repair": false,
"outputs": 2,
"x": 460,
"y": 3060,
"wires": [
[
"2ff1d9f7d0cd1e1c"
],
[
"22d518d36e04716c"
]
]
},
{
"id": "9909e92faf9def23",
"type": "change",
"z": "68ee181e9defa139",
"g": "282f949a47889a3f",
"name": "set metric",
"rules": [
{
"t": "set",
"p": "bucket",
"pt": "msg",
"to": "scene.bucket",
"tot": "msg"
},
{
"t": "set",
"p": "measurement",
"pt": "msg",
"to": "scene.measurement",
"tot": "msg"
},
{
"t": "set",
"p": "field",
"pt": "msg",
"to": "scene.field",
"tot": "msg"
},
{
"t": "set",
"p": "repeat",
"pt": "msg",
"to": "true",
"tot": "bool"
},
{
"t": "set",
"p": "state",
"pt": "msg",
"to": "metrics[msg.bucket][msg.measurement][msg.field]",
"tot": "global"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 280,
"y": 3060,
"wires": [
[
"deed3da8baf03817"
]
]
},
{
"id": "22d518d36e04716c",
"type": "change",
"z": "68ee181e9defa139",
"g": "282f949a47889a3f",
"name": "level -",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "(msg.state-msg.routine.step)<msg.routine.lower?msg.routine.lower:(msg.state-msg.routine.step)",
"tot": "jsonata"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 630,
"y": 3060,
"wires": [
[
"6ffbc9731bd5e6ae",
"3d8af1903f187678"
]
]
},
{
"id": "a1ef7c28be93a984",
"type": "comment",
"z": "68ee181e9defa139",
"g": "282f949a47889a3f",
"name": "this does not use \"scene write\" and goes to kernel metric",
"info": "",
"x": 1110,
"y": 3060,
"wires": []
},
{
"id": "0cd574bde14391d4",
"type": "link call",
"z": "68ee181e9defa139",
"g": "cec3ab5a35c60f2d",
"name": "",
"links": [
"c1a22098f4c6b607"
],
"linkType": "static",
"timeout": "30",
"x": 1740,
"y": 3780,
"wires": [
[
"4b76b340559fb347",
"b0a067f702405dd8"
]
]
},
{
"id": "4b76b340559fb347",
"type": "switch",
"z": "68ee181e9defa139",
"g": "cec3ab5a35c60f2d",
"name": "rsp",
"property": "routine.response",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "1",
"vt": "num"
}
],
"checkall": "false",
"repair": false,
"outputs": 1,
"x": 1920,
"y": 3840,
"wires": [
[
"ba1ad3b1c11760c5"
]
]
},
{
"id": "82aa18736b702cd8",
"type": "comment",
"z": "68ee181e9defa139",
"g": "241e58e3b15dd775",
"name": "this does not use \"scene write\" and goes to kernel metric",
"info": "",
"x": 770,
"y": 2880,
"wires": []
},
{
"id": "d8f45ef2a1ef83db",
"type": "comment",
"z": "68ee181e9defa139",
"g": "1d10dc102aa4bd1a",
"name": "this does not use \"scene write\" and goes to kernel metric",
"info": "",
"x": 970,
"y": 2700,
"wires": []
},
{
"id": "1864089149dd1020",
"type": "change",
"z": "68ee181e9defa139",
"g": "fed2a5ee0a71e88f",
"name": "from scenes",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "scenes",
"tot": "global"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 610,
"y": 240,
"wires": [
[
"3d78b859e586fa91"
]
]
},
{
"id": "3d78b859e586fa91",
"type": "split",
"z": "68ee181e9defa139",
"g": "fed2a5ee0a71e88f",
"name": "types",
"splt": "\\n",
"spltType": "str",
"arraySplt": 1,
"arraySpltType": "len",
"stream": false,
"addname": "type",
"property": "payload",
"x": 790,
"y": 240,
"wires": [
[
"9cb403d67f5020f4"
]
]
},
{
"id": "9cb403d67f5020f4",
"type": "split",
"z": "68ee181e9defa139",
"g": "fed2a5ee0a71e88f",
"name": "scenes",
"splt": "\\n",
"spltType": "str",
"arraySplt": 1,
"arraySpltType": "len",
"stream": false,
"addname": "scene",
"property": "payload",
"x": 960,
"y": 240,
"wires": [
[
"0365c97a2f5bfd4a"
]
]
},
{
"id": "0365c97a2f5bfd4a",
"type": "switch",
"z": "68ee181e9defa139",
"g": "fed2a5ee0a71e88f",
"name": "field",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "hask",
"v": "daily",
"vt": "str"
}
],
"checkall": "false",
"repair": false,
"outputs": 1,
"x": 1130,
"y": 240,
"wires": [
[
"3f3b9ea1c2157e30"
]
]
},
{
"id": "3f3b9ea1c2157e30",
"type": "change",
"z": "68ee181e9defa139",
"g": "fed2a5ee0a71e88f",
"name": "reset daily scene",
"rules": [
{
"t": "set",
"p": "scenes[msg.type][msg.scene]daily",
"pt": "global",
"to": "false",
"tot": "bool"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1330,
"y": 240,
"wires": [
[]
]
},
{
"id": "564fec2392c7191d",
"type": "switch",
"z": "68ee181e9defa139",
"g": "9fed22b2831a8c22",
"name": "has scene",
"property": "scenes[msg.scene.type]",
"propertyType": "global",
"rules": [
{
"t": "hask",
"v": "msg.scene.bucket&'/'&msg.scene.measurement&'/'&msg.scene.field",
"vt": "jsonata"
}
],
"checkall": "false",
"repair": false,
"outputs": 1,
"x": 550,
"y": 480,
"wires": [
[
"8f0ff756ad2dce52"
]
]
},
{
"id": "8f0ff756ad2dce52",
"type": "change",
"z": "68ee181e9defa139",
"g": "9fed22b2831a8c22",
"name": "set daily scene",
"rules": [
{
"t": "set",
"p": "path",
"pt": "msg",
"to": "msg.scene.bucket&'/'&msg.scene.measurement&'/'&msg.scene.field",
"tot": "jsonata"
},
{
"t": "set",
"p": "scenes[msg.scene.type][msg.path]daily",
"pt": "global",
"to": "true",
"tot": "bool"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 760,
"y": 480,
"wires": [
[
"4abd6ee3b969ce9b"
]
]
},
{
"id": "36fedc6b0be804e7",
"type": "change",
"z": "68ee181e9defa139",
"g": "152a1afefb8c6055",
"name": "reset daily scene",
"rules": [
{
"t": "set",
"p": "scenes[msg.scene.type][msg.scene.path]daily",
"pt": "global",
"to": "false",
"tot": "bool"
},
{
"t": "set",
"p": "routine.daily",
"pt": "msg",
"to": "false",
"tot": "bool"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1030,
"y": 1140,
"wires": [
[
"f1475eafde58ef48"
]
]
},
{
"id": "e61e9d413554539f",
"type": "link out",
"z": "68ee181e9defa139",
"g": "cec3ab5a35c60f2d",
"name": "scene - trigger - airflow",
"mode": "link",
"links": [
"222a2cb866b5d927"
],
"x": 2245,
"y": 3960,
"wires": []
},
{
"id": "08678fd952d0718b",
"type": "link call",
"z": "68ee181e9defa139",
"g": "ca328d57424013a3",
"name": "",
"links": [
"834ce9850cdb0a72"
],
"linkType": "static",
"timeout": "30",
"x": 870,
"y": 1800,
"wires": [
[
"ab4fc8c6e09cc5c2"
]
]
},
{
"id": "75bb87ae3f2c0e0a",
"type": "link out",
"z": "68ee181e9defa139",
"g": "ca328d57424013a3",
"name": "scene - airflow",
"mode": "link",
"links": [
"fb4b4e2a3fb029df"
],
"x": 1175,
"y": 1920,
"wires": []
},
{
"id": "ab4fc8c6e09cc5c2",
"type": "switch",
"z": "68ee181e9defa139",
"g": "ca328d57424013a3",
"name": "rsp",
"property": "routine.response",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "1",
"vt": "num"
}
],
"checkall": "false",
"repair": false,
"outputs": 1,
"x": 1050,
"y": 1800,
"wires": [
[
"75bb87ae3f2c0e0a",
"82b63e4a511b74b1",
"e2b5d164394915e1"
]
]
},
{
"id": "a0fa2c85acd788b9",
"type": "switch",
"z": "68ee181e9defa139",
"g": "ca328d57424013a3",
"name": "measurement",
"property": "measurement",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "mode",
"vt": "str"
},
{
"t": "eq",
"v": "humidity",
"vt": "str"
},
{
"t": "else"
}
],
"checkall": "false",
"repair": false,
"outputs": 3,
"x": 300,
"y": 1860,
"wires": [
[
"6790e3c9c69ca682"
],
[
"e1f16ee8824ca937"
],
[
"0f4579886aba5d44"
]
]
},
{
"id": "6790e3c9c69ca682",
"type": "switch",
"z": "68ee181e9defa139",
"g": "ca328d57424013a3",
"name": "manual",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "manual",
"vt": "str"
}
],
"checkall": "false",
"repair": false,
"outputs": 1,
"x": 500,
"y": 1800,
"wires": [
[
"d15334a68d41f0c1"
]
]
},
{
"id": "d15334a68d41f0c1",
"type": "change",
"z": "68ee181e9defa139",
"g": "ca328d57424013a3",
"name": "true",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "true",
"tot": "bool"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 690,
"y": 1860,
"wires": [
[
"75bb87ae3f2c0e0a",
"08678fd952d0718b",
"e2b5d164394915e1"
]
]
},
{
"id": "82b63e4a511b74b1",
"type": "switch",
"z": "68ee181e9defa139",
"g": "ca328d57424013a3",
"name": "mode",
"property": "metrics.system.mode.airflow",
"propertyType": "global",
"rules": [
{
"t": "eq",
"v": "manual",
"vt": "str"
}
],
"checkall": "false",
"repair": false,
"outputs": 1,
"x": 1210,
"y": 1800,
"wires": [
[
"406126819aeb6e7a"
]
]
},
{
"id": "406126819aeb6e7a",
"type": "change",
"z": "68ee181e9defa139",
"g": "ca328d57424013a3",
"name": "set metric",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "automatic",
"tot": "str"
},
{
"t": "set",
"p": "bucket",
"pt": "msg",
"to": "system",
"tot": "str"
},
{
"t": "set",
"p": "measurement",
"pt": "msg",
"to": "mode",
"tot": "str"
},
{
"t": "set",
"p": "field",
"pt": "msg",
"to": "airflow",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1380,
"y": 1800,
"wires": [
[
"9824552e3d00a585"
]
]
},
{
"id": "9824552e3d00a585",
"type": "link out",
"z": "68ee181e9defa139",
"g": "ca328d57424013a3",
"name": "scene - airflow - auto",
"mode": "link",
"links": [
"206c1fb4a48067df"
],
"x": 1515,
"y": 1800,
"wires": []
},
{
"id": "e1f16ee8824ca937",
"type": "switch",
"z": "68ee181e9defa139",
"g": "ca328d57424013a3",
"name": "humidity",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "true"
}
],
"checkall": "false",
"repair": false,
"outputs": 1,
"x": 500,
"y": 1860,
"wires": [
[
"d15334a68d41f0c1"
]
]
},
{
"id": "0f4579886aba5d44",
"type": "link call",
"z": "68ee181e9defa139",
"g": "ca328d57424013a3",
"name": "",
"links": [
"587236e6160da46c"
],
"linkType": "static",
"timeout": "30",
"x": 510,
"y": 1920,
"wires": [
[
"5d63e702c0356933",
"08678fd952d0718b"
]
]
},
{
"id": "5d63e702c0356933",
"type": "switch",
"z": "68ee181e9defa139",
"g": "ca328d57424013a3",
"name": "rsp",
"property": "routine.response",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "1",
"vt": "num"
}
],
"checkall": "false",
"repair": false,
"outputs": 1,
"x": 690,
"y": 1920,
"wires": [
[
"75bb87ae3f2c0e0a",
"e2b5d164394915e1"
]
]
},
{
"id": "e2b5d164394915e1",
"type": "debug",
"z": "68ee181e9defa139",
"g": "ca328d57424013a3",
"name": "scene - airflow",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 1240,
"y": 1860,
"wires": []
},
{
"id": "222a2cb866b5d927",
"type": "link in",
"z": "68ee181e9defa139",
"g": "ca328d57424013a3",
"name": "scene - airflow",
"links": [
"e61e9d413554539f"
],
"x": 135,
"y": 1860,
"wires": [
[
"a0fa2c85acd788b9"
]
]
},
{
"id": "f4ad016915b58f34",
"type": "link call",
"z": "68ee181e9defa139",
"g": "c9e818a567724ec0",
"name": "",
"links": [
"c63c05889184c3bc"
],
"linkType": "static",
"timeout": "30",
"x": 1090,
"y": 2280,
"wires": [
[
"1b526a505cca4b38"
]
]
},
{
"id": "1b526a505cca4b38",
"type": "switch",
"z": "68ee181e9defa139",
"g": "c9e818a567724ec0",
"name": "rsp",
"property": "routine.response",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "1",
"vt": "str"
}
],
"checkall": "false",
"repair": false,
"outputs": 1,
"x": 1270,
"y": 2280,
"wires": [
[
"aab05884f02c9ae5"
]
]
},
{
"id": "05d83797479be408",
"type": "link call",
"z": "68ee181e9defa139",
"g": "c9e818a567724ec0",
"name": "",
"links": [
"834ce9850cdb0a72"
],
"linkType": "static",
"timeout": "30",
"x": 1830,
"y": 2160,
"wires": [
[
"ff50da859f9ab394"
]
]
},
{
"id": "ff50da859f9ab394",
"type": "switch",
"z": "68ee181e9defa139",
"g": "c9e818a567724ec0",
"name": "rsp",
"property": "routine.response",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "1",
"vt": "num"
}
],
"checkall": "false",
"repair": false,
"outputs": 1,
"x": 2010,
"y": 2160,
"wires": [
[
"9d69c9b73ed6d46a",
"c24662116bd8d039",
"f800de19b190bb45"
]
]
},
{
"id": "9d69c9b73ed6d46a",
"type": "link out",
"z": "68ee181e9defa139",
"g": "c9e818a567724ec0",
"name": "scene - cumulus",
"mode": "link",
"links": [
"fb4b4e2a3fb029df"
],
"x": 2135,
"y": 2280,
"wires": []
},
{
"id": "42352296ba1a9b8f",
"type": "link call",
"z": "68ee181e9defa139",
"g": "c9e818a567724ec0",
"name": "",
"links": [
"dfec2e7efb555d4d"
],
"linkType": "static",
"timeout": "30",
"x": 710,
"y": 2280,
"wires": [
[
"092fe634cc63515f"
]
]
},
{
"id": "ac52cc5b1a310d97",
"type": "trigger",
"z": "68ee181e9defa139",
"g": "c9e818a567724ec0",
"name": "wait 5 s",
"op1": "",
"op2": "",
"op1type": "nul",
"op2type": "pay",
"duration": "5",
"extend": false,
"overrideDelay": false,
"units": "s",
"reset": "false",
"bytopic": "all",
"topic": "topic",
"outputs": 1,
"x": 1640,
"y": 2280,
"wires": [
[
"9d69c9b73ed6d46a",
"f800de19b190bb45",
"05d83797479be408"
]
]
},
{
"id": "a7985c79389939ee",
"type": "switch",
"z": "68ee181e9defa139",
"g": "c9e818a567724ec0",
"name": "tariff = HP",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "false"
},
{
"t": "true"
}
],
"checkall": "false",
"repair": false,
"outputs": 2,
"x": 500,
"y": 2220,
"wires": [
[
"6b28323c8b96ebdb"
],
[
"42352296ba1a9b8f"
]
]
},
{
"id": "35328fc67036b0b7",
"type": "switch",
"z": "68ee181e9defa139",
"g": "c9e818a567724ec0",
"name": "cumulus = manuel",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "true"
}
],
"checkall": "false",
"repair": false,
"outputs": 1,
"x": 1230,
"y": 2100,
"wires": [
[
"aab05884f02c9ae5"
]
]
},
{
"id": "aab05884f02c9ae5",
"type": "change",
"z": "68ee181e9defa139",
"g": "c9e818a567724ec0",
"name": "scene on",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "scene.on",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1440,
"y": 2280,
"wires": [
[
"ac52cc5b1a310d97"
]
]
},
{
"id": "c24662116bd8d039",
"type": "switch",
"z": "68ee181e9defa139",
"g": "c9e818a567724ec0",
"name": "mode cumulus",
"property": "metrics.system.mode.cumulus",
"propertyType": "global",
"rules": [
{
"t": "eq",
"v": "manual",
"vt": "str"
}
],
"checkall": "false",
"repair": false,
"outputs": 1,
"x": 2200,
"y": 2160,
"wires": [
[
"d87d6edb5c6df065"
]
]
},
{
"id": "d87d6edb5c6df065",
"type": "change",
"z": "68ee181e9defa139",
"g": "c9e818a567724ec0",
"name": "set metric",
"rules": [
{
"t": "set",
"p": "bucket",
"pt": "msg",
"to": "system",
"tot": "str"
},
{
"t": "set",
"p": "measurement",
"pt": "msg",
"to": "mode",
"tot": "str"
},
{
"t": "set",
"p": "field",
"pt": "msg",
"to": "cumulus",
"tot": "str"
},
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "automatic",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 2400,
"y": 2160,
"wires": [
[
"ee2f9913c385850b"
]
]
},
{
"id": "ee2f9913c385850b",
"type": "link out",
"z": "68ee181e9defa139",
"g": "c9e818a567724ec0",
"name": "scene - cumulus - automatic",
"mode": "link",
"links": [
"206c1fb4a48067df"
],
"x": 2535,
"y": 2160,
"wires": []
},
{
"id": "fee856239ffcf41d",
"type": "change",
"z": "68ee181e9defa139",
"g": "c9e818a567724ec0",
"name": "scene off",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "scene.off",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1440,
"y": 2220,
"wires": [
[
"9d69c9b73ed6d46a",
"ac52cc5b1a310d97",
"f800de19b190bb45",
"05d83797479be408"
]
]
},
{
"id": "092fe634cc63515f",
"type": "switch",
"z": "68ee181e9defa139",
"g": "c9e818a567724ec0",
"name": "rsp",
"property": "routine.response",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "-1",
"vt": "num"
},
{
"t": "eq",
"v": "1",
"vt": "num"
}
],
"checkall": "false",
"repair": false,
"outputs": 2,
"x": 910,
"y": 2280,
"wires": [
[
"6b28323c8b96ebdb"
],
[
"f4ad016915b58f34"
]
]
},
{
"id": "6b28323c8b96ebdb",
"type": "switch",
"z": "68ee181e9defa139",
"g": "c9e818a567724ec0",
"name": "cumulus auto",
"property": "metrics.system.mode.cumulus",
"propertyType": "global",
"rules": [
{
"t": "neq",
"v": "manual",
"vt": "str"
}
],
"checkall": "false",
"repair": false,
"outputs": 1,
"x": 1090,
"y": 2220,
"wires": [
[
"fee856239ffcf41d"
]
]
},
{
"id": "179270593d4a9213",
"type": "switch",
"z": "68ee181e9defa139",
"g": "c9e818a567724ec0",
"name": "nycthemer = day",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "true"
}
],
"checkall": "false",
"repair": false,
"outputs": 1,
"x": 870,
"y": 2160,
"wires": [
[
"6b28323c8b96ebdb"
]
]
},
{
"id": "029a7d6759da4e71",
"type": "delay",
"z": "68ee181e9defa139",
"g": "c9e818a567724ec0",
"name": "1 s",
"pauseType": "delay",
"timeout": "1",
"timeoutUnits": "seconds",
"rate": "1",
"nbRateUnits": "1",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": false,
"allowrate": false,
"outputs": 1,
"x": 670,
"y": 2040,
"wires": [
[
"3db7c0647f6f3b27"
]
]
},
{
"id": "3db7c0647f6f3b27",
"type": "switch",
"z": "68ee181e9defa139",
"g": "c9e818a567724ec0",
"name": "balloon is on",
"property": "metrics[msg.scene.bucket][msg.scene.measurement][msg.scene.field]",
"propertyType": "global",
"rules": [
{
"t": "true"
}
],
"checkall": "false",
"repair": false,
"outputs": 1,
"x": 1250,
"y": 2040,
"wires": [
[
"fee856239ffcf41d"
]
]
},
{
"id": "f800de19b190bb45",
"type": "debug",
"z": "68ee181e9defa139",
"g": "c9e818a567724ec0",
"name": "scene - cumulus",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 2200,
"y": 2220,
"wires": []
},
{
"id": "66144194d3248dab",
"type": "link in",
"z": "68ee181e9defa139",
"g": "c9e818a567724ec0",
"name": "scene - cumulus",
"links": [
"1ea871e1ad0c448e"
],
"x": 135,
"y": 2160,
"wires": [
[
"aa6fd304e5255f29"
]
]
},
{
"id": "1ea871e1ad0c448e",
"type": "link out",
"z": "68ee181e9defa139",
"g": "cec3ab5a35c60f2d",
"name": "scene - trigger - cumulus",
"mode": "link",
"links": [
"66144194d3248dab"
],
"x": 2245,
"y": 4020,
"wires": []
},
{
"id": "aa6fd304e5255f29",
"type": "switch",
"z": "68ee181e9defa139",
"g": "c9e818a567724ec0",
"name": "measurement",
"property": "measurement",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "power",
"vt": "str"
},
{
"t": "eq",
"v": "tariff",
"vt": "str"
},
{
"t": "eq",
"v": "mode",
"vt": "str"
},
{
"t": "else"
}
],
"checkall": "false",
"repair": false,
"outputs": 4,
"x": 300,
"y": 2160,
"wires": [
[
"e80f200967e6e92e"
],
[
"a7985c79389939ee"
],
[
"8a6e80bb7690df1a"
],
[
"154ca07785fc4a03"
]
]
},
{
"id": "e80f200967e6e92e",
"type": "switch",
"z": "68ee181e9defa139",
"g": "c9e818a567724ec0",
"name": "power = 0",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "false"
}
],
"checkall": "false",
"repair": false,
"outputs": 1,
"x": 500,
"y": 2040,
"wires": [
[
"029a7d6759da4e71"
]
]
},
{
"id": "8a6e80bb7690df1a",
"type": "switch",
"z": "68ee181e9defa139",
"g": "c9e818a567724ec0",
"name": "mode",
"property": "field",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "cumulus",
"vt": "str"
},
{
"t": "eq",
"v": "nycthemer",
"vt": "str"
}
],
"checkall": "false",
"repair": false,
"outputs": 2,
"x": 490,
"y": 2100,
"wires": [
[
"35328fc67036b0b7"
],
[
"179270593d4a9213"
]
]
},
{
"id": "154ca07785fc4a03",
"type": "link call",
"z": "68ee181e9defa139",
"g": "c9e818a567724ec0",
"name": "",
"links": [
"587236e6160da46c"
],
"linkType": "static",
"timeout": "30",
"x": 510,
"y": 2340,
"wires": [
[
"32abed02d0722808"
]
]
},
{
"id": "32abed02d0722808",
"type": "switch",
"z": "68ee181e9defa139",
"g": "c9e818a567724ec0",
"name": "rsp",
"property": "routine.response",
"propertyType": "msg",
"rules": [
{
"t": "neq",
"v": "0",
"vt": "num"
}
],
"checkall": "false",
"repair": false,
"outputs": 1,
"x": 1450,
"y": 2340,
"wires": [
[
"ac52cc5b1a310d97"
]
]
},
{
"id": "3ada84cb46c4cf59",
"type": "link out",
"z": "68ee181e9defa139",
"g": "cec3ab5a35c60f2d",
"name": "scene - trigger - snapshot",
"mode": "link",
"links": [
"d7a5fb49638d61c7"
],
"x": 2245,
"y": 4080,
"wires": []
},
{
"id": "d7a5fb49638d61c7",
"type": "link in",
"z": "68ee181e9defa139",
"g": "7ad8c7d614a6550d",
"name": "scene - snapshot",
"links": [
"3ada84cb46c4cf59"
],
"x": 135,
"y": 3420,
"wires": [
[
"c47576e23f709bb0"
]
]
},
{
"id": "07a2f1dafbf1361b",
"type": "change",
"z": "68ee181e9defa139",
"g": "7ad8c7d614a6550d",
"name": "get camre url",
"rules": [
{
"t": "set",
"p": "url",
"pt": "msg",
"to": "metrics[msg.scene.bucket][msg.scene.measurement]url",
"tot": "global"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 450,
"y": 3420,
"wires": [
[
"2ac3ee9cfd871785"
]
]
},
{
"id": "2ac3ee9cfd871785",
"type": "delay",
"z": "68ee181e9defa139",
"g": "7ad8c7d614a6550d",
"name": "1 ms / miin",
"pauseType": "rate",
"timeout": "5",
"timeoutUnits": "seconds",
"rate": "1",
"nbRateUnits": "1",
"rateUnits": "minute",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": true,
"allowrate": false,
"outputs": 1,
"x": 650,
"y": 3420,
"wires": [
[
"cf9bb9f13aa683ed"
]
]
},
{
"id": "cf9bb9f13aa683ed",
"type": "trigger",
"z": "68ee181e9defa139",
"g": "7ad8c7d614a6550d",
"name": "repeat 5 s",
"op1": "",
"op2": "",
"op1type": "pay",
"op2type": "payl",
"duration": "5",
"extend": false,
"overrideDelay": false,
"units": "s",
"reset": "",
"bytopic": "all",
"topic": "topic",
"outputs": 1,
"x": 840,
"y": 3420,
"wires": [
[
"b1d8ee0c1293ac1d"
]
]
},
{
"id": "b1d8ee0c1293ac1d",
"type": "http request",
"z": "68ee181e9defa139",
"g": "7ad8c7d614a6550d",
"name": "get snapshot",
"method": "GET",
"ret": "bin",
"paytoqs": "ignore",
"url": "",
"tls": "",
"persist": false,
"proxy": "",
"insecureHTTPParser": false,
"authType": "",
"senderr": false,
"headers": [],
"x": 1030,
"y": 3420,
"wires": [
[
"0f6fdddafa87cee7"
]
]
},
{
"id": "a246dabb539abf36",
"type": "change",
"z": "68ee181e9defa139",
"g": "7ad8c7d614a6550d",
"name": "set metric",
"rules": [
{
"t": "set",
"p": "topic",
"pt": "msg",
"to": "scene",
"tot": "str"
},
{
"t": "set",
"p": "bucket",
"pt": "msg",
"to": "system",
"tot": "str"
},
{
"t": "set",
"p": "measurement",
"pt": "msg",
"to": "notification",
"tot": "str"
},
{
"t": "set",
"p": "field",
"pt": "msg",
"to": "photo",
"tot": "str"
},
{
"t": "set",
"p": "repeat",
"pt": "msg",
"to": "true",
"tot": "bool"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1400,
"y": 3420,
"wires": [
[
"1b0cbe0fc795ac63",
"3be19cd8f49a0c90"
]
]
},
{
"id": "0f6fdddafa87cee7",
"type": "base64",
"z": "68ee181e9defa139",
"g": "7ad8c7d614a6550d",
"name": "",
"action": "",
"property": "payload",
"x": 1220,
"y": 3420,
"wires": [
[
"a246dabb539abf36"
]
]
},
{
"id": "ee662244b88ac05c",
"type": "comment",
"z": "68ee181e9defa139",
"g": "7ad8c7d614a6550d",
"name": "base64 encoded buffered image",
"info": "",
"x": 1290,
"y": 3360,
"wires": []
},
{
"id": "c47576e23f709bb0",
"type": "switch",
"z": "68ee181e9defa139",
"g": "7ad8c7d614a6550d",
"name": "has url",
"property": "metrics[msg.scene.bucket][msg.scene.measurement]",
"propertyType": "global",
"rules": [
{
"t": "hask",
"v": "url",
"vt": "str"
}
],
"checkall": "false",
"repair": false,
"outputs": 1,
"x": 270,
"y": 3420,
"wires": [
[
"07a2f1dafbf1361b"
]
]
},
{
"id": "1b0cbe0fc795ac63",
"type": "link out",
"z": "68ee181e9defa139",
"g": "7ad8c7d614a6550d",
"name": "scene - snaphsot",
"mode": "link",
"links": [
"206c1fb4a48067df"
],
"x": 1535,
"y": 3420,
"wires": []
},
{
"id": "3be19cd8f49a0c90",
"type": "debug",
"z": "68ee181e9defa139",
"g": "7ad8c7d614a6550d",
"name": "scene - snapshot",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 1610,
"y": 3360,
"wires": []
},
{
"id": "7e60e1c2ce2b33b5",
"type": "link out",
"z": "68ee181e9defa139",
"g": "cec3ab5a35c60f2d",
"name": "scene - trigger - custom volume",
"mode": "link",
"links": [
"779a7ca67f93706e"
],
"x": 2245,
"y": 4320,
"wires": []
},
{
"id": "588b2a84691acfcc",
"type": "change",
"z": "68ee181e9defa139",
"g": "4f3050e222b9d901",
"name": "set metric",
"rules": [
{
"t": "set",
"p": "bucket",
"pt": "msg",
"to": "scene.bucket",
"tot": "msg"
},
{
"t": "set",
"p": "measurement",
"pt": "msg",
"to": "scene.measurement",
"tot": "msg"
},
{
"t": "set",
"p": "field",
"pt": "msg",
"to": "scene.field",
"tot": "msg"
},
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "msg.payload?msg.scene.on:msg.scene.off",
"tot": "jsonata"
},
{
"t": "set",
"p": "repeat",
"pt": "msg",
"to": "true",
"tot": "bool"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 460,
"y": 3240,
"wires": [
[
"75552a6e9aeabca1",
"30505f159e3df7fb"
]
]
},
{
"id": "779a7ca67f93706e",
"type": "link in",
"z": "68ee181e9defa139",
"g": "4f3050e222b9d901",
"name": "scene - custom volume",
"links": [
"7e60e1c2ce2b33b5"
],
"x": 135,
"y": 3240,
"wires": [
[
"086c6a1d782a1f2b"
]
]
},
{
"id": "75552a6e9aeabca1",
"type": "debug",
"z": "68ee181e9defa139",
"g": "4f3050e222b9d901",
"name": "scene - custom volume",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 690,
"y": 3180,
"wires": []
},
{
"id": "30505f159e3df7fb",
"type": "link out",
"z": "68ee181e9defa139",
"g": "4f3050e222b9d901",
"name": "scene - custom volume",
"mode": "link",
"links": [
"206c1fb4a48067df"
],
"x": 595,
"y": 3240,
"wires": []
},
{
"id": "057d3226a76029a3",
"type": "comment",
"z": "68ee181e9defa139",
"g": "4f3050e222b9d901",
"name": "this does not use \"scene write\" and goes to kernel metric",
"info": "",
"x": 950,
"y": 3240,
"wires": []
},
{
"id": "086c6a1d782a1f2b",
"type": "rbe",
"z": "68ee181e9defa139",
"g": "4f3050e222b9d901",
"name": "no repeat",
"func": "rbe",
"gap": "",
"start": "",
"inout": "out",
"septopics": true,
"property": "payload",
"topi": "scene.path",
"x": 280,
"y": 3240,
"wires": [
[
"588b2a84691acfcc"
]
]
},
{
"id": "0bba3390b421b942",
"type": "link out",
"z": "68ee181e9defa139",
"g": "cec3ab5a35c60f2d",
"name": "scene - trigger - overload",
"mode": "link",
"links": [
"077d26e64b31245a"
],
"x": 2245,
"y": 4140,
"wires": []
},
{
"id": "cb1e39e2071036cb",
"type": "switch",
"z": "68ee181e9defa139",
"g": "b211976dfc18123b",
"name": "mode != off",
"property": "metrics.system.mode[msg.scene.type]",
"propertyType": "global",
"rules": [
{
"t": "neq",
"v": "off",
"vt": "str"
}
],
"checkall": "false",
"repair": false,
"outputs": 1,
"x": 510,
"y": 3600,
"wires": [
[
"979e5dadb00816e2",
"b784f74024662869"
]
]
},
{
"id": "c7cc959fe94dc6ec",
"type": "switch",
"z": "68ee181e9defa139",
"g": "b211976dfc18123b",
"name": "measurement",
"property": "measurement",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "mode",
"vt": "str"
},
{
"t": "else"
}
],
"checkall": "false",
"repair": false,
"outputs": 2,
"x": 300,
"y": 3600,
"wires": [
[
"f1253a4898076087"
],
[
"cb1e39e2071036cb"
]
]
},
{
"id": "4bb9a5575ff72468",
"type": "change",
"z": "68ee181e9defa139",
"g": "b211976dfc18123b",
"name": "set metric",
"rules": [
{
"t": "set",
"p": "bucket",
"pt": "msg",
"to": "scene.bucket",
"tot": "msg"
},
{
"t": "set",
"p": "measurement",
"pt": "msg",
"to": "scene.measurement",
"tot": "msg"
},
{
"t": "set",
"p": "field",
"pt": "msg",
"to": "scene.field",
"tot": "msg"
},
{
"t": "set",
"p": "repeat",
"pt": "msg",
"to": "true",
"tot": "bool"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1420,
"y": 3600,
"wires": [
[
"ac34f353008f720b",
"a2ca81a4a0f17f2b"
]
]
},
{
"id": "a2ca81a4a0f17f2b",
"type": "link out",
"z": "68ee181e9defa139",
"g": "b211976dfc18123b",
"name": "scene - overload",
"mode": "link",
"links": [
"206c1fb4a48067df"
],
"x": 1555,
"y": 3600,
"wires": []
},
{
"id": "ac34f353008f720b",
"type": "debug",
"z": "68ee181e9defa139",
"g": "b211976dfc18123b",
"name": "scene - overload",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 1630,
"y": 3540,
"wires": []
},
{
"id": "cc0c27e2ec0f27c3",
"type": "comment",
"z": "68ee181e9defa139",
"g": "b211976dfc18123b",
"name": "this does not use \"scene write\" and must be plug to whatever used it",
"info": "",
"x": 1940,
"y": 3600,
"wires": []
},
{
"id": "077d26e64b31245a",
"type": "link in",
"z": "68ee181e9defa139",
"g": "b211976dfc18123b",
"name": "scene - overload",
"links": [
"0bba3390b421b942"
],
"x": 135,
"y": 3600,
"wires": [
[
"c7cc959fe94dc6ec"
]
]
},
{
"id": "f1253a4898076087",
"type": "switch",
"z": "68ee181e9defa139",
"g": "b211976dfc18123b",
"name": "mode = auto",
"property": "field",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "scene.type",
"vt": "msg"
}
],
"checkall": "false",
"repair": false,
"outputs": 1,
"x": 510,
"y": 3540,
"wires": [
[
"979e5dadb00816e2",
"b784f74024662869"
]
]
},
{
"id": "979e5dadb00816e2",
"type": "link call",
"z": "68ee181e9defa139",
"g": "b211976dfc18123b",
"name": "",
"links": [
"834ce9850cdb0a72"
],
"linkType": "static",
"timeout": "30",
"x": 710,
"y": 3540,
"wires": [
[
"345bfad057c2239b"
]
]
},
{
"id": "345bfad057c2239b",
"type": "switch",
"z": "68ee181e9defa139",
"g": "b211976dfc18123b",
"name": "rsp",
"property": "routine.response",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "1",
"vt": "num"
}
],
"checkall": "false",
"repair": false,
"outputs": 1,
"x": 890,
"y": 3540,
"wires": [
[
"4bb9a5575ff72468"
]
]
},
{
"id": "5e4211383e41daf1",
"type": "link call",
"z": "68ee181e9defa139",
"g": "b211976dfc18123b",
"name": "",
"links": [
"c1a22098f4c6b607"
],
"linkType": "static",
"timeout": "30",
"x": 1070,
"y": 3540,
"wires": [
[
"46f096fb26163aaf"
]
]
},
{
"id": "46f096fb26163aaf",
"type": "switch",
"z": "68ee181e9defa139",
"g": "b211976dfc18123b",
"name": "rsp",
"property": "routine.response",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "1",
"vt": "num"
}
],
"checkall": "false",
"repair": false,
"outputs": 1,
"x": 1250,
"y": 3540,
"wires": [
[]
]
},
{
"id": "dbf634344f4eb19d",
"type": "switch",
"z": "68ee181e9defa139",
"g": "b211976dfc18123b",
"name": "rsp",
"property": "routine.response",
"propertyType": "msg",
"rules": [
{
"t": "neq",
"v": "0",
"vt": "num"
}
],
"checkall": "false",
"repair": false,
"outputs": 1,
"x": 890,
"y": 3600,
"wires": [
[
"4bb9a5575ff72468"
]
]
},
{
"id": "b784f74024662869",
"type": "link call",
"z": "68ee181e9defa139",
"g": "b211976dfc18123b",
"name": "",
"links": [
"587236e6160da46c"
],
"linkType": "static",
"timeout": "30",
"x": 710,
"y": 3600,
"wires": [
[
"dbf634344f4eb19d"
]
]
},
{
"id": "3b1fb9312071cef4",
"type": "comment",
"z": "68ee181e9defa139",
"g": "7ad8c7d614a6550d",
"name": "this does not use \"scene write\" and goes to kernel metric",
"info": "",
"x": 1890,
"y": 3420,
"wires": []
},
{
"id": "dc2fab4bf098df8c",
"type": "comment",
"z": "68ee181e9defa139",
"g": "7ad8c7d614a6550d",
"name": "scene snapshot goes to system / notification / photo",
"info": "",
"x": 310,
"y": 3360,
"wires": []
},
{
"id": "4ba20a57285906e1",
"type": "trigger",
"z": "68ee181e9defa139",
"g": "152a1afefb8c6055",
"name": "delay",
"op1": "",
"op2": "",
"op1type": "nul",
"op2type": "payl",
"duration": "250",
"extend": false,
"overrideDelay": true,
"units": "ms",
"reset": "",
"bytopic": "topic",
"topic": "scene.bucket",
"outputs": 1,
"x": 830,
"y": 1140,
"wires": [
[
"36fedc6b0be804e7"
]
]
},
{
"id": "437450dbe9e8f9d5",
"type": "gate",
"z": "68ee181e9defa139",
"g": "cec3ab5a35c60f2d",
"name": "gate scene",
"controlTopic": "gate scene",
"defaultState": "closed",
"openCmd": "open",
"closeCmd": "close",
"toggleCmd": "toggle",
"defaultCmd": "default",
"statusCmd": "status",
"persist": false,
"storeName": "onFile",
"x": 290,
"y": 3780,
"wires": [
[
"2ea571ad93364449"
]
]
}
]