iotredloop/flows/U.Entities.json

7559 lines
137 KiB
JSON
Raw Normal View History

2024-05-06 20:15:18 +00:00
[
{
"id": "1362a4b4f08f3d5b",
"type": "tab",
"label": "U.Entities",
2024-05-06 20:15:18 +00:00
"disabled": false,
"info": "",
"env": []
},
{
"id": "215a32642af29284",
"type": "group",
"z": "1362a4b4f08f3d5b",
"name": "entities - bucket",
2024-05-06 20:15:18 +00:00
"style": {
"fill": "#ffC000",
"fill-opacity": "0.05",
"label": true,
"stroke": "#ffC000"
},
"nodes": [
"1d1b97b90e8247f3",
"633ef89ae7ff3aac",
"7d77f0bc3fa0e695"
],
"x": 94,
"y": 19,
"w": 342,
"h": 82
},
{
"id": "3c6b51ae156a9cac",
"type": "group",
"z": "1362a4b4f08f3d5b",
"name": "catch error",
"style": {
"fill": "#ff0000",
"fill-opacity": "0.05",
"label": true,
"stroke": "#ff0000"
},
"nodes": [
"73b58c6d90a26112",
"2d538ce8ed696396",
"2d7299cd90641836"
],
"x": 534,
"y": 19,
"w": 422,
"h": 82
},
{
"id": "d62c9cf0cb81a537",
"type": "group",
"z": "1362a4b4f08f3d5b",
"name": "entities - register rooms",
2024-05-06 20:15:18 +00:00
"style": {
"label": true,
"fill": "#ff0000",
"fill-opacity": "0.05"
},
"nodes": [
"69a45eebaa58325f",
"6eafb2a9c1ec95c0",
"39740b8338a622fd",
"4e5188bf59004a54",
"cc946bae3f4b46d8",
2024-07-21 19:34:43 +00:00
"fc14608145819575",
"6b5dd5979114ad9c",
"a1dbeb8cf51c3366"
2024-05-06 20:15:18 +00:00
],
"x": 94,
"y": 379,
2024-07-21 19:34:43 +00:00
"w": 1052,
2024-05-06 20:15:18 +00:00
"h": 142
},
{
"id": "7a3b686f86cb9beb",
"type": "group",
"z": "1362a4b4f08f3d5b",
"name": "entities - add entity",
2024-05-06 20:15:18 +00:00
"style": {
"label": true,
"fill": "#6f2fa0",
"fill-opacity": "0.05"
},
"nodes": [
"4e039b1bb507cbd3",
"6c95c42a1bb0e0e8",
"3cad0ebae9bab6a3",
"c94f5e94ee5a1918",
"cea54c8794dd0ef6",
"518e99798b484eac",
"a4418ab91ed4c56d",
"503454da3c35d846",
"deca341e91bb7f09",
"c1a9384e4cb3acd2",
"9ff743b23cbe42cd",
"51a8b73d46163353",
"e5cbd1d6e36b3a71",
"60e62fd2914949fb",
"fdc89ddd1aa0f14a",
"8df78aa19a0af2aa",
"fcf36df06936ea4e",
"cb2e82e3ca5ad664",
"540ec68bb8166067",
"d0fcc8358b550646",
"1cd4711186e0eacd",
"72bdc2b803d56d5e",
"b866e5ea8c6f4135",
"e3c3329221c57637",
"33428cdad37f69b9",
"f03da2323ee09882",
"fbbdc47d5910770e",
"47eb8b39520f8641",
"402d82489d297c82",
"d8873ffc90a0b800",
"75fbca1d39c47339",
"374944ec7a1d4b47",
"306bc174ad2aaf84",
"04d40482183bc373",
"8bf7263e2c4b2732",
"de8190cc7acf1ab9",
"0f589b67cb910c6a",
"68d2962c711d3dd3",
"fb5f4b43f105eeee",
"c7337b13965771ee",
"82128d17e64350cb",
"a85ba25677fe8dd1",
"d9f51facbcafa156",
"36cdeec08c7a3dd8",
"6d4c2ec76c80126b",
"fdea9ff531a587a8",
"b09d639af149c549",
"e82029e6586f9f7e",
"f2ae81bacad53d72",
"740db566709021ed",
"4f087e589110693b",
"1519b923650e36db",
"45880c15ca4a61c5",
"9171766e1ee10649",
"21c200a736413965",
"06657762c4774a90",
"44bfa2b788405872",
"fd414e4814858c31",
"4ca6bf4176ebe985",
"c19a4a024ab45653",
"868f82b1a5ca2a85",
"f5b6bba2551b5bec",
2024-05-08 16:38:22 +00:00
"28026a2ce29f6d72",
"be0fb9a04ea16004",
2024-05-18 07:40:16 +00:00
"41e9885bae118005",
"bf39b8d1716ca963",
"4f7352e714e2f497",
"9ee5440963269d27",
"e7c533a4825e3889"
2024-05-06 20:15:18 +00:00
],
"x": 94,
"y": 739,
"w": 1672,
2024-05-18 07:40:16 +00:00
"h": 1062
2024-05-06 20:15:18 +00:00
},
{
"id": "4aa11d03f1b394a5",
"type": "group",
"z": "1362a4b4f08f3d5b",
"name": "entities - boot entities",
2024-05-06 20:15:18 +00:00
"style": {
"fill": "#ff0000",
"fill-opacity": "0.05",
"label": true
},
"nodes": [
"c622c7d8b085a6d6",
"25579c2b6bf10a53",
"03f2f5c00addae38",
"316e053ce43b8176",
"1fe7191fde26e8cb",
"a8759eb49d4d47f1",
"8c9e51e853c941fe"
],
"x": 94,
"y": 199,
2024-07-21 19:34:43 +00:00
"w": 1092,
2024-05-06 20:15:18 +00:00
"h": 142
},
{
"id": "d163a291da272610",
"type": "group",
"z": "1362a4b4f08f3d5b",
"name": "entities - delete entity",
2024-05-06 20:15:18 +00:00
"style": {
"label": true,
"fill": "#6f2fa0",
"fill-opacity": "0.05"
},
"nodes": [
"035760b14c0a3455",
"c115ad43edc89efe",
"e941b40b953cddbc",
"6964c9772d7bc5d6",
"7fbf24f2a6bb7f36",
"2b222d433afe409d",
"eb935fa8155701e2",
"ceffdbc65f225ed5",
"2936ec4c8c8ab565",
"d8de448ed73f17d3",
"91ba1b199e91916c",
"82150d4178a42162",
"6155deee9e0c160b",
"4a6b620a1d208d7e",
"21beb0360e865da3",
"29d27126cf3ba304",
"ee4607a9074fe742",
"cd5b164b7ad4bb78",
"ccc2df3ce92c67ad",
"8fe577cea4ac48fa",
"cad2fc584c39df0f",
"015f0472776f11b7",
"e7ffcd836be34681",
"72f3d70342e83655",
"c4df794af04292af",
"3fe28ab3d007c572",
"662c49c88089f00f",
"b40e12a183af125b",
"b9356dbf87d93bc5",
"b85e06a6ce56c496",
"471f98e80f09e7fc",
"d0602834860e1ad6",
"1723a88c57edd93a",
"723dec470a8f2678",
"85c927dcf9dfd8d6",
"890c995bc0b1bf4b",
"c8588ccd19d318e2",
"f9c4a58c92b5b4d9",
"ba6f0526fb7931c1",
"09d81adba4bcf125",
"9b17052c6b788f45",
"7a3535db9e7c5047",
"663a9910ecb7d4b7",
"e0b5e448c81dcca6",
"6c4bed6b5d616836",
"6ed2ba39d2ad3830",
2024-05-07 23:17:47 +00:00
"422e1dd2aab1ae7d",
"30ccf1e79a8c842a",
"389909b07238cc3a"
2024-05-06 20:15:18 +00:00
],
"x": 94,
"y": 1899,
"w": 2332,
"h": 622
2024-05-06 20:15:18 +00:00
},
{
"id": "3b06cf51ed60a17e",
"type": "group",
"z": "1362a4b4f08f3d5b",
"name": "entities - export entities",
2024-05-06 20:15:18 +00:00
"style": {
"label": true,
"fill": "#6f2fa0",
"fill-opacity": "0.05"
},
"nodes": [
"ad7fb302dbb22bcf",
"16192cfee4d23370",
"cffc4b31a6570cae",
"595853542a4259b5",
"705131420801edaf",
"156d8365a01c4fb4",
"1d9d8c969ccdf2be",
"e3bcd358aa687acc",
"66d5953240afce8e",
"0ae3184728b2a2c7",
"4f07f65ec7f8a5e2",
"da3dfd792007d0d0",
"72de98adadd34a6f",
"b5a5d39699459183",
"00103f2867eaf0af",
"7340045ba5d10c4d",
"29addac35906de8a",
"6236a5e8600f634e",
"5ce6d992ddb52bf9",
"29f907f589e47ba6",
"5a6f8f519e070c79",
"cc9ae1f14650ea53",
"8ecb5617ac72d19a",
"5d3538459077156c",
"5c6e003545ed92a0",
"78f44a60b8f4cc68",
"80ce9cd387590b00",
"85db3cff53254780",
"a6bb0870c0eeda1d",
"c8456ba2aa6075ce",
"51a0b7fe34dab9a9",
2024-05-18 07:40:16 +00:00
"f39f016b95fc3bb9",
"2affc8f60f87bf7b"
2024-05-06 20:15:18 +00:00
],
"x": 94,
2024-05-18 07:40:16 +00:00
"y": 2559,
"w": 4932,
2024-05-06 20:15:18 +00:00
"h": 262
},
{
"id": "ed710864874f0897",
"type": "group",
"z": "1362a4b4f08f3d5b",
"name": "entities - entity to md5",
2024-05-06 20:15:18 +00:00
"style": {
"label": true,
"stroke": "#92d04f",
"fill": "#92d04f",
"fill-opacity": "0.05"
},
"nodes": [
"a327bc0ce37018cf",
"2e633d555e1a36f6",
"95727dfedbf37b0d",
"76a625401145af61",
"51977d236a5b4e17",
"463b42633dcf4058",
"83530f0e60512326",
"52f51be9fc39e849",
"2241bb87e3791806",
"e87e17419a9dd28c"
],
"x": 94,
"y": 559,
2024-05-06 20:15:18 +00:00
"w": 1182,
"h": 142
},
{
"id": "e7814f99120a45d2",
"type": "group",
"z": "1362a4b4f08f3d5b",
"name": "entities - list entities",
"style": {
"label": true
},
"nodes": [
"fd0e7bccfabe2ee6",
"451c9ff36fe2e477",
"b940aaca8de45053",
"d4a55209a00a2850",
"090dbbbe36a15a24",
"6e172580996cd122",
"457282d09d5173fa",
"4731776cfc733e84",
"a6d607b465b7fe5e"
],
"x": 94,
2024-05-18 07:40:16 +00:00
"y": 2859,
"w": 1392,
"h": 142
},
{
"id": "087716156d7ca3c7",
"type": "group",
"z": "1362a4b4f08f3d5b",
"name": "entities - add room",
"style": {
"fill": "#6f2fa0",
"fill-opacity": "0.05",
"label": true
},
"nodes": [
"6934471d55d3dc61",
"a0738c4dddf29c0c",
"7becb48e82e41f4d",
"77618bede4cd20a4",
"0031d2f1a7c3c8ac",
"6076cbdfef84255d",
"cb1e6d4592635001",
"cf0c81d932939eeb",
"c819a68d55e52a48",
"1b7806eb440632ce",
"52c9ef8bf5d5f352",
"bbc4e7be116546f6",
"69f377a19c3aaebb"
],
"x": 94,
"y": 3039,
"w": 1112,
"h": 262
},
{
"id": "b8a64a86d3eb3506",
"type": "group",
"z": "1362a4b4f08f3d5b",
"name": "entities - delete room",
"style": {
"fill": "#6f2fa0",
"fill-opacity": "0.05",
"label": true
},
"nodes": [
"44639ce55332cbf7",
"b39e6b36efa2837a",
"28b0fb497ecfebb2",
"8e60fec05ccbd504",
"eb03f7c93f8b43a3",
"66b74056a86a68c5",
"66d2402c36529cd8",
"e665cef3b57e2e30",
"be1564c06fdecf2b",
"7b09dadab4169774",
"9804124babada246",
"dc7b00050a7d145a",
"39c9aaaef7274169",
"9b255197471d7224",
"d4606f08690adde6",
"607bdd179757b5c7",
"2e60e757450968dc",
"33a339c0afc1ba9a",
"ae105b35b7dfbc69"
],
"x": 94,
"y": 3339,
"w": 1432,
"h": 262
},
{
"id": "433d0b51637d03f5",
"type": "group",
"z": "1362a4b4f08f3d5b",
"name": "entities - export room",
"style": {
"fill": "#6f2fa0",
"fill-opacity": "0.05",
"label": true
},
"nodes": [
"a0202211b5f8a9ce",
"d24a1016b1615427",
"726ccca1e080bf6b",
"695be3c75559690b",
"b7488a10a88f20a9",
"0949b6119fa62e77",
"9606333fe00f01bb",
"5c4aa68efe456371",
"f83897b1f3c48879",
"20a79d9eeb90fda6",
"1fa905f4d19b3376",
"d2997f50cec29cce",
"6f0c74e816a70334",
"8d4d236424edbea8",
"f14ce35482fb5f06",
"087ef495d3f3bf63",
"c8ca16b97279bf5f"
],
"x": 94,
"y": 3639,
"w": 1872,
"h": 202
},
2024-05-06 20:15:18 +00:00
{
"id": "1d1b97b90e8247f3",
"type": "change",
"z": "1362a4b4f08f3d5b",
"g": "215a32642af29284",
"name": "bucket",
"rules": [
{
"t": "set",
"p": "bucket",
"pt": "msg",
"to": "entities",
2024-05-06 20:15:18 +00:00
"tot": "str"
},
{
"t": "set",
"p": "bucket",
"pt": "flow",
"to": "bucket",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 270,
"y": 60,
"wires": [
[
"7d77f0bc3fa0e695"
]
]
},
{
"id": "633ef89ae7ff3aac",
"type": "link in",
"z": "1362a4b4f08f3d5b",
"g": "215a32642af29284",
"name": "entities - bucket",
2024-05-06 20:15:18 +00:00
"links": [
"25445f5a9b787a0a"
],
"x": 135,
"y": 60,
"wires": [
[
"1d1b97b90e8247f3"
]
]
},
{
"id": "7d77f0bc3fa0e695",
"type": "link out",
"z": "1362a4b4f08f3d5b",
"g": "215a32642af29284",
"name": "entities - bucket",
2024-05-06 20:15:18 +00:00
"mode": "link",
"links": [
"035760b14c0a3455",
"595853542a4259b5",
"c94f5e94ee5a1918"
2024-05-06 20:15:18 +00:00
],
"x": 395,
"y": 60,
"wires": []
},
{
"id": "73b58c6d90a26112",
"type": "catch",
"z": "1362a4b4f08f3d5b",
"g": "3c6b51ae156a9cac",
"name": "catch error",
"scope": null,
"uncaught": false,
"x": 620,
"y": 60,
"wires": [
[
"2d538ce8ed696396"
]
]
},
{
"id": "2d538ce8ed696396",
"type": "change",
"z": "1362a4b4f08f3d5b",
"g": "3c6b51ae156a9cac",
"name": "topic",
"rules": [
{
"t": "set",
"p": "topic",
"pt": "msg",
"to": "entities",
2024-05-06 20:15:18 +00:00
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 790,
"y": 60,
"wires": [
[
"2d7299cd90641836"
]
]
},
{
"id": "2d7299cd90641836",
"type": "link out",
"z": "1362a4b4f08f3d5b",
"g": "3c6b51ae156a9cac",
"name": "catch error",
"mode": "link",
"links": [
"a52f0e788cd4dca3"
],
"x": 915,
"y": 60,
"wires": []
},
{
"id": "6c95c42a1bb0e0e8",
"type": "ui-dropdown",
"z": "1362a4b4f08f3d5b",
"g": "7a3b686f86cb9beb",
"group": "e5d4647d97841024",
"name": "bucket",
"label": "Sélectionner une pièce :",
"tooltip": "",
"order": 12,
2024-05-06 20:15:18 +00:00
"width": "6",
"height": "1",
"passthru": false,
"multiple": false,
2024-05-18 07:40:16 +00:00
"options": [
{
"label": "non assigné",
"value": "",
"type": "str"
}
],
2024-05-06 20:15:18 +00:00
"payload": "",
"topic": "bucket",
"topicType": "str",
"className": "",
"x": 1510,
2024-05-18 07:40:16 +00:00
"y": 1560,
2024-05-06 20:15:18 +00:00
"wires": [
[
"47eb8b39520f8641"
]
]
},
{
"id": "3cad0ebae9bab6a3",
"type": "delay",
"z": "1362a4b4f08f3d5b",
"g": "7a3b686f86cb9beb",
"name": "wait 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,
"x": 1530,
"y": 840,
"wires": [
[
"fcf36df06936ea4e"
]
]
},
{
"id": "4e039b1bb507cbd3",
"type": "change",
"z": "1362a4b4f08f3d5b",
"g": "7a3b686f86cb9beb",
"name": "reset",
"rules": [
{
"t": "set",
"p": "add",
"pt": "flow",
"to": "[]",
"tot": "jsonata"
},
{
"t": "set",
"p": "entity",
"pt": "msg",
"to": "{}",
"tot": "jsonata"
},
{
"t": "set",
"p": "class",
"pt": "msg",
"to": "remove",
"tot": "str"
},
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "",
"tot": "str"
},
{
"t": "delete",
"p": "bucket",
"pt": "msg"
},
{
"t": "delete",
"p": "measurement",
"pt": "msg"
},
{
"t": "delete",
"p": "field",
"pt": "msg"
2024-05-18 07:40:16 +00:00
},
{
"t": "delete",
"p": "options",
"pt": "msg"
2024-05-06 20:15:18 +00:00
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1350,
"y": 840,
2024-05-06 20:15:18 +00:00
"wires": [
[
"6c95c42a1bb0e0e8",
"fdc89ddd1aa0f14a",
"8df78aa19a0af2aa",
"72bdc2b803d56d5e",
"e3c3329221c57637",
"fbbdc47d5910770e",
"0f589b67cb910c6a",
"a85ba25677fe8dd1",
"6d4c2ec76c80126b",
"3cad0ebae9bab6a3",
"4ca6bf4176ebe985",
"c19a4a024ab45653",
2024-05-18 07:40:16 +00:00
"868f82b1a5ca2a85",
"bf39b8d1716ca963"
2024-05-06 20:15:18 +00:00
]
]
},
{
"id": "c94f5e94ee5a1918",
"type": "link in",
"z": "1362a4b4f08f3d5b",
"g": "7a3b686f86cb9beb",
"name": "entities - add entity",
2024-05-06 20:15:18 +00:00
"links": [
"21fbe912a43d9c26",
2024-05-06 20:15:18 +00:00
"7d77f0bc3fa0e695",
"fdea9ff531a587a8"
],
"x": 1015,
"y": 840,
2024-05-06 20:15:18 +00:00
"wires": [
[
"41e9885bae118005"
2024-05-06 20:15:18 +00:00
]
]
},
{
"id": "cea54c8794dd0ef6",
"type": "change",
"z": "1362a4b4f08f3d5b",
"g": "7a3b686f86cb9beb",
"name": "set",
"rules": [
{
"t": "set",
"p": "entity.id",
"pt": "msg",
"to": "payload",
"tot": "msg"
},
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "rooms",
"tot": "global"
},
{
"t": "set",
"p": "add.buckets",
"pt": "flow",
"to": "[]",
"tot": "jsonata"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 170,
2024-05-18 07:40:16 +00:00
"y": 1560,
2024-05-06 20:15:18 +00:00
"wires": [
[
"518e99798b484eac"
]
]
},
{
"id": "518e99798b484eac",
"type": "split",
"z": "1362a4b4f08f3d5b",
"g": "7a3b686f86cb9beb",
"name": "",
"splt": "\\n",
"spltType": "str",
"arraySplt": 1,
"arraySpltType": "len",
"stream": false,
"addname": "field",
"x": 330,
2024-05-18 07:40:16 +00:00
"y": 1560,
2024-05-06 20:15:18 +00:00
"wires": [
[
"a4418ab91ed4c56d"
]
]
},
{
"id": "a4418ab91ed4c56d",
"type": "change",
"z": "1362a4b4f08f3d5b",
"g": "7a3b686f86cb9beb",
"name": "add",
"rules": [
{
"t": "set",
"p": "add.buckets[msg.parts.index]",
"pt": "flow",
"to": "{\"label\":msg.field, \"value\":msg.field}",
"tot": "jsonata"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1010,
2024-05-18 07:40:16 +00:00
"y": 1560,
2024-05-06 20:15:18 +00:00
"wires": [
[
"503454da3c35d846"
]
]
},
{
"id": "503454da3c35d846",
"type": "join",
"z": "1362a4b4f08f3d5b",
"g": "7a3b686f86cb9beb",
"name": "",
"mode": "auto",
"build": "string",
"property": "payload",
"propertyType": "msg",
"key": "topic",
"joiner": "\\n",
"joinerType": "str",
"accumulate": false,
"timeout": "",
"count": "",
"reduceRight": false,
"reduceExp": "",
"reduceInit": "",
"reduceInitType": "",
"reduceFixup": "",
"x": 1170,
2024-05-18 07:40:16 +00:00
"y": 1560,
2024-05-06 20:15:18 +00:00
"wires": [
[
"deca341e91bb7f09"
]
]
},
{
"id": "deca341e91bb7f09",
"type": "change",
"z": "1362a4b4f08f3d5b",
"g": "7a3b686f86cb9beb",
"name": "options",
"rules": [
{
"t": "set",
"p": "topic",
"pt": "msg",
"to": "payload",
"tot": "msg"
},
{
"t": "set",
"p": "options",
"pt": "msg",
"to": "add.buckets",
"tot": "flow"
},
{
"t": "set",
"p": "options",
"pt": "msg",
"to": "$sort(msg.options, function($l, $r) {\t $l[0].label > $r[0].label\t})",
"tot": "jsonata"
},
2024-05-06 20:15:18 +00:00
{
"t": "set",
"p": "class",
"pt": "msg",
"to": "",
"tot": "str"
},
{
"t": "delete",
"p": "field",
"pt": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1340,
2024-05-18 07:40:16 +00:00
"y": 1560,
2024-05-06 20:15:18 +00:00
"wires": [
[
"6c95c42a1bb0e0e8"
]
]
},
{
"id": "c1a9384e4cb3acd2",
"type": "change",
"z": "1362a4b4f08f3d5b",
"g": "7a3b686f86cb9beb",
"name": "set",
"rules": [
{
"t": "set",
2024-05-18 07:40:16 +00:00
"p": "entity.option",
2024-05-06 20:15:18 +00:00
"pt": "msg",
"to": "payload",
"tot": "msg"
},
{
"t": "set",
"p": "add.measurements",
"pt": "flow",
"to": "[]",
"tot": "jsonata"
},
{
"t": "delete",
"p": "dictionnary",
"pt": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 170,
2024-05-18 07:40:16 +00:00
"y": 1140,
2024-05-06 20:15:18 +00:00
"wires": [
[
"06657762c4774a90"
]
]
},
{
"id": "9ff743b23cbe42cd",
"type": "split",
"z": "1362a4b4f08f3d5b",
"g": "7a3b686f86cb9beb",
"name": "",
"splt": "\\n",
"spltType": "str",
"arraySplt": 1,
"arraySpltType": "len",
"stream": false,
"addname": "field",
"x": 850,
2024-05-18 07:40:16 +00:00
"y": 1140,
2024-05-06 20:15:18 +00:00
"wires": [
[
"51a8b73d46163353"
]
]
},
{
"id": "51a8b73d46163353",
"type": "change",
"z": "1362a4b4f08f3d5b",
"g": "7a3b686f86cb9beb",
"name": "add",
"rules": [
{
"t": "set",
"p": "add.measurements[msg.parts.index]",
"pt": "flow",
"to": "{\"label\":msg.payload, \"value\":msg.field}",
"tot": "jsonata"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1010,
2024-05-18 07:40:16 +00:00
"y": 1140,
2024-05-06 20:15:18 +00:00
"wires": [
[
"e5cbd1d6e36b3a71"
]
]
},
{
"id": "e5cbd1d6e36b3a71",
"type": "join",
"z": "1362a4b4f08f3d5b",
"g": "7a3b686f86cb9beb",
"name": "",
"mode": "auto",
"build": "string",
"property": "payload",
"propertyType": "msg",
"key": "topic",
"joiner": "\\n",
"joinerType": "str",
"accumulate": false,
"timeout": "",
"count": "",
"reduceRight": false,
"reduceExp": "",
"reduceInit": "",
"reduceInitType": "",
"reduceFixup": "",
"x": 1170,
2024-05-18 07:40:16 +00:00
"y": 1140,
2024-05-06 20:15:18 +00:00
"wires": [
[
"60e62fd2914949fb"
]
]
},
{
"id": "60e62fd2914949fb",
"type": "change",
"z": "1362a4b4f08f3d5b",
"g": "7a3b686f86cb9beb",
"name": "options",
"rules": [
{
"t": "set",
"p": "options",
"pt": "msg",
"to": "add.measurements",
"tot": "flow"
},
{
"t": "set",
"p": "options",
"pt": "msg",
"to": "$sort(msg.options, function($l, $r) {\t $l[0].label > $r[0].label\t})",
"tot": "jsonata"
},
2024-05-06 20:15:18 +00:00
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "models[msg.entity.protocol][msg.entity.brand][msg.entity.model]measurement",
"tot": "global"
},
{
"t": "set",
"p": "class",
"pt": "msg",
"to": "",
"tot": "str"
},
{
"t": "delete",
"p": "field",
"pt": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1340,
2024-05-18 07:40:16 +00:00
"y": 1140,
2024-05-06 20:15:18 +00:00
"wires": [
[
"fdc89ddd1aa0f14a"
]
]
},
{
"id": "fdc89ddd1aa0f14a",
"type": "ui-dropdown",
"z": "1362a4b4f08f3d5b",
"g": "7a3b686f86cb9beb",
"group": "e5d4647d97841024",
"name": "measurement",
"label": "Mesure :",
"tooltip": "",
"order": 5,
2024-05-06 20:15:18 +00:00
"width": "6",
"height": "1",
"passthru": false,
"multiple": false,
2024-05-18 07:40:16 +00:00
"options": [
{
"label": "non assigné",
"value": "",
"type": "str"
}
],
2024-05-06 20:15:18 +00:00
"payload": "",
"topic": "topic",
"topicType": "msg",
"className": "",
"x": 1540,
2024-05-18 07:40:16 +00:00
"y": 1140,
2024-05-06 20:15:18 +00:00
"wires": [
[
"f2ae81bacad53d72"
]
]
},
{
"id": "8df78aa19a0af2aa",
"type": "ui-dropdown",
"z": "1362a4b4f08f3d5b",
"g": "7a3b686f86cb9beb",
"group": "e5d4647d97841024",
"name": "field",
"label": "Champs :",
"tooltip": "",
"order": 6,
2024-05-06 20:15:18 +00:00
"width": 0,
"height": 0,
"passthru": false,
"multiple": false,
2024-05-18 07:40:16 +00:00
"options": [
{
"label": "non assigné",
"value": "",
"type": "str"
}
],
2024-05-06 20:15:18 +00:00
"payload": "",
"topic": "topic",
"topicType": "msg",
"className": "",
"x": 1510,
2024-05-18 07:40:16 +00:00
"y": 1200,
2024-05-06 20:15:18 +00:00
"wires": [
[
"b866e5ea8c6f4135"
]
]
},
{
"id": "fcf36df06936ea4e",
"type": "change",
"z": "1362a4b4f08f3d5b",
"g": "7a3b686f86cb9beb",
"name": "set",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "models",
"tot": "global"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 170,
"y": 900,
"wires": [
[
"306bc174ad2aaf84"
]
]
},
{
"id": "cb2e82e3ca5ad664",
"type": "split",
"z": "1362a4b4f08f3d5b",
"g": "7a3b686f86cb9beb",
"name": "",
"splt": "\\n",
"spltType": "str",
"arraySplt": 1,
"arraySpltType": "len",
"stream": false,
"addname": "field",
"x": 330,
"y": 1020,
"wires": [
[
"540ec68bb8166067"
]
]
},
{
"id": "540ec68bb8166067",
"type": "change",
"z": "1362a4b4f08f3d5b",
"g": "7a3b686f86cb9beb",
"name": "add",
"rules": [
{
"t": "set",
"p": "add.models[msg.parts.index]",
"pt": "flow",
"to": "{\"label\":msg.field, \"value\":msg.field}",
"tot": "jsonata"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1010,
"y": 1020,
"wires": [
[
"d0fcc8358b550646"
]
]
},
{
"id": "d0fcc8358b550646",
"type": "join",
"z": "1362a4b4f08f3d5b",
"g": "7a3b686f86cb9beb",
"name": "",
"mode": "auto",
"build": "string",
"property": "payload",
"propertyType": "msg",
"key": "topic",
"joiner": "\\n",
"joinerType": "str",
"accumulate": false,
"timeout": "",
"count": "",
"reduceRight": false,
"reduceExp": "",
"reduceInit": "",
"reduceInitType": "",
"reduceFixup": "",
"x": 1170,
"y": 1020,
"wires": [
[
"1cd4711186e0eacd"
]
]
},
{
"id": "1cd4711186e0eacd",
"type": "change",
"z": "1362a4b4f08f3d5b",
"g": "7a3b686f86cb9beb",
"name": "options",
"rules": [
{
"t": "set",
"p": "options",
"pt": "msg",
"to": "add.models",
"tot": "flow"
},
{
"t": "set",
"p": "options",
"pt": "msg",
"to": "$sort(msg.options, function($l, $r) {\t $l[0].label > $r[0].label\t})",
"tot": "jsonata"
},
2024-05-06 20:15:18 +00:00
{
"t": "set",
"p": "class",
"pt": "msg",
"to": "",
"tot": "str"
},
{
"t": "delete",
"p": "field",
"pt": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1340,
"y": 1020,
"wires": [
[
"72bdc2b803d56d5e"
]
]
},
{
"id": "72bdc2b803d56d5e",
"type": "ui-dropdown",
"z": "1362a4b4f08f3d5b",
"g": "7a3b686f86cb9beb",
"group": "e5d4647d97841024",
"name": "model",
"label": "Modèle :",
"tooltip": "",
"order": 3,
2024-05-06 20:15:18 +00:00
"width": "6",
"height": "1",
"passthru": false,
"multiple": false,
2024-05-18 07:40:16 +00:00
"options": [
{
"label": "non assigné",
"value": "",
"type": "str"
}
],
2024-05-06 20:15:18 +00:00
"payload": "",
"topic": "topic",
"topicType": "msg",
"className": "",
"x": 1510,
"y": 1020,
"wires": [
[
2024-05-18 07:40:16 +00:00
"9ee5440963269d27"
2024-05-06 20:15:18 +00:00
]
]
},
{
"id": "b866e5ea8c6f4135",
"type": "change",
"z": "1362a4b4f08f3d5b",
"g": "7a3b686f86cb9beb",
"name": "set",
"rules": [
{
"t": "set",
"p": "entity.field",
"pt": "msg",
"to": "payload",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 170,
2024-05-18 07:40:16 +00:00
"y": 1260,
2024-05-06 20:15:18 +00:00
"wires": [
[
2024-05-18 07:40:16 +00:00
"4f7352e714e2f497"
2024-05-06 20:15:18 +00:00
]
]
},
{
"id": "e3c3329221c57637",
"type": "ui-text-input",
"z": "1362a4b4f08f3d5b",
"g": "7a3b686f86cb9beb",
"group": "e5d4647d97841024",
"name": "id",
"label": "Identifiant :",
"order": 11,
2024-05-06 20:15:18 +00:00
"width": "6",
"height": "1",
"topic": "topic",
"topicType": "msg",
"mode": "text",
"delay": 300,
"passthru": false,
"sendOnDelay": false,
"sendOnBlur": true,
"sendOnEnter": true,
"className": "",
"x": 1510,
2024-05-18 07:40:16 +00:00
"y": 1500,
2024-05-06 20:15:18 +00:00
"wires": [
[
"cea54c8794dd0ef6"
]
]
},
{
"id": "33428cdad37f69b9",
"type": "change",
"z": "1362a4b4f08f3d5b",
"g": "7a3b686f86cb9beb",
"name": "options",
"rules": [
{
"t": "delete",
"p": "options",
"pt": "msg"
},
{
"t": "set",
"p": "class",
"pt": "msg",
"to": "",
"tot": "str"
},
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1340,
2024-05-18 07:40:16 +00:00
"y": 1500,
2024-05-06 20:15:18 +00:00
"wires": [
[
"e3c3329221c57637"
]
]
},
{
"id": "f03da2323ee09882",
"type": "change",
"z": "1362a4b4f08f3d5b",
"g": "7a3b686f86cb9beb",
"name": "set",
"rules": [
{
"t": "set",
"p": "entity.default",
"pt": "msg",
"to": "payload",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 170,
2024-05-18 07:40:16 +00:00
"y": 1500,
2024-05-06 20:15:18 +00:00
"wires": [
[
"33428cdad37f69b9"
]
]
},
{
"id": "fbbdc47d5910770e",
"type": "ui-button",
"z": "1362a4b4f08f3d5b",
"g": "7a3b686f86cb9beb",
"group": "e5d4647d97841024",
2024-05-18 07:40:16 +00:00
"name": "add",
"label": "",
"order": 13,
2024-05-06 20:15:18 +00:00
"width": "6",
"height": "1",
"emulateClick": false,
"tooltip": "",
"color": "",
"bgcolor": "",
"className": "",
2024-05-18 07:40:16 +00:00
"icon": "plus",
2024-05-06 20:15:18 +00:00
"iconPosition": "left",
"payload": "",
"payloadType": "str",
"topic": "topic",
"topicType": "msg",
2024-05-18 07:40:16 +00:00
"x": 1510,
"y": 1620,
2024-05-06 20:15:18 +00:00
"wires": [
[
"28026a2ce29f6d72"
]
]
},
{
"id": "47eb8b39520f8641",
"type": "change",
"z": "1362a4b4f08f3d5b",
"g": "7a3b686f86cb9beb",
"name": "set",
"rules": [
{
"t": "set",
"p": "entity.bucket",
"pt": "msg",
"to": "payload",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 170,
2024-05-18 07:40:16 +00:00
"y": 1620,
2024-05-06 20:15:18 +00:00
"wires": [
[
"402d82489d297c82"
]
]
},
{
"id": "402d82489d297c82",
"type": "change",
"z": "1362a4b4f08f3d5b",
"g": "7a3b686f86cb9beb",
"name": "options",
"rules": [
{
"t": "set",
"p": "class",
"pt": "msg",
"to": "",
"tot": "str"
},
{
"t": "delete",
"p": "options",
"pt": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1340,
2024-05-18 07:40:16 +00:00
"y": 1620,
2024-05-06 20:15:18 +00:00
"wires": [
[
"fbbdc47d5910770e"
]
]
},
{
"id": "d8873ffc90a0b800",
"type": "debug",
"z": "1362a4b4f08f3d5b",
"g": "7a3b686f86cb9beb",
"name": "entities - add entity",
2024-05-06 20:15:18 +00:00
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "entity",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 910,
2024-05-18 07:40:16 +00:00
"y": 1680,
2024-05-06 20:15:18 +00:00
"wires": []
},
{
"id": "75fbca1d39c47339",
"type": "change",
"z": "1362a4b4f08f3d5b",
"g": "7a3b686f86cb9beb",
"name": "set",
"rules": [
{
"t": "set",
2024-05-18 07:40:16 +00:00
"p": "entity.field",
2024-05-06 20:15:18 +00:00
"pt": "msg",
2024-05-18 07:40:16 +00:00
"to": "msg.payload>0?msg.entity.field&' '&msg.payload:msg.entity.field",
"tot": "jsonata"
2024-05-06 20:15:18 +00:00
},
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "models[msg.entity.protocol][msg.entity.brand][msg.entity.model]default",
"tot": "global"
},
{
"t": "set",
"p": "class",
"pt": "msg",
"to": "",
"tot": "str"
},
{
"t": "delete",
"p": "options",
"pt": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 170,
2024-05-18 07:40:16 +00:00
"y": 1320,
2024-05-06 20:15:18 +00:00
"wires": [
[
"fd414e4814858c31"
]
]
},
{
"id": "374944ec7a1d4b47",
"type": "change",
"z": "1362a4b4f08f3d5b",
"g": "7a3b686f86cb9beb",
"name": "options",
"rules": [
{
"t": "set",
"p": "options",
"pt": "msg",
"to": "[0,1,2,3]",
"tot": "jsonata"
},
{
"t": "set",
"p": "class",
"pt": "msg",
"to": "",
"tot": "str"
},
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "0",
"tot": "num"
},
{
"t": "delete",
"p": "field",
"pt": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1340,
2024-05-18 07:40:16 +00:00
"y": 1080,
2024-05-06 20:15:18 +00:00
"wires": [
[
"6d4c2ec76c80126b"
]
]
},
{
"id": "306bc174ad2aaf84",
"type": "split",
"z": "1362a4b4f08f3d5b",
"g": "7a3b686f86cb9beb",
"name": "",
"splt": "\\n",
"spltType": "str",
"arraySplt": 1,
"arraySpltType": "len",
"stream": false,
"addname": "field",
"x": 330,
"y": 900,
"wires": [
[
"04d40482183bc373"
]
]
},
{
"id": "04d40482183bc373",
"type": "change",
"z": "1362a4b4f08f3d5b",
"g": "7a3b686f86cb9beb",
"name": "add",
"rules": [
{
"t": "set",
"p": "add.protocols[msg.parts.index]",
"pt": "flow",
"to": "{\"label\":msg.field, \"value\":msg.field}",
"tot": "jsonata"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1010,
"y": 900,
"wires": [
[
"8bf7263e2c4b2732"
]
]
},
{
"id": "8bf7263e2c4b2732",
"type": "join",
"z": "1362a4b4f08f3d5b",
"g": "7a3b686f86cb9beb",
"name": "",
"mode": "auto",
"build": "string",
"property": "payload",
"propertyType": "msg",
"key": "topic",
"joiner": "\\n",
"joinerType": "str",
"accumulate": false,
"timeout": "",
"count": "",
"reduceRight": false,
"reduceExp": "",
"reduceInit": "",
"reduceInitType": "",
"reduceFixup": "",
"x": 1170,
"y": 900,
"wires": [
[
"de8190cc7acf1ab9"
]
]
},
{
"id": "de8190cc7acf1ab9",
"type": "change",
"z": "1362a4b4f08f3d5b",
"g": "7a3b686f86cb9beb",
"name": "options",
"rules": [
{
"t": "set",
"p": "options",
"pt": "msg",
"to": "add.protocols",
"tot": "flow"
},
{
"t": "set",
"p": "options",
"pt": "msg",
"to": "$sort(msg.options, function($l, $r) {\t $l[0].label > $r[0].label\t})",
"tot": "jsonata"
},
{
"t": "set",
"p": "options",
"pt": "msg",
"to": "$append(msg.options,[{'label':'» recharger','value':''}])",
"tot": "jsonata"
},
2024-05-06 20:15:18 +00:00
{
"t": "set",
"p": "class",
"pt": "msg",
"to": "",
"tot": "str"
},
{
"t": "delete",
"p": "field",
"pt": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1340,
"y": 900,
"wires": [
[
"0f589b67cb910c6a"
]
]
},
{
"id": "0f589b67cb910c6a",
"type": "ui-dropdown",
"z": "1362a4b4f08f3d5b",
"g": "7a3b686f86cb9beb",
"group": "e5d4647d97841024",
"name": "protocol",
"label": "Protocole :",
"tooltip": "",
"order": 1,
2024-05-06 20:15:18 +00:00
"width": "6",
"height": "1",
"passthru": false,
"multiple": false,
2024-05-18 07:40:16 +00:00
"options": [
{
"label": "» recharger",
2024-05-18 07:40:16 +00:00
"value": "",
"type": "str"
}
],
2024-05-06 20:15:18 +00:00
"payload": "",
"topic": "topic",
"topicType": "msg",
"className": "",
"x": 1520,
"y": 900,
"wires": [
[
"e7c533a4825e3889"
2024-05-06 20:15:18 +00:00
]
]
},
{
"id": "68d2962c711d3dd3",
"type": "split",
"z": "1362a4b4f08f3d5b",
"g": "7a3b686f86cb9beb",
"name": "",
"splt": "\\n",
"spltType": "str",
"arraySplt": 1,
"arraySpltType": "len",
"stream": false,
"addname": "field",
"x": 330,
"y": 960,
"wires": [
[
"fb5f4b43f105eeee"
]
]
},
{
"id": "fb5f4b43f105eeee",
"type": "change",
"z": "1362a4b4f08f3d5b",
"g": "7a3b686f86cb9beb",
"name": "add",
"rules": [
{
"t": "set",
"p": "add.brands[msg.parts.index]",
"pt": "flow",
"to": "{\"label\":msg.field, \"value\":msg.field}",
"tot": "jsonata"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1010,
"y": 960,
"wires": [
[
"c7337b13965771ee"
]
]
},
{
"id": "c7337b13965771ee",
"type": "join",
"z": "1362a4b4f08f3d5b",
"g": "7a3b686f86cb9beb",
"name": "",
"mode": "auto",
"build": "string",
"property": "payload",
"propertyType": "msg",
"key": "topic",
"joiner": "\\n",
"joinerType": "str",
"accumulate": false,
"timeout": "",
"count": "",
"reduceRight": false,
"reduceExp": "",
"reduceInit": "",
"reduceInitType": "",
"reduceFixup": "",
"x": 1170,
"y": 960,
"wires": [
[
"82128d17e64350cb"
]
]
},
{
"id": "82128d17e64350cb",
"type": "change",
"z": "1362a4b4f08f3d5b",
"g": "7a3b686f86cb9beb",
"name": "options",
"rules": [
{
"t": "set",
"p": "options",
"pt": "msg",
"to": "add.brands",
"tot": "flow"
},
{
"t": "set",
"p": "options",
"pt": "msg",
"to": "$sort(msg.options, function($l, $r) {\t $l[0].label > $r[0].label\t})",
"tot": "jsonata"
},
2024-05-06 20:15:18 +00:00
{
"t": "set",
"p": "class",
"pt": "msg",
"to": "",
"tot": "str"
},
{
"t": "delete",
"p": "field",
"pt": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1340,
"y": 960,
"wires": [
[
"a85ba25677fe8dd1"
]
]
},
{
"id": "a85ba25677fe8dd1",
"type": "ui-dropdown",
"z": "1362a4b4f08f3d5b",
"g": "7a3b686f86cb9beb",
"group": "e5d4647d97841024",
"name": "brand",
"label": "Marque :",
"tooltip": "",
"order": 2,
2024-05-06 20:15:18 +00:00
"width": "6",
"height": "1",
"passthru": false,
"multiple": false,
2024-05-18 07:40:16 +00:00
"options": [
{
"label": "non assigné",
"value": "",
"type": "str"
}
],
2024-05-06 20:15:18 +00:00
"payload": "",
"topic": "topic",
"topicType": "msg",
"className": "",
"x": 1510,
"y": 960,
"wires": [
[
"36cdeec08c7a3dd8"
]
]
},
{
"id": "d9f51facbcafa156",
"type": "change",
"z": "1362a4b4f08f3d5b",
"g": "7a3b686f86cb9beb",
"name": "set",
"rules": [
{
"t": "set",
"p": "entity.protocol",
"pt": "msg",
"to": "payload",
"tot": "msg"
},
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "models[msg.entity.protocol]",
"tot": "global"
},
{
"t": "set",
"p": "add.protocols",
"pt": "flow",
"to": "[]",
"tot": "jsonata"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 170,
"y": 960,
"wires": [
[
"68d2962c711d3dd3"
]
]
},
{
"id": "36cdeec08c7a3dd8",
"type": "change",
"z": "1362a4b4f08f3d5b",
"g": "7a3b686f86cb9beb",
"name": "set",
"rules": [
{
"t": "set",
"p": "entity.brand",
"pt": "msg",
"to": "payload",
"tot": "msg"
},
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "models[msg.entity.protocol][msg.entity.brand]",
"tot": "global"
},
{
"t": "set",
"p": "add.brands",
"pt": "flow",
"to": "[]",
"tot": "jsonata"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 170,
"y": 1020,
"wires": [
[
"cb2e82e3ca5ad664"
]
]
},
{
"id": "6d4c2ec76c80126b",
"type": "ui-dropdown",
"z": "1362a4b4f08f3d5b",
"g": "7a3b686f86cb9beb",
"group": "e5d4647d97841024",
"name": "options",
"label": "Variante :",
"tooltip": "",
"order": 4,
2024-05-06 20:15:18 +00:00
"width": "6",
"height": "1",
"passthru": false,
"multiple": false,
"options": [
{
"label": "0",
"value": "0",
"type": "str"
},
{
"label": "1",
"value": "1",
"type": "str"
},
{
"label": "2",
"value": "2",
"type": "str"
},
{
"label": "3",
"value": "3",
"type": "str"
}
],
"payload": "",
"topic": "topic",
"topicType": "msg",
"className": "",
"x": 1520,
2024-05-18 07:40:16 +00:00
"y": 1080,
2024-05-06 20:15:18 +00:00
"wires": [
[
2024-05-18 07:40:16 +00:00
"c1a9384e4cb3acd2"
2024-05-06 20:15:18 +00:00
]
]
},
{
"id": "fdea9ff531a587a8",
"type": "link out",
"z": "1362a4b4f08f3d5b",
"g": "7a3b686f86cb9beb",
"name": "entities - add entity",
2024-05-06 20:15:18 +00:00
"mode": "link",
"links": [
"035760b14c0a3455",
"206c1fb4a48067df",
"595853542a4259b5",
2024-05-06 20:15:18 +00:00
"7c98833082d48029",
"c94f5e94ee5a1918"
2024-05-06 20:15:18 +00:00
],
"x": 835,
2024-05-18 07:40:16 +00:00
"y": 1760,
2024-05-06 20:15:18 +00:00
"wires": []
},
{
"id": "b09d639af149c549",
"type": "change",
"z": "1362a4b4f08f3d5b",
"g": "7a3b686f86cb9beb",
"name": "to global",
"rules": [
{
"t": "set",
"p": "entities[msg.md5]",
"pt": "global",
"to": "entity",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 440,
2024-05-18 07:40:16 +00:00
"y": 1680,
2024-05-06 20:15:18 +00:00
"wires": [
[
"e82029e6586f9f7e"
]
]
},
{
"id": "e82029e6586f9f7e",
"type": "change",
"z": "1362a4b4f08f3d5b",
"g": "7a3b686f86cb9beb",
"name": "set notification metric",
2024-05-06 20:15:18 +00:00
"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"
},
2024-05-06 20:15:18 +00:00
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "Entité ajouté",
"tot": "str"
},
{
"t": "set",
"p": "repeat",
"pt": "msg",
"to": "true",
"tot": "bool"
2024-05-06 20:15:18 +00:00
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 660,
2024-05-18 07:40:16 +00:00
"y": 1680,
2024-05-06 20:15:18 +00:00
"wires": [
[
"fdea9ff531a587a8",
"d8873ffc90a0b800"
]
]
},
{
"id": "c622c7d8b085a6d6",
"type": "link in",
"z": "1362a4b4f08f3d5b",
"g": "4aa11d03f1b394a5",
"name": "entities - boot entities",
2024-05-06 20:15:18 +00:00
"links": [
"25445f5a9b787a0a"
],
"x": 135,
"y": 300,
"wires": [
[
"25579c2b6bf10a53"
]
]
},
{
"id": "25579c2b6bf10a53",
"type": "change",
"z": "1362a4b4f08f3d5b",
"g": "4aa11d03f1b394a5",
2024-07-21 19:34:43 +00:00
"name": "get entities from global",
2024-05-06 20:15:18 +00:00
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "entities",
"tot": "global"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
2024-07-21 19:34:43 +00:00
"x": 440,
2024-05-06 20:15:18 +00:00
"y": 300,
"wires": [
[
"03f2f5c00addae38"
]
]
},
{
"id": "03f2f5c00addae38",
"type": "split",
"z": "1362a4b4f08f3d5b",
"g": "4aa11d03f1b394a5",
"name": "md5",
"splt": "\\n",
"spltType": "str",
"arraySplt": 1,
"arraySpltType": "len",
"stream": false,
"addname": "",
2024-07-21 19:34:43 +00:00
"x": 650,
2024-05-06 20:15:18 +00:00
"y": 300,
"wires": [
[
"1fe7191fde26e8cb"
]
]
},
{
"id": "316e053ce43b8176",
"type": "debug",
"z": "1362a4b4f08f3d5b",
"g": "4aa11d03f1b394a5",
"name": "entities - boot entities",
"active": false,
2024-05-06 20:15:18 +00:00
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
2024-07-21 19:34:43 +00:00
"x": 1040,
2024-05-06 20:15:18 +00:00
"y": 240,
"wires": []
},
{
"id": "1fe7191fde26e8cb",
"type": "function",
"z": "1362a4b4f08f3d5b",
"g": "4aa11d03f1b394a5",
"name": "set device",
"func": "var msg = msg;\nvar newmsg = {};\n\nnewmsg = msg.payload;\n\nreturn newmsg;",
"outputs": 1,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
2024-07-21 19:34:43 +00:00
"x": 820,
2024-05-06 20:15:18 +00:00
"y": 300,
"wires": [
[
"a8759eb49d4d47f1",
"316e053ce43b8176"
]
]
},
{
"id": "a8759eb49d4d47f1",
"type": "link out",
"z": "1362a4b4f08f3d5b",
"g": "4aa11d03f1b394a5",
"name": "entities - boot entities",
2024-05-06 20:15:18 +00:00
"mode": "link",
"links": [
"d85fe6335a6eae7b"
],
2024-07-21 19:34:43 +00:00
"x": 955,
2024-05-06 20:15:18 +00:00
"y": 300,
"wires": []
},
{
"id": "035760b14c0a3455",
"type": "link in",
"z": "1362a4b4f08f3d5b",
"g": "d163a291da272610",
"name": "entities - delete entity",
2024-05-06 20:15:18 +00:00
"links": [
"1d9d8c969ccdf2be",
2024-05-06 20:15:18 +00:00
"72f3d70342e83655",
"7d77f0bc3fa0e695",
"fdea9ff531a587a8"
2024-05-06 20:15:18 +00:00
],
2024-05-07 23:17:47 +00:00
"x": 1895,
2024-05-18 07:40:16 +00:00
"y": 1940,
2024-05-06 20:15:18 +00:00
"wires": [
[
"ccc2df3ce92c67ad"
]
]
},
{
"id": "c115ad43edc89efe",
"type": "split",
"z": "1362a4b4f08f3d5b",
"g": "d163a291da272610",
"name": "",
"splt": "\\n",
"spltType": "str",
"arraySplt": 1,
"arraySpltType": "len",
"stream": false,
"addname": "",
"x": 370,
2024-05-18 07:40:16 +00:00
"y": 2000,
2024-05-06 20:15:18 +00:00
"wires": [
[
"6964c9772d7bc5d6"
]
]
},
{
"id": "e941b40b953cddbc",
"type": "change",
"z": "1362a4b4f08f3d5b",
"g": "d163a291da272610",
"name": "from global",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "entities",
"tot": "global"
},
{
"t": "set",
"p": "delete.list",
"pt": "flow",
"to": "{}",
"tot": "jsonata"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 190,
2024-05-18 07:40:16 +00:00
"y": 2000,
2024-05-06 20:15:18 +00:00
"wires": [
[
"c115ad43edc89efe"
]
]
},
{
"id": "6964c9772d7bc5d6",
"type": "change",
"z": "1362a4b4f08f3d5b",
"g": "d163a291da272610",
"name": "add",
"rules": [
{
"t": "set",
"p": "delete.list[msg.payload.bucket][msg.parts.index]",
"pt": "flow",
"to": "payload",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
2024-05-07 23:17:47 +00:00
"x": 1690,
2024-05-18 07:40:16 +00:00
"y": 2000,
2024-05-06 20:15:18 +00:00
"wires": [
[
"7fbf24f2a6bb7f36"
]
]
},
{
"id": "7fbf24f2a6bb7f36",
"type": "join",
"z": "1362a4b4f08f3d5b",
"g": "d163a291da272610",
"name": "",
"mode": "auto",
"build": "object",
"property": "payload",
"propertyType": "msg",
"key": "topic",
"joiner": "\\n",
"joinerType": "str",
"accumulate": "false",
"timeout": "",
"count": "",
"reduceRight": false,
2024-05-07 23:17:47 +00:00
"x": 1850,
2024-05-18 07:40:16 +00:00
"y": 2000,
2024-05-06 20:15:18 +00:00
"wires": [
[
"2936ec4c8c8ab565"
]
]
},
{
"id": "2b222d433afe409d",
"type": "change",
"z": "1362a4b4f08f3d5b",
"g": "d163a291da272610",
"name": "from flow",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "delete.list",
"tot": "flow"
},
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "$keys(msg.payload)",
"tot": "jsonata"
},
{
"t": "set",
"p": "delete.options",
"pt": "flow",
"to": "[]",
"tot": "jsonata"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 180,
2024-05-18 07:40:16 +00:00
"y": 2060,
2024-05-06 20:15:18 +00:00
"wires": [
[
"d8de448ed73f17d3"
]
]
},
{
"id": "eb935fa8155701e2",
"type": "ui-dropdown",
"z": "1362a4b4f08f3d5b",
"g": "d163a291da272610",
"group": "bb1749d6bdee813d",
"name": "bucket",
"label": "Pièce :",
"tooltip": "",
"order": 1,
2024-05-06 20:15:18 +00:00
"width": "6",
"height": "1",
"passthru": false,
"multiple": false,
2024-05-18 07:40:16 +00:00
"options": [
{
"label": "» recharger",
2024-05-18 07:40:16 +00:00
"value": "",
"type": "str"
}
],
2024-05-06 20:15:18 +00:00
"payload": "",
"topic": "topic",
"topicType": "msg",
"className": "",
2024-05-07 23:17:47 +00:00
"x": 2190,
2024-05-18 07:40:16 +00:00
"y": 2060,
2024-05-06 20:15:18 +00:00
"wires": [
[
"389909b07238cc3a"
2024-05-06 20:15:18 +00:00
]
]
},
{
"id": "ceffdbc65f225ed5",
"type": "change",
"z": "1362a4b4f08f3d5b",
"g": "d163a291da272610",
"name": "from flow",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "delete.list[msg.payload]",
"tot": "flow"
},
{
"t": "set",
"p": "delete.md5",
"pt": "flow",
"to": "[]",
"tot": "jsonata"
2024-05-07 23:17:47 +00:00
},
{
"t": "set",
"p": "index",
"pt": "flow",
"to": "0",
"tot": "num"
2024-05-06 20:15:18 +00:00
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 180,
2024-05-18 07:40:16 +00:00
"y": 2120,
2024-05-06 20:15:18 +00:00
"wires": [
[
"4a6b620a1d208d7e"
]
]
},
{
"id": "2936ec4c8c8ab565",
"type": "delay",
"z": "1362a4b4f08f3d5b",
"g": "d163a291da272610",
"name": "wait 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-05-07 23:17:47 +00:00
"x": 2210,
2024-05-18 07:40:16 +00:00
"y": 2000,
2024-05-06 20:15:18 +00:00
"wires": [
[
"2b222d433afe409d"
]
]
},
{
"id": "d8de448ed73f17d3",
"type": "split",
"z": "1362a4b4f08f3d5b",
"g": "d163a291da272610",
"name": "",
"splt": "\\n",
"spltType": "str",
"arraySplt": 1,
"arraySpltType": "len",
"stream": false,
"addname": "",
2024-05-07 23:17:47 +00:00
"x": 370,
2024-05-18 07:40:16 +00:00
"y": 2060,
2024-05-06 20:15:18 +00:00
"wires": [
[
"91ba1b199e91916c"
]
]
},
{
"id": "91ba1b199e91916c",
"type": "change",
"z": "1362a4b4f08f3d5b",
"g": "d163a291da272610",
"name": "add",
"rules": [
{
"t": "set",
"p": "delete.options[msg.parts.index]",
"pt": "flow",
"to": "{\t 'label':msg.payload,\t 'value':msg.payload\t}",
"tot": "jsonata"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
2024-05-07 23:17:47 +00:00
"x": 1690,
2024-05-18 07:40:16 +00:00
"y": 2060,
2024-05-06 20:15:18 +00:00
"wires": [
[
"82150d4178a42162"
]
]
},
{
"id": "82150d4178a42162",
"type": "join",
"z": "1362a4b4f08f3d5b",
"g": "d163a291da272610",
"name": "",
"mode": "auto",
"build": "object",
"property": "payload",
"propertyType": "msg",
"key": "topic",
"joiner": "\\n",
"joinerType": "str",
"accumulate": "false",
"timeout": "",
"count": "",
"reduceRight": false,
2024-05-07 23:17:47 +00:00
"x": 1850,
2024-05-18 07:40:16 +00:00
"y": 2060,
2024-05-06 20:15:18 +00:00
"wires": [
[
"6155deee9e0c160b"
]
]
},
{
"id": "6155deee9e0c160b",
"type": "change",
"z": "1362a4b4f08f3d5b",
"g": "d163a291da272610",
"name": "options",
"rules": [
{
"t": "set",
"p": "options",
"pt": "msg",
"to": "delete.options",
"tot": "flow"
},
{
"t": "set",
"p": "options",
"pt": "msg",
"to": "$sort(msg.options, function($l, $r) {\t $l[0].label > $r[0].label\t})",
"tot": "jsonata"
},
{
"t": "set",
"p": "options",
"pt": "msg",
"to": "$append(msg.options,[{'label':'» recharger','value':''}])",
"tot": "jsonata"
},
2024-05-06 20:15:18 +00:00
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "",
"tot": "str"
},
{
"t": "set",
"p": "class",
"pt": "msg",
"to": "",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
2024-05-07 23:17:47 +00:00
"x": 2020,
2024-05-18 07:40:16 +00:00
"y": 2060,
2024-05-06 20:15:18 +00:00
"wires": [
[
"eb935fa8155701e2"
]
]
},
{
"id": "4a6b620a1d208d7e",
"type": "split",
"z": "1362a4b4f08f3d5b",
"g": "d163a291da272610",
"name": "",
"splt": "\\n",
"spltType": "str",
"arraySplt": 1,
"arraySpltType": "len",
"stream": false,
"addname": "",
"x": 350,
2024-05-18 07:40:16 +00:00
"y": 2120,
2024-05-06 20:15:18 +00:00
"wires": [
[
2024-05-07 23:17:47 +00:00
"30ccf1e79a8c842a"
2024-05-06 20:15:18 +00:00
]
]
},
{
"id": "21beb0360e865da3",
"type": "change",
"z": "1362a4b4f08f3d5b",
"g": "d163a291da272610",
"name": "add",
"rules": [
{
"t": "set",
2024-05-07 23:17:47 +00:00
"p": "delete_md5",
"pt": "msg",
"to": "delete.md5",
"tot": "flow"
},
{
"t": "set",
"p": "delete.md5",
2024-05-06 20:15:18 +00:00
"pt": "flow",
2024-05-07 23:17:47 +00:00
"to": "$append(msg.delete_md5,{\t 'label':msg.trans&' '&msg.measurement&' / '&msg.payload.brand&' '&msg.payload.model&' / '&msg.payload.protocol&' '&msg.payload.id,\t 'value':msg.md5\t})",
2024-05-06 20:15:18 +00:00
"tot": "jsonata"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
2024-05-07 23:17:47 +00:00
"x": 1690,
2024-05-18 07:40:16 +00:00
"y": 2180,
2024-05-06 20:15:18 +00:00
"wires": [
[
"ee4607a9074fe742"
]
]
},
{
"id": "29d27126cf3ba304",
"type": "change",
"z": "1362a4b4f08f3d5b",
"g": "d163a291da272610",
"name": "options",
"rules": [
{
"t": "set",
"p": "options",
"pt": "msg",
"to": "delete.md5",
"tot": "flow"
},
{
"t": "set",
"p": "options",
"pt": "msg",
"to": "$sort(msg.options, function($l, $r) {\t $l[0].label > $r[0].label\t})",
"tot": "jsonata"
},
2024-05-06 20:15:18 +00:00
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "",
"tot": "str"
},
{
"t": "set",
"p": "class",
"pt": "msg",
"to": "",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
2024-05-07 23:17:47 +00:00
"x": 2020,
2024-05-18 07:40:16 +00:00
"y": 2120,
2024-05-06 20:15:18 +00:00
"wires": [
[
"cd5b164b7ad4bb78"
]
]
},
{
"id": "ee4607a9074fe742",
"type": "join",
"z": "1362a4b4f08f3d5b",
"g": "d163a291da272610",
"name": "",
"mode": "auto",
"build": "object",
"property": "payload",
"propertyType": "msg",
"key": "topic",
"joiner": "\\n",
"joinerType": "str",
"accumulate": true,
"timeout": "",
"count": "",
"reduceRight": false,
"reduceExp": "",
"reduceInit": "",
"reduceInitType": "",
"reduceFixup": "",
2024-05-07 23:17:47 +00:00
"x": 1850,
2024-05-18 07:40:16 +00:00
"y": 2120,
2024-05-06 20:15:18 +00:00
"wires": [
[
"29d27126cf3ba304"
]
]
},
{
"id": "cd5b164b7ad4bb78",
"type": "ui-dropdown",
"z": "1362a4b4f08f3d5b",
"g": "d163a291da272610",
"group": "bb1749d6bdee813d",
"name": "id",
"label": "ID :",
"tooltip": "",
"order": 2,
2024-05-06 20:15:18 +00:00
"width": "6",
"height": "1",
"passthru": false,
"multiple": false,
"options": [
{
2024-05-18 07:40:16 +00:00
"label": "non assigné",
2024-05-06 20:15:18 +00:00
"value": "",
"type": "str"
}
],
"payload": "",
"topic": "topic",
"topicType": "msg",
"className": "",
2024-05-07 23:17:47 +00:00
"x": 2190,
2024-05-18 07:40:16 +00:00
"y": 2120,
2024-05-06 20:15:18 +00:00
"wires": [
[
"015f0472776f11b7"
]
]
},
{
"id": "ccc2df3ce92c67ad",
"type": "change",
"z": "1362a4b4f08f3d5b",
"g": "d163a291da272610",
"name": "reset",
"rules": [
{
"t": "set",
"p": "delete",
"pt": "flow",
"to": "{}",
"tot": "jsonata"
},
{
"t": "set",
"p": "class",
"pt": "msg",
"to": "remove",
"tot": "str"
},
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "",
"tot": "str"
},
{
"t": "delete",
"p": "bucket",
"pt": "msg"
},
{
"t": "delete",
"p": "measurement",
"pt": "msg"
},
{
"t": "delete",
"p": "field",
"pt": "msg"
},
{
"t": "delete",
"p": "entity",
"pt": "msg"
2024-05-18 07:40:16 +00:00
},
{
"t": "delete",
"p": "options",
"pt": "msg"
2024-05-06 20:15:18 +00:00
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
2024-05-07 23:17:47 +00:00
"x": 2030,
2024-05-18 07:40:16 +00:00
"y": 1940,
2024-05-06 20:15:18 +00:00
"wires": [
[
"eb935fa8155701e2",
"cd5b164b7ad4bb78",
"8fe577cea4ac48fa",
"cad2fc584c39df0f"
]
]
},
{
"id": "8fe577cea4ac48fa",
"type": "delay",
"z": "1362a4b4f08f3d5b",
"g": "d163a291da272610",
"name": "wait 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-05-07 23:17:47 +00:00
"x": 2210,
2024-05-18 07:40:16 +00:00
"y": 1940,
2024-05-06 20:15:18 +00:00
"wires": [
[
"e941b40b953cddbc"
]
]
},
{
"id": "cad2fc584c39df0f",
"type": "ui-button",
"z": "1362a4b4f08f3d5b",
"g": "d163a291da272610",
"group": "bb1749d6bdee813d",
2024-05-18 07:40:16 +00:00
"name": "delete",
"label": "",
"order": 3,
2024-05-06 20:15:18 +00:00
"width": "6",
"height": "1",
"emulateClick": false,
"tooltip": "",
"color": "",
"bgcolor": "",
"className": "",
2024-05-18 07:40:16 +00:00
"icon": "close",
2024-05-06 20:15:18 +00:00
"iconPosition": "left",
"payload": "",
"payloadType": "str",
"topic": "topic",
"topicType": "msg",
2024-05-18 07:40:16 +00:00
"x": 2190,
"y": 2180,
2024-05-06 20:15:18 +00:00
"wires": [
[
"471f98e80f09e7fc"
]
]
},
{
"id": "015f0472776f11b7",
"type": "change",
"z": "1362a4b4f08f3d5b",
"g": "d163a291da272610",
"name": "options",
"rules": [
{
"t": "set",
"p": "md5",
"pt": "msg",
"to": "payload",
"tot": "msg"
},
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "",
"tot": "str"
},
{
"t": "set",
"p": "class",
"pt": "msg",
"to": "",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
2024-05-07 23:17:47 +00:00
"x": 2020,
2024-05-18 07:40:16 +00:00
"y": 2180,
2024-05-06 20:15:18 +00:00
"wires": [
[
"cad2fc584c39df0f"
]
]
},
{
"id": "e7ffcd836be34681",
"type": "change",
"z": "1362a4b4f08f3d5b",
"g": "d163a291da272610",
"name": "set notification metric",
2024-05-06 20:15:18 +00:00
"rules": [
{
"t": "set",
2024-05-18 07:40:16 +00:00
"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"
},
2024-05-06 20:15:18 +00:00
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "Entitée supprimée",
2024-05-06 20:15:18 +00:00
"tot": "str"
},
{
"t": "set",
"p": "repeat",
"pt": "msg",
"to": "true",
"tot": "bool"
2024-05-06 20:15:18 +00:00
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 680,
2024-05-18 07:40:16 +00:00
"y": 2420,
2024-05-06 20:15:18 +00:00
"wires": [
[
"c4df794af04292af",
"72f3d70342e83655"
]
]
},
{
"id": "72f3d70342e83655",
"type": "link out",
"z": "1362a4b4f08f3d5b",
"g": "d163a291da272610",
"name": "entities - delete entity",
2024-05-06 20:15:18 +00:00
"mode": "link",
"links": [
"035760b14c0a3455",
"206c1fb4a48067df",
"595853542a4259b5",
"7c98833082d48029"
2024-05-06 20:15:18 +00:00
],
"x": 855,
2024-05-18 07:40:16 +00:00
"y": 2480,
2024-05-06 20:15:18 +00:00
"wires": []
},
{
"id": "c4df794af04292af",
"type": "debug",
"z": "1362a4b4f08f3d5b",
"g": "d163a291da272610",
"name": "entities - delete entity",
2024-05-06 20:15:18 +00:00
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "entity",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 940,
2024-05-18 07:40:16 +00:00
"y": 2420,
2024-05-06 20:15:18 +00:00
"wires": []
},
{
"id": "3fe28ab3d007c572",
"type": "delay",
"z": "1362a4b4f08f3d5b",
"g": "d163a291da272610",
"name": "wait 150 ms",
"pauseType": "delay",
"timeout": "150",
"timeoutUnits": "milliseconds",
"rate": "1",
"nbRateUnits": "1",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": false,
"allowrate": false,
"outputs": 1,
"x": 450,
2024-05-18 07:40:16 +00:00
"y": 2420,
2024-05-06 20:15:18 +00:00
"wires": [
[
"e7ffcd836be34681"
]
]
},
{
"id": "662c49c88089f00f",
"type": "change",
"z": "1362a4b4f08f3d5b",
"g": "d163a291da272610",
"name": "trans",
"rules": [
{
"t": "set",
"p": "field",
"pt": "msg",
"to": "payload.measurement",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
2024-05-07 23:17:47 +00:00
"x": 930,
2024-05-18 07:40:16 +00:00
"y": 2180,
2024-05-06 20:15:18 +00:00
"wires": [
[
"b40e12a183af125b"
]
]
},
{
"id": "b40e12a183af125b",
"type": "link call",
"z": "1362a4b4f08f3d5b",
"g": "d163a291da272610",
"name": "",
"links": [
"df0e4ab2e1efc286"
],
"linkType": "static",
"timeout": "30",
2024-05-07 23:17:47 +00:00
"x": 1120,
2024-05-18 07:40:16 +00:00
"y": 2180,
2024-05-06 20:15:18 +00:00
"wires": [
[
"b9356dbf87d93bc5"
]
]
},
{
"id": "b9356dbf87d93bc5",
"type": "change",
"z": "1362a4b4f08f3d5b",
"g": "d163a291da272610",
"name": "trans",
"rules": [
{
"t": "set",
"p": "measurement",
"pt": "msg",
"to": "trans",
"tot": "msg"
},
{
"t": "set",
"p": "field",
"pt": "msg",
"to": "payload.field",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
2024-05-07 23:17:47 +00:00
"x": 1310,
2024-05-18 07:40:16 +00:00
"y": 2180,
2024-05-06 20:15:18 +00:00
"wires": [
[
"b85e06a6ce56c496"
]
]
},
{
"id": "b85e06a6ce56c496",
"type": "link call",
"z": "1362a4b4f08f3d5b",
"g": "d163a291da272610",
"name": "",
"links": [
"df0e4ab2e1efc286"
],
"linkType": "static",
"timeout": "30",
2024-05-07 23:17:47 +00:00
"x": 1500,
2024-05-18 07:40:16 +00:00
"y": 2180,
2024-05-06 20:15:18 +00:00
"wires": [
[
"21beb0360e865da3"
]
]
},
{
"id": "8c9e51e853c941fe",
"type": "inject",
"z": "1362a4b4f08f3d5b",
"g": "4aa11d03f1b394a5",
"name": "reload entities",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
2024-07-21 19:34:43 +00:00
"x": 210,
2024-05-06 20:15:18 +00:00
"y": 240,
"wires": [
[
"25579c2b6bf10a53"
]
]
},
{
"id": "471f98e80f09e7fc",
"type": "change",
"z": "1362a4b4f08f3d5b",
"g": "d163a291da272610",
"name": "get entity from global",
"rules": [
{
"t": "set",
"p": "entity",
"pt": "msg",
"to": "entities[msg.md5]",
"tot": "global"
},
{
"t": "set",
"p": "entity.subid",
"pt": "msg",
"to": "msg.entity.id&'.'&msg.entity.option",
"tot": "jsonata"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 220,
2024-05-18 07:40:16 +00:00
"y": 2240,
2024-05-06 20:15:18 +00:00
"wires": [
[
"6ed2ba39d2ad3830",
"1723a88c57edd93a",
"d0602834860e1ad6",
"3fe28ab3d007c572"
]
]
},
{
"id": "d0602834860e1ad6",
"type": "change",
"z": "1362a4b4f08f3d5b",
"g": "d163a291da272610",
"name": "get devices from global",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "devices",
"tot": "global"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 490,
2024-05-18 07:40:16 +00:00
"y": 2360,
2024-05-06 20:15:18 +00:00
"wires": [
[
"ba6f0526fb7931c1"
]
]
},
{
"id": "1723a88c57edd93a",
"type": "change",
"z": "1362a4b4f08f3d5b",
"g": "d163a291da272610",
"name": "get protocols from global",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "protocols",
"tot": "global"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 490,
2024-05-18 07:40:16 +00:00
"y": 2300,
2024-05-06 20:15:18 +00:00
"wires": [
[
"723dec470a8f2678"
]
]
},
{
"id": "723dec470a8f2678",
"type": "split",
"z": "1362a4b4f08f3d5b",
"g": "d163a291da272610",
"name": "split by protocol",
"splt": "\\n",
"spltType": "str",
"arraySplt": 1,
"arraySpltType": "len",
"stream": false,
"addname": "protocol",
"x": 740,
2024-05-18 07:40:16 +00:00
"y": 2300,
2024-05-06 20:15:18 +00:00
"wires": [
[
"85c927dcf9dfd8d6"
]
]
},
{
"id": "85c927dcf9dfd8d6",
"type": "split",
"z": "1362a4b4f08f3d5b",
"g": "d163a291da272610",
"name": "split by id or subid",
"splt": "\\n",
"spltType": "str",
"arraySplt": 1,
"arraySpltType": "len",
"stream": false,
"addname": "id",
"x": 970,
2024-05-18 07:40:16 +00:00
"y": 2300,
2024-05-06 20:15:18 +00:00
"wires": [
[
"890c995bc0b1bf4b"
]
]
},
{
"id": "890c995bc0b1bf4b",
"type": "switch",
"z": "1362a4b4f08f3d5b",
"g": "d163a291da272610",
"name": "check bucket",
"property": "payload.bucket",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "entity.bucket",
"vt": "msg"
}
],
"checkall": "false",
"repair": false,
"outputs": 1,
"x": 1190,
2024-05-18 07:40:16 +00:00
"y": 2300,
2024-05-06 20:15:18 +00:00
"wires": [
[
"c8588ccd19d318e2"
]
]
},
{
"id": "c8588ccd19d318e2",
"type": "switch",
"z": "1362a4b4f08f3d5b",
"g": "d163a291da272610",
"name": "check id or subid",
"property": "id",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "entity.id",
"vt": "msg"
},
{
"t": "eq",
"v": "entity.subid",
"vt": "msg"
}
],
"checkall": "false",
"repair": false,
"outputs": 2,
"x": 1410,
2024-05-18 07:40:16 +00:00
"y": 2300,
2024-05-06 20:15:18 +00:00
"wires": [
[
"f9c4a58c92b5b4d9"
],
[
"f9c4a58c92b5b4d9"
]
]
},
{
"id": "f9c4a58c92b5b4d9",
"type": "change",
"z": "1362a4b4f08f3d5b",
"g": "d163a291da272610",
"name": "delete protocol from global",
"rules": [
{
"t": "delete",
"p": "protocols[msg.protocol][msg.id]",
"pt": "global"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1680,
2024-05-18 07:40:16 +00:00
"y": 2300,
2024-05-06 20:15:18 +00:00
"wires": [
[]
]
},
{
"id": "ba6f0526fb7931c1",
"type": "split",
"z": "1362a4b4f08f3d5b",
"g": "d163a291da272610",
"name": "split by bucket",
"splt": "\\n",
"spltType": "str",
"arraySplt": 1,
"arraySpltType": "len",
"stream": false,
"addname": "bucket",
"x": 740,
2024-05-18 07:40:16 +00:00
"y": 2360,
2024-05-06 20:15:18 +00:00
"wires": [
[
"09d81adba4bcf125"
]
]
},
{
"id": "09d81adba4bcf125",
"type": "switch",
"z": "1362a4b4f08f3d5b",
"g": "d163a291da272610",
"name": "check bucket",
"property": "bucket",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "entity.bucket",
"vt": "msg"
}
],
"checkall": "false",
"repair": false,
"outputs": 1,
"x": 950,
2024-05-18 07:40:16 +00:00
"y": 2360,
2024-05-06 20:15:18 +00:00
"wires": [
[
"9b17052c6b788f45"
]
]
},
{
"id": "9b17052c6b788f45",
"type": "split",
"z": "1362a4b4f08f3d5b",
"g": "d163a291da272610",
"name": "split by measurement",
"splt": "\\n",
"spltType": "str",
"arraySplt": 1,
"arraySpltType": "len",
"stream": false,
"addname": "measurement",
"x": 1180,
2024-05-18 07:40:16 +00:00
"y": 2360,
2024-05-06 20:15:18 +00:00
"wires": [
[
"7a3535db9e7c5047"
]
]
},
{
"id": "7a3535db9e7c5047",
"type": "split",
"z": "1362a4b4f08f3d5b",
"g": "d163a291da272610",
"name": "split by field",
"splt": "\\n",
"spltType": "str",
"arraySplt": 1,
"arraySpltType": "len",
"stream": false,
"addname": "field",
"x": 1410,
2024-05-18 07:40:16 +00:00
"y": 2360,
2024-05-06 20:15:18 +00:00
"wires": [
[
"663a9910ecb7d4b7"
]
]
},
{
"id": "663a9910ecb7d4b7",
"type": "switch",
"z": "1362a4b4f08f3d5b",
"g": "d163a291da272610",
"name": "check id",
"property": "payload.id",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "entity.id",
"vt": "msg"
}
],
"checkall": "false",
"repair": false,
"outputs": 1,
"x": 1600,
2024-05-18 07:40:16 +00:00
"y": 2360,
2024-05-06 20:15:18 +00:00
"wires": [
[
"e0b5e448c81dcca6"
]
]
},
{
"id": "e0b5e448c81dcca6",
"type": "switch",
"z": "1362a4b4f08f3d5b",
"g": "d163a291da272610",
"name": "check model",
"property": "payload.model",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "entity.model",
"vt": "msg"
}
],
"checkall": "false",
"repair": false,
"outputs": 1,
"x": 1790,
2024-05-18 07:40:16 +00:00
"y": 2360,
2024-05-06 20:15:18 +00:00
"wires": [
[
"6c4bed6b5d616836"
]
]
},
{
"id": "6c4bed6b5d616836",
"type": "change",
"z": "1362a4b4f08f3d5b",
"g": "d163a291da272610",
"name": "delete device and metric from global",
"rules": [
{
"t": "delete",
"p": "devices[msg.bucket][msg.measurement][msg.field]",
"pt": "global"
},
{
"t": "delete",
"p": "metrics[msg.bucket][msg.measurement][msg.field]",
"pt": "global"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 2070,
2024-05-18 07:40:16 +00:00
"y": 2360,
2024-05-06 20:15:18 +00:00
"wires": [
[]
]
},
{
"id": "6ed2ba39d2ad3830",
"type": "change",
"z": "1362a4b4f08f3d5b",
"g": "d163a291da272610",
"name": "delete entity from global",
"rules": [
{
"t": "delete",
"p": "entities[msg.md5]",
"pt": "global"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 490,
2024-05-18 07:40:16 +00:00
"y": 2240,
2024-05-06 20:15:18 +00:00
"wires": [
[]
]
},
{
"id": "ad7fb302dbb22bcf",
"type": "ui-text-input",
"z": "1362a4b4f08f3d5b",
"g": "3b06cf51ed60a17e",
"group": "d97b07c77b6d5f1b",
"name": "",
"label": "",
"order": 2,
"width": "6",
"height": "3",
"topic": "topic",
"topicType": "msg",
"mode": "textarea",
"delay": 300,
"passthru": true,
"sendOnDelay": false,
"sendOnBlur": true,
"sendOnEnter": true,
"className": "",
"x": 600,
2024-05-18 07:40:16 +00:00
"y": 2660,
2024-05-06 20:15:18 +00:00
"wires": [
[
"e3bcd358aa687acc"
]
]
},
{
"id": "16192cfee4d23370",
"type": "ui-button",
"z": "1362a4b4f08f3d5b",
"g": "3b06cf51ed60a17e",
"group": "d97b07c77b6d5f1b",
2024-05-18 07:40:16 +00:00
"name": "reload",
"label": "",
2024-05-06 20:15:18 +00:00
"order": 1,
"width": "6",
"height": "1",
"emulateClick": false,
"tooltip": "",
"color": "",
"bgcolor": "",
"className": "",
2024-05-18 07:40:16 +00:00
"icon": "reload",
2024-05-06 20:15:18 +00:00
"iconPosition": "left",
"payload": "",
"payloadType": "str",
"topic": "topic",
"topicType": "msg",
2024-05-18 07:40:16 +00:00
"x": 170,
"y": 2660,
2024-05-06 20:15:18 +00:00
"wires": [
[
"cffc4b31a6570cae"
]
]
},
{
"id": "cffc4b31a6570cae",
"type": "change",
"z": "1362a4b4f08f3d5b",
"g": "3b06cf51ed60a17e",
"name": "from global",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "entities",
"tot": "global"
},
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "$string(msg.payload, true)",
"tot": "jsonata"
},
{
"t": "set",
"p": "import",
"pt": "flow",
"to": "{}",
"tot": "jsonata"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 390,
2024-05-18 07:40:16 +00:00
"y": 2660,
2024-05-06 20:15:18 +00:00
"wires": [
[
"ad7fb302dbb22bcf"
]
]
},
{
"id": "595853542a4259b5",
"type": "link in",
"z": "1362a4b4f08f3d5b",
"g": "3b06cf51ed60a17e",
"name": "entities - export entities",
2024-05-06 20:15:18 +00:00
"links": [
"72f3d70342e83655",
2024-05-06 20:15:18 +00:00
"7d77f0bc3fa0e695",
"fdea9ff531a587a8"
2024-05-06 20:15:18 +00:00
],
"x": 245,
2024-05-18 07:40:16 +00:00
"y": 2600,
2024-05-06 20:15:18 +00:00
"wires": [
[
"cffc4b31a6570cae"
]
]
},
{
"id": "705131420801edaf",
"type": "change",
"z": "1362a4b4f08f3d5b",
"g": "3b06cf51ed60a17e",
"name": "message",
"rules": [
{
"t": "set",
"p": "import.message",
"pt": "flow",
"to": "Une entité n'a pas pu être importé",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 3940,
2024-05-18 07:40:16 +00:00
"y": 2780,
2024-05-06 20:15:18 +00:00
"wires": [
[
"cc9ae1f14650ea53"
]
]
},
{
"id": "156d8365a01c4fb4",
"type": "debug",
"z": "1362a4b4f08f3d5b",
"g": "3b06cf51ed60a17e",
"name": "entities - import export entity",
2024-05-06 20:15:18 +00:00
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 4860,
2024-05-18 07:40:16 +00:00
"y": 2720,
2024-05-06 20:15:18 +00:00
"wires": []
},
{
"id": "1d9d8c969ccdf2be",
"type": "link out",
"z": "1362a4b4f08f3d5b",
"g": "3b06cf51ed60a17e",
"name": "entities - import export entity",
2024-05-06 20:15:18 +00:00
"mode": "link",
"links": [
"035760b14c0a3455",
"206c1fb4a48067df",
2024-05-06 20:15:18 +00:00
"7c98833082d48029"
],
"x": 4755,
2024-05-18 07:40:16 +00:00
"y": 2780,
2024-05-06 20:15:18 +00:00
"wires": []
},
{
"id": "e3bcd358aa687acc",
"type": "change",
"z": "1362a4b4f08f3d5b",
"g": "3b06cf51ed60a17e",
"name": "to flow",
"rules": [
{
"t": "set",
"p": "import.content",
"pt": "flow",
"to": "payload",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 790,
2024-05-18 07:40:16 +00:00
"y": 2660,
2024-05-06 20:15:18 +00:00
"wires": [
[]
]
},
{
"id": "66d5953240afce8e",
"type": "ui-button",
"z": "1362a4b4f08f3d5b",
"g": "3b06cf51ed60a17e",
"group": "d97b07c77b6d5f1b",
2024-05-18 07:40:16 +00:00
"name": "import",
"label": "",
2024-05-06 20:15:18 +00:00
"order": 3,
"width": "6",
"height": "1",
"emulateClick": false,
"tooltip": "",
"color": "",
"bgcolor": "",
"className": "",
2024-05-18 07:40:16 +00:00
"icon": "plus",
2024-05-06 20:15:18 +00:00
"iconPosition": "left",
"payload": "",
"payloadType": "str",
"topic": "topic",
"topicType": "msg",
2024-05-18 07:40:16 +00:00
"x": 170,
"y": 2720,
2024-05-06 20:15:18 +00:00
"wires": [
[
"0ae3184728b2a2c7"
]
]
},
{
"id": "0ae3184728b2a2c7",
"type": "change",
"z": "1362a4b4f08f3d5b",
"g": "3b06cf51ed60a17e",
"name": "from flow",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "import.content",
"tot": "flow"
},
{
"t": "set",
"p": "import.message",
"pt": "flow",
"to": "Entités importé avec succès",
"tot": "str"
},
{
"t": "delete",
"p": "entity",
"pt": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 360,
2024-05-18 07:40:16 +00:00
"y": 2720,
2024-05-06 20:15:18 +00:00
"wires": [
[
"4f07f65ec7f8a5e2"
]
]
},
{
"id": "4f07f65ec7f8a5e2",
"type": "json",
"z": "1362a4b4f08f3d5b",
"g": "3b06cf51ed60a17e",
"name": "",
"property": "payload",
"action": "obj",
"pretty": false,
"x": 530,
2024-05-18 07:40:16 +00:00
"y": 2720,
2024-05-06 20:15:18 +00:00
"wires": [
[
"da3dfd792007d0d0"
]
]
},
{
"id": "da3dfd792007d0d0",
"type": "split",
"z": "1362a4b4f08f3d5b",
"g": "3b06cf51ed60a17e",
"name": "",
"splt": "\\n",
"spltType": "str",
"arraySplt": 1,
"arraySpltType": "len",
"stream": false,
"addname": "",
"x": 690,
2024-05-18 07:40:16 +00:00
"y": 2720,
2024-05-06 20:15:18 +00:00
"wires": [
[
"72de98adadd34a6f"
]
]
},
{
"id": "72de98adadd34a6f",
"type": "switch",
"z": "1362a4b4f08f3d5b",
"g": "3b06cf51ed60a17e",
"name": "protocol",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "hask",
"v": "protocol",
"vt": "str"
},
{
"t": "else"
}
],
"checkall": "false",
"repair": false,
"outputs": 2,
"x": 860,
2024-05-18 07:40:16 +00:00
"y": 2720,
2024-05-06 20:15:18 +00:00
"wires": [
[
"b5a5d39699459183"
],
[
"705131420801edaf"
]
]
},
{
"id": "b5a5d39699459183",
"type": "switch",
"z": "1362a4b4f08f3d5b",
"g": "3b06cf51ed60a17e",
"name": "brand",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "hask",
"v": "brand",
"vt": "str"
},
{
"t": "else"
}
],
"checkall": "false",
"repair": false,
"outputs": 2,
"x": 1030,
2024-05-18 07:40:16 +00:00
"y": 2720,
2024-05-06 20:15:18 +00:00
"wires": [
[
"00103f2867eaf0af"
],
[
"705131420801edaf"
]
]
},
{
"id": "00103f2867eaf0af",
"type": "switch",
"z": "1362a4b4f08f3d5b",
"g": "3b06cf51ed60a17e",
"name": "model",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "hask",
"v": "model",
"vt": "str"
},
{
"t": "else"
}
],
"checkall": "false",
"repair": false,
"outputs": 2,
"x": 1190,
2024-05-18 07:40:16 +00:00
"y": 2720,
2024-05-06 20:15:18 +00:00
"wires": [
[
"5d3538459077156c"
],
[
"705131420801edaf"
]
]
},
{
"id": "7340045ba5d10c4d",
"type": "switch",
"z": "1362a4b4f08f3d5b",
"g": "3b06cf51ed60a17e",
"name": "measurement",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "hask",
"v": "measurement",
"vt": "str"
},
{
"t": "else"
}
],
"checkall": "false",
"repair": false,
"outputs": 2,
"x": 1600,
2024-05-18 07:40:16 +00:00
"y": 2720,
2024-05-06 20:15:18 +00:00
"wires": [
[
"80ce9cd387590b00"
],
[
"705131420801edaf"
]
]
},
{
"id": "29addac35906de8a",
"type": "switch",
"z": "1362a4b4f08f3d5b",
"g": "3b06cf51ed60a17e",
"name": "field",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "hask",
"v": "field",
"vt": "str"
},
{
"t": "else"
}
],
"checkall": "false",
"repair": false,
"outputs": 2,
"x": 2470,
2024-05-18 07:40:16 +00:00
"y": 2720,
2024-05-06 20:15:18 +00:00
"wires": [
[
"51a0b7fe34dab9a9"
],
[
"705131420801edaf"
]
]
},
{
"id": "6236a5e8600f634e",
"type": "switch",
"z": "1362a4b4f08f3d5b",
"g": "3b06cf51ed60a17e",
"name": "option",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "hask",
"v": "option",
"vt": "str"
},
{
"t": "else"
}
],
"checkall": "false",
"repair": false,
"outputs": 2,
"x": 3250,
2024-05-18 07:40:16 +00:00
"y": 2720,
2024-05-06 20:15:18 +00:00
"wires": [
[
"5ce6d992ddb52bf9"
],
[
"705131420801edaf"
]
]
},
{
"id": "5ce6d992ddb52bf9",
"type": "switch",
"z": "1362a4b4f08f3d5b",
"g": "3b06cf51ed60a17e",
"name": "id",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "hask",
"v": "id",
"vt": "str"
},
{
"t": "else"
}
],
"checkall": "false",
"repair": false,
"outputs": 2,
"x": 3410,
2024-05-18 07:40:16 +00:00
"y": 2720,
2024-05-06 20:15:18 +00:00
"wires": [
[
"8ecb5617ac72d19a"
],
[
"705131420801edaf"
]
]
},
{
"id": "8ecb5617ac72d19a",
"type": "switch",
"z": "1362a4b4f08f3d5b",
"g": "3b06cf51ed60a17e",
"name": "bucket",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "hask",
"v": "bucket",
"vt": "str"
},
{
"t": "else"
}
],
"checkall": "false",
"repair": false,
"outputs": 2,
"x": 3570,
2024-05-18 07:40:16 +00:00
"y": 2720,
2024-05-06 20:15:18 +00:00
"wires": [
[
"29f907f589e47ba6"
],
[
"705131420801edaf"
]
]
},
{
"id": "29f907f589e47ba6",
"type": "switch",
"z": "1362a4b4f08f3d5b",
"g": "3b06cf51ed60a17e",
"name": "check rooms",
"property": "rooms",
"propertyType": "global",
"rules": [
{
"t": "hask",
"v": "payload.bucket",
"vt": "msg"
},
{
"t": "else"
}
],
"checkall": "false",
"repair": false,
"outputs": 2,
"x": 3750,
2024-05-18 07:40:16 +00:00
"y": 2720,
2024-05-06 20:15:18 +00:00
"wires": [
[
"f39f016b95fc3bb9"
],
[
"705131420801edaf"
]
]
},
{
"id": "5a6f8f519e070c79",
"type": "change",
"z": "1362a4b4f08f3d5b",
"g": "3b06cf51ed60a17e",
"name": "to global",
"rules": [
{
"t": "set",
"p": "entities[msg.md5]",
"pt": "global",
"to": "payload",
"tot": "msg",
"dc": true
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 4200,
2024-05-18 07:40:16 +00:00
"y": 2720,
2024-05-06 20:15:18 +00:00
"wires": [
[
"cc9ae1f14650ea53"
]
]
},
{
"id": "cc9ae1f14650ea53",
"type": "join",
"z": "1362a4b4f08f3d5b",
"g": "3b06cf51ed60a17e",
"name": "",
"mode": "auto",
"build": "object",
"property": "payload",
"propertyType": "msg",
"key": "topic",
"joiner": "\\n",
"joinerType": "str",
"accumulate": "false",
"timeout": "",
"count": "",
"reduceRight": false,
"x": 4370,
2024-05-18 07:40:16 +00:00
"y": 2780,
2024-05-06 20:15:18 +00:00
"wires": [
[
"5c6e003545ed92a0"
]
]
},
{
"id": "69a45eebaa58325f",
"type": "debug",
"z": "1362a4b4f08f3d5b",
"g": "d62c9cf0cb81a537",
"name": "entities - register rooms",
2024-05-06 20:15:18 +00:00
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
2024-07-21 19:34:43 +00:00
"x": 870,
"y": 420,
2024-05-06 20:15:18 +00:00
"wires": []
},
{
"id": "5d3538459077156c",
"type": "switch",
"z": "1362a4b4f08f3d5b",
"g": "3b06cf51ed60a17e",
"name": "check models",
"property": "models[msg.payload.protocol][msg.payload.brand]",
"propertyType": "global",
"rules": [
{
"t": "hask",
"v": "payload.model",
"vt": "msg"
},
{
"t": "else"
}
],
"checkall": "false",
"repair": false,
"outputs": 2,
"x": 1380,
2024-05-18 07:40:16 +00:00
"y": 2720,
2024-05-06 20:15:18 +00:00
"wires": [
[
"7340045ba5d10c4d"
],
[
"705131420801edaf"
]
]
},
{
"id": "5c6e003545ed92a0",
"type": "change",
"z": "1362a4b4f08f3d5b",
"g": "3b06cf51ed60a17e",
"name": "set notification metric",
2024-05-06 20:15:18 +00:00
"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"
},
2024-05-06 20:15:18 +00:00
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "import.message",
"tot": "flow"
},
{
"t": "set",
"p": "repeat",
"pt": "msg",
"to": "true",
"tot": "bool"
2024-05-06 20:15:18 +00:00
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 4580,
2024-05-18 07:40:16 +00:00
"y": 2780,
2024-05-06 20:15:18 +00:00
"wires": [
[
"1d9d8c969ccdf2be",
"156d8365a01c4fb4"
]
]
},
{
"id": "740db566709021ed",
"type": "link call",
"z": "1362a4b4f08f3d5b",
"g": "7a3b686f86cb9beb",
"name": "",
"links": [
"0ac217c2ced7927a"
],
"linkType": "static",
"timeout": "30",
"x": 400,
2024-05-18 07:40:16 +00:00
"y": 1200,
2024-05-06 20:15:18 +00:00
"wires": [
[
"4f087e589110693b"
]
]
},
{
"id": "4f087e589110693b",
"type": "change",
"z": "1362a4b4f08f3d5b",
"g": "7a3b686f86cb9beb",
"name": "move",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "dictionnary",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 690,
2024-05-18 07:40:16 +00:00
"y": 1200,
2024-05-06 20:15:18 +00:00
"wires": [
[
"1519b923650e36db"
]
]
},
{
"id": "1519b923650e36db",
"type": "split",
"z": "1362a4b4f08f3d5b",
"g": "7a3b686f86cb9beb",
"name": "",
"splt": "\\n",
"spltType": "str",
"arraySplt": 1,
"arraySpltType": "len",
"stream": false,
"addname": "field",
"x": 850,
2024-05-18 07:40:16 +00:00
"y": 1200,
2024-05-06 20:15:18 +00:00
"wires": [
[
"45880c15ca4a61c5"
]
]
},
{
"id": "45880c15ca4a61c5",
"type": "change",
"z": "1362a4b4f08f3d5b",
"g": "7a3b686f86cb9beb",
"name": "add",
"rules": [
{
"t": "set",
"p": "add.fields[msg.parts.index]",
"pt": "flow",
"to": "{\"label\":msg.payload, \"value\":msg.field}",
"tot": "jsonata"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1010,
2024-05-18 07:40:16 +00:00
"y": 1200,
2024-05-06 20:15:18 +00:00
"wires": [
[
"9171766e1ee10649"
]
]
},
{
"id": "f2ae81bacad53d72",
"type": "change",
"z": "1362a4b4f08f3d5b",
"g": "7a3b686f86cb9beb",
"name": "set",
"rules": [
{
"t": "set",
"p": "entity.measurement",
"pt": "msg",
"to": "payload",
"tot": "msg"
},
{
"t": "set",
"p": "add.fields",
"pt": "flow",
"to": "[]",
"tot": "jsonata"
},
{
"t": "delete",
"p": "dictionnary",
"pt": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 170,
2024-05-18 07:40:16 +00:00
"y": 1200,
2024-05-06 20:15:18 +00:00
"wires": [
[
"740db566709021ed"
]
]
},
{
"id": "9171766e1ee10649",
"type": "join",
"z": "1362a4b4f08f3d5b",
"g": "7a3b686f86cb9beb",
"name": "",
"mode": "auto",
"build": "string",
"property": "payload",
"propertyType": "msg",
"key": "topic",
"joiner": "\\n",
"joinerType": "str",
"accumulate": false,
"timeout": "",
"count": "",
"reduceRight": false,
"reduceExp": "",
"reduceInit": "",
"reduceInitType": "",
"reduceFixup": "",
"x": 1170,
2024-05-18 07:40:16 +00:00
"y": 1200,
2024-05-06 20:15:18 +00:00
"wires": [
[
"21c200a736413965"
]
]
},
{
"id": "21c200a736413965",
"type": "change",
"z": "1362a4b4f08f3d5b",
"g": "7a3b686f86cb9beb",
"name": "options",
"rules": [
{
"t": "set",
"p": "options",
"pt": "msg",
"to": "add.fields",
"tot": "flow"
},
{
"t": "set",
"p": "options",
"pt": "msg",
"to": "$sort(msg.options, function($l, $r) {\t $l[0].label > $r[0].label\t})",
"tot": "jsonata"
},
2024-05-06 20:15:18 +00:00
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "models[msg.entity.protocol][msg.entity.brand][msg.entity.model]field",
"tot": "global"
},
{
"t": "set",
"p": "class",
"pt": "msg",
"to": "",
"tot": "str"
},
{
"t": "delete",
"p": "field",
"pt": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1340,
2024-05-18 07:40:16 +00:00
"y": 1200,
2024-05-06 20:15:18 +00:00
"wires": [
[
"8df78aa19a0af2aa"
]
]
},
{
"id": "06657762c4774a90",
"type": "link call",
"z": "1362a4b4f08f3d5b",
"g": "7a3b686f86cb9beb",
"name": "",
"links": [
"27183008d41a13ed"
],
"linkType": "static",
"timeout": "30",
"x": 430,
2024-05-18 07:40:16 +00:00
"y": 1140,
2024-05-06 20:15:18 +00:00
"wires": [
[
"44bfa2b788405872"
]
]
},
{
"id": "44bfa2b788405872",
"type": "change",
"z": "1362a4b4f08f3d5b",
"g": "7a3b686f86cb9beb",
"name": "move",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "dictionnary",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 690,
2024-05-18 07:40:16 +00:00
"y": 1140,
2024-05-06 20:15:18 +00:00
"wires": [
[
"9ff743b23cbe42cd"
]
]
},
{
"id": "78f44a60b8f4cc68",
"type": "link call",
"z": "1362a4b4f08f3d5b",
"g": "3b06cf51ed60a17e",
"name": "",
"links": [
"27183008d41a13ed"
],
"linkType": "static",
"timeout": "30",
"x": 2050,
2024-05-18 07:40:16 +00:00
"y": 2720,
2024-05-06 20:15:18 +00:00
"wires": [
[
"85db3cff53254780"
]
]
},
{
"id": "80ce9cd387590b00",
"type": "change",
"z": "1362a4b4f08f3d5b",
"g": "3b06cf51ed60a17e",
"name": "reset",
"rules": [
{
"t": "delete",
"p": "dictionnary",
"pt": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1790,
2024-05-18 07:40:16 +00:00
"y": 2720,
2024-05-06 20:15:18 +00:00
"wires": [
[
"78f44a60b8f4cc68"
]
]
},
{
"id": "85db3cff53254780",
"type": "switch",
"z": "1362a4b4f08f3d5b",
"g": "3b06cf51ed60a17e",
"name": "check",
"property": "dictionnary",
"propertyType": "msg",
"rules": [
{
"t": "hask",
"v": "payload.measurement",
"vt": "msg"
},
{
"t": "else"
}
],
"checkall": "false",
"repair": false,
"outputs": 2,
"x": 2310,
2024-05-18 07:40:16 +00:00
"y": 2720,
2024-05-06 20:15:18 +00:00
"wires": [
[
"29addac35906de8a"
],
[
"705131420801edaf"
]
]
},
{
"id": "a6bb0870c0eeda1d",
"type": "switch",
"z": "1362a4b4f08f3d5b",
"g": "3b06cf51ed60a17e",
"name": "check",
"property": "dictionnary",
"propertyType": "msg",
"rules": [
{
"t": "hask",
"v": "payload.field",
"vt": "msg"
},
{
"t": "else"
}
],
"checkall": "false",
"repair": false,
"outputs": 2,
"x": 3090,
2024-05-18 07:40:16 +00:00
"y": 2720,
2024-05-06 20:15:18 +00:00
"wires": [
[
"6236a5e8600f634e"
],
[
"705131420801edaf"
]
]
},
{
"id": "c8456ba2aa6075ce",
"type": "link call",
"z": "1362a4b4f08f3d5b",
"g": "3b06cf51ed60a17e",
"name": "",
"links": [
"0ac217c2ced7927a"
],
"linkType": "static",
"timeout": "30",
"x": 2860,
2024-05-18 07:40:16 +00:00
"y": 2720,
2024-05-06 20:15:18 +00:00
"wires": [
[
"a6bb0870c0eeda1d"
]
]
},
{
"id": "51a0b7fe34dab9a9",
"type": "change",
"z": "1362a4b4f08f3d5b",
"g": "3b06cf51ed60a17e",
"name": "reset",
"rules": [
{
"t": "delete",
"p": "dictionnary",
"pt": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 2630,
2024-05-18 07:40:16 +00:00
"y": 2720,
2024-05-06 20:15:18 +00:00
"wires": [
[
"c8456ba2aa6075ce"
]
]
},
{
"id": "fd414e4814858c31",
"type": "switch",
"z": "1362a4b4f08f3d5b",
"g": "7a3b686f86cb9beb",
"name": "format",
"property": "models[msg.entity.protocol][msg.entity.brand][msg.entity.model]format",
"propertyType": "global",
"rules": [
{
"t": "eq",
"v": "boolean",
"vt": "str"
},
{
"t": "eq",
"v": "number",
"vt": "str"
},
{
"t": "eq",
"v": "text",
"vt": "str"
}
],
"checkall": "false",
"repair": false,
"outputs": 3,
2024-05-08 16:38:22 +00:00
"x": 1150,
2024-05-18 07:40:16 +00:00
"y": 1320,
2024-05-06 20:15:18 +00:00
"wires": [
[
2024-05-08 16:38:22 +00:00
"be0fb9a04ea16004"
2024-05-06 20:15:18 +00:00
],
[
"4ca6bf4176ebe985"
],
[
"c19a4a024ab45653"
]
]
},
{
"id": "4ca6bf4176ebe985",
"type": "ui-slider",
"z": "1362a4b4f08f3d5b",
"g": "7a3b686f86cb9beb",
"group": "e5d4647d97841024",
"name": "default_number",
"label": "Valeur par défaut",
"tooltip": "",
"order": 9,
2024-05-06 20:15:18 +00:00
"width": "6",
"height": "1",
"passthru": false,
"outs": "end",
"topic": "topic",
"topicType": "msg",
"thumbLabel": true,
"min": 0,
"max": "99",
"step": 1,
"className": "",
"x": 1540,
2024-05-18 07:40:16 +00:00
"y": 1380,
2024-05-06 20:15:18 +00:00
"wires": [
[
"f03da2323ee09882"
]
]
},
{
"id": "c19a4a024ab45653",
"type": "ui-text-input",
"z": "1362a4b4f08f3d5b",
"g": "7a3b686f86cb9beb",
"group": "e5d4647d97841024",
"name": "default_text",
"label": "Valeur par défaut",
"order": 10,
2024-05-06 20:15:18 +00:00
"width": "6",
"height": "1",
"topic": "topic",
"topicType": "msg",
"mode": "text",
"delay": 300,
"passthru": false,
"sendOnDelay": false,
"sendOnBlur": true,
"sendOnEnter": true,
"className": "",
"x": 1530,
2024-05-18 07:40:16 +00:00
"y": 1440,
2024-05-06 20:15:18 +00:00
"wires": [
[
"f03da2323ee09882"
]
]
},
{
"id": "868f82b1a5ca2a85",
"type": "change",
"z": "1362a4b4f08f3d5b",
"g": "7a3b686f86cb9beb",
"name": "false",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "false",
"tot": "bool"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1350,
"y": 780,
2024-05-06 20:15:18 +00:00
"wires": [
[
"f5b6bba2551b5bec"
]
]
},
{
"id": "f5b6bba2551b5bec",
"type": "ui-dropdown",
"z": "1362a4b4f08f3d5b",
"g": "7a3b686f86cb9beb",
"group": "e5d4647d97841024",
"name": "default_boolean",
"label": "Valeur par défaut:",
"tooltip": "",
"order": 8,
2024-05-06 20:15:18 +00:00
"width": "6",
"height": "1",
"passthru": false,
"multiple": false,
"options": [
{
"label": "niveau haut",
"value": true,
"type": "bool"
},
{
"label": "niveau bas",
"value": false,
"type": "bool"
}
],
"payload": "",
"topic": "topic",
"topicType": "msg",
"className": "",
"x": 1540,
2024-05-18 07:40:16 +00:00
"y": 1320,
2024-05-06 20:15:18 +00:00
"wires": [
[
"f03da2323ee09882"
]
]
},
{
"id": "a327bc0ce37018cf",
"type": "link in",
"z": "1362a4b4f08f3d5b",
"g": "ed710864874f0897",
"name": "entities - entity to md5",
2024-05-06 20:15:18 +00:00
"links": [],
"x": 135,
"y": 600,
2024-05-06 20:15:18 +00:00
"wires": [
[
"83530f0e60512326"
]
]
},
{
"id": "2e633d555e1a36f6",
"type": "change",
"z": "1362a4b4f08f3d5b",
"g": "ed710864874f0897",
"name": "copy",
"rules": [
{
"t": "set",
"p": "entity_string",
"pt": "msg",
"to": "entity",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 450,
"y": 600,
2024-05-06 20:15:18 +00:00
"wires": [
[
"2241bb87e3791806"
]
]
},
{
"id": "95727dfedbf37b0d",
"type": "json",
"z": "1362a4b4f08f3d5b",
"g": "ed710864874f0897",
"name": "",
"property": "entity_string",
"action": "str",
"pretty": true,
"x": 790,
"y": 600,
2024-05-06 20:15:18 +00:00
"wires": [
[
"76a625401145af61"
]
]
},
{
"id": "76a625401145af61",
"type": "md5",
"z": "1362a4b4f08f3d5b",
"g": "ed710864874f0897",
"name": "",
"fieldToHash": "entity_string",
"fieldTypeToHash": "msg",
"hashField": "md5",
"hashFieldType": "msg",
"x": 950,
"y": 600,
2024-05-06 20:15:18 +00:00
"wires": [
[
"51977d236a5b4e17"
]
]
},
{
"id": "51977d236a5b4e17",
"type": "change",
"z": "1362a4b4f08f3d5b",
"g": "ed710864874f0897",
"name": "delete",
"rules": [
{
"t": "delete",
"p": "entity_string",
"pt": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1110,
"y": 600,
2024-05-06 20:15:18 +00:00
"wires": [
[
"463b42633dcf4058"
]
]
},
{
"id": "463b42633dcf4058",
"type": "link out",
"z": "1362a4b4f08f3d5b",
"g": "ed710864874f0897",
"name": "entities - entity to md5",
2024-05-06 20:15:18 +00:00
"mode": "return",
"links": [],
"x": 1235,
"y": 600,
2024-05-06 20:15:18 +00:00
"wires": []
},
{
"id": "28026a2ce29f6d72",
"type": "link call",
"z": "1362a4b4f08f3d5b",
"g": "7a3b686f86cb9beb",
"name": "",
"links": [
"a327bc0ce37018cf"
],
"linkType": "static",
"timeout": "30",
"x": 220,
2024-05-18 07:40:16 +00:00
"y": 1680,
2024-05-06 20:15:18 +00:00
"wires": [
[
"b09d639af149c549"
2024-05-06 20:15:18 +00:00
]
]
},
{
"id": "83530f0e60512326",
"type": "switch",
"z": "1362a4b4f08f3d5b",
"g": "ed710864874f0897",
"name": "property",
"property": "entity",
"propertyType": "msg",
"rules": [
{
"t": "nnull"
},
{
"t": "else"
}
],
"checkall": "false",
"repair": false,
"outputs": 2,
"x": 280,
"y": 600,
2024-05-06 20:15:18 +00:00
"wires": [
[
"2e633d555e1a36f6"
],
[
"52f51be9fc39e849"
]
]
},
{
"id": "52f51be9fc39e849",
"type": "change",
"z": "1362a4b4f08f3d5b",
"g": "ed710864874f0897",
"name": "copy",
"rules": [
{
"t": "set",
"p": "entity_string",
"pt": "msg",
"to": "payload",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 450,
"y": 660,
2024-05-06 20:15:18 +00:00
"wires": [
[
"2241bb87e3791806"
]
]
},
{
"id": "422e1dd2aab1ae7d",
"type": "link call",
"z": "1362a4b4f08f3d5b",
"g": "d163a291da272610",
"name": "",
"links": [
"a327bc0ce37018cf"
],
"linkType": "static",
"timeout": "30",
2024-05-07 23:17:47 +00:00
"x": 720,
2024-05-18 07:40:16 +00:00
"y": 2180,
2024-05-06 20:15:18 +00:00
"wires": [
[
"662c49c88089f00f"
]
]
},
{
"id": "f39f016b95fc3bb9",
"type": "link call",
"z": "1362a4b4f08f3d5b",
"g": "3b06cf51ed60a17e",
"name": "",
"links": [
"a327bc0ce37018cf"
],
"linkType": "static",
"timeout": "30",
"x": 3980,
2024-05-18 07:40:16 +00:00
"y": 2720,
2024-05-06 20:15:18 +00:00
"wires": [
[
"5a6f8f519e070c79"
]
]
},
{
"id": "2241bb87e3791806",
"type": "change",
"z": "1362a4b4f08f3d5b",
"g": "ed710864874f0897",
"name": "uid",
"rules": [
{
"t": "set",
2024-05-07 23:17:47 +00:00
"p": "entity_string",
2024-05-06 20:15:18 +00:00
"pt": "msg",
"to": "msg.entity_string.model&'.'&msg.entity_string.id&'.'&msg.entity_string.option",
"tot": "jsonata"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 630,
"y": 600,
2024-05-06 20:15:18 +00:00
"wires": [
[
"95727dfedbf37b0d"
]
]
},
{
"id": "e87e17419a9dd28c",
"type": "comment",
"z": "1362a4b4f08f3d5b",
"g": "ed710864874f0897",
"name": "uid = model . id . option",
"info": "",
"x": 680,
"y": 660,
2024-05-06 20:15:18 +00:00
"wires": []
2024-05-07 23:17:47 +00:00
},
{
"id": "30ccf1e79a8c842a",
"type": "switch",
"z": "1362a4b4f08f3d5b",
"g": "d163a291da272610",
"name": "object",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "istype",
"v": "object",
"vt": "object"
},
{
"t": "else"
}
],
"checkall": "false",
"repair": false,
"outputs": 2,
"x": 510,
2024-05-18 07:40:16 +00:00
"y": 2120,
2024-05-07 23:17:47 +00:00
"wires": [
[
"422e1dd2aab1ae7d"
],
[
"ee4607a9074fe742"
]
]
2024-05-08 16:38:22 +00:00
},
{
"id": "be0fb9a04ea16004",
"type": "change",
"z": "1362a4b4f08f3d5b",
"g": "7a3b686f86cb9beb",
"name": "options",
"rules": [
{
"t": "set",
"p": "options",
"pt": "msg",
"to": "[{'label':'high level','value':true},{'label':'low level','value':false}]",
"tot": "jsonata"
},
{
"t": "set",
"p": "class",
"pt": "msg",
"to": "",
"tot": "str"
},
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "false",
"tot": "bool"
},
{
"t": "delete",
"p": "field",
"pt": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1340,
2024-05-18 07:40:16 +00:00
"y": 1320,
2024-05-08 16:38:22 +00:00
"wires": [
[
"f5b6bba2551b5bec"
]
]
},
{
"id": "fd0e7bccfabe2ee6",
"type": "ui-table",
"z": "1362a4b4f08f3d5b",
"g": "e7814f99120a45d2",
"group": "234a71f9f37e0fe7",
"name": "",
"label": "text",
"order": 3,
"width": "18",
"height": "1",
"maxrows": 0,
"passthru": false,
"autocols": true,
"selectionType": "none",
"columns": [],
"x": 1210,
2024-05-18 07:40:16 +00:00
"y": 2960,
"wires": [
[]
]
},
{
"id": "451c9ff36fe2e477",
"type": "ui-button",
"z": "1362a4b4f08f3d5b",
"g": "e7814f99120a45d2",
"group": "234a71f9f37e0fe7",
2024-05-18 07:40:16 +00:00
"name": "reload",
"label": "",
"order": 1,
2024-05-18 07:40:16 +00:00
"width": "6",
"height": "1",
"emulateClick": false,
"tooltip": "",
"color": "",
"bgcolor": "",
"className": "",
2024-05-18 07:40:16 +00:00
"icon": "reload",
"iconPosition": "left",
"payload": "",
"payloadType": "str",
"topic": "topic",
"topicType": "msg",
2024-05-18 07:40:16 +00:00
"x": 170,
"y": 2900,
"wires": [
[
"b940aaca8de45053"
]
]
},
{
"id": "b940aaca8de45053",
"type": "change",
"z": "1362a4b4f08f3d5b",
"g": "e7814f99120a45d2",
"name": "from global",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "entities",
"tot": "global"
},
{
"t": "set",
"p": "list_entities",
"pt": "flow",
"to": "[]",
"tot": "json"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 390,
2024-05-18 07:40:16 +00:00
"y": 2900,
"wires": [
[
"d4a55209a00a2850"
]
]
},
{
"id": "d4a55209a00a2850",
"type": "split",
"z": "1362a4b4f08f3d5b",
"g": "e7814f99120a45d2",
"name": "",
"splt": "\\n",
"spltType": "str",
"arraySplt": 1,
"arraySpltType": "len",
"stream": false,
"addname": "",
"x": 570,
2024-05-18 07:40:16 +00:00
"y": 2900,
"wires": [
[
"6e172580996cd122"
]
]
},
{
"id": "090dbbbe36a15a24",
"type": "join",
"z": "1362a4b4f08f3d5b",
"g": "e7814f99120a45d2",
"name": "",
"mode": "auto",
"build": "object",
"property": "payload",
"propertyType": "msg",
"key": "topic",
"joiner": "\\n",
"joinerType": "str",
"accumulate": "false",
"timeout": "",
"count": "",
"reduceRight": false,
"x": 890,
2024-05-18 07:40:16 +00:00
"y": 2900,
"wires": [
[
"457282d09d5173fa"
]
]
},
{
"id": "6e172580996cd122",
"type": "change",
"z": "1362a4b4f08f3d5b",
"g": "e7814f99120a45d2",
"name": "add",
"rules": [
{
"t": "set",
"p": "list_entities[msg.parts.index]",
"pt": "flow",
"to": "{\t 'bucket':msg.payload.bucket,\t 'measurement':msg.payload.measurement,\t 'field':msg.payload.field,\t 'protocol':msg.payload.protocol,\t 'id':msg.payload.id,\t 'option':msg.payload.option,\t 'value':msg.option.default,\t 'brand':msg.payload.brand,\t 'mdoel':msg.payload.model\t}",
"tot": "jsonata"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 730,
2024-05-18 07:40:16 +00:00
"y": 2900,
"wires": [
[
"090dbbbe36a15a24"
]
]
},
{
"id": "457282d09d5173fa",
"type": "change",
"z": "1362a4b4f08f3d5b",
"g": "e7814f99120a45d2",
"name": "table",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "list_entities",
"tot": "flow"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1050,
2024-05-18 07:40:16 +00:00
"y": 2900,
"wires": [
[
"fd0e7bccfabe2ee6",
"4731776cfc733e84"
]
]
},
{
"id": "41e9885bae118005",
"type": "trigger",
"z": "1362a4b4f08f3d5b",
"g": "7a3b686f86cb9beb",
"name": "wait 50 ms",
"op1": "",
"op2": "",
"op1type": "nul",
"op2type": "str",
"duration": "50",
"extend": true,
"overrideDelay": false,
"units": "ms",
"reset": "",
"bytopic": "all",
"topic": "topic",
"outputs": 1,
"x": 1170,
"y": 840,
"wires": [
[
"4e039b1bb507cbd3"
]
]
},
{
"id": "4731776cfc733e84",
"type": "change",
"z": "1362a4b4f08f3d5b",
"g": "e7814f99120a45d2",
"name": "count",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "$count(msg.payload)",
"tot": "jsonata"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1210,
2024-05-18 07:40:16 +00:00
"y": 2900,
"wires": [
[
"a6d607b465b7fe5e"
]
]
},
{
"id": "a6d607b465b7fe5e",
"type": "ui-text",
"z": "1362a4b4f08f3d5b",
"g": "e7814f99120a45d2",
"group": "234a71f9f37e0fe7",
"order": 2,
"width": "6",
"height": "1",
"name": "entities count",
"label": "Nombre d'entités enregistrées : ",
"format": "{{msg.payload}}",
"layout": "row-left",
"style": false,
"font": "",
"fontSize": 16,
"color": "#717171",
"className": "",
"x": 1390,
2024-05-18 07:40:16 +00:00
"y": 2900,
"wires": []
2024-05-18 07:40:16 +00:00
},
{
"id": "2affc8f60f87bf7b",
"type": "link call",
"z": "1362a4b4f08f3d5b",
"g": "3b06cf51ed60a17e",
"name": "",
"links": [
"aeb0d3b6747c9280"
],
"linkType": "static",
"timeout": "30",
"x": 3110,
"y": 2620,
"wires": [
[]
]
},
{
"id": "bf39b8d1716ca963",
"type": "ui-dropdown",
"z": "1362a4b4f08f3d5b",
"g": "7a3b686f86cb9beb",
"group": "e5d4647d97841024",
"name": "suffix",
"label": "Suffix :",
"tooltip": "",
"order": 7,
2024-05-18 07:40:16 +00:00
"width": "6",
"height": "1",
"passthru": false,
"multiple": false,
"options": [
{
"label": "Aucun",
"value": "",
"type": "str"
},
{
"label": "1",
"value": 1,
"type": "num"
},
{
"label": "2",
"value": 2,
"type": "num"
},
{
"label": "3",
"value": 3,
"type": "num"
},
{
"label": "4",
"value": 4,
"type": "num"
},
{
"label": "5",
"value": 5,
"type": "num"
}
],
"payload": "",
"topic": "topic",
"topicType": "msg",
"className": "",
"x": 1510,
"y": 1260,
"wires": [
[
"75fbca1d39c47339"
]
]
},
{
"id": "4f7352e714e2f497",
"type": "change",
"z": "1362a4b4f08f3d5b",
"g": "7a3b686f86cb9beb",
"name": "options",
"rules": [
{
"t": "set",
"p": "options",
"pt": "msg",
"to": "[0,1,2,3,4,5]",
"tot": "json"
},
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "",
"tot": "str"
},
{
"t": "set",
"p": "class",
"pt": "msg",
"to": "",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1340,
"y": 1260,
"wires": [
[
"bf39b8d1716ca963"
]
]
},
{
"id": "9ee5440963269d27",
"type": "change",
"z": "1362a4b4f08f3d5b",
"g": "7a3b686f86cb9beb",
"name": "set",
"rules": [
{
"t": "set",
"p": "entity.model",
"pt": "msg",
"to": "payload",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 170,
"y": 1080,
"wires": [
[
"374944ec7a1d4b47"
]
]
},
{
"id": "e7c533a4825e3889",
"type": "switch",
"z": "1362a4b4f08f3d5b",
"g": "7a3b686f86cb9beb",
"name": "reload",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "",
"vt": "str"
},
{
"t": "else"
}
],
"checkall": "false",
"repair": false,
"outputs": 2,
"x": 1690,
"y": 900,
"wires": [
[
"4e039b1bb507cbd3"
],
[
"d9f51facbcafa156"
]
]
},
{
"id": "389909b07238cc3a",
"type": "switch",
"z": "1362a4b4f08f3d5b",
"g": "d163a291da272610",
"name": "reload",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "",
"vt": "str"
},
{
"t": "else"
}
],
"checkall": "false",
"repair": false,
"outputs": 2,
"x": 2350,
"y": 2060,
"wires": [
[
"ccc2df3ce92c67ad"
],
[
"ceffdbc65f225ed5"
]
]
},
{
"id": "6934471d55d3dc61",
"type": "link in",
"z": "1362a4b4f08f3d5b",
"g": "087716156d7ca3c7",
"name": "entities - add room",
"links": [
"69f377a19c3aaebb",
"39c9aaaef7274169"
],
"x": 135,
"y": 3080,
"wires": [
[
"a0738c4dddf29c0c"
]
]
},
{
"id": "a0738c4dddf29c0c",
"type": "change",
"z": "1362a4b4f08f3d5b",
"g": "087716156d7ca3c7",
"name": "reset",
"rules": [
{
"t": "set",
"p": "class",
"pt": "msg",
"to": "remove",
"tot": "str"
},
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "",
"tot": "str"
},
{
"t": "delete",
"p": "bucket",
"pt": "msg"
},
{
"t": "delete",
"p": "measurement",
"pt": "msg"
},
{
"t": "delete",
"p": "field",
"pt": "msg"
},
{
"t": "delete",
"p": "options",
"pt": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 270,
"y": 3080,
"wires": [
[
"7becb48e82e41f4d",
"77618bede4cd20a4",
"cf0c81d932939eeb"
]
]
},
{
"id": "7becb48e82e41f4d",
"type": "delay",
"z": "1362a4b4f08f3d5b",
"g": "087716156d7ca3c7",
"name": "wait 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,
"x": 450,
"y": 3080,
"wires": [
[
"1b7806eb440632ce"
]
]
},
{
"id": "77618bede4cd20a4",
"type": "ui-text-input",
"z": "1362a4b4f08f3d5b",
"g": "087716156d7ca3c7",
"group": "c1cd47eafbe36514",
"name": "bucket",
"label": "Pièces :",
"order": 1,
"width": "6",
"height": "1",
"topic": "topic",
"topicType": "msg",
"mode": "text",
"delay": 300,
"passthru": false,
"sendOnDelay": false,
"sendOnBlur": true,
"sendOnEnter": true,
"className": "",
"x": 430,
"y": 3140,
"wires": [
[
"52c9ef8bf5d5f352"
]
]
},
{
"id": "0031d2f1a7c3c8ac",
"type": "change",
"z": "1362a4b4f08f3d5b",
"g": "087716156d7ca3c7",
"name": "to global",
"rules": [
{
"t": "set",
"p": "rooms[msg.room]",
"pt": "global",
"to": "true",
"tot": "bool"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 600,
"y": 3200,
"wires": [
[
"6076cbdfef84255d"
]
]
},
{
"id": "6076cbdfef84255d",
"type": "change",
"z": "1362a4b4f08f3d5b",
"g": "087716156d7ca3c7",
"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": "Pièce ajouté",
"tot": "str"
},
{
"t": "set",
"p": "repeat",
"pt": "msg",
"to": "true",
"tot": "bool"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 820,
"y": 3200,
"wires": [
[
"cb1e6d4592635001",
"69f377a19c3aaebb"
]
]
},
{
"id": "cb1e6d4592635001",
"type": "debug",
"z": "1362a4b4f08f3d5b",
"g": "087716156d7ca3c7",
"name": "entities - add room",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "room",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 1070,
"y": 3200,
"wires": []
},
{
"id": "cf0c81d932939eeb",
"type": "ui-button",
"z": "1362a4b4f08f3d5b",
"g": "087716156d7ca3c7",
"group": "c1cd47eafbe36514",
"name": "add",
"label": "",
"order": 2,
"width": "6",
"height": "1",
"emulateClick": false,
"tooltip": "",
"color": "",
"bgcolor": "",
"className": "",
"icon": "plus",
"iconPosition": "left",
"payload": "",
"payloadType": "str",
"topic": "topic",
"topicType": "msg",
"x": 430,
"y": 3200,
"wires": [
[
"0031d2f1a7c3c8ac"
]
]
},
{
"id": "c819a68d55e52a48",
"type": "change",
"z": "1362a4b4f08f3d5b",
"g": "087716156d7ca3c7",
"name": "options",
"rules": [
{
"t": "set",
"p": "class",
"pt": "msg",
"to": "",
"tot": "str"
},
{
"t": "delete",
"p": "options",
"pt": "msg"
},
{
"t": "set",
"p": "room",
"pt": "msg",
"to": "payload",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 260,
"y": 3200,
"wires": [
[
"cf0c81d932939eeb"
]
]
},
{
"id": "1b7806eb440632ce",
"type": "change",
"z": "1362a4b4f08f3d5b",
"g": "087716156d7ca3c7",
"name": "options",
"rules": [
{
"t": "set",
"p": "class",
"pt": "msg",
"to": "",
"tot": "str"
},
{
"t": "delete",
"p": "options",
"pt": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 260,
"y": 3140,
"wires": [
[
"77618bede4cd20a4"
]
]
},
{
"id": "52c9ef8bf5d5f352",
"type": "switch",
"z": "1362a4b4f08f3d5b",
"g": "087716156d7ca3c7",
"name": "check room",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "regex",
"v": "(system|room|thermostat|agenda|home)",
"vt": "str",
"case": false
},
{
"t": "regex",
"v": "^[a-z]{4,20}$",
"vt": "str",
"case": false
},
{
"t": "else"
}
],
"checkall": "false",
"repair": false,
"outputs": 3,
"x": 610,
"y": 3140,
"wires": [
[
"bbc4e7be116546f6"
],
[
"c819a68d55e52a48"
],
[
"bbc4e7be116546f6"
]
]
},
{
"id": "bbc4e7be116546f6",
"type": "debug",
"z": "1362a4b4f08f3d5b",
"g": "087716156d7ca3c7",
"name": "entities - add room - invalid name",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 880,
"y": 3140,
"wires": []
},
{
"id": "69f377a19c3aaebb",
"type": "link out",
"z": "1362a4b4f08f3d5b",
"g": "087716156d7ca3c7",
"name": "entities - add room",
"mode": "link",
"links": [
"206c1fb4a48067df",
"6934471d55d3dc61",
"dc7b00050a7d145a"
],
"x": 995,
"y": 3260,
"wires": []
},
{
"id": "44639ce55332cbf7",
"type": "change",
"z": "1362a4b4f08f3d5b",
"g": "b8a64a86d3eb3506",
"name": "reset",
"rules": [
{
"t": "set",
"p": "delete",
"pt": "flow",
"to": "{}",
"tot": "jsonata"
},
{
"t": "set",
"p": "class",
"pt": "msg",
"to": "remove",
"tot": "str"
},
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "",
"tot": "str"
},
{
"t": "delete",
"p": "bucket",
"pt": "msg"
},
{
"t": "delete",
"p": "measurement",
"pt": "msg"
},
{
"t": "delete",
"p": "field",
"pt": "msg"
},
{
"t": "delete",
"p": "entity",
"pt": "msg"
},
{
"t": "delete",
"p": "options",
"pt": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 270,
"y": 3380,
"wires": [
[
"8e60fec05ccbd504",
"9804124babada246",
"b39e6b36efa2837a"
]
]
},
{
"id": "b39e6b36efa2837a",
"type": "delay",
"z": "1362a4b4f08f3d5b",
"g": "b8a64a86d3eb3506",
"name": "wait 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,
"x": 450,
"y": 3380,
"wires": [
[
"be1564c06fdecf2b"
]
]
},
{
"id": "28b0fb497ecfebb2",
"type": "switch",
"z": "1362a4b4f08f3d5b",
"g": "b8a64a86d3eb3506",
"name": "reload",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "",
"vt": "str"
},
{
"t": "else"
}
],
"checkall": "false",
"repair": false,
"outputs": 2,
"x": 590,
"y": 3440,
"wires": [
[
"44639ce55332cbf7"
],
[
"7b09dadab4169774"
]
]
},
{
"id": "8e60fec05ccbd504",
"type": "ui-dropdown",
"z": "1362a4b4f08f3d5b",
"g": "b8a64a86d3eb3506",
"group": "773eef4fbdd58da8",
"name": "bucket",
"label": "Pièce :",
"tooltip": "",
"order": 1,
"width": "6",
"height": "1",
"passthru": false,
"multiple": false,
"options": [
{
"label": "» recharger",
"value": "",
"type": "str"
}
],
"payload": "",
"topic": "topic",
"topicType": "msg",
"className": "",
"x": 430,
"y": 3440,
"wires": [
[
"28b0fb497ecfebb2"
]
]
},
{
"id": "eb03f7c93f8b43a3",
"type": "change",
"z": "1362a4b4f08f3d5b",
"g": "b8a64a86d3eb3506",
"name": "options",
"rules": [
{
"t": "set",
"p": "options",
"pt": "msg",
"to": "delete.roomsoptions",
"tot": "flow"
},
{
"t": "set",
"p": "options",
"pt": "msg",
"to": "$sort(msg.options, function($l, $r) {\t $l[0].label > $r[0].label\t})",
"tot": "jsonata"
},
{
"t": "set",
"p": "options",
"pt": "msg",
"to": "$append(msg.options,[{'label':'» recharger','value':''}])",
"tot": "jsonata"
},
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "",
"tot": "str"
},
{
"t": "set",
"p": "class",
"pt": "msg",
"to": "",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 260,
"y": 3440,
"wires": [
[
"8e60fec05ccbd504"
]
]
},
{
"id": "66b74056a86a68c5",
"type": "join",
"z": "1362a4b4f08f3d5b",
"g": "b8a64a86d3eb3506",
"name": "",
"mode": "auto",
"build": "object",
"property": "payload",
"propertyType": "msg",
"key": "topic",
"joiner": "\\n",
"joinerType": "str",
"accumulate": "false",
"timeout": "",
"count": "",
"reduceRight": false,
"x": 1350,
"y": 3380,
"wires": [
[
"eb03f7c93f8b43a3"
]
]
},
{
"id": "66d2402c36529cd8",
"type": "change",
"z": "1362a4b4f08f3d5b",
"g": "b8a64a86d3eb3506",
"name": "add",
"rules": [
{
"t": "set",
"p": "delete.roomsoptions[msg.parts.index]",
"pt": "flow",
"to": "{\t 'label':msg.room,\t 'value':msg.room\t}",
"tot": "jsonata"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1190,
"y": 3440,
"wires": [
[
"66b74056a86a68c5"
]
]
},
{
"id": "e665cef3b57e2e30",
"type": "split",
"z": "1362a4b4f08f3d5b",
"g": "b8a64a86d3eb3506",
"name": "",
"splt": "\\n",
"spltType": "str",
"arraySplt": 1,
"arraySpltType": "len",
"stream": false,
"addname": "room",
"x": 830,
"y": 3380,
"wires": [
[
"33a339c0afc1ba9a"
]
]
},
{
"id": "be1564c06fdecf2b",
"type": "change",
"z": "1362a4b4f08f3d5b",
"g": "b8a64a86d3eb3506",
"name": "from global",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "rooms",
"tot": "global"
},
{
"t": "set",
"p": "delete.roomsoptions",
"pt": "flow",
"to": "[]",
"tot": "jsonata"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 650,
"y": 3380,
"wires": [
[
"e665cef3b57e2e30"
]
]
},
{
"id": "7b09dadab4169774",
"type": "change",
"z": "1362a4b4f08f3d5b",
"g": "b8a64a86d3eb3506",
"name": "options",
"rules": [
{
"t": "set",
"p": "room",
"pt": "msg",
"to": "payload",
"tot": "msg"
},
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "",
"tot": "str"
},
{
"t": "set",
"p": "class",
"pt": "msg",
"to": "",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 260,
"y": 3500,
"wires": [
[
"9804124babada246"
]
]
},
{
"id": "9804124babada246",
"type": "ui-button",
"z": "1362a4b4f08f3d5b",
"g": "b8a64a86d3eb3506",
"group": "773eef4fbdd58da8",
"name": "delete",
"label": "",
"order": 2,
"width": "6",
"height": "1",
"emulateClick": false,
"tooltip": "",
"color": "",
"bgcolor": "",
"className": "",
"icon": "close",
"iconPosition": "left",
"payload": "",
"payloadType": "str",
"topic": "topic",
"topicType": "msg",
"x": 430,
"y": 3500,
"wires": [
[
"9b255197471d7224"
]
]
},
{
"id": "dc7b00050a7d145a",
"type": "link in",
"z": "1362a4b4f08f3d5b",
"g": "b8a64a86d3eb3506",
"name": "entities - delete room",
"links": [
"39c9aaaef7274169",
"69f377a19c3aaebb"
],
"x": 135,
"y": 3380,
"wires": [
[
"44639ce55332cbf7"
]
]
},
{
"id": "39c9aaaef7274169",
"type": "link out",
"z": "1362a4b4f08f3d5b",
"g": "b8a64a86d3eb3506",
"name": "entities - delete room",
"mode": "link",
"links": [
"dc7b00050a7d145a",
"6934471d55d3dc61"
],
"x": 1295,
"y": 3560,
"wires": []
},
{
"id": "9b255197471d7224",
"type": "change",
"z": "1362a4b4f08f3d5b",
"g": "b8a64a86d3eb3506",
"name": "delete room from global",
"rules": [
{
"t": "delete",
"p": "rooms[msg.room]",
"pt": "global"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 650,
"y": 3500,
"wires": [
[
"2e60e757450968dc"
]
]
},
{
"id": "d4606f08690adde6",
"type": "change",
"z": "1362a4b4f08f3d5b",
"g": "b8a64a86d3eb3506",
"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": "Pièce supprimée",
"tot": "str"
},
{
"t": "set",
"p": "repeat",
"pt": "msg",
"to": "true",
"tot": "bool"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1120,
"y": 3500,
"wires": [
[
"607bdd179757b5c7",
"39c9aaaef7274169"
]
]
},
{
"id": "607bdd179757b5c7",
"type": "debug",
"z": "1362a4b4f08f3d5b",
"g": "b8a64a86d3eb3506",
"name": "entities - delete room",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "room",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 1380,
"y": 3500,
"wires": []
},
{
"id": "2e60e757450968dc",
"type": "delay",
"z": "1362a4b4f08f3d5b",
"g": "b8a64a86d3eb3506",
"name": "wait 150 ms",
"pauseType": "delay",
"timeout": "150",
"timeoutUnits": "milliseconds",
"rate": "1",
"nbRateUnits": "1",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": false,
"allowrate": false,
"outputs": 1,
"x": 890,
"y": 3500,
"wires": [
[
"d4606f08690adde6"
]
]
},
{
"id": "33a339c0afc1ba9a",
"type": "switch",
"z": "1362a4b4f08f3d5b",
"g": "b8a64a86d3eb3506",
"name": "check room",
"property": "room",
"propertyType": "msg",
"rules": [
{
"t": "regex",
"v": "(system|room|thermostat|agenda|home)",
"vt": "str",
"case": false
},
{
"t": "else"
}
],
"checkall": "false",
"repair": false,
"outputs": 2,
"x": 1010,
"y": 3380,
"wires": [
[
"ae105b35b7dfbc69"
],
[
"66d2402c36529cd8"
]
]
},
{
"id": "ae105b35b7dfbc69",
"type": "change",
"z": "1362a4b4f08f3d5b",
"g": "b8a64a86d3eb3506",
"name": "add",
"rules": [
{
"t": "set",
"p": "delete.roomsoptions[msg.parts.index]",
"pt": "flow",
"to": "{\t 'label':msg.room&' (system)',\t 'value':''\t}",
"tot": "jsonata"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1190,
"y": 3380,
"wires": [
[
"66b74056a86a68c5"
]
]
},
{
"id": "a0202211b5f8a9ce",
"type": "ui-button",
"z": "1362a4b4f08f3d5b",
"g": "433d0b51637d03f5",
"group": "851105d76914a281",
"name": "reload",
"label": "",
"order": 1,
"width": "6",
"height": "1",
"emulateClick": false,
"tooltip": "",
"color": "",
"bgcolor": "",
"className": "",
"icon": "reload",
"iconPosition": "left",
"payload": "",
"payloadType": "str",
"topic": "topic",
"topicType": "msg",
"x": 270,
"y": 3680,
"wires": [
[
"d24a1016b1615427"
]
]
},
{
"id": "d24a1016b1615427",
"type": "change",
"z": "1362a4b4f08f3d5b",
"g": "433d0b51637d03f5",
"name": "from global",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "rooms",
"tot": "global"
},
{
"t": "set",
"p": "import",
"pt": "flow",
"to": "{}",
"tot": "jsonata"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 450,
"y": 3680,
"wires": [
[
"20a79d9eeb90fda6"
]
]
},
{
"id": "726ccca1e080bf6b",
"type": "ui-text-input",
"z": "1362a4b4f08f3d5b",
"g": "433d0b51637d03f5",
"group": "851105d76914a281",
"name": "",
"label": "",
"order": 2,
"width": "6",
"height": "3",
"topic": "topic",
"topicType": "msg",
"mode": "textarea",
"delay": 300,
"passthru": true,
"sendOnDelay": false,
"sendOnBlur": true,
"sendOnEnter": true,
"className": "",
"x": 820,
"y": 3680,
"wires": [
[
"695be3c75559690b"
]
]
},
{
"id": "695be3c75559690b",
"type": "change",
"z": "1362a4b4f08f3d5b",
"g": "433d0b51637d03f5",
"name": "to flow",
"rules": [
{
"t": "set",
"p": "import.content",
"pt": "flow",
"to": "payload",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1010,
"y": 3680,
"wires": [
[]
]
},
{
"id": "b7488a10a88f20a9",
"type": "ui-button",
"z": "1362a4b4f08f3d5b",
"g": "433d0b51637d03f5",
"group": "851105d76914a281",
"name": "import",
"label": "",
"order": 3,
"width": "6",
"height": "1",
"emulateClick": false,
"tooltip": "",
"color": "",
"bgcolor": "",
"className": "",
"icon": "plus",
"iconPosition": "left",
"payload": "",
"payloadType": "str",
"topic": "topic",
"topicType": "msg",
"x": 270,
"y": 3740,
"wires": [
[
"0949b6119fa62e77"
]
]
},
{
"id": "0949b6119fa62e77",
"type": "change",
"z": "1362a4b4f08f3d5b",
"g": "433d0b51637d03f5",
"name": "from flow",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "import.content",
"tot": "flow"
},
{
"t": "set",
"p": "import.message",
"pt": "flow",
"to": "Pièces importé avec succès",
"tot": "str"
},
{
"t": "delete",
"p": "entity",
"pt": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 440,
"y": 3740,
"wires": [
[
"9606333fe00f01bb"
]
]
},
{
"id": "9606333fe00f01bb",
"type": "json",
"z": "1362a4b4f08f3d5b",
"g": "433d0b51637d03f5",
"name": "",
"property": "payload",
"action": "obj",
"pretty": false,
"x": 610,
"y": 3740,
"wires": [
[
"5c4aa68efe456371"
]
]
},
{
"id": "5c4aa68efe456371",
"type": "split",
"z": "1362a4b4f08f3d5b",
"g": "433d0b51637d03f5",
"name": "",
"splt": "\\n",
"spltType": "str",
"arraySplt": 1,
"arraySpltType": "len",
"stream": false,
"addname": "room",
"x": 770,
"y": 3740,
"wires": [
[
"1fa905f4d19b3376"
]
]
},
{
"id": "f83897b1f3c48879",
"type": "link in",
"z": "1362a4b4f08f3d5b",
"g": "433d0b51637d03f5",
"name": "entities - export rooms",
"links": [],
"x": 135,
"y": 3680,
"wires": [
[
"a0202211b5f8a9ce"
]
]
},
{
"id": "20a79d9eeb90fda6",
"type": "json",
"z": "1362a4b4f08f3d5b",
"g": "433d0b51637d03f5",
"name": "",
"property": "payload",
"action": "",
"pretty": true,
"x": 630,
"y": 3680,
"wires": [
[
"726ccca1e080bf6b"
]
]
},
{
"id": "1fa905f4d19b3376",
"type": "switch",
"z": "1362a4b4f08f3d5b",
"g": "433d0b51637d03f5",
"name": "check room",
"property": "room",
"propertyType": "msg",
"rules": [
{
"t": "regex",
"v": "(system|room|thermostat|agenda|home)",
"vt": "str",
"case": false
},
{
"t": "else"
}
],
"checkall": "false",
"repair": false,
"outputs": 2,
"x": 950,
"y": 3740,
"wires": [
[
"d2997f50cec29cce"
],
[
"6f0c74e816a70334"
]
]
},
{
"id": "d2997f50cec29cce",
"type": "change",
"z": "1362a4b4f08f3d5b",
"g": "433d0b51637d03f5",
"name": "message",
"rules": [
{
"t": "set",
"p": "import.message",
"pt": "flow",
"to": "Une pièce n'a pas pu être importé",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1140,
"y": 3740,
"wires": [
[
"8d4d236424edbea8"
]
]
},
{
"id": "6f0c74e816a70334",
"type": "change",
"z": "1362a4b4f08f3d5b",
"g": "433d0b51637d03f5",
"name": "to global",
"rules": [
{
"t": "set",
"p": "entities[msg.md5]",
"pt": "global",
"to": "payload",
"tot": "msg",
"dc": true
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1140,
"y": 3800,
"wires": [
[
"8d4d236424edbea8"
]
]
},
{
"id": "8d4d236424edbea8",
"type": "join",
"z": "1362a4b4f08f3d5b",
"g": "433d0b51637d03f5",
"name": "",
"mode": "auto",
"build": "object",
"property": "payload",
"propertyType": "msg",
"key": "topic",
"joiner": "\\n",
"joinerType": "str",
"accumulate": "false",
"timeout": "",
"count": "",
"reduceRight": false,
"x": 1310,
"y": 3740,
"wires": [
[
"f14ce35482fb5f06"
]
]
},
{
"id": "f14ce35482fb5f06",
"type": "change",
"z": "1362a4b4f08f3d5b",
"g": "433d0b51637d03f5",
"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": "import.message",
"tot": "flow"
},
{
"t": "set",
"p": "repeat",
"pt": "msg",
"to": "true",
"tot": "bool"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1520,
"y": 3740,
"wires": [
[
"087ef495d3f3bf63",
"c8ca16b97279bf5f"
]
]
},
{
"id": "087ef495d3f3bf63",
"type": "debug",
"z": "1362a4b4f08f3d5b",
"g": "433d0b51637d03f5",
"name": "entities - import export room",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 1800,
"y": 3680,
"wires": []
},
{
"id": "c8ca16b97279bf5f",
"type": "link out",
"z": "1362a4b4f08f3d5b",
"g": "433d0b51637d03f5",
"name": "entities - export room",
"mode": "link",
"links": [],
"x": 1695,
"y": 3740,
"wires": []
},
{
"id": "6eafb2a9c1ec95c0",
"type": "link in",
"z": "1362a4b4f08f3d5b",
"g": "d62c9cf0cb81a537",
"name": "entities - rooms to buckets",
"links": [
"f4e4d84dd55f9d0d"
],
"x": 135,
2024-07-21 19:34:43 +00:00
"y": 480,
"wires": [
[
"4e5188bf59004a54"
]
]
},
{
"id": "39740b8338a622fd",
"type": "split",
"z": "1362a4b4f08f3d5b",
"g": "d62c9cf0cb81a537",
2024-07-21 19:34:43 +00:00
"name": "rooms",
"splt": "\\n",
"spltType": "str",
"arraySplt": 1,
"arraySpltType": "len",
"stream": false,
"addname": "room",
2024-07-21 19:34:43 +00:00
"property": "payload",
"x": 650,
"y": 480,
"wires": [
[
2024-07-21 19:34:43 +00:00
"fc14608145819575",
"69a45eebaa58325f"
]
]
},
{
"id": "4e5188bf59004a54",
"type": "change",
"z": "1362a4b4f08f3d5b",
"g": "d62c9cf0cb81a537",
2024-07-21 19:34:43 +00:00
"name": "get rooms from global",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "rooms",
"tot": "global"
},
{
"t": "set",
"p": "payload.home",
"pt": "msg",
"to": "true",
"tot": "bool"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
2024-07-21 19:34:43 +00:00
"x": 440,
"y": 480,
"wires": [
[
"39740b8338a622fd"
]
]
},
{
"id": "cc946bae3f4b46d8",
"type": "change",
"z": "1362a4b4f08f3d5b",
"g": "d62c9cf0cb81a537",
2024-07-21 19:34:43 +00:00
"name": "to global metrics",
"rules": [
{
"t": "set",
"p": "metrics[msg.room]",
"pt": "global",
"to": "{}",
"tot": "jsonata"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
2024-07-21 19:34:43 +00:00
"x": 1040,
"y": 480,
"wires": [
[]
]
},
{
"id": "fc14608145819575",
"type": "switch",
"z": "1362a4b4f08f3d5b",
"g": "d62c9cf0cb81a537",
"name": "has bucket",
"property": "metrics",
"propertyType": "global",
"rules": [
{
"t": "hask",
"v": "room",
"vt": "msg"
},
{
"t": "else"
}
],
"checkall": "false",
"repair": false,
"outputs": 2,
2024-07-21 19:34:43 +00:00
"x": 830,
"y": 480,
"wires": [
[],
[
"cc946bae3f4b46d8"
]
]
2024-07-21 19:34:43 +00:00
},
{
"id": "6b5dd5979114ad9c",
"type": "comment",
"z": "1362a4b4f08f3d5b",
"g": "d62c9cf0cb81a537",
"name": "buckets which are rooms",
"info": "",
"x": 590,
"y": 420,
"wires": []
},
{
"id": "a1dbeb8cf51c3366",
"type": "inject",
"z": "1362a4b4f08f3d5b",
"g": "d62c9cf0cb81a537",
"name": "reload rooms",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 210,
"y": 420,
"wires": [
[
"4e5188bf59004a54"
]
]
2024-05-06 20:15:18 +00:00
}
]