iotredloop/flows/A.Telegram.json

4146 lines
77 KiB
JSON
Raw Normal View History

2024-04-28 12:55:01 +00:00
[
{
"id": "52347795767acd3f",
"type": "tab",
"label": "A.Telegram",
"disabled": false,
"info": "",
"env": []
},
{
"id": "ab32af53a59cbfa9",
"type": "group",
"z": "52347795767acd3f",
"name": "catch error",
"style": {
"fill": "#ff0000",
"fill-opacity": "0.05",
"label": true,
"stroke": "#ff0000"
},
"nodes": [
"cb4b8e74cf76ad20",
"1493b3ec590211ef",
"56268dd3950d582f"
],
"x": 534,
"y": 19,
"w": 422,
"h": 82
},
2024-04-28 13:16:13 +00:00
{
"id": "6c5d9361dd313b9f",
2024-04-28 12:55:01 +00:00
"type": "group",
"z": "52347795767acd3f",
"name": "",
2024-04-28 12:55:01 +00:00
"style": {
"fill": "#777777",
2024-04-28 12:55:01 +00:00
"fill-opacity": "0.05",
"label": true
},
"nodes": [
"5b419a28f8338f2f",
"d2959fd404d63e14",
"a159d489843f4d84",
"bdd2440c99f0d065",
2024-07-27 07:51:17 +00:00
"93b32becb3f1dc05",
"35fa81df547b4491"
2024-04-28 12:55:01 +00:00
],
"x": 68,
"y": 233,
2024-08-10 14:54:49 +00:00
"w": 6094,
2024-07-27 07:51:17 +00:00
"h": 494
2024-04-28 12:55:01 +00:00
},
{
"id": "6a1e1fb203c6236a",
"type": "group",
"z": "52347795767acd3f",
"name": "telegram - conversation",
"style": {
"fill": "#ff0000",
"fill-opacity": "0.05",
"label": true
},
"nodes": [
"35ddaf63494d655b",
"e5af41b779d62608",
"94517b52fbc7c222",
"90e4840756b8a410",
"8c27c7e68eca1a64",
"6697649d1c9b6c0e",
"5ec32bd48911e852",
"7dc93121ae6674e5",
"534311e383278b30",
"d69deeaa7e9d8299",
"cf9ce352e1e22189",
"51ac68fb3896f3c5",
"03eee1773e4b2310",
"e8ce95675101e8af",
"c991e97927420e81",
"d59ba3289c9140f5",
"294f1ce97f6089bd",
"01e78849a643e8a5",
"2f22451fdc194049",
"b03d810847d86c13",
"930ec55bdd15ae80",
"c98c8e1dd186a9e6",
"a6c40e0c7109ccfc",
"9ac1e60d77200847",
"72129b12981918d3",
"d14d8323f4b64b21",
"bd19832c18d23672",
"9d1cc9c17c4a70de",
"c8bc6bc3f69bd415",
"da845243f83992e3",
"e73144651291e1f3",
"e1cfda2f4b7b203d",
"15ae149127236493",
"7f180cad8bf1f211",
"a99440b2cd2f03bf",
"11628a7a4db100fe",
"30946c7743bfbcc8",
"0e7de263432880b9",
"7d4b7dd3f0f26094",
"5f97554e959fb27f",
"91714762765d1df4",
"f7c53c245cb82dbb",
"2b9f5994b30122d2",
"882c784fa50c695e",
"cccf7ae8e3728235",
"dc85e9205b9bc40a",
"558e2007055f9c38",
"3be41a89fb1c71f4",
"cdf962c271de3805",
"87eb4084ab2b6c4f",
"4e3c3057b42e2a2a",
"ce4d1a4c8f39d6ad",
"55aa1e8e4e61d51f",
"d9a8d6a331678098",
"56a01bb3a1823ca6",
"0c7e8c2914e9141c",
"7c990a9e25fd7abf",
"2eab37ce4e1d38c7",
"5c38dd887299ff9c",
"d0658792bccca939",
"a4572ddd98280be9",
"de28e8e397badc0d",
"05436cd3824bb9cc",
"c7adcee301e53907",
"ecba03e31652a0a8",
"0deb3214b824aa2f",
"b1720ba6a2ac3c26",
"c218bc6590a159a3",
"ccba35f51ea02cde",
"8c325fb9f9eedcc8"
2024-04-28 12:55:01 +00:00
],
"x": 94,
2024-07-27 07:51:17 +00:00
"y": 819,
"w": 3822,
2024-04-28 12:55:01 +00:00
"h": 922
},
2024-05-13 18:54:03 +00:00
{
"id": "ca924b100cc8cff2",
"type": "group",
"z": "52347795767acd3f",
"name": "telegram - sender",
"style": {
"label": true,
"fill": "#ff0000",
"fill-opacity": "0.05"
},
"nodes": [
"758726f2b1f2072d",
"0c86ad51105737f4",
"3433733d6b9a8736"
],
"x": 1334,
"y": 19,
"w": 652,
"h": 82
},
{
"id": "d2959fd404d63e14",
"type": "group",
"z": "52347795767acd3f",
"g": "6c5d9361dd313b9f",
"name": "telegram - chatbot - device",
"style": {
"fill": "#ffC000",
"fill-opacity": "0.05",
"label": true
},
"nodes": [
"9af7b9c56907a138",
"592fa749c393ef14",
"f3cdc22dc1a6145b",
"5c4f2123036c754e",
"19134c8dcb4e84fd",
"e34fb98383954858",
"d0e2d7ea7c84203e",
"68df08774aae3089"
],
"x": 534,
"y": 259,
"w": 882,
"h": 262
},
{
"id": "a159d489843f4d84",
"type": "group",
"z": "52347795767acd3f",
"g": "6c5d9361dd313b9f",
"name": "telegram - chatbot - model",
"style": {
"fill": "#001f60",
"fill-opacity": "0.05",
"label": true
},
"nodes": [
"addd40dc7fbf27c9",
"5bea21ea2f447a5b",
"ac45d4c7f6f1a547"
],
"x": 94,
"y": 259,
"w": 342,
"h": 82
},
{
"id": "bdd2440c99f0d065",
"type": "group",
"z": "52347795767acd3f",
"g": "6c5d9361dd313b9f",
"name": "telegram - chatbot - metric",
"style": {
"fill": "#92d04f",
"fill-opacity": "0.05",
"label": true
},
"nodes": [
"3a5d788b6c9b1490",
"b203a4b79c347218",
"af344ccaf295edf7",
"2e3fc4b6e967c768",
"db0cf67f4aecddf5",
"e485f554c91b63f6",
"647f561f3855b795",
"5bec85a040561e90",
"8d4968b4487ece04",
"887cdd3998bb0a7b",
"5cce3ddc85ae4b7f",
"52e58ab14c13701d",
"ba7a5c79cd8542ce",
2024-05-13 18:54:03 +00:00
"cf344cfc63c703eb",
2024-08-10 14:54:49 +00:00
"7102b05e3a7f621d",
"8f85e38762803340"
],
"x": 1514,
"y": 259,
2024-08-10 14:54:49 +00:00
"w": 2692,
2024-05-13 18:54:03 +00:00
"h": 149.5
},
{
"id": "93b32becb3f1dc05",
"type": "group",
"z": "52347795767acd3f",
"g": "6c5d9361dd313b9f",
"name": "telegram - chatbot - source - action system report",
"style": {
"fill": "#0070c0",
"fill-opacity": "0.05",
"label": true
},
"nodes": [
"316ed209c87c228e",
"6917e9365bf15cf3"
],
"x": 1514,
"y": 439,
"w": 314,
"h": 82
},
2024-07-27 07:51:17 +00:00
{
"id": "35fa81df547b4491",
"type": "group",
"z": "52347795767acd3f",
"g": "6c5d9361dd313b9f",
"name": "room - ui - telegram",
"style": {
"fill": "#6f2fa0",
"fill-opacity": "0.05",
"label": true
},
"nodes": [
"0691d9a37686f464",
"3c6ee783748b235e",
"761cb37547fe4dc2",
"a033c6dbdefb80f9",
"1d6b2ca73ae11560",
"befe8bfd3d3446cc",
"2936573edcac41e4",
"6495af71a7195bb4",
"bf793e9865c9e834",
"5f4fe9067e1fd9a0",
"05b5a24c1547eb9a",
"b4a9884f6b553123",
"5ab53f45b766d97b",
"86f604b24a73308c",
"25609df681da5c1b",
"d2194c4dad790ec4",
"12697008ac3ea99d",
"97087ce25aae4515",
"4edb12baad4c5bd0",
2024-08-28 16:04:14 +00:00
"58e1c9e33b0a90f3",
"1dec76a256793b0b",
"30c0ca5c8f8631ea",
"024254ee38afd638"
2024-07-27 07:51:17 +00:00
],
2024-08-10 14:54:49 +00:00
"x": 4454,
2024-07-27 07:51:17 +00:00
"y": 259,
"w": 1682,
"h": 442
},
2024-04-28 12:55:01 +00:00
{
"id": "c28cd86afb368a68",
"type": "comment",
"z": "52347795767acd3f",
"name": "Nestor - Telegram",
"info": "chatid = 777414971",
2024-04-29 22:28:34 +00:00
"x": 1150,
2024-04-28 12:55:01 +00:00
"y": 60,
"wires": []
},
{
"id": "316ed209c87c228e",
"type": "telegram command",
2024-04-28 12:55:01 +00:00
"z": "52347795767acd3f",
"g": "93b32becb3f1dc05",
2024-04-28 12:55:01 +00:00
"name": "",
"command": "Rapport",
"description": "",
"registercommand": false,
"language": "",
"scope": "default",
2024-04-28 12:55:01 +00:00
"bot": "8c93df4a796cf540",
"strict": false,
"hasresponse": false,
"useregex": false,
"removeregexcommand": false,
2024-04-28 12:55:01 +00:00
"outputs": 1,
"x": 1590,
"y": 480,
2024-04-28 12:55:01 +00:00
"wires": [
[
"6917e9365bf15cf3"
2024-04-28 12:55:01 +00:00
]
]
},
{
"id": "35ddaf63494d655b",
"type": "telegram command",
2024-04-28 12:55:01 +00:00
"z": "52347795767acd3f",
"g": "6a1e1fb203c6236a",
"name": "",
"command": "Nestor",
"description": "",
"registercommand": false,
"language": "",
"scope": "default",
"bot": "8c93df4a796cf540",
"strict": false,
"hasresponse": true,
"useregex": false,
"removeregexcommand": false,
"outputs": 2,
"x": 170,
2024-07-27 07:51:17 +00:00
"y": 860,
2024-04-28 12:55:01 +00:00
"wires": [
[
"c8bc6bc3f69bd415"
],
[
"6697649d1c9b6c0e"
2024-04-28 12:55:01 +00:00
]
]
},
{
"id": "e5af41b779d62608",
"type": "change",
2024-04-28 12:55:01 +00:00
"z": "52347795767acd3f",
"g": "6a1e1fb203c6236a",
"name": "start conversation",
2024-04-28 12:55:01 +00:00
"rules": [
{
"t": "set",
"p": "payload.type",
"pt": "msg",
"to": "message",
"tot": "str"
},
{
"t": "set",
"p": "payload.content",
"pt": "msg",
"to": "Monsieur.",
"tot": "str"
},
{
"t": "delete",
2024-08-24 17:58:44 +00:00
"p": "#:(onMemory)::query",
"pt": "flow"
2024-04-28 12:55:01 +00:00
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 590,
2024-07-27 07:51:17 +00:00
"y": 860,
2024-04-28 12:55:01 +00:00
"wires": [
[
"05436cd3824bb9cc"
2024-04-28 12:55:01 +00:00
]
]
},
{
"id": "94517b52fbc7c222",
"type": "link out",
2024-04-28 12:55:01 +00:00
"z": "52347795767acd3f",
"g": "6a1e1fb203c6236a",
"name": "telegram - conversation",
"mode": "link",
"links": [
"ba0f26a893bbaac2",
"3433733d6b9a8736"
2024-04-28 12:55:01 +00:00
],
"x": 3875,
2024-07-27 07:51:17 +00:00
"y": 920,
"wires": []
2024-04-28 12:55:01 +00:00
},
{
"id": "90e4840756b8a410",
"type": "trigger",
2024-04-28 12:55:01 +00:00
"z": "52347795767acd3f",
"g": "6a1e1fb203c6236a",
"name": "wait 10 s",
"op1": "",
"op2": "false",
"op1type": "nul",
"op2type": "bool",
"duration": "10",
"extend": false,
"overrideDelay": false,
"units": "s",
"reset": "",
"bytopic": "all",
"topic": "topic",
2024-04-28 12:55:01 +00:00
"outputs": 1,
"x": 2400,
2024-07-27 07:51:17 +00:00
"y": 980,
2024-04-28 12:55:01 +00:00
"wires": [
[
"8c27c7e68eca1a64"
2024-04-28 12:55:01 +00:00
]
]
},
{
"id": "8c27c7e68eca1a64",
2024-04-28 12:55:01 +00:00
"type": "change",
"z": "52347795767acd3f",
"g": "6a1e1fb203c6236a",
"name": "not ok",
2024-04-28 12:55:01 +00:00
"rules": [
{
"t": "set",
"p": "payload",
2024-04-28 12:55:01 +00:00
"pt": "msg",
"to": "{}",
"tot": "json"
},
{
"t": "set",
"p": "payload.type",
"pt": "msg",
"to": "message",
"tot": "str"
},
{
"t": "set",
"p": "payload.content",
"pt": "msg",
"to": "Je n'ai pas réussi.",
"tot": "str"
},
{
"t": "delete",
2024-08-24 17:58:44 +00:00
"p": "#:(onMemory)::query",
"pt": "flow"
},
{
"t": "delete",
"p": "bot",
"pt": "msg"
},
{
"t": "set",
"p": "reset",
"pt": "msg",
"to": "true",
"tot": "bool"
2024-04-28 12:55:01 +00:00
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 2570,
2024-07-27 07:51:17 +00:00
"y": 980,
2024-04-28 12:55:01 +00:00
"wires": [
[
"90e4840756b8a410",
"05436cd3824bb9cc"
2024-04-28 12:55:01 +00:00
]
]
},
{
"id": "6697649d1c9b6c0e",
2024-04-28 12:55:01 +00:00
"type": "switch",
"z": "52347795767acd3f",
"g": "6a1e1fb203c6236a",
"name": "bucket",
"property": "metrics",
"propertyType": "global",
2024-04-28 12:55:01 +00:00
"rules": [
{
"t": "hask",
"v": "$lowercase(msg.payload.content)",
"vt": "jsonata"
},
{
"t": "else"
2024-04-28 12:55:01 +00:00
}
],
"checkall": "false",
"repair": false,
"outputs": 2,
"x": 330,
2024-07-27 07:51:17 +00:00
"y": 980,
2024-04-28 12:55:01 +00:00
"wires": [
[
"cf9ce352e1e22189"
],
2024-04-28 12:55:01 +00:00
[
"5ec32bd48911e852"
2024-04-28 12:55:01 +00:00
]
]
},
{
"id": "5ec32bd48911e852",
2024-04-28 12:55:01 +00:00
"type": "change",
"z": "52347795767acd3f",
"g": "6a1e1fb203c6236a",
"name": "inconnu",
2024-04-28 12:55:01 +00:00
"rules": [
{
"t": "set",
"p": "payload",
2024-04-28 12:55:01 +00:00
"pt": "msg",
"to": "{}",
"tot": "json"
},
{
"t": "set",
"p": "payload.type",
"pt": "msg",
"to": "message",
2024-04-28 12:55:01 +00:00
"tot": "str"
},
{
"t": "set",
"p": "payload.content",
"pt": "msg",
"to": "Je ne connais pas cette pièce.",
"tot": "str"
},
{
"t": "delete",
2024-08-24 17:58:44 +00:00
"p": "#:(onMemory)::query",
"pt": "flow"
},
{
"t": "delete",
"p": "bot",
"pt": "msg"
},
{
"t": "set",
"p": "reset",
"pt": "msg",
"to": "true",
"tot": "bool"
2024-04-28 12:55:01 +00:00
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 500,
2024-07-27 07:51:17 +00:00
"y": 980,
2024-04-28 12:55:01 +00:00
"wires": [
[
"90e4840756b8a410",
"05436cd3824bb9cc"
2024-04-28 12:55:01 +00:00
]
]
},
{
"id": "7dc93121ae6674e5",
"type": "function",
2024-04-28 12:55:01 +00:00
"z": "52347795767acd3f",
"g": "6a1e1fb203c6236a",
"name": "intention",
"func": "var opts = [[]];\nvar i = 0;\nif (msg.payload.light==true) {\n opts[0][i++] = {\n \"text\": \"lumière\",\n \"callback_data\": \"light\" \n }\n}\nif (msg.payload.shutter==true) {\n opts[0][i++] = {\n \"text\": \"volet\",\n \"callback_data\": \"shutter\" \n }\n}\nif (msg.payload.temperature==true) {\n opts[0][i++] = {\n \"text\": \"temperature\",\n \"callback_data\": \"temperature\" \n }\n}\nif (msg.payload.camera==true) {\n opts[0][i++] = {\n \"text\": \"photo\",\n \"callback_data\": \"camera\" \n }\n}\n\nmsg.payload.content = \"Que dois-je gérer ?\";\nmsg.payload.options = {reply_markup: JSON.stringify({\"inline_keyboard\":opts})};\nmsg.payload.messageId = 99;\nmsg.payload.sentMessageId = 99;\nmsg.payload.type = \"message\";\n\nreturn msg;",
"outputs": 1,
"timeout": "",
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 2220,
2024-07-27 07:51:17 +00:00
"y": 1100,
2024-04-28 12:55:01 +00:00
"wires": [
[
"90e4840756b8a410",
"05436cd3824bb9cc"
2024-04-28 12:55:01 +00:00
]
]
},
{
"id": "534311e383278b30",
"type": "telegram event",
2024-04-28 12:55:01 +00:00
"z": "52347795767acd3f",
"g": "6a1e1fb203c6236a",
"name": "",
"bot": "8c93df4a796cf540",
"event": "callback_query",
"autoanswer": false,
"x": 200,
2024-07-27 07:51:17 +00:00
"y": 1280,
2024-04-28 12:55:01 +00:00
"wires": [
[
"03eee1773e4b2310"
2024-04-28 12:55:01 +00:00
]
]
},
{
"id": "d69deeaa7e9d8299",
2024-04-28 12:55:01 +00:00
"type": "switch",
"z": "52347795767acd3f",
"g": "6a1e1fb203c6236a",
"name": "has light",
"property": "stack_bucket",
2024-04-28 12:55:01 +00:00
"propertyType": "msg",
"rules": [
{
"t": "hask",
"v": "light",
2024-04-28 12:55:01 +00:00
"vt": "str"
},
{
"t": "else"
2024-04-28 12:55:01 +00:00
}
],
"checkall": "false",
"repair": false,
"outputs": 2,
"x": 700,
2024-07-27 07:51:17 +00:00
"y": 1100,
2024-04-28 12:55:01 +00:00
"wires": [
[
"51ac68fb3896f3c5"
],
[
"c991e97927420e81"
2024-04-28 12:55:01 +00:00
]
]
},
{
"id": "cf9ce352e1e22189",
2024-04-28 12:55:01 +00:00
"type": "change",
"z": "52347795767acd3f",
"g": "6a1e1fb203c6236a",
"name": "reset payload",
2024-04-28 12:55:01 +00:00
"rules": [
{
"t": "set",
"p": "bucket",
"pt": "msg",
"to": "$lowercase(msg.payload.content)",
"tot": "jsonata"
},
{
"t": "set",
2024-08-24 17:58:44 +00:00
"p": "#:(onMemory)::query.bucket",
"pt": "flow",
2024-04-28 12:55:01 +00:00
"to": "bucket",
"tot": "msg"
2024-04-28 12:55:01 +00:00
},
{
"t": "set",
"p": "payload",
2024-04-28 12:55:01 +00:00
"pt": "msg",
"to": "{}",
"tot": "jsonata"
2024-04-28 12:55:01 +00:00
},
{
"t": "set",
"p": "stack_bucket",
2024-04-28 12:55:01 +00:00
"pt": "msg",
"to": "metrics[msg.bucket]",
"tot": "global"
2024-04-28 12:55:01 +00:00
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 520,
2024-07-27 07:51:17 +00:00
"y": 1100,
2024-04-28 12:55:01 +00:00
"wires": [
[
"d69deeaa7e9d8299"
2024-04-28 12:55:01 +00:00
]
]
},
{
"id": "51ac68fb3896f3c5",
2024-04-28 12:55:01 +00:00
"type": "change",
"z": "52347795767acd3f",
"g": "6a1e1fb203c6236a",
"name": "light",
2024-04-28 12:55:01 +00:00
"rules": [
{
"t": "set",
"p": "payload.light",
2024-04-28 12:55:01 +00:00
"pt": "msg",
"to": "true",
"tot": "bool"
2024-04-28 12:55:01 +00:00
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 890,
2024-07-27 07:51:17 +00:00
"y": 1040,
2024-04-28 12:55:01 +00:00
"wires": [
[
"c991e97927420e81"
2024-04-28 12:55:01 +00:00
]
]
},
{
"id": "03eee1773e4b2310",
2024-04-28 12:55:01 +00:00
"type": "switch",
"z": "52347795767acd3f",
"g": "6a1e1fb203c6236a",
"name": "select action",
"property": "payload.content",
2024-04-28 12:55:01 +00:00
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "light",
"vt": "str"
},
{
"t": "eq",
"v": "temperature",
"vt": "str"
},
{
"t": "eq",
"v": "shutter",
"vt": "str"
},
{
"t": "eq",
"v": "camera",
"vt": "str"
},
{
"t": "eq",
"v": "switch on",
"vt": "str"
},
{
"t": "eq",
"v": "switch off",
"vt": "str"
},
{
"t": "eq",
"v": "open",
"vt": "str"
},
{
"t": "eq",
"v": "openwork",
"vt": "str"
},
{
"t": "eq",
"v": "close",
"vt": "str"
2024-04-28 12:55:01 +00:00
},
{
"t": "else"
}
],
"checkall": "false",
"repair": false,
"outputs": 10,
"x": 410,
2024-07-27 07:51:17 +00:00
"y": 1280,
2024-04-28 12:55:01 +00:00
"wires": [
[
"294f1ce97f6089bd"
2024-04-28 12:55:01 +00:00
],
[
"a4572ddd98280be9"
],
[
"0e7de263432880b9"
],
[
"a99440b2cd2f03bf"
],
2024-04-28 12:55:01 +00:00
[
"2f22451fdc194049"
],
[
"72129b12981918d3"
],
[
"5f97554e959fb27f"
],
[
"91714762765d1df4"
],
[
"f7c53c245cb82dbb"
],
[
"01e78849a643e8a5"
2024-04-28 12:55:01 +00:00
]
]
},
{
"id": "e8ce95675101e8af",
"type": "function",
2024-04-28 12:55:01 +00:00
"z": "52347795767acd3f",
"g": "6a1e1fb203c6236a",
"name": "light",
"func": "var opts = {\n reply_markup: JSON.stringify({\n \"inline_keyboard\": [[\n {\n \"text\": \"éteindre\",\n \"callback_data\": \"switch off\" \n }, \n {\n \"text\": \"allumer\",\n \"callback_data\": \"switch on\" \n }]\n ]\n })\n};\n\nmsg.payload.content = \"Dois-je éteindre ou allumer la lumière ?\";\nmsg.payload.options = opts;\nmsg.payload.messageId = 99;\nmsg.payload.sentMessageId = 99;\nmsg.payload.type = \"message\";\n\nreturn [ msg ];\n",
"outputs": 1,
"timeout": "",
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 2230,
2024-07-27 07:51:17 +00:00
"y": 1160,
2024-04-28 12:55:01 +00:00
"wires": [
[
"90e4840756b8a410",
"05436cd3824bb9cc"
2024-04-28 12:55:01 +00:00
]
]
},
{
"id": "c991e97927420e81",
2024-04-28 12:55:01 +00:00
"type": "switch",
"z": "52347795767acd3f",
"g": "6a1e1fb203c6236a",
"name": "has temperature",
"property": "stack_bucket",
2024-04-28 12:55:01 +00:00
"propertyType": "msg",
"rules": [
{
"t": "hask",
"v": "temperature",
2024-04-28 12:55:01 +00:00
"vt": "str"
},
{
"t": "else"
2024-04-28 12:55:01 +00:00
}
],
"checkall": "false",
"repair": false,
"outputs": 2,
"x": 1100,
2024-07-27 07:51:17 +00:00
"y": 1100,
2024-04-28 12:55:01 +00:00
"wires": [
[
"d59ba3289c9140f5"
2024-04-28 12:55:01 +00:00
],
[
"e1cfda2f4b7b203d"
2024-04-28 12:55:01 +00:00
]
]
},
{
"id": "d59ba3289c9140f5",
2024-04-28 12:55:01 +00:00
"type": "change",
"z": "52347795767acd3f",
"g": "6a1e1fb203c6236a",
"name": "temperature",
2024-04-28 12:55:01 +00:00
"rules": [
{
"t": "set",
"p": "payload.temperature",
2024-04-28 12:55:01 +00:00
"pt": "msg",
"to": "true",
"tot": "bool"
2024-04-28 12:55:01 +00:00
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1310,
2024-07-27 07:51:17 +00:00
"y": 1040,
2024-04-28 12:55:01 +00:00
"wires": [
[
"e1cfda2f4b7b203d"
2024-04-28 12:55:01 +00:00
]
]
},
{
"id": "294f1ce97f6089bd",
"type": "change",
2024-04-28 12:55:01 +00:00
"z": "52347795767acd3f",
"g": "6a1e1fb203c6236a",
"name": "set measurement",
2024-04-28 12:55:01 +00:00
"rules": [
{
"t": "set",
2024-08-24 17:58:44 +00:00
"p": "#:(onMemory)::query.measurement",
"pt": "flow",
"to": "payload.content",
"tot": "msg"
2024-04-28 12:55:01 +00:00
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 630,
2024-07-27 07:51:17 +00:00
"y": 1160,
2024-04-28 12:55:01 +00:00
"wires": [
[
"e8ce95675101e8af"
2024-04-28 12:55:01 +00:00
]
]
},
{
"id": "01e78849a643e8a5",
2024-04-28 12:55:01 +00:00
"type": "change",
"z": "52347795767acd3f",
"g": "6a1e1fb203c6236a",
"name": "unset measurement",
2024-04-28 12:55:01 +00:00
"rules": [
{
"t": "delete",
2024-08-24 17:58:44 +00:00
"p": "#:(onMemory)::query.measurement",
"pt": "flow"
2024-04-28 12:55:01 +00:00
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 640,
2024-07-27 07:51:17 +00:00
"y": 1700,
2024-04-28 12:55:01 +00:00
"wires": [
[
"30946c7743bfbcc8"
2024-04-28 12:55:01 +00:00
]
]
},
{
"id": "2f22451fdc194049",
2024-04-28 12:55:01 +00:00
"type": "switch",
"z": "52347795767acd3f",
"g": "6a1e1fb203c6236a",
"name": "has measurement",
2024-08-24 17:58:44 +00:00
"property": "#:(onMemory)::query.measurement",
"propertyType": "flow",
2024-04-28 12:55:01 +00:00
"rules": [
{
"t": "nempty"
2024-04-28 12:55:01 +00:00
}
],
"checkall": "false",
"repair": false,
"outputs": 1,
"x": 630,
2024-07-27 07:51:17 +00:00
"y": 1400,
2024-04-28 12:55:01 +00:00
"wires": [
[
"a6c40e0c7109ccfc"
2024-04-28 12:55:01 +00:00
]
]
},
{
"id": "b03d810847d86c13",
2024-04-28 12:55:01 +00:00
"type": "change",
"z": "52347795767acd3f",
"g": "6a1e1fb203c6236a",
"name": "topic",
2024-04-28 12:55:01 +00:00
"rules": [
{
"t": "set",
"p": "topic",
"pt": "msg",
"to": "'telegram/' & msg.bucket & '/cible/' & msg.field",
"tot": "jsonata"
},
2024-04-28 12:55:01 +00:00
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "true",
"tot": "bool"
2024-04-28 12:55:01 +00:00
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1690,
2024-07-27 07:51:17 +00:00
"y": 1400,
2024-04-28 12:55:01 +00:00
"wires": [
[
"0c7e8c2914e9141c",
"d0658792bccca939"
2024-04-28 12:55:01 +00:00
]
]
},
{
"id": "930ec55bdd15ae80",
"type": "link out",
2024-04-28 12:55:01 +00:00
"z": "52347795767acd3f",
"g": "6a1e1fb203c6236a",
"name": "telegram - conversation - metric",
"mode": "link",
"links": [
"206c1fb4a48067df"
],
"x": 1975,
2024-07-27 07:51:17 +00:00
"y": 1460,
"wires": []
},
{
"id": "c98c8e1dd186a9e6",
"type": "change",
"z": "52347795767acd3f",
"g": "6a1e1fb203c6236a",
"name": "ok",
2024-04-28 12:55:01 +00:00
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "{}",
"tot": "json"
},
{
"t": "set",
"p": "payload.type",
"pt": "msg",
"to": "message",
"tot": "str"
},
{
"t": "set",
"p": "payload.content",
"pt": "msg",
"to": "Bien monsieur",
"tot": "str"
},
{
"t": "delete",
2024-08-24 17:58:44 +00:00
"p": "#:(onMemory)::query",
"pt": "flow"
},
{
"t": "delete",
"p": "bot",
"pt": "msg"
},
{
"t": "set",
"p": "reset",
"pt": "msg",
"to": "true",
"tot": "bool"
2024-04-28 12:55:01 +00:00
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 2230,
2024-07-27 07:51:17 +00:00
"y": 1400,
2024-04-28 12:55:01 +00:00
"wires": [
[
"90e4840756b8a410",
"05436cd3824bb9cc"
2024-04-28 12:55:01 +00:00
]
]
},
{
"id": "a6c40e0c7109ccfc",
2024-04-28 12:55:01 +00:00
"type": "change",
"z": "52347795767acd3f",
"g": "6a1e1fb203c6236a",
"name": "from global",
2024-04-28 12:55:01 +00:00
"rules": [
{
"t": "set",
"p": "bucket",
"pt": "msg",
2024-08-24 17:58:44 +00:00
"to": "#:(onMemory)::query.bucket",
"tot": "flow"
},
2024-04-28 12:55:01 +00:00
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "metrics[msg.bucket]light",
"tot": "global"
2024-04-28 12:55:01 +00:00
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 850,
2024-07-27 07:51:17 +00:00
"y": 1400,
2024-04-28 12:55:01 +00:00
"wires": [
[
"9ac1e60d77200847"
2024-04-28 12:55:01 +00:00
]
]
},
{
"id": "9ac1e60d77200847",
"type": "split",
2024-04-28 12:55:01 +00:00
"z": "52347795767acd3f",
"g": "6a1e1fb203c6236a",
"name": "",
"splt": "\\n",
"spltType": "str",
"arraySplt": 1,
"arraySpltType": "len",
"stream": false,
"addname": "field",
"x": 1030,
2024-07-27 07:51:17 +00:00
"y": 1400,
2024-04-28 12:55:01 +00:00
"wires": [
[
"b03d810847d86c13"
2024-04-28 12:55:01 +00:00
]
]
},
{
"id": "72129b12981918d3",
"type": "switch",
2024-04-28 12:55:01 +00:00
"z": "52347795767acd3f",
"g": "6a1e1fb203c6236a",
"name": "has measurement",
2024-08-24 17:58:44 +00:00
"property": "#:(onMemory)::query.measurement",
"propertyType": "flow",
"rules": [
{
"t": "nempty"
}
],
"checkall": "false",
"repair": false,
2024-04-28 12:55:01 +00:00
"outputs": 1,
"x": 630,
2024-07-27 07:51:17 +00:00
"y": 1460,
2024-04-28 12:55:01 +00:00
"wires": [
[
"bd19832c18d23672"
2024-04-28 12:55:01 +00:00
]
]
},
{
"id": "d14d8323f4b64b21",
2024-04-28 12:55:01 +00:00
"type": "change",
"z": "52347795767acd3f",
"g": "6a1e1fb203c6236a",
"name": "topic",
2024-04-28 12:55:01 +00:00
"rules": [
{
"t": "set",
"p": "topic",
"pt": "msg",
"to": "'telegram/' & msg.bucket & '/cible/' & msg.field",
"tot": "jsonata"
},
2024-04-28 12:55:01 +00:00
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "false",
"tot": "bool"
2024-04-28 12:55:01 +00:00
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1690,
2024-07-27 07:51:17 +00:00
"y": 1460,
2024-04-28 12:55:01 +00:00
"wires": [
[
"0c7e8c2914e9141c",
"d0658792bccca939"
2024-04-28 12:55:01 +00:00
]
]
},
{
"id": "bd19832c18d23672",
2024-04-28 12:55:01 +00:00
"type": "change",
"z": "52347795767acd3f",
"g": "6a1e1fb203c6236a",
"name": "from global",
2024-04-28 12:55:01 +00:00
"rules": [
{
"t": "set",
"p": "bucket",
2024-04-28 12:55:01 +00:00
"pt": "msg",
2024-08-24 17:58:44 +00:00
"to": "#:(onMemory)::query.bucket",
"tot": "flow"
},
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "metrics[msg.bucket]light",
"tot": "global"
2024-04-28 12:55:01 +00:00
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 850,
2024-07-27 07:51:17 +00:00
"y": 1460,
2024-04-28 12:55:01 +00:00
"wires": [
[
"9d1cc9c17c4a70de"
2024-04-28 12:55:01 +00:00
]
]
},
{
"id": "9d1cc9c17c4a70de",
"type": "split",
2024-04-28 12:55:01 +00:00
"z": "52347795767acd3f",
"g": "6a1e1fb203c6236a",
2024-04-28 12:55:01 +00:00
"name": "",
"splt": "\\n",
"spltType": "str",
"arraySplt": 1,
"arraySpltType": "len",
"stream": false,
"addname": "field",
"x": 1030,
2024-07-27 07:51:17 +00:00
"y": 1460,
2024-04-28 12:55:01 +00:00
"wires": [
[
"d14d8323f4b64b21"
2024-04-28 12:55:01 +00:00
]
]
},
{
"id": "c8bc6bc3f69bd415",
"type": "trigger",
2024-04-28 12:55:01 +00:00
"z": "52347795767acd3f",
"g": "6a1e1fb203c6236a",
"name": "send then 1 s",
"op1": "",
"op2": "",
"op1type": "pay",
"op2type": "pay",
"duration": "1",
"extend": false,
"overrideDelay": false,
"units": "s",
"reset": "",
"bytopic": "all",
"topic": "topic",
2024-04-28 12:55:01 +00:00
"outputs": 2,
"x": 360,
2024-07-27 07:51:17 +00:00
"y": 860,
2024-04-28 12:55:01 +00:00
"wires": [
[
"e5af41b779d62608"
2024-04-28 12:55:01 +00:00
],
[
"da845243f83992e3"
2024-04-28 12:55:01 +00:00
]
]
},
{
"id": "da845243f83992e3",
2024-04-28 12:55:01 +00:00
"type": "change",
"z": "52347795767acd3f",
"g": "6a1e1fb203c6236a",
"name": "start conversation",
"rules": [
{
"t": "set",
"p": "payload.type",
"pt": "msg",
"to": "message",
"tot": "str"
},
{
"t": "set",
"p": "payload.content",
"pt": "msg",
"to": "De quelle pièce dois-je m'occuper ?",
2024-04-28 12:55:01 +00:00
"tot": "str"
},
{
"t": "delete",
2024-08-24 17:58:44 +00:00
"p": "#:(onMemory)::query",
2024-04-28 12:55:01 +00:00
"pt": "flow"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 590,
2024-07-27 07:51:17 +00:00
"y": 920,
2024-04-28 12:55:01 +00:00
"wires": [
[
"05436cd3824bb9cc"
2024-04-28 12:55:01 +00:00
]
]
},
{
"id": "e73144651291e1f3",
2024-04-28 12:55:01 +00:00
"type": "change",
"z": "52347795767acd3f",
"g": "6a1e1fb203c6236a",
"name": "temperature",
2024-04-28 12:55:01 +00:00
"rules": [
{
"t": "set",
"p": "tmp",
"pt": "msg",
2024-08-24 17:58:44 +00:00
"to": "#:(onMemory)::query.bucket",
"tot": "flow"
},
{
"t": "set",
"p": "tmp",
"pt": "msg",
"to": "payload",
"tot": "msg"
},
2024-04-28 12:55:01 +00:00
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "{}",
"tot": "json"
},
{
"t": "set",
"p": "payload.type",
"pt": "msg",
"to": "message",
"tot": "str"
},
{
"t": "set",
"p": "payload.content",
"pt": "msg",
"to": "'Il fait actuellement ' & msg.tmp & '°C monsieur'",
"tot": "jsonata"
2024-04-28 12:55:01 +00:00
},
{
"t": "delete",
2024-08-24 17:58:44 +00:00
"p": "#:(onMemory)::query",
2024-04-28 12:55:01 +00:00
"pt": "flow"
},
{
"t": "delete",
"p": "bot",
"pt": "msg"
},
{
"t": "set",
"p": "reset",
"pt": "msg",
"to": "true",
"tot": "bool"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 2210,
2024-07-27 07:51:17 +00:00
"y": 1220,
2024-04-28 12:55:01 +00:00
"wires": [
[
"90e4840756b8a410",
"05436cd3824bb9cc"
2024-04-28 12:55:01 +00:00
]
]
},
{
"id": "e1cfda2f4b7b203d",
2024-04-28 12:55:01 +00:00
"type": "switch",
"z": "52347795767acd3f",
"g": "6a1e1fb203c6236a",
"name": "has camera",
"property": "stack_bucket",
"propertyType": "msg",
2024-04-28 12:55:01 +00:00
"rules": [
{
"t": "hask",
"v": "camera",
"vt": "str"
2024-04-28 12:55:01 +00:00
},
{
"t": "else"
}
],
"checkall": "false",
"repair": false,
"outputs": 2,
"x": 1510,
2024-07-27 07:51:17 +00:00
"y": 1100,
2024-04-28 12:55:01 +00:00
"wires": [
[
"15ae149127236493"
2024-04-28 12:55:01 +00:00
],
[
"d9a8d6a331678098"
2024-04-28 12:55:01 +00:00
]
]
},
{
"id": "15ae149127236493",
2024-04-28 12:55:01 +00:00
"type": "change",
"z": "52347795767acd3f",
"g": "6a1e1fb203c6236a",
"name": "camera",
2024-04-28 12:55:01 +00:00
"rules": [
{
"t": "set",
"p": "payload.camera",
2024-04-28 12:55:01 +00:00
"pt": "msg",
"to": "true",
"tot": "bool"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1700,
2024-07-27 07:51:17 +00:00
"y": 1040,
2024-04-28 12:55:01 +00:00
"wires": [
[
"d9a8d6a331678098"
2024-04-28 12:55:01 +00:00
]
]
},
{
"id": "7f180cad8bf1f211",
"type": "http request",
2024-04-28 12:55:01 +00:00
"z": "52347795767acd3f",
"g": "6a1e1fb203c6236a",
"name": "get snapshot",
"method": "GET",
"ret": "bin",
"paytoqs": "ignore",
"url": "",
"tls": "",
"persist": false,
"proxy": "",
"insecureHTTPParser": false,
"authType": "",
"senderr": false,
"headers": [],
"x": 810,
2024-07-27 07:51:17 +00:00
"y": 1340,
2024-04-28 12:55:01 +00:00
"wires": [
[
"11628a7a4db100fe"
2024-04-28 12:55:01 +00:00
]
]
},
{
"id": "a99440b2cd2f03bf",
"type": "change",
2024-04-28 12:55:01 +00:00
"z": "52347795767acd3f",
"g": "6a1e1fb203c6236a",
"name": "camera url",
2024-04-28 12:55:01 +00:00
"rules": [
{
"t": "set",
"p": "tmp",
"pt": "msg",
2024-08-24 17:58:44 +00:00
"to": "#:(onMemory)::query.bucket",
"tot": "flow"
2024-04-28 12:55:01 +00:00
},
{
"t": "set",
"p": "url",
"pt": "msg",
"to": "metrics[msg.tmp]camera.url",
"tot": "global"
2024-04-28 12:55:01 +00:00
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 610,
2024-07-27 07:51:17 +00:00
"y": 1340,
2024-04-28 12:55:01 +00:00
"wires": [
[
"7f180cad8bf1f211"
2024-04-28 12:55:01 +00:00
]
]
},
{
"id": "11628a7a4db100fe",
2024-04-28 12:55:01 +00:00
"type": "change",
"z": "52347795767acd3f",
"g": "6a1e1fb203c6236a",
"name": "photo",
2024-04-28 12:55:01 +00:00
"rules": [
{
"t": "set",
"p": "tmp",
2024-04-28 12:55:01 +00:00
"pt": "msg",
"to": "payload",
"tot": "msg"
2024-04-28 12:55:01 +00:00
},
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "{}",
"tot": "json"
},
{
"t": "set",
"p": "payload.content",
"pt": "msg",
"to": "tmp",
2024-04-28 12:55:01 +00:00
"tot": "msg"
},
{
"t": "set",
"p": "payload.type",
2024-04-28 12:55:01 +00:00
"pt": "msg",
"to": "photo",
"tot": "str"
2024-04-28 12:55:01 +00:00
},
{
"t": "set",
"p": "payload.caption",
2024-04-28 12:55:01 +00:00
"pt": "msg",
2024-08-24 17:58:44 +00:00
"to": "#:(onMemory)::query.bucket",
"tot": "flow"
},
{
"t": "set",
"p": "payload.caption",
"pt": "msg",
"to": "\"snapshot \" & msg.payload.caption",
"tot": "jsonata"
},
{
"t": "delete",
"p": "tmp",
"pt": "msg"
},
2024-04-28 12:55:01 +00:00
{
"t": "set",
"p": "reset",
2024-04-28 12:55:01 +00:00
"pt": "msg",
"to": "true",
"tot": "bool"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 2230,
2024-07-27 07:51:17 +00:00
"y": 1340,
2024-04-28 12:55:01 +00:00
"wires": [
[
"90e4840756b8a410",
"05436cd3824bb9cc"
2024-04-28 12:55:01 +00:00
]
]
},
{
"id": "30946c7743bfbcc8",
"type": "change",
2024-04-28 12:55:01 +00:00
"z": "52347795767acd3f",
"g": "6a1e1fb203c6236a",
"name": "message pas ok",
2024-04-28 12:55:01 +00:00
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "{}",
"tot": "json"
2024-04-28 12:55:01 +00:00
},
{
"t": "set",
"p": "payload.type",
"pt": "msg",
"to": "message",
"tot": "str"
2024-04-28 12:55:01 +00:00
},
{
"t": "set",
"p": "payload.content",
"pt": "msg",
"to": "Désole, je n'ai pas compris.",
"tot": "str"
2024-04-28 12:55:01 +00:00
},
{
"t": "delete",
2024-08-24 17:58:44 +00:00
"p": "#:(onMemory)::query",
"pt": "flow"
},
{
"t": "delete",
"p": "bot",
"pt": "msg"
},
2024-04-28 12:55:01 +00:00
{
"t": "set",
"p": "reset",
2024-04-28 12:55:01 +00:00
"pt": "msg",
"to": "true",
"tot": "bool"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 2200,
2024-07-27 07:51:17 +00:00
"y": 1700,
2024-04-28 12:55:01 +00:00
"wires": [
[
"90e4840756b8a410",
"05436cd3824bb9cc"
2024-04-28 12:55:01 +00:00
]
]
},
{
"id": "0e7de263432880b9",
2024-04-28 12:55:01 +00:00
"type": "change",
"z": "52347795767acd3f",
"g": "6a1e1fb203c6236a",
"name": "set measurement",
"rules": [
{
"t": "set",
2024-08-24 17:58:44 +00:00
"p": "#:(onMemory)::query.measurement",
2024-04-28 12:55:01 +00:00
"pt": "flow",
"to": "payload.content",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 630,
2024-07-27 07:51:17 +00:00
"y": 1260,
2024-04-28 12:55:01 +00:00
"wires": [
[
"7d4b7dd3f0f26094"
2024-04-28 12:55:01 +00:00
]
]
},
{
"id": "7d4b7dd3f0f26094",
"type": "function",
2024-04-28 12:55:01 +00:00
"z": "52347795767acd3f",
"g": "6a1e1fb203c6236a",
"name": "shutter",
"func": "var opts = {\n reply_markup: JSON.stringify({\n \"inline_keyboard\": [[\n {\n \"text\": \"ouvrir\",\n \"callback_data\": \"open\" \n }, \n {\n \"text\": \"ajourer\",\n \"callback_data\": \"openwork\" \n }, \n {\n \"text\": \"fermer\",\n \"callback_data\": \"close\" \n }]\n ]\n })\n};\n\nmsg.payload.content = \"Dans quelle position dois-je mettre les volets ?\";\nmsg.payload.options = opts;\nmsg.payload.messageId = 99;\nmsg.payload.sentMessageId = 99;\nmsg.payload.type = \"message\";\n\nreturn [ msg ];\n",
"outputs": 1,
"timeout": "",
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 2230,
2024-07-27 07:51:17 +00:00
"y": 1280,
"wires": [
[
"90e4840756b8a410",
"05436cd3824bb9cc"
]
]
},
{
"id": "5f97554e959fb27f",
"type": "switch",
"z": "52347795767acd3f",
"g": "6a1e1fb203c6236a",
"name": "has measurement",
2024-08-24 17:58:44 +00:00
"property": "#:(onMemory)::query.measurement",
"propertyType": "flow",
2024-04-28 12:55:01 +00:00
"rules": [
{
"t": "nempty"
2024-04-28 12:55:01 +00:00
}
],
"checkall": "false",
"repair": false,
"outputs": 1,
"x": 630,
2024-07-27 07:51:17 +00:00
"y": 1520,
2024-04-28 12:55:01 +00:00
"wires": [
[
"87eb4084ab2b6c4f"
2024-04-28 12:55:01 +00:00
]
]
},
{
"id": "91714762765d1df4",
2024-04-28 12:55:01 +00:00
"type": "switch",
"z": "52347795767acd3f",
"g": "6a1e1fb203c6236a",
"name": "has measurement",
2024-08-24 17:58:44 +00:00
"property": "#:(onMemory)::query.measurement",
2024-04-28 12:55:01 +00:00
"propertyType": "flow",
"rules": [
{
"t": "nempty"
}
],
"checkall": "false",
"repair": false,
"outputs": 1,
"x": 630,
2024-07-27 07:51:17 +00:00
"y": 1580,
2024-04-28 12:55:01 +00:00
"wires": [
[
"3be41a89fb1c71f4"
2024-04-28 12:55:01 +00:00
]
]
},
{
"id": "f7c53c245cb82dbb",
"type": "switch",
"z": "52347795767acd3f",
"g": "6a1e1fb203c6236a",
"name": "has measurement",
2024-08-24 17:58:44 +00:00
"property": "#:(onMemory)::query.measurement",
"propertyType": "flow",
"rules": [
{
"t": "nempty"
}
],
"checkall": "false",
"repair": false,
"outputs": 1,
"x": 630,
2024-07-27 07:51:17 +00:00
"y": 1640,
"wires": [
[
"5c38dd887299ff9c"
]
]
},
{
"id": "2b9f5994b30122d2",
2024-04-28 12:55:01 +00:00
"type": "change",
"z": "52347795767acd3f",
"g": "6a1e1fb203c6236a",
"name": "topic",
"rules": [
{
"t": "set",
"p": "topic",
"pt": "msg",
"to": "'telegram/' & msg.bucket & '/cible/' & msg.field",
"tot": "jsonata"
},
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "openwork",
"tot": "msg"
2024-04-28 12:55:01 +00:00
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1690,
2024-07-27 07:51:17 +00:00
"y": 1580,
2024-04-28 12:55:01 +00:00
"wires": [
[
"0c7e8c2914e9141c",
"d0658792bccca939"
]
]
},
{
"id": "882c784fa50c695e",
"type": "switch",
2024-04-28 12:55:01 +00:00
"z": "52347795767acd3f",
"g": "6a1e1fb203c6236a",
"name": "shutter",
"property": "field",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "shutter",
"vt": "str"
}
2024-04-28 12:55:01 +00:00
],
"checkall": "false",
"repair": false,
"outputs": 1,
"x": 1190,
2024-07-27 07:51:17 +00:00
"y": 1580,
"wires": [
[
"cccf7ae8e3728235"
]
]
2024-04-28 12:55:01 +00:00
},
{
"id": "cccf7ae8e3728235",
2024-04-28 12:55:01 +00:00
"type": "change",
"z": "52347795767acd3f",
"g": "6a1e1fb203c6236a",
"name": "openwork",
2024-04-28 12:55:01 +00:00
"rules": [
{
"t": "set",
"p": "openwork",
2024-04-28 12:55:01 +00:00
"pt": "msg",
"to": "metrics[msg.bucket]shading.openwork",
"tot": "global"
2024-04-28 12:55:01 +00:00
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1360,
2024-07-27 07:51:17 +00:00
"y": 1580,
2024-04-28 12:55:01 +00:00
"wires": [
[
"dc85e9205b9bc40a"
2024-04-28 12:55:01 +00:00
]
]
},
{
"id": "dc85e9205b9bc40a",
"type": "switch",
2024-04-28 12:55:01 +00:00
"z": "52347795767acd3f",
"g": "6a1e1fb203c6236a",
"name": "exists",
"property": "openwork",
"propertyType": "msg",
2024-04-28 12:55:01 +00:00
"rules": [
{
"t": "gt",
"v": "0",
"vt": "num"
2024-04-28 12:55:01 +00:00
}
],
"checkall": "false",
"repair": false,
"outputs": 1,
"x": 1530,
2024-07-27 07:51:17 +00:00
"y": 1580,
2024-04-28 12:55:01 +00:00
"wires": [
[
"2b9f5994b30122d2"
2024-04-28 12:55:01 +00:00
]
]
},
{
"id": "558e2007055f9c38",
2024-04-28 12:55:01 +00:00
"type": "split",
"z": "52347795767acd3f",
"g": "6a1e1fb203c6236a",
"name": "",
"splt": "\\n",
"spltType": "str",
"arraySplt": 1,
"arraySpltType": "len",
"stream": false,
"addname": "field",
"x": 1030,
2024-07-27 07:51:17 +00:00
"y": 1580,
2024-04-28 12:55:01 +00:00
"wires": [
[
"882c784fa50c695e"
2024-04-28 12:55:01 +00:00
]
]
},
{
"id": "3be41a89fb1c71f4",
"type": "change",
2024-04-28 12:55:01 +00:00
"z": "52347795767acd3f",
"g": "6a1e1fb203c6236a",
"name": "from global",
2024-04-28 12:55:01 +00:00
"rules": [
{
"t": "set",
"p": "bucket",
"pt": "msg",
2024-08-24 17:58:44 +00:00
"to": "#:(onMemory)::query.bucket",
"tot": "flow"
},
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "metrics[msg.bucket]aperture",
"tot": "global"
2024-04-28 12:55:01 +00:00
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 850,
2024-07-27 07:51:17 +00:00
"y": 1580,
2024-04-28 12:55:01 +00:00
"wires": [
[
"558e2007055f9c38"
2024-04-28 12:55:01 +00:00
]
]
},
{
"id": "cdf962c271de3805",
2024-04-28 12:55:01 +00:00
"type": "change",
"z": "52347795767acd3f",
"g": "6a1e1fb203c6236a",
"name": "topic",
"rules": [
{
"t": "set",
"p": "topic",
"pt": "msg",
"to": "'telegram/' & msg.bucket & '/cible/' & msg.field",
"tot": "jsonata"
},
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "99",
"tot": "num"
2024-04-28 12:55:01 +00:00
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1690,
2024-07-27 07:51:17 +00:00
"y": 1520,
2024-04-28 12:55:01 +00:00
"wires": [
[
"0c7e8c2914e9141c",
"d0658792bccca939"
]
]
},
{
"id": "87eb4084ab2b6c4f",
2024-04-28 12:55:01 +00:00
"type": "change",
"z": "52347795767acd3f",
"g": "6a1e1fb203c6236a",
"name": "from global",
"rules": [
{
"t": "set",
"p": "bucket",
"pt": "msg",
2024-08-24 17:58:44 +00:00
"to": "#:(onMemory)::query.bucket",
2024-04-28 12:55:01 +00:00
"tot": "flow"
},
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "metrics[msg.bucket]aperture",
2024-04-28 12:55:01 +00:00
"tot": "global"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 850,
2024-07-27 07:51:17 +00:00
"y": 1520,
2024-04-28 12:55:01 +00:00
"wires": [
[
"4e3c3057b42e2a2a"
2024-04-28 12:55:01 +00:00
]
]
},
{
"id": "4e3c3057b42e2a2a",
2024-04-28 12:55:01 +00:00
"type": "split",
"z": "52347795767acd3f",
"g": "6a1e1fb203c6236a",
"name": "",
"splt": "\\n",
"spltType": "str",
"arraySplt": 1,
"arraySpltType": "len",
"stream": false,
"addname": "field",
"x": 1030,
2024-07-27 07:51:17 +00:00
"y": 1520,
2024-04-28 12:55:01 +00:00
"wires": [
[
"ce4d1a4c8f39d6ad"
2024-04-28 12:55:01 +00:00
]
]
},
{
"id": "ce4d1a4c8f39d6ad",
"type": "switch",
2024-04-28 12:55:01 +00:00
"z": "52347795767acd3f",
"g": "6a1e1fb203c6236a",
"name": "shutter",
"property": "field",
"propertyType": "msg",
2024-04-28 12:55:01 +00:00
"rules": [
{
"t": "eq",
"v": "shutter",
"vt": "str"
2024-04-28 12:55:01 +00:00
}
],
"checkall": "false",
"repair": false,
"outputs": 1,
"x": 1190,
2024-07-27 07:51:17 +00:00
"y": 1520,
2024-04-28 12:55:01 +00:00
"wires": [
[
"cdf962c271de3805"
2024-04-28 12:55:01 +00:00
]
]
},
{
"id": "55aa1e8e4e61d51f",
2024-04-28 12:55:01 +00:00
"type": "change",
"z": "52347795767acd3f",
"g": "6a1e1fb203c6236a",
"name": "topic",
2024-04-28 12:55:01 +00:00
"rules": [
{
"t": "set",
"p": "topic",
2024-04-28 12:55:01 +00:00
"pt": "msg",
"to": "'telegram/' & msg.bucket & '/cible/' & msg.field",
2024-04-28 12:55:01 +00:00
"tot": "jsonata"
},
{
"t": "set",
"p": "payload",
2024-04-28 12:55:01 +00:00
"pt": "msg",
"to": "0",
"tot": "num"
2024-04-28 12:55:01 +00:00
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1690,
2024-07-27 07:51:17 +00:00
"y": 1640,
2024-04-28 12:55:01 +00:00
"wires": [
[
"0c7e8c2914e9141c",
"d0658792bccca939"
2024-04-28 12:55:01 +00:00
]
]
},
{
"id": "d9a8d6a331678098",
2024-04-28 12:55:01 +00:00
"type": "switch",
"z": "52347795767acd3f",
"g": "6a1e1fb203c6236a",
"name": "has shutter",
"property": "stack_bucket.aperture",
2024-04-28 12:55:01 +00:00
"propertyType": "msg",
"rules": [
{
"t": "hask",
"v": "shutter",
2024-04-28 12:55:01 +00:00
"vt": "str"
},
{
"t": "else"
}
],
"checkall": "false",
"repair": false,
"outputs": 2,
"x": 1890,
2024-07-27 07:51:17 +00:00
"y": 1100,
2024-04-28 12:55:01 +00:00
"wires": [
[
"56a01bb3a1823ca6"
2024-04-28 12:55:01 +00:00
],
[
"7dc93121ae6674e5"
2024-04-28 12:55:01 +00:00
]
]
},
{
"id": "56a01bb3a1823ca6",
2024-04-28 12:55:01 +00:00
"type": "change",
"z": "52347795767acd3f",
"g": "6a1e1fb203c6236a",
"name": "shutter",
2024-04-28 12:55:01 +00:00
"rules": [
{
"t": "set",
"p": "payload.shutter",
2024-04-28 12:55:01 +00:00
"pt": "msg",
"to": "true",
"tot": "bool"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 2050,
2024-07-27 07:51:17 +00:00
"y": 1040,
2024-04-28 12:55:01 +00:00
"wires": [
[
"7dc93121ae6674e5"
2024-04-28 12:55:01 +00:00
]
]
},
{
"id": "0c7e8c2914e9141c",
"type": "trigger",
2024-04-28 12:55:01 +00:00
"z": "52347795767acd3f",
"g": "6a1e1fb203c6236a",
"name": "send, wait 5 s",
"op1": "",
"op2": "",
"op1type": "pay",
"op2type": "nul",
"duration": "5",
"extend": false,
"overrideDelay": false,
"units": "s",
"reset": "",
"bytopic": "all",
"topic": "topic",
"outputs": 1,
"x": 1880,
2024-07-27 07:51:17 +00:00
"y": 1400,
2024-04-28 12:55:01 +00:00
"wires": [
[
"c98c8e1dd186a9e6"
2024-04-28 12:55:01 +00:00
]
]
},
{
"id": "7c990a9e25fd7abf",
"type": "switch",
2024-04-28 12:55:01 +00:00
"z": "52347795767acd3f",
"g": "6a1e1fb203c6236a",
"name": "shutter",
"property": "field",
"propertyType": "msg",
2024-04-28 12:55:01 +00:00
"rules": [
{
"t": "eq",
"v": "shutter",
"vt": "str"
2024-04-28 12:55:01 +00:00
}
],
"checkall": "false",
"repair": false,
"outputs": 1,
"x": 1190,
2024-07-27 07:51:17 +00:00
"y": 1640,
2024-04-28 12:55:01 +00:00
"wires": [
[
"55aa1e8e4e61d51f"
2024-04-28 12:55:01 +00:00
]
]
},
{
"id": "2eab37ce4e1d38c7",
"type": "split",
"z": "52347795767acd3f",
"g": "6a1e1fb203c6236a",
"name": "",
"splt": "\\n",
"spltType": "str",
"arraySplt": 1,
"arraySpltType": "len",
"stream": false,
"addname": "field",
"x": 1030,
2024-07-27 07:51:17 +00:00
"y": 1640,
"wires": [
[
"7c990a9e25fd7abf"
]
]
},
{
"id": "5c38dd887299ff9c",
"type": "change",
"z": "52347795767acd3f",
"g": "6a1e1fb203c6236a",
"name": "from global",
"rules": [
2024-04-28 12:55:01 +00:00
{
"t": "set",
"p": "bucket",
2024-04-28 12:55:01 +00:00
"pt": "msg",
2024-08-24 17:58:44 +00:00
"to": "#:(onMemory)::query.bucket",
"tot": "flow"
2024-04-28 12:55:01 +00:00
},
{
"t": "set",
"p": "payload",
2024-04-28 12:55:01 +00:00
"pt": "msg",
"to": "metrics[msg.bucket]aperture",
"tot": "global"
2024-04-28 12:55:01 +00:00
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 850,
2024-07-27 07:51:17 +00:00
"y": 1640,
2024-04-28 12:55:01 +00:00
"wires": [
[
"2eab37ce4e1d38c7"
2024-04-28 12:55:01 +00:00
]
]
},
{
"id": "d0658792bccca939",
2024-04-28 12:55:01 +00:00
"type": "change",
"z": "52347795767acd3f",
"g": "6a1e1fb203c6236a",
"name": "clean",
2024-04-28 12:55:01 +00:00
"rules": [
{
"t": "delete",
"p": "bucket",
"pt": "msg"
2024-04-28 12:55:01 +00:00
},
{
"t": "delete",
"p": "measurement",
2024-04-28 12:55:01 +00:00
"pt": "msg"
},
{
"t": "delete",
"p": "field",
"pt": "msg"
2024-04-28 12:55:01 +00:00
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1850,
2024-07-27 07:51:17 +00:00
"y": 1460,
2024-04-28 12:55:01 +00:00
"wires": [
[
"930ec55bdd15ae80"
2024-04-28 12:55:01 +00:00
]
]
},
{
"id": "a4572ddd98280be9",
2024-04-28 12:55:01 +00:00
"type": "change",
"z": "52347795767acd3f",
"g": "6a1e1fb203c6236a",
"name": "bucket",
2024-04-28 12:55:01 +00:00
"rules": [
{
"t": "set",
"p": "scene.bucket",
"pt": "msg",
2024-08-24 17:58:44 +00:00
"to": "#:(onMemory)::query.bucket",
"tot": "flow"
2024-04-28 12:55:01 +00:00
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1550,
2024-07-27 07:51:17 +00:00
"y": 1220,
2024-04-28 12:55:01 +00:00
"wires": [
[
"de28e8e397badc0d"
2024-04-28 12:55:01 +00:00
]
]
},
{
"id": "de28e8e397badc0d",
"type": "link call",
2024-04-28 12:55:01 +00:00
"z": "52347795767acd3f",
"g": "6a1e1fb203c6236a",
"name": "",
"links": [
"ddd39f991efd9d31"
],
"linkType": "static",
"timeout": "30",
"x": 1750,
2024-07-27 07:51:17 +00:00
"y": 1220,
2024-04-28 12:55:01 +00:00
"wires": [
[
"e73144651291e1f3"
2024-04-28 12:55:01 +00:00
]
]
},
{
"id": "cb4b8e74cf76ad20",
"type": "catch",
2024-04-28 12:55:01 +00:00
"z": "52347795767acd3f",
"g": "ab32af53a59cbfa9",
"name": "catch error",
"scope": null,
"uncaught": false,
"x": 620,
"y": 60,
2024-04-28 12:55:01 +00:00
"wires": [
[
"1493b3ec590211ef"
2024-04-28 12:55:01 +00:00
]
]
},
{
"id": "1493b3ec590211ef",
"type": "change",
2024-04-28 12:55:01 +00:00
"z": "52347795767acd3f",
"g": "ab32af53a59cbfa9",
"name": "topic",
2024-04-28 12:55:01 +00:00
"rules": [
{
"t": "set",
"p": "topic",
"pt": "msg",
"to": "telegram",
"tot": "str"
2024-04-28 12:55:01 +00:00
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 790,
"y": 60,
2024-04-28 12:55:01 +00:00
"wires": [
[
"56268dd3950d582f"
2024-04-28 12:55:01 +00:00
]
]
},
{
"id": "56268dd3950d582f",
"type": "link out",
2024-04-28 12:55:01 +00:00
"z": "52347795767acd3f",
"g": "ab32af53a59cbfa9",
"name": "catch error",
"mode": "link",
"links": [
"a52f0e788cd4dca3"
2024-04-28 12:55:01 +00:00
],
"x": 915,
"y": 60,
"wires": []
2024-04-28 12:55:01 +00:00
},
{
"id": "5b419a28f8338f2f",
"type": "comment",
"z": "52347795767acd3f",
"g": "6c5d9361dd313b9f",
"name": "telegram / actif",
"info": "",
"x": 200,
"y": 380,
"wires": []
},
{
"id": "9af7b9c56907a138",
2024-04-28 12:55:01 +00:00
"type": "change",
"z": "52347795767acd3f",
"g": "d2959fd404d63e14",
"name": "telegram / actif / boolean / true",
2024-04-28 12:55:01 +00:00
"rules": [
{
"t": "set",
"p": "measurement",
2024-04-28 12:55:01 +00:00
"pt": "msg",
"to": "telegram",
"tot": "str"
2024-04-28 12:55:01 +00:00
},
{
"t": "set",
"p": "field",
2024-04-28 12:55:01 +00:00
"pt": "msg",
"to": "actif",
"tot": "str"
},
{
"t": "set",
"p": "format",
"pt": "msg",
"to": "boolean",
"tot": "str"
},
{
"t": "set",
"p": "default",
"pt": "msg",
"to": "true",
"tot": "bool"
2024-04-28 12:55:01 +00:00
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 950,
"y": 360,
"wires": [
[
"5c4f2123036c754e"
]
]
},
{
"id": "592fa749c393ef14",
"type": "link in",
"z": "52347795767acd3f",
"g": "d2959fd404d63e14",
"name": "telegram - chatbot - device",
"links": [
"546f190f3ec0c90d"
],
"x": 575,
"y": 300,
2024-04-28 12:55:01 +00:00
"wires": [
[
"f3cdc22dc1a6145b"
2024-04-28 12:55:01 +00:00
]
]
},
{
"id": "f3cdc22dc1a6145b",
2024-04-28 12:55:01 +00:00
"type": "switch",
"z": "52347795767acd3f",
"g": "d2959fd404d63e14",
"name": "model",
"property": "model",
2024-04-28 12:55:01 +00:00
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "chatbot",
2024-04-28 12:55:01 +00:00
"vt": "str"
}
],
"checkall": "false",
"repair": false,
"outputs": 1,
"x": 710,
"y": 300,
2024-04-28 12:55:01 +00:00
"wires": [
[
"9af7b9c56907a138",
"e34fb98383954858",
"d0e2d7ea7c84203e",
"68df08774aae3089"
2024-04-28 12:55:01 +00:00
]
]
},
{
"id": "5c4f2123036c754e",
2024-04-28 12:55:01 +00:00
"type": "change",
"z": "52347795767acd3f",
"g": "d2959fd404d63e14",
"name": "protocol",
2024-04-28 12:55:01 +00:00
"rules": [
{
"t": "set",
"p": "protocol",
2024-04-28 12:55:01 +00:00
"pt": "msg",
"to": "telegram",
"tot": "str"
2024-04-28 12:55:01 +00:00
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1240,
"y": 300,
2024-04-28 12:55:01 +00:00
"wires": [
[
"19134c8dcb4e84fd"
2024-04-28 12:55:01 +00:00
]
]
},
{
"id": "19134c8dcb4e84fd",
"type": "link out",
2024-04-28 12:55:01 +00:00
"z": "52347795767acd3f",
"g": "d2959fd404d63e14",
"name": "telegram - chatbot - device",
"mode": "link",
"links": [
"3e1b4213132404be"
2024-04-28 12:55:01 +00:00
],
"x": 1375,
"y": 300,
"wires": []
2024-04-28 12:55:01 +00:00
},
{
"id": "e34fb98383954858",
2024-04-28 12:55:01 +00:00
"type": "change",
"z": "52347795767acd3f",
"d": true,
"g": "d2959fd404d63e14",
"name": "brand",
2024-04-28 12:55:01 +00:00
"rules": [
{
"t": "set",
"p": "measurement",
2024-04-28 12:55:01 +00:00
"pt": "msg",
"to": "telegram",
"tot": "jsonata"
2024-04-28 12:55:01 +00:00
},
{
"t": "set",
"p": "field",
2024-04-28 12:55:01 +00:00
"pt": "msg",
"to": "actif",
"tot": "jsonata"
},
{
"t": "set",
"p": "brand",
"pt": "msg",
"to": "telegram",
"tot": "str"
2024-04-28 12:55:01 +00:00
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 870,
"y": 300,
2024-04-28 12:55:01 +00:00
"wires": [
[
"5c4f2123036c754e"
2024-04-28 12:55:01 +00:00
]
]
},
{
"id": "addd40dc7fbf27c9",
"type": "link in",
"z": "52347795767acd3f",
"g": "a159d489843f4d84",
"name": "telegram - chatbot - model",
"links": [
"9cb906bf8066d37e"
],
"x": 135,
"y": 300,
"wires": [
[
"5bea21ea2f447a5b"
]
]
},
{
"id": "5bea21ea2f447a5b",
2024-04-28 12:55:01 +00:00
"type": "change",
"z": "52347795767acd3f",
"g": "a159d489843f4d84",
"name": "model",
2024-04-28 12:55:01 +00:00
"rules": [
{
"t": "set",
"p": "brand",
2024-04-28 12:55:01 +00:00
"pt": "msg",
"to": "telegram",
"tot": "str"
2024-04-28 12:55:01 +00:00
},
{
"t": "set",
"p": "model",
2024-04-28 12:55:01 +00:00
"pt": "msg",
"to": "chatbot",
"tot": "str"
},
{
"t": "set",
"p": "protocol",
"pt": "msg",
"to": "telegram",
"tot": "str"
},
{
"t": "set",
"p": "measurement",
"pt": "msg",
"to": "telegram",
"tot": "str"
},
{
"t": "set",
"p": "field",
"pt": "msg",
"to": "actif",
"tot": "str"
},
{
"t": "set",
"p": "format",
"pt": "msg",
"to": "boolean",
"tot": "str"
},
{
"t": "set",
"p": "default",
"pt": "msg",
"to": "true",
"tot": "bool"
2024-04-28 12:55:01 +00:00
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 270,
"y": 300,
2024-04-28 12:55:01 +00:00
"wires": [
[
"ac45d4c7f6f1a547"
2024-04-28 12:55:01 +00:00
]
]
},
{
"id": "ac45d4c7f6f1a547",
"type": "link out",
"z": "52347795767acd3f",
"g": "a159d489843f4d84",
"name": "telegram - chatbot - model",
"mode": "link",
"links": [
"94aa726ce8973d2c"
],
"x": 395,
"y": 300,
"wires": []
},
{
"id": "d0e2d7ea7c84203e",
2024-04-28 12:55:01 +00:00
"type": "change",
"z": "52347795767acd3f",
"g": "d2959fd404d63e14",
"name": "telegram / message / text / ",
2024-04-28 12:55:01 +00:00
"rules": [
{
"t": "set",
"p": "measurement",
2024-04-28 12:55:01 +00:00
"pt": "msg",
"to": "telegram",
"tot": "str"
2024-04-28 12:55:01 +00:00
},
{
"t": "set",
"p": "field",
2024-04-28 12:55:01 +00:00
"pt": "msg",
"to": "message",
"tot": "str"
},
{
"t": "set",
"p": "format",
"pt": "msg",
"to": "text",
"tot": "str"
},
{
"t": "set",
"p": "default",
"pt": "msg",
"to": "",
"tot": "str"
2024-04-28 12:55:01 +00:00
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 940,
"y": 420,
2024-04-28 12:55:01 +00:00
"wires": [
[
"5c4f2123036c754e"
2024-04-28 12:55:01 +00:00
]
]
},
{
"id": "3a5d788b6c9b1490",
"type": "link in",
2024-04-28 12:55:01 +00:00
"z": "52347795767acd3f",
"g": "bdd2440c99f0d065",
"name": "telegram - chatbot - metric",
"links": [
"031a6afd8300356a",
2024-08-10 14:54:49 +00:00
"094771ea30e6c0b6"
],
"x": 1555,
"y": 360,
2024-04-28 12:55:01 +00:00
"wires": [
[
2024-08-10 14:54:49 +00:00
"8f85e38762803340"
2024-04-28 12:55:01 +00:00
]
]
},
{
"id": "b203a4b79c347218",
2024-04-28 12:55:01 +00:00
"type": "switch",
"z": "52347795767acd3f",
"g": "bdd2440c99f0d065",
"name": "measurement",
"property": "measurement",
2024-04-28 12:55:01 +00:00
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "telegram",
2024-04-28 12:55:01 +00:00
"vt": "str"
},
{
"t": "eq",
"v": "notification",
"vt": "str"
2024-04-28 12:55:01 +00:00
}
],
"checkall": "false",
"repair": false,
"outputs": 2,
2024-08-10 14:54:49 +00:00
"x": 1900,
"y": 360,
2024-04-28 12:55:01 +00:00
"wires": [
[
"af344ccaf295edf7"
],
[
"af344ccaf295edf7"
2024-04-28 12:55:01 +00:00
]
]
},
{
"id": "af344ccaf295edf7",
2024-04-28 12:55:01 +00:00
"type": "switch",
"z": "52347795767acd3f",
"g": "bdd2440c99f0d065",
"name": "field",
"property": "field",
2024-04-28 12:55:01 +00:00
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "photo",
2024-04-28 12:55:01 +00:00
"vt": "str"
},
{
"t": "eq",
"v": "message",
"vt": "str"
2024-05-13 18:54:03 +00:00
},
{
"t": "eq",
"v": "report",
"vt": "str"
2024-04-28 12:55:01 +00:00
}
],
"checkall": "false",
"repair": false,
2024-05-13 18:54:03 +00:00
"outputs": 3,
2024-08-10 14:54:49 +00:00
"x": 2090,
"y": 360,
2024-04-28 12:55:01 +00:00
"wires": [
[
"cf344cfc63c703eb"
2024-04-28 12:55:01 +00:00
],
[
2024-05-13 18:54:03 +00:00
"7102b05e3a7f621d"
],
[
"7102b05e3a7f621d"
2024-04-28 12:55:01 +00:00
]
]
},
{
"id": "2e3fc4b6e967c768",
2024-04-28 12:55:01 +00:00
"type": "change",
"z": "52347795767acd3f",
"g": "bdd2440c99f0d065",
"name": "payload",
2024-04-28 12:55:01 +00:00
"rules": [
{
"t": "set",
"p": "tmp",
2024-04-28 12:55:01 +00:00
"pt": "msg",
"to": "old_payload",
"tot": "msg"
},
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "{}",
"tot": "jsonata"
},
{
"t": "set",
"p": "payload.content",
"pt": "msg",
"to": "tmp",
"tot": "msg"
},
{
"t": "set",
"p": "payload.chatId",
"pt": "msg",
"to": "devices[msg.bucket]telegram.message.id",
"tot": "global"
},
{
"t": "set",
"p": "payload.type",
"pt": "msg",
"to": "field",
"tot": "msg"
},
{
"t": "delete",
"p": "tmp",
"pt": "msg"
2024-04-28 12:55:01 +00:00
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
2024-08-10 14:54:49 +00:00
"x": 3640,
"y": 360,
2024-04-28 12:55:01 +00:00
"wires": [
[
"5bec85a040561e90"
2024-04-28 12:55:01 +00:00
]
]
},
{
"id": "db0cf67f4aecddf5",
"type": "switch",
2024-04-28 12:55:01 +00:00
"z": "52347795767acd3f",
"g": "bdd2440c99f0d065",
"name": "mode master",
"property": "metrics.system.mode.master",
"propertyType": "global",
"rules": [
{
"t": "eq",
"v": "about.automate",
"vt": "global"
}
],
"checkall": "false",
"repair": false,
2024-04-28 12:55:01 +00:00
"outputs": 1,
2024-08-10 14:54:49 +00:00
"x": 2990,
"y": 360,
2024-04-28 12:55:01 +00:00
"wires": [
[
"e485f554c91b63f6"
2024-04-28 12:55:01 +00:00
]
]
},
{
"id": "e485f554c91b63f6",
2024-04-28 12:55:01 +00:00
"type": "switch",
"z": "52347795767acd3f",
"g": "bdd2440c99f0d065",
"name": "mode automate",
"property": "metrics.system.mode.automate",
"propertyType": "global",
2024-04-28 12:55:01 +00:00
"rules": [
{
"t": "eq",
"v": "automatic",
2024-04-28 12:55:01 +00:00
"vt": "str"
}
],
"checkall": "false",
"repair": false,
"outputs": 1,
2024-08-10 14:54:49 +00:00
"x": 3200,
"y": 360,
2024-04-28 12:55:01 +00:00
"wires": [
[
"647f561f3855b795"
2024-04-28 12:55:01 +00:00
]
]
},
{
"id": "647f561f3855b795",
"type": "switch",
2024-04-28 12:55:01 +00:00
"z": "52347795767acd3f",
"g": "bdd2440c99f0d065",
"name": "mode notification",
"property": "metrics.system.mode.notification",
"propertyType": "global",
"rules": [
{
"t": "neq",
"v": "off",
"vt": "str"
}
],
"checkall": "false",
"repair": false,
"outputs": 1,
2024-08-10 14:54:49 +00:00
"x": 3430,
"y": 360,
2024-04-28 12:55:01 +00:00
"wires": [
[
"2e3fc4b6e967c768"
2024-04-28 12:55:01 +00:00
]
]
},
{
"id": "5bec85a040561e90",
"type": "switch",
2024-04-28 12:55:01 +00:00
"z": "52347795767acd3f",
"g": "bdd2440c99f0d065",
"name": "not empty",
"property": "payload.content",
"propertyType": "msg",
2024-04-28 12:55:01 +00:00
"rules": [
{
"t": "nempty"
2024-04-28 12:55:01 +00:00
}
],
"checkall": "false",
"repair": false,
"outputs": 1,
2024-08-10 14:54:49 +00:00
"x": 3820,
"y": 360,
2024-04-28 12:55:01 +00:00
"wires": [
[
"8d4968b4487ece04",
"887cdd3998bb0a7b"
2024-04-28 12:55:01 +00:00
]
]
},
{
"id": "758726f2b1f2072d",
"type": "telegram sender",
2024-04-28 12:55:01 +00:00
"z": "52347795767acd3f",
"g": "ca924b100cc8cff2",
"name": "",
"bot": "8c93df4a796cf540",
"haserroroutput": false,
"outputs": 1,
"x": 1550,
"y": 60,
"wires": [
[
"0c86ad51105737f4"
]
]
},
{
"id": "0c86ad51105737f4",
"type": "debug",
"z": "52347795767acd3f",
"g": "ca924b100cc8cff2",
"name": "telegram - sender - response",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 1820,
"y": 60,
"wires": []
},
{
"id": "8d4968b4487ece04",
"type": "debug",
"z": "52347795767acd3f",
"g": "bdd2440c99f0d065",
"name": "telegram - chatbot - metric",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
2024-08-10 14:54:49 +00:00
"x": 4050,
"y": 300,
"wires": []
},
{
"id": "6917e9365bf15cf3",
"type": "link out",
"z": "52347795767acd3f",
"g": "93b32becb3f1dc05",
"name": "telegram - chatbot - source - action system report",
"mode": "link",
"links": [
"34a350a168b2e745",
"254eee2678120cf3"
2024-04-28 12:55:01 +00:00
],
"x": 1715,
"y": 480,
"wires": []
},
{
"id": "3433733d6b9a8736",
"type": "link in",
"z": "52347795767acd3f",
"g": "ca924b100cc8cff2",
"name": "telegram - sender",
"links": [
"887cdd3998bb0a7b",
"94517b52fbc7c222"
],
"x": 1375,
"y": 60,
2024-04-28 12:55:01 +00:00
"wires": [
[
"758726f2b1f2072d"
2024-04-28 12:55:01 +00:00
]
]
},
{
"id": "887cdd3998bb0a7b",
"type": "link out",
"z": "52347795767acd3f",
"g": "bdd2440c99f0d065",
"name": "telegram - chatbot - metric",
"mode": "link",
"links": [
"3433733d6b9a8736"
],
2024-08-10 14:54:49 +00:00
"x": 3955,
"y": 360,
"wires": []
},
{
"id": "05436cd3824bb9cc",
2024-04-28 12:55:01 +00:00
"type": "change",
"z": "52347795767acd3f",
"g": "6a1e1fb203c6236a",
"name": "from global",
2024-04-28 12:55:01 +00:00
"rules": [
{
"t": "set",
"p": "old_payload",
"pt": "msg",
"to": "payload",
"tot": "msg"
},
{
"t": "set",
"p": "payload",
2024-04-28 12:55:01 +00:00
"pt": "msg",
"to": "metrics",
"tot": "global"
2024-04-28 12:55:01 +00:00
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 2410,
2024-07-27 07:51:17 +00:00
"y": 920,
2024-04-28 12:55:01 +00:00
"wires": [
[
"c7adcee301e53907"
2024-04-28 12:55:01 +00:00
]
]
},
{
"id": "c7adcee301e53907",
"type": "split",
2024-04-28 12:55:01 +00:00
"z": "52347795767acd3f",
"g": "6a1e1fb203c6236a",
"name": "",
"splt": "\\n",
"spltType": "str",
"arraySplt": 1,
"arraySpltType": "len",
"stream": false,
"addname": "bucket",
"x": 2590,
2024-07-27 07:51:17 +00:00
"y": 920,
"wires": [
[
"ecba03e31652a0a8"
]
]
},
{
"id": "ecba03e31652a0a8",
"type": "switch",
"z": "52347795767acd3f",
"g": "6a1e1fb203c6236a",
"name": "actif",
"property": "payload.telegram.actif",
"propertyType": "msg",
"rules": [
{
"t": "true"
}
2024-04-28 12:55:01 +00:00
],
"checkall": "false",
"repair": false,
"outputs": 1,
"x": 2750,
2024-07-27 07:51:17 +00:00
"y": 920,
2024-04-28 12:55:01 +00:00
"wires": [
[
"0deb3214b824aa2f"
2024-04-28 12:55:01 +00:00
]
]
},
{
"id": "0deb3214b824aa2f",
"type": "switch",
2024-04-28 12:55:01 +00:00
"z": "52347795767acd3f",
"g": "6a1e1fb203c6236a",
"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": 2930,
2024-07-27 07:51:17 +00:00
"y": 920,
2024-04-28 12:55:01 +00:00
"wires": [
[
"b1720ba6a2ac3c26"
2024-04-28 12:55:01 +00:00
]
]
},
{
"id": "b1720ba6a2ac3c26",
"type": "switch",
2024-04-28 12:55:01 +00:00
"z": "52347795767acd3f",
"g": "6a1e1fb203c6236a",
"name": "mode automate",
"property": "metrics.system.mode.automate",
"propertyType": "global",
"rules": [
{
"t": "eq",
"v": "automatic",
"vt": "str"
}
],
"checkall": "false",
"repair": false,
"outputs": 1,
"x": 3140,
2024-07-27 07:51:17 +00:00
"y": 920,
2024-04-28 12:55:01 +00:00
"wires": [
[
"c218bc6590a159a3"
2024-04-28 12:55:01 +00:00
]
]
},
{
"id": "c218bc6590a159a3",
"type": "switch",
2024-04-28 12:55:01 +00:00
"z": "52347795767acd3f",
"g": "6a1e1fb203c6236a",
"name": "mode notification",
"property": "metrics.system.mode.notification",
"propertyType": "global",
2024-04-28 12:55:01 +00:00
"rules": [
{
"t": "neq",
"v": "off",
"vt": "str"
2024-04-28 12:55:01 +00:00
}
],
"checkall": "false",
"repair": false,
"outputs": 1,
"x": 3370,
2024-07-27 07:51:17 +00:00
"y": 920,
2024-04-28 12:55:01 +00:00
"wires": [
[
"8c325fb9f9eedcc8"
]
2024-04-28 12:55:01 +00:00
]
},
{
"id": "ccba35f51ea02cde",
2024-04-28 12:55:01 +00:00
"type": "switch",
"z": "52347795767acd3f",
"g": "6a1e1fb203c6236a",
"name": "not empty",
"property": "payload.content",
"propertyType": "msg",
2024-04-28 12:55:01 +00:00
"rules": [
{
"t": "nempty"
}
],
"checkall": "false",
"repair": false,
"outputs": 1,
"x": 3740,
2024-07-27 07:51:17 +00:00
"y": 920,
2024-04-28 12:55:01 +00:00
"wires": [
[
"94517b52fbc7c222"
2024-04-28 12:55:01 +00:00
]
]
},
{
"id": "8c325fb9f9eedcc8",
2024-04-28 12:55:01 +00:00
"type": "change",
"z": "52347795767acd3f",
"g": "6a1e1fb203c6236a",
"name": "chatid",
2024-04-28 12:55:01 +00:00
"rules": [
{
"t": "set",
2024-08-21 08:35:16 +00:00
"p": "payload",
"pt": "msg",
2024-08-21 08:35:16 +00:00
"to": "old_payload",
"tot": "msg"
},
2024-04-28 12:55:01 +00:00
{
"t": "set",
2024-08-21 08:35:16 +00:00
"p": "payload.chatId",
2024-04-28 12:55:01 +00:00
"pt": "msg",
2024-08-21 08:35:16 +00:00
"to": "devices[msg.bucket]telegram.message.id",
"tot": "global"
},
{
"t": "delete",
"p": "old_payload",
"pt": "msg"
2024-04-28 12:55:01 +00:00
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 3570,
2024-07-27 07:51:17 +00:00
"y": 920,
2024-04-28 12:55:01 +00:00
"wires": [
[
"ccba35f51ea02cde"
2024-04-28 12:55:01 +00:00
]
]
},
{
"id": "68df08774aae3089",
2024-04-28 12:55:01 +00:00
"type": "change",
"z": "52347795767acd3f",
"g": "d2959fd404d63e14",
"name": "telegram / photo / text / ",
2024-04-28 12:55:01 +00:00
"rules": [
{
"t": "set",
"p": "measurement",
2024-04-28 12:55:01 +00:00
"pt": "msg",
"to": "telegram",
"tot": "str"
},
{
"t": "set",
"p": "field",
"pt": "msg",
"to": "photo",
"tot": "str"
},
{
"t": "set",
"p": "format",
"pt": "msg",
"to": "text",
"tot": "str"
},
{
"t": "set",
"p": "default",
"pt": "msg",
"to": "",
"tot": "str"
2024-04-28 12:55:01 +00:00
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 920,
"y": 480,
2024-04-28 12:55:01 +00:00
"wires": [
[
"5c4f2123036c754e"
2024-04-28 12:55:01 +00:00
]
]
},
{
"id": "5cce3ddc85ae4b7f",
2024-04-28 12:55:01 +00:00
"type": "change",
"z": "52347795767acd3f",
"g": "bdd2440c99f0d065",
"name": "from global",
2024-04-28 12:55:01 +00:00
"rules": [
{
"t": "set",
"p": "old_payload",
"pt": "msg",
"to": "payload",
"tot": "msg"
},
2024-04-28 12:55:01 +00:00
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "metrics",
"tot": "global"
2024-04-28 12:55:01 +00:00
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
2024-08-10 14:54:49 +00:00
"x": 2450,
"y": 360,
2024-04-28 12:55:01 +00:00
"wires": [
[
"52e58ab14c13701d"
2024-04-28 12:55:01 +00:00
]
]
},
{
"id": "52e58ab14c13701d",
"type": "split",
2024-04-28 12:55:01 +00:00
"z": "52347795767acd3f",
"g": "bdd2440c99f0d065",
"name": "buckets",
"splt": "\\n",
"spltType": "str",
"arraySplt": 1,
"arraySpltType": "len",
"stream": false,
"addname": "bucket",
"property": "payload",
2024-08-10 14:54:49 +00:00
"x": 2640,
"y": 360,
2024-04-28 12:55:01 +00:00
"wires": [
[
"ba7a5c79cd8542ce"
2024-04-28 12:55:01 +00:00
]
]
2024-04-29 22:28:34 +00:00
},
{
"id": "ba7a5c79cd8542ce",
"type": "switch",
2024-04-29 22:28:34 +00:00
"z": "52347795767acd3f",
"g": "bdd2440c99f0d065",
"name": "actif",
"property": "payload.telegram.actif",
"propertyType": "msg",
"rules": [
{
"t": "true"
}
],
"checkall": "false",
"repair": false,
"outputs": 1,
2024-08-10 14:54:49 +00:00
"x": 2810,
"y": 360,
2024-04-29 22:28:34 +00:00
"wires": [
[
"db0cf67f4aecddf5"
2024-04-29 22:28:34 +00:00
]
]
},
{
"id": "cf344cfc63c703eb",
"type": "base64",
2024-04-29 22:28:34 +00:00
"z": "52347795767acd3f",
"g": "bdd2440c99f0d065",
"name": "",
2024-04-29 22:28:34 +00:00
"action": "",
"property": "payload",
2024-08-10 14:54:49 +00:00
"x": 2260,
"y": 300,
2024-04-29 22:28:34 +00:00
"wires": [
[
"5cce3ddc85ae4b7f"
2024-04-29 22:28:34 +00:00
]
]
2024-05-13 18:54:03 +00:00
},
{
"id": "7102b05e3a7f621d",
"type": "change",
"z": "52347795767acd3f",
"g": "bdd2440c99f0d065",
"name": "field",
"rules": [
{
"t": "set",
"p": "field",
"pt": "msg",
"to": "message",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
2024-08-10 14:54:49 +00:00
"x": 2250,
2024-05-13 18:54:03 +00:00
"y": 360,
"wires": [
[
"5cce3ddc85ae4b7f"
]
]
2024-07-27 07:51:17 +00:00
},
{
"id": "0691d9a37686f464",
"type": "switch",
"z": "52347795767acd3f",
"g": "35fa81df547b4491",
"name": "field",
"property": "field",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "actif",
"vt": "str"
}
],
"checkall": "false",
"repair": false,
"outputs": 1,
2024-08-10 14:54:49 +00:00
"x": 5030,
2024-07-27 07:51:17 +00:00
"y": 540,
"wires": [
[
"6495af71a7195bb4",
"4edb12baad4c5bd0"
]
]
},
{
"id": "3c6ee783748b235e",
"type": "change",
"z": "52347795767acd3f",
"g": "35fa81df547b4491",
"name": "set metric",
"rules": [
{
"t": "set",
"p": "measurement",
"pt": "msg",
"to": "telegram",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
2024-08-10 14:54:49 +00:00
"x": 5880,
2024-07-27 07:51:17 +00:00
"y": 540,
"wires": [
[
"1d6b2ca73ae11560"
]
]
},
{
"id": "761cb37547fe4dc2",
"type": "link in",
"z": "52347795767acd3f",
"g": "35fa81df547b4491",
"name": "room - ui - telegram - metric",
"links": [
"b6323e1460f6f50c"
],
2024-08-10 14:54:49 +00:00
"x": 4495,
2024-07-27 07:51:17 +00:00
"y": 360,
"wires": [
[
"befe8bfd3d3446cc"
]
]
},
{
"id": "a033c6dbdefb80f9",
"type": "link in",
"z": "52347795767acd3f",
"g": "35fa81df547b4491",
"name": "room - ui - telegram - load",
"links": [
"9e4bfee0db3051d4"
],
2024-08-10 14:54:49 +00:00
"x": 4495,
2024-07-27 07:51:17 +00:00
"y": 300,
"wires": [
[
2024-08-28 16:04:14 +00:00
"58e1c9e33b0a90f3",
"1dec76a256793b0b"
2024-07-27 07:51:17 +00:00
]
]
},
{
"id": "1d6b2ca73ae11560",
"type": "link out",
"z": "52347795767acd3f",
"g": "35fa81df547b4491",
"name": "room - ui - alexa - metric",
"mode": "link",
"links": [
"2690f4e06626ebda"
],
2024-08-10 14:54:49 +00:00
"x": 6015,
2024-07-27 07:51:17 +00:00
"y": 540,
"wires": []
},
{
"id": "befe8bfd3d3446cc",
"type": "switch",
"z": "52347795767acd3f",
"g": "35fa81df547b4491",
"name": "measurement",
"property": "measurement",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "telegram",
"vt": "str"
}
],
"checkall": "false",
"repair": false,
"outputs": 1,
2024-08-10 14:54:49 +00:00
"x": 4660,
2024-07-27 07:51:17 +00:00
"y": 360,
"wires": [
[
2024-08-28 16:04:14 +00:00
"bf793e9865c9e834",
"024254ee38afd638"
2024-07-27 07:51:17 +00:00
]
]
},
{
"id": "2936573edcac41e4",
"type": "change",
"z": "52347795767acd3f",
"g": "35fa81df547b4491",
"name": "reset",
"rules": [],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
2024-08-10 14:54:49 +00:00
"x": 5190,
2024-07-27 07:51:17 +00:00
"y": 420,
"wires": [
[
"6495af71a7195bb4",
"97087ce25aae4515",
"5f4fe9067e1fd9a0"
]
]
},
{
"id": "6495af71a7195bb4",
"type": "ui-switch",
"z": "52347795767acd3f",
"g": "35fa81df547b4491",
"name": "actif",
"label": "",
"group": "cfbed463c3e70b05",
2024-08-28 16:04:14 +00:00
"order": 2,
2024-07-27 07:51:17 +00:00
"width": "1",
"height": "1",
"passthru": false,
"topic": "actif",
"topicType": "str",
"style": "",
"className": "",
"onvalue": "true",
"onvalueType": "bool",
"onicon": "cog",
"oncolor": "teal",
"offvalue": "false",
"offvalueType": "bool",
"officon": "cog-off-outline",
"offcolor": "grey",
2024-08-10 14:54:49 +00:00
"x": 5530,
2024-07-27 07:51:17 +00:00
"y": 540,
"wires": [
[
"3c6ee783748b235e"
]
]
},
{
"id": "bf793e9865c9e834",
"type": "delay",
"z": "52347795767acd3f",
"g": "35fa81df547b4491",
"name": "100 ms",
"pauseType": "delay",
"timeout": "100",
"timeoutUnits": "milliseconds",
"rate": "1",
"nbRateUnits": "1",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": false,
"allowrate": false,
"outputs": 1,
2024-08-10 14:54:49 +00:00
"x": 4860,
2024-07-27 07:51:17 +00:00
"y": 540,
"wires": [
[
"0691d9a37686f464",
"5ab53f45b766d97b"
]
]
},
{
"id": "5f4fe9067e1fd9a0",
"type": "ui-text-input",
"z": "52347795767acd3f",
"g": "35fa81df547b4491",
"group": "cfbed463c3e70b05",
"name": "",
"label": "Message",
2024-08-28 16:04:14 +00:00
"order": 3,
2024-07-27 07:51:17 +00:00
"width": "5",
"height": "1",
"topic": "topic",
"topicType": "msg",
"mode": "text",
"delay": 300,
"passthru": true,
"sendOnDelay": false,
"sendOnBlur": true,
"sendOnEnter": true,
"className": "",
2024-08-10 14:54:49 +00:00
"x": 5360,
2024-07-27 07:51:17 +00:00
"y": 600,
"wires": [
[
"b4a9884f6b553123"
]
]
},
{
"id": "05b5a24c1547eb9a",
"type": "ui-button",
"z": "52347795767acd3f",
"g": "35fa81df547b4491",
"group": "cfbed463c3e70b05",
"name": "send",
"label": "",
2024-08-28 16:04:14 +00:00
"order": 4,
2024-07-27 07:51:17 +00:00
"width": "1",
"height": "1",
"emulateClick": false,
"tooltip": "",
"color": "",
"bgcolor": "",
"className": "",
"icon": "send",
"iconPosition": "left",
"payload": "",
"payloadType": "str",
"topic": "message",
"topicType": "str",
2024-08-10 14:54:49 +00:00
"x": 5350,
2024-07-27 07:51:17 +00:00
"y": 660,
"wires": [
[
"12697008ac3ea99d"
]
]
},
{
"id": "b4a9884f6b553123",
"type": "change",
"z": "52347795767acd3f",
"g": "35fa81df547b4491",
"name": "flow",
"rules": [
{
"t": "set",
2024-08-10 14:54:49 +00:00
"p": "#:(onMemory)::telegram.content",
2024-07-27 07:51:17 +00:00
"pt": "flow",
"to": "payload",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
2024-08-10 14:54:49 +00:00
"x": 5530,
2024-07-27 07:51:17 +00:00
"y": 600,
"wires": [
[]
]
},
{
"id": "5ab53f45b766d97b",
"type": "change",
"z": "52347795767acd3f",
"g": "35fa81df547b4491",
"name": "empty",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
2024-08-10 14:54:49 +00:00
"x": 5030,
2024-07-27 07:51:17 +00:00
"y": 600,
"wires": [
[
"5f4fe9067e1fd9a0"
]
]
},
{
"id": "86f604b24a73308c",
"type": "change",
"z": "52347795767acd3f",
"g": "35fa81df547b4491",
"name": "payload",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
2024-08-10 14:54:49 +00:00
"to": "#:(onMemory)::telegram.content",
2024-07-27 07:51:17 +00:00
"tot": "flow"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
2024-08-10 14:54:49 +00:00
"x": 5700,
2024-07-27 07:51:17 +00:00
"y": 660,
"wires": [
[
"5ab53f45b766d97b",
"25609df681da5c1b",
"3c6ee783748b235e"
]
]
},
{
"id": "25609df681da5c1b",
"type": "change",
"z": "52347795767acd3f",
"g": "35fa81df547b4491",
"name": "set notification metric",
"rules": [
{
"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": "message",
"tot": "str"
},
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "Message telegram envoyé",
"tot": "str"
},
{
"t": "set",
"p": "repeat",
"pt": "msg",
"to": "true",
"tot": "bool"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
2024-08-10 14:54:49 +00:00
"x": 5920,
2024-07-27 07:51:17 +00:00
"y": 660,
"wires": [
[
"d2194c4dad790ec4"
]
]
},
{
"id": "d2194c4dad790ec4",
"type": "link out",
"z": "52347795767acd3f",
"g": "35fa81df547b4491",
"name": "telegram - ui - notification",
"mode": "link",
"links": [
"206c1fb4a48067df"
],
2024-08-10 14:54:49 +00:00
"x": 6095,
2024-07-27 07:51:17 +00:00
"y": 660,
"wires": []
},
{
"id": "12697008ac3ea99d",
"type": "switch",
"z": "52347795767acd3f",
"g": "35fa81df547b4491",
"name": "flow",
2024-08-10 14:54:49 +00:00
"property": "#:(onMemory)::telegram.content",
2024-07-27 07:51:17 +00:00
"propertyType": "flow",
"rules": [
{
"t": "nempty"
}
],
"checkall": "false",
"repair": false,
"outputs": 1,
2024-08-10 14:54:49 +00:00
"x": 5530,
2024-07-27 07:51:17 +00:00
"y": 660,
"wires": [
[
"86f604b24a73308c"
]
]
},
{
"id": "97087ce25aae4515",
"type": "ui-text",
"z": "52347795767acd3f",
"g": "35fa81df547b4491",
"group": "cfbed463c3e70b05",
2024-08-28 16:04:14 +00:00
"order": 1,
2024-07-27 07:51:17 +00:00
"width": "5",
"height": "1",
"name": "actif (txt)",
"label": "",
"format": "{{msg.payload}}",
"layout": "row-right",
"style": false,
"font": "",
"fontSize": 16,
"color": "#717171",
"className": "",
2024-08-10 14:54:49 +00:00
"x": 5360,
2024-07-27 07:51:17 +00:00
"y": 540,
"wires": []
},
{
"id": "4edb12baad4c5bd0",
"type": "change",
"z": "52347795767acd3f",
"g": "35fa81df547b4491",
"name": "format",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "msg.payload?\"Gestion d'assistant active\":\"Gestion d'assistant inactive\"",
"tot": "jsonata"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
2024-08-10 14:54:49 +00:00
"x": 5190,
2024-07-27 07:51:17 +00:00
"y": 540,
"wires": [
[
"97087ce25aae4515"
]
]
},
{
"id": "58e1c9e33b0a90f3",
"type": "delay",
"z": "52347795767acd3f",
"g": "35fa81df547b4491",
"name": "50 ms",
"pauseType": "delay",
"timeout": "50",
"timeoutUnits": "milliseconds",
"rate": "1",
"nbRateUnits": "1",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": false,
"allowrate": false,
"outputs": 1,
2024-08-10 14:54:49 +00:00
"x": 4630,
2024-07-27 07:51:17 +00:00
"y": 420,
"wires": [
[
"2936573edcac41e4"
]
]
2024-08-10 14:54:49 +00:00
},
{
"id": "8f85e38762803340",
"type": "gate",
"z": "52347795767acd3f",
"g": "bdd2440c99f0d065",
"name": "gate loop",
"controlTopic": "gate loop",
"defaultState": "closed",
"openCmd": "open",
"closeCmd": "close",
"toggleCmd": "toggle",
"defaultCmd": "default",
"statusCmd": "status",
"persist": false,
"storeName": "default",
"x": 1700,
"y": 360,
"wires": [
[
"b203a4b79c347218"
]
]
2024-08-28 16:04:14 +00:00
},
{
"id": "1dec76a256793b0b",
"type": "change",
"z": "52347795767acd3f",
"g": "35fa81df547b4491",
"name": "group",
"rules": [
{
"t": "set",
"p": "group",
"pt": "msg",
"to": "Telegram",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 5010,
"y": 300,
"wires": [
[
"30c0ca5c8f8631ea"
]
]
},
{
"id": "30c0ca5c8f8631ea",
"type": "link out",
"z": "52347795767acd3f",
"g": "35fa81df547b4491",
"name": "room - ui - telegram - control",
"mode": "link",
"links": [
"4afaf74fbb2e3c7f"
],
"x": 5135,
"y": 300,
"wires": []
},
{
"id": "024254ee38afd638",
"type": "change",
"z": "52347795767acd3f",
"g": "35fa81df547b4491",
"name": "control",
"rules": [
{
"t": "set",
"p": "control",
"pt": "msg",
"to": "show",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 4850,
"y": 360,
"wires": [
[
"1dec76a256793b0b"
]
]
2024-04-28 12:55:01 +00:00
}
]