iotredloop/flows/P.API.json

5922 lines
No EOL
107 KiB
JSON

[
{
"id": "f125f568d4e332ee",
"type": "tab",
"label": "P.API",
"disabled": false,
"info": "",
"env": []
},
{
"id": "9a5f8bbe3eabf5fb",
"type": "group",
"z": "f125f568d4e332ee",
"name": "REOLINK - camera",
"style": {
"fill": "#777777",
"fill-opacity": "0.05",
"label": true
},
"nodes": [
"636790a6de6bdeca",
"e9ac143262e4b9a0",
"4408e79a921abde7"
],
"x": 68,
"y": 173,
"w": 1354,
"h": 194
},
{
"id": "571cfd384a015b88",
"type": "group",
"z": "f125f568d4e332ee",
"name": "Daikin - BRP069B45",
"style": {
"fill": "#777777",
"fill-opacity": "0.05",
"label": true
},
"nodes": [
"9cdc88788fe441f1",
"360ce5f1d0de3811",
"e7dd5536e7ec485b",
"c845a1c03f4d92c1",
"00798774fd655f5e",
"56543977028aa001",
"8aac22b29281bbb2"
],
"x": 68,
"y": 413,
"w": 5954,
"h": 794
},
{
"id": "6c796c0f0a2e4a4b",
"type": "group",
"z": "f125f568d4e332ee",
"name": "catch error",
"style": {
"fill": "#ff0000",
"fill-opacity": "0.05",
"label": true,
"stroke": "#ff0000"
},
"nodes": [
"b45f1179a641d133",
"3df393955c61492b",
"7a47df709c00596e"
],
"x": 534,
"y": 19,
"w": 422,
"h": 82
},
{
"id": "96eb2a79eb4c26b2",
"type": "group",
"z": "f125f568d4e332ee",
"name": "api - ecu-c - device",
"style": {
"fill": "#777777",
"fill-opacity": "0.05",
"label": true
},
"nodes": [
"e3693344db474a0a",
"709f263740a61967",
"c2f0571e97f072d9",
"a839571a87dd2aa6",
"97176af7973174dd"
],
"x": 68,
"y": 1253,
"w": 4604,
"h": 374
},
{
"id": "f415bb3d48bbe3f8",
"type": "group",
"z": "f125f568d4e332ee",
"name": "api - nodered",
"style": {
"fill": "#777777",
"fill-opacity": "0.05",
"label": true
},
"nodes": [
"b72b30ef40073df1",
"6402ef93b3ea92bd",
"4b0e15b62cc0c407",
"5b5a2f2cb0f13d57"
],
"x": 68,
"y": 1673,
"w": 2934,
"h": 254
},
{
"id": "636790a6de6bdeca",
"type": "group",
"z": "f125f568d4e332ee",
"g": "9a5f8bbe3eabf5fb",
"name": "api - camera - device",
"style": {
"fill": "#ffC000",
"fill-opacity": "0.05",
"label": true
},
"nodes": [
"99fe787fc1aa2efe",
"a54905c20392b984",
"cd58e411fe4d34cd",
"61651b0ee41123b7",
"7c230d4cdca2bfea",
"4e3f5c09468d189b"
],
"x": 534,
"y": 199,
"w": 862,
"h": 142
},
{
"id": "9cdc88788fe441f1",
"type": "group",
"z": "f125f568d4e332ee",
"g": "571cfd384a015b88",
"name": "api - BRP069B45 - device",
"style": {
"label": true,
"fill": "#ffC000",
"fill-opacity": "0.05"
},
"nodes": [
"9405d14c97dba7e5",
"61e245f74e07b10d",
"e3c4ae3ddd50eec2",
"011ade793e7bc445",
"fe303e4021a5b4be",
"038b2def0f9a28ae",
"2a9e3b488590c435",
"fa538e7bec527b6f",
"51b51889079ebf6c",
"ddd2fdbcdb9c86c1",
"584d6b722534c912",
"f0caf0d00683cab6",
"2ea0e31ea4bcc4e0",
"5075e1b00bd279ed",
"ed78d57addcfaed4",
"48d093a809c863d7"
],
"x": 534,
"y": 439,
"w": 942,
"h": 742
},
{
"id": "360ce5f1d0de3811",
"type": "group",
"z": "f125f568d4e332ee",
"g": "571cfd384a015b88",
"name": "api - BRP069B45 - source",
"style": {
"fill": "#0070c0",
"fill-opacity": "0.05",
"label": true
},
"nodes": [
"f71143d4a1e865c3",
"8608637b5a26bca7",
"5e888e23163ac3bf",
"6943689df4884df3",
"7634941bff66a6dd",
"af1d46d32e7d572e",
"1717b4b42c3de1df",
"28b4c85488f128d5",
"bffe192d318c5b7b",
"4a0ee4c3c569cf57",
"bc238f831322f260",
"5c02d7293ada883c",
"873fffb1d263db71",
"8156394d9b7d6e42",
"1ce065ee95e4bc96",
"da2926c9f2b6bf96",
"30827d65144b688f",
"c578d346dcc9f38e",
"6c341edbdc85864c",
"05632f2f980cdf7b",
"9ef2d8276441403e",
"0fb952b271143df6",
"99ba27f17405021f"
],
"x": 1574,
"y": 439,
"w": 2052,
"h": 262
},
{
"id": "e7dd5536e7ec485b",
"type": "group",
"z": "f125f568d4e332ee",
"g": "571cfd384a015b88",
"name": "api - BRP069B45 - metric",
"style": {
"fill": "#92d04f",
"fill-opacity": "0.05",
"label": true
},
"nodes": [
"7efac7e387d141ec",
"ba235aab7dfb1657",
"cfe63595d3b8995f",
"876b1f20d9cf3e10",
"8148c9d62d0a05ab",
"f202d1365abe395c",
"9d79f271f0274c74",
"ed0961c2ec67452b",
"8fa6a7c7df79344c",
"d5788e29f1e344be",
"efec7c8362bd6496",
"2c35832edfa0d2fc",
"1a5051a42ca6c504",
"bc4daaee49052e86"
],
"x": 3694,
"y": 439,
"w": 2042,
"h": 142
},
{
"id": "c845a1c03f4d92c1",
"type": "group",
"z": "f125f568d4e332ee",
"g": "571cfd384a015b88",
"name": "api - BRP069B45 - call",
"style": {
"fill": "#ff0000",
"fill-opacity": "0.05",
"label": true
},
"nodes": [
"786bfd43841bb244",
"f721ca03be8ff260",
"f2a95a5b30167059",
"5d1d77696340830c",
"983cd159a0b40113",
"37d6df803145f6b3",
"0f9815dd4369b44e",
"dedd7481c1232f2b",
"221ee97bfed13f5d",
"f8b304d5bd41013d",
"ced32d247bfe4ecd",
"37b01079e497bc64",
"a4813736579f6a19",
"54880878ed729b66",
"aa72fc0611d255ca",
"1af45cb185475ea3",
"2aca27cd78517955",
"78056d2e854d07b8",
"8919c8979775e43c",
"bbfde2c30bb24f53",
"2efdb634d6eff450",
"d1e219d53c99be45",
"17db5a87405dc4cb",
"8f81968d65ec739b",
"c63d0c615d60abc8",
"68aeddd9bd26aa5b"
],
"x": 3694,
"y": 619,
"w": 2302,
"h": 442
},
{
"id": "00798774fd655f5e",
"type": "group",
"z": "f125f568d4e332ee",
"g": "571cfd384a015b88",
"name": "api - BRP069B45 - update thermostat to air conditioner",
"style": {
"fill": "#92d04f",
"fill-opacity": "0.05",
"label": true
},
"nodes": [
"16f4d5aef15c6bdd",
"08048d875b38ceb8",
"d5cdd8f60040d125",
"1d16f018c9c5ace2",
"a76580bfbb24a34e",
"e314d68876ac9938",
"192d06a39b1a1f66",
"517ffa31c1e561c3",
"8296521e661aabf6"
],
"x": 1574,
"y": 739,
"w": 782,
"h": 262
},
{
"id": "e3693344db474a0a",
"type": "group",
"z": "f125f568d4e332ee",
"g": "96eb2a79eb4c26b2",
"name": "api - ecu-c - source",
"style": {
"fill": "#0070c0",
"fill-opacity": "0.05",
"label": true
},
"nodes": [
"42747e8a5076b140",
"0b2db761754711da",
"645a5c37a7442a3a",
"ba1b2e019bac57a0",
"6b69eabc1b4262e7",
"ea470f779e4827f9",
"b1329a14210f3a69",
"2c5ef02ab2fd4b04",
"6f09c4d0fd650430",
"735d536496e9ddda",
"fcb1ab6455b06283",
"2242e0f8f199a633",
"476acc2dcd7993ae",
"9c8f46ffc099ab23",
"7f10b42898985d21",
"4433605232813be4",
"403ed8a53ec05449",
"01722dc818a6feda",
"5616c2ce5c283bbd",
"14040e777a789a38",
"f1de6feff23055f5",
"5b23a7e32b5b478a"
],
"x": 1574,
"y": 1279,
"w": 3072,
"h": 142
},
{
"id": "709f263740a61967",
"type": "group",
"z": "f125f568d4e332ee",
"g": "96eb2a79eb4c26b2",
"name": "home - ecu - device",
"style": {
"label": true,
"fill": "#ffC000",
"fill-opacity": "0.05"
},
"nodes": [
"626fbd5643a10cad",
"d05a833bc0944694",
"6bc13c7cf7683462",
"de60b0422ab7f7a1",
"d59e71f32dca20fe",
"9a4b65c56551cc5a",
"196a9e3b2963d54d",
"13df18e469dd5933",
"2ed136ebd92695c1"
],
"x": 534,
"y": 1279,
"w": 942,
"h": 322
},
{
"id": "c2f0571e97f072d9",
"type": "group",
"z": "f125f568d4e332ee",
"g": "96eb2a79eb4c26b2",
"name": "api- ecu-c - get url",
"style": {
"fill": "#ff0000",
"fill-opacity": "0.05",
"label": true
},
"nodes": [
"487c23a4a5a0bdc3",
"61ad71f1a6e26708",
"6e5199207c64c314",
"747be65a91f87907",
"9ab1093bbdb724bd",
"1630d20b18ae1ca5",
"da2aec8e2b2edecf",
"6e55943b9d5ef0ee"
],
"x": 1574,
"y": 1459,
"w": 1232,
"h": 82
},
{
"id": "a839571a87dd2aa6",
"type": "group",
"z": "f125f568d4e332ee",
"g": "96eb2a79eb4c26b2",
"name": "api - ecu-c - model",
"style": {
"fill": "#001f60",
"fill-opacity": "0.05",
"label": true
},
"nodes": [
"0df2f6e07a121689",
"c58419a94fdc0937",
"ac9c9b4e7caf4c7c"
],
"x": 94,
"y": 1279,
"w": 342,
"h": 82
},
{
"id": "56543977028aa001",
"type": "group",
"z": "f125f568d4e332ee",
"g": "571cfd384a015b88",
"name": "api - BRP069B45 - model",
"style": {
"fill": "#001f60",
"fill-opacity": "0.05",
"label": true
},
"nodes": [
"40de83c24a607884",
"291134c3ae70e68a",
"72a29139af6e48a9"
],
"x": 94,
"y": 439,
"w": 342,
"h": 82
},
{
"id": "e9ac143262e4b9a0",
"type": "group",
"z": "f125f568d4e332ee",
"g": "9a5f8bbe3eabf5fb",
"name": "api - REOLINK - model",
"style": {
"fill": "#001f60",
"fill-opacity": "0.05",
"label": true
},
"nodes": [
"e31b48fc04ade3f3",
"3dc94638f08bfde6",
"f5d43b55f6998570"
],
"x": 94,
"y": 199,
"w": 342,
"h": 82
},
{
"id": "b72b30ef40073df1",
"type": "group",
"z": "f125f568d4e332ee",
"g": "f415bb3d48bbe3f8",
"name": "api - nodered - device",
"style": {
"fill": "#ffC000",
"fill-opacity": "0.05",
"label": true
},
"nodes": [
"8d88dcb327d3404d",
"efcf7b575d53e6c0",
"c9eb3c5aa51745b0",
"968b644498d1743a",
"6469fe2f046f5112",
"4d37e0a09b4ce70b",
"f064e16a50e5d575"
],
"x": 534,
"y": 1699,
"w": 862,
"h": 202
},
{
"id": "6402ef93b3ea92bd",
"type": "group",
"z": "f125f568d4e332ee",
"g": "f415bb3d48bbe3f8",
"name": "api - nodered - source",
"style": {
"fill": "#0070c0",
"fill-opacity": "0.05",
"label": true
},
"nodes": [
"0b957131451db9ef",
"f8309e72971c027c",
"1f263044e8a9dd75",
"17e9b81d88b1604a",
"f6323a0b9073240d",
"20d7953a9ead353a",
"60efdc17c7f5ad29",
"808db065967c9e6d",
"babc2bc27fa9f0e2"
],
"x": 1494,
"y": 1699,
"w": 1482,
"h": 82
},
{
"id": "4b0e15b62cc0c407",
"type": "group",
"z": "f125f568d4e332ee",
"g": "f415bb3d48bbe3f8",
"name": "api - nodered - model",
"style": {
"fill": "#001f60",
"fill-opacity": "0.05",
"label": true
},
"nodes": [
"da360449dd96785f",
"09dc99fbf771a617",
"07107ca09790b060"
],
"x": 94,
"y": 1699,
"w": 342,
"h": 82
},
{
"id": "a4306c9de01d4722",
"type": "group",
"z": "f125f568d4e332ee",
"g": "1021acef5727d683",
"name": "api - clock - source",
"style": {
"fill": "#0070c0",
"fill-opacity": "0.05",
"label": true
},
"nodes": [
"28812ef076d967f4",
"7f0910ae6f903617",
"85890de261cf2a1f",
"ac912f36def02119",
"ffb6d8f6427b4d52",
"7a46605f38735c66",
"b9f3d00e902f65a2",
"1acc4b7b4c392c1f",
"59e31b73c4ea2253",
"5e6d3072053bc3d4",
"61f1ad5814d37ec9"
],
"x": 1134,
"y": 1999,
"w": 1292,
"h": 202
},
{
"id": "69645e55501064d8",
"type": "group",
"z": "f125f568d4e332ee",
"g": "1021acef5727d683",
"name": "api - clock - device",
"style": {
"fill": "#ffC000",
"fill-opacity": "0.05",
"label": true
},
"nodes": [
"685a0ab8aaa24747",
"260725a140f7cb61",
"62d9811cb83cb6dd",
"44266579fe2f82fd",
"0acceaea33c8972d",
"4a4b8dcde9348a97",
"7f8e16b6edfac5e4"
],
"x": 94,
"y": 1999,
"w": 942,
"h": 142
},
{
"id": "1021acef5727d683",
"type": "group",
"z": "f125f568d4e332ee",
"name": "room - clock",
"style": {
"fill": "#777777",
"fill-opacity": "0.05",
"label": true
},
"nodes": [
"69645e55501064d8",
"a4306c9de01d4722"
],
"x": 68,
"y": 1973,
"w": 2384,
"h": 254
},
{
"id": "99fe787fc1aa2efe",
"type": "change",
"z": "f125f568d4e332ee",
"g": "636790a6de6bdeca",
"name": "camera / url / text / *",
"rules": [
{
"t": "set",
"p": "measurement",
"pt": "msg",
"to": "camera",
"tot": "str"
},
{
"t": "set",
"p": "field",
"pt": "msg",
"to": "url",
"tot": "str"
},
{
"t": "set",
"p": "format",
"pt": "msg",
"to": "text",
"tot": "str"
},
{
"t": "set",
"p": "default",
"pt": "msg",
"to": "msg.default?msg.default:''",
"tot": "jsonata"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 920,
"y": 300,
"wires": [
[
"61651b0ee41123b7"
]
]
},
{
"id": "a54905c20392b984",
"type": "link in",
"z": "f125f568d4e332ee",
"g": "636790a6de6bdeca",
"name": "api - camera - device",
"links": [
"546f190f3ec0c90d"
],
"x": 575,
"y": 240,
"wires": [
[
"cd58e411fe4d34cd"
]
]
},
{
"id": "cd58e411fe4d34cd",
"type": "switch",
"z": "f125f568d4e332ee",
"g": "636790a6de6bdeca",
"name": "model",
"property": "model",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "REOLINK",
"vt": "str"
}
],
"checkall": "false",
"repair": false,
"outputs": 1,
"x": 710,
"y": 240,
"wires": [
[
"99fe787fc1aa2efe",
"4e3f5c09468d189b"
]
]
},
{
"id": "61651b0ee41123b7",
"type": "change",
"z": "f125f568d4e332ee",
"g": "636790a6de6bdeca",
"name": "protocol",
"rules": [
{
"t": "set",
"p": "protocol",
"pt": "msg",
"to": "url",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1220,
"y": 240,
"wires": [
[
"7c230d4cdca2bfea"
]
]
},
{
"id": "7c230d4cdca2bfea",
"type": "link out",
"z": "f125f568d4e332ee",
"g": "636790a6de6bdeca",
"name": "api - camera - device",
"mode": "link",
"links": [
"3e1b4213132404be"
],
"x": 1355,
"y": 240,
"wires": []
},
{
"id": "4e3f5c09468d189b",
"type": "change",
"z": "f125f568d4e332ee",
"d": true,
"g": "636790a6de6bdeca",
"name": "brand",
"rules": [
{
"t": "set",
"p": "measurement",
"pt": "msg",
"to": "camera'",
"tot": "str"
},
{
"t": "set",
"p": "field",
"pt": "msg",
"to": "url",
"tot": "str"
},
{
"t": "set",
"p": "brand",
"pt": "msg",
"to": "reolink",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 870,
"y": 240,
"wires": [
[
"61651b0ee41123b7"
]
]
},
{
"id": "4408e79a921abde7",
"type": "comment",
"z": "f125f568d4e332ee",
"g": "9a5f8bbe3eabf5fb",
"name": "camera / url",
"info": "",
"x": 190,
"y": 320,
"wires": []
},
{
"id": "9405d14c97dba7e5",
"type": "link in",
"z": "f125f568d4e332ee",
"g": "9cdc88788fe441f1",
"name": "api - BRP069B45 - device",
"links": [
"546f190f3ec0c90d"
],
"x": 575,
"y": 480,
"wires": [
[
"584d6b722534c912"
]
]
},
{
"id": "61e245f74e07b10d",
"type": "change",
"z": "f125f568d4e332ee",
"g": "9cdc88788fe441f1",
"name": "air conditioner / actif / boolean / true",
"rules": [
{
"t": "set",
"p": "measurement",
"pt": "msg",
"to": "air conditioner",
"tot": "str"
},
{
"t": "set",
"p": "field",
"pt": "msg",
"to": "actif",
"tot": "str"
},
{
"t": "set",
"p": "format",
"pt": "msg",
"to": "boolean",
"tot": "str"
},
{
"t": "set",
"p": "default",
"pt": "msg",
"to": "false",
"tot": "bool"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 960,
"y": 600,
"wires": [
[
"ddd2fdbcdb9c86c1"
]
]
},
{
"id": "e3c4ae3ddd50eec2",
"type": "change",
"z": "f125f568d4e332ee",
"g": "9cdc88788fe441f1",
"name": "air conditioner / mode / text / A",
"rules": [
{
"t": "set",
"p": "measurement",
"pt": "msg",
"to": "air conditioner",
"tot": "str"
},
{
"t": "set",
"p": "field",
"pt": "msg",
"to": "mode",
"tot": "str"
},
{
"t": "set",
"p": "format",
"pt": "msg",
"to": "text",
"tot": "str"
},
{
"t": "set",
"p": "default",
"pt": "msg",
"to": "A",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 950,
"y": 660,
"wires": [
[
"ddd2fdbcdb9c86c1"
]
]
},
{
"id": "011ade793e7bc445",
"type": "change",
"z": "f125f568d4e332ee",
"g": "9cdc88788fe441f1",
"name": "air conditioner / fan rate / text / A",
"rules": [
{
"t": "set",
"p": "measurement",
"pt": "msg",
"to": "air conditioner",
"tot": "str"
},
{
"t": "set",
"p": "field",
"pt": "msg",
"to": "fan rate",
"tot": "str"
},
{
"t": "set",
"p": "format",
"pt": "msg",
"to": "text",
"tot": "str"
},
{
"t": "set",
"p": "default",
"pt": "msg",
"to": "A",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 950,
"y": 720,
"wires": [
[
"ddd2fdbcdb9c86c1"
]
]
},
{
"id": "fe303e4021a5b4be",
"type": "change",
"z": "f125f568d4e332ee",
"g": "9cdc88788fe441f1",
"name": "air conditioner / fan direction / text / 0",
"rules": [
{
"t": "set",
"p": "measurement",
"pt": "msg",
"to": "air conditioner",
"tot": "str"
},
{
"t": "set",
"p": "field",
"pt": "msg",
"to": "fan direction",
"tot": "str"
},
{
"t": "set",
"p": "format",
"pt": "msg",
"to": "text",
"tot": "str"
},
{
"t": "set",
"p": "default",
"pt": "msg",
"to": "0",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 970,
"y": 780,
"wires": [
[
"ddd2fdbcdb9c86c1"
]
]
},
{
"id": "038b2def0f9a28ae",
"type": "change",
"z": "f125f568d4e332ee",
"g": "9cdc88788fe441f1",
"name": "air conditioner / temperature setpoint / text / 21",
"rules": [
{
"t": "set",
"p": "measurement",
"pt": "msg",
"to": "air conditioner",
"tot": "str"
},
{
"t": "set",
"p": "field",
"pt": "msg",
"to": "temperature setpoint",
"tot": "str"
},
{
"t": "set",
"p": "format",
"pt": "msg",
"to": "text",
"tot": "str"
},
{
"t": "set",
"p": "default",
"pt": "msg",
"to": "21",
"tot": "num"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1000,
"y": 900,
"wires": [
[
"ddd2fdbcdb9c86c1"
]
]
},
{
"id": "2a9e3b488590c435",
"type": "link out",
"z": "f125f568d4e332ee",
"g": "9cdc88788fe441f1",
"name": "api - BRP069B45 - device",
"mode": "link",
"links": [
"3e1b4213132404be"
],
"x": 1435,
"y": 480,
"wires": []
},
{
"id": "fa538e7bec527b6f",
"type": "change",
"z": "f125f568d4e332ee",
"g": "9cdc88788fe441f1",
"name": "air conditioner / url / text / *",
"rules": [
{
"t": "set",
"p": "measurement",
"pt": "msg",
"to": "air conditioner",
"tot": "str"
},
{
"t": "set",
"p": "field",
"pt": "msg",
"to": "url",
"tot": "str"
},
{
"t": "set",
"p": "format",
"pt": "msg",
"to": "text",
"tot": "str"
},
{
"t": "set",
"p": "default",
"pt": "msg",
"to": "msg.default?msg.default:''",
"tot": "jsonata"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 940,
"y": 540,
"wires": [
[
"ddd2fdbcdb9c86c1"
]
]
},
{
"id": "51b51889079ebf6c",
"type": "change",
"z": "f125f568d4e332ee",
"d": true,
"g": "9cdc88788fe441f1",
"name": "brand",
"rules": [
{
"t": "set",
"p": "measurement",
"pt": "msg",
"to": "air conditioner",
"tot": "str"
},
{
"t": "set",
"p": "field",
"pt": "msg",
"to": "url",
"tot": "str"
},
{
"t": "set",
"p": "brand",
"pt": "msg",
"to": "daikin",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 870,
"y": 480,
"wires": [
[
"ddd2fdbcdb9c86c1"
]
]
},
{
"id": "ddd2fdbcdb9c86c1",
"type": "change",
"z": "f125f568d4e332ee",
"g": "9cdc88788fe441f1",
"name": "protocol",
"rules": [
{
"t": "set",
"p": "protocol",
"pt": "msg",
"to": "url",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1300,
"y": 480,
"wires": [
[
"2a9e3b488590c435"
]
]
},
{
"id": "584d6b722534c912",
"type": "switch",
"z": "f125f568d4e332ee",
"g": "9cdc88788fe441f1",
"name": "model",
"property": "model",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "BRP069B45",
"vt": "str"
}
],
"checkall": "false",
"repair": false,
"outputs": 1,
"x": 710,
"y": 480,
"wires": [
[
"51b51889079ebf6c",
"fa538e7bec527b6f",
"61e245f74e07b10d",
"e3c4ae3ddd50eec2",
"011ade793e7bc445",
"fe303e4021a5b4be",
"038b2def0f9a28ae",
"f0caf0d00683cab6",
"2ea0e31ea4bcc4e0",
"5075e1b00bd279ed",
"ed78d57addcfaed4",
"48d093a809c863d7"
]
]
},
{
"id": "8aac22b29281bbb2",
"type": "comment",
"z": "f125f568d4e332ee",
"g": "571cfd384a015b88",
"name": "air conditioner / url",
"info": "",
"x": 210,
"y": 560,
"wires": []
},
{
"id": "f0caf0d00683cab6",
"type": "change",
"z": "f125f568d4e332ee",
"g": "9cdc88788fe441f1",
"name": "cible / pilot / boolean / false",
"rules": [
{
"t": "set",
"p": "measurement",
"pt": "msg",
"to": "cible",
"tot": "str"
},
{
"t": "set",
"p": "field",
"pt": "msg",
"to": "pilot",
"tot": "str"
},
{
"t": "set",
"p": "format",
"pt": "msg",
"to": "boolean",
"tot": "str"
},
{
"t": "set",
"p": "default",
"pt": "msg",
"to": "false",
"tot": "bool"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 940,
"y": 960,
"wires": [
[
"ddd2fdbcdb9c86c1"
]
]
},
{
"id": "2ea0e31ea4bcc4e0",
"type": "change",
"z": "f125f568d4e332ee",
"g": "9cdc88788fe441f1",
"name": "thermostat / pilot / boolean / false",
"rules": [
{
"t": "set",
"p": "measurement",
"pt": "msg",
"to": "thermostat",
"tot": "str"
},
{
"t": "set",
"p": "field",
"pt": "msg",
"to": "pilot",
"tot": "str"
},
{
"t": "set",
"p": "format",
"pt": "msg",
"to": "boolean",
"tot": "str"
},
{
"t": "set",
"p": "default",
"pt": "msg",
"to": "false",
"tot": "bool"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 960,
"y": 1020,
"wires": [
[
"ddd2fdbcdb9c86c1"
]
]
},
{
"id": "5075e1b00bd279ed",
"type": "change",
"z": "f125f568d4e332ee",
"g": "9cdc88788fe441f1",
"name": "temperature / air conditioner / number / 20",
"rules": [
{
"t": "set",
"p": "measurement",
"pt": "msg",
"to": "temperature",
"tot": "str"
},
{
"t": "set",
"p": "field",
"pt": "msg",
"to": "air conditioner",
"tot": "str"
},
{
"t": "set",
"p": "format",
"pt": "msg",
"to": "number",
"tot": "str"
},
{
"t": "set",
"p": "default",
"pt": "msg",
"to": "20",
"tot": "num"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 980,
"y": 1080,
"wires": [
[
"ddd2fdbcdb9c86c1"
]
]
},
{
"id": "ed78d57addcfaed4",
"type": "change",
"z": "f125f568d4e332ee",
"g": "9cdc88788fe441f1",
"name": "power / air conditioner / number / 0",
"rules": [
{
"t": "set",
"p": "measurement",
"pt": "msg",
"to": "power",
"tot": "str"
},
{
"t": "set",
"p": "field",
"pt": "msg",
"to": "air conditioner",
"tot": "str"
},
{
"t": "set",
"p": "format",
"pt": "msg",
"to": "number",
"tot": "str"
},
{
"t": "set",
"p": "default",
"pt": "msg",
"to": "0",
"tot": "num"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 960,
"y": 1140,
"wires": [
[
"ddd2fdbcdb9c86c1"
]
]
},
{
"id": "48d093a809c863d7",
"type": "change",
"z": "f125f568d4e332ee",
"g": "9cdc88788fe441f1",
"name": "air conditioner / advanced / text / ",
"rules": [
{
"t": "set",
"p": "measurement",
"pt": "msg",
"to": "air conditioner",
"tot": "str"
},
{
"t": "set",
"p": "field",
"pt": "msg",
"to": "advanced",
"tot": "str"
},
{
"t": "set",
"p": "format",
"pt": "msg",
"to": "text",
"tot": "str"
},
{
"t": "set",
"p": "default",
"pt": "msg",
"to": "",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 950,
"y": 840,
"wires": [
[
"ddd2fdbcdb9c86c1"
]
]
},
{
"id": "f71143d4a1e865c3",
"type": "link in",
"z": "f125f568d4e332ee",
"g": "360ce5f1d0de3811",
"name": "api - BRP069B45 - source",
"links": [
"004bb30c27c94fb4"
],
"x": 1615,
"y": 540,
"wires": [
[
"8608637b5a26bca7"
]
]
},
{
"id": "8608637b5a26bca7",
"type": "change",
"z": "f125f568d4e332ee",
"g": "360ce5f1d0de3811",
"name": "from global",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "metrics",
"tot": "global"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1770,
"y": 540,
"wires": [
[
"5e888e23163ac3bf"
]
]
},
{
"id": "5e888e23163ac3bf",
"type": "split",
"z": "f125f568d4e332ee",
"g": "360ce5f1d0de3811",
"name": "",
"splt": "\\n",
"spltType": "str",
"arraySplt": 1,
"arraySpltType": "len",
"stream": false,
"addname": "bucket",
"x": 1950,
"y": 540,
"wires": [
[
"6943689df4884df3"
]
]
},
{
"id": "6943689df4884df3",
"type": "switch",
"z": "f125f568d4e332ee",
"g": "360ce5f1d0de3811",
"name": "measurement",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "hask",
"v": "air conditioner",
"vt": "str"
}
],
"checkall": "false",
"repair": false,
"outputs": 1,
"x": 2140,
"y": 540,
"wires": [
[
"bffe192d318c5b7b"
]
]
},
{
"id": "7634941bff66a6dd",
"type": "debug",
"z": "f125f568d4e332ee",
"g": "360ce5f1d0de3811",
"name": "api - BRP069B45 - source",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 3470,
"y": 480,
"wires": []
},
{
"id": "af1d46d32e7d572e",
"type": "delay",
"z": "f125f568d4e332ee",
"g": "360ce5f1d0de3811",
"name": "50 ms",
"pauseType": "delay",
"timeout": "50",
"timeoutUnits": "milliseconds",
"rate": "1",
"nbRateUnits": "1",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": false,
"allowrate": false,
"outputs": 1,
"x": 2490,
"y": 540,
"wires": [
[
"4a0ee4c3c569cf57"
]
]
},
{
"id": "1717b4b42c3de1df",
"type": "link out",
"z": "f125f568d4e332ee",
"g": "360ce5f1d0de3811",
"name": "api - BRP069B45 - source",
"mode": "link",
"links": [
"206c1fb4a48067df"
],
"x": 3375,
"y": 540,
"wires": []
},
{
"id": "28b4c85488f128d5",
"type": "comment",
"z": "f125f568d4e332ee",
"g": "360ce5f1d0de3811",
"name": "scan buckets to find air conditioner and to query it to update values",
"info": "",
"x": 1840,
"y": 480,
"wires": []
},
{
"id": "bffe192d318c5b7b",
"type": "switch",
"z": "f125f568d4e332ee",
"g": "360ce5f1d0de3811",
"name": "device",
"property": "devices[msg.bucket]['air conditioner']url.model",
"propertyType": "global",
"rules": [
{
"t": "eq",
"v": "BRP069B45",
"vt": "str"
}
],
"checkall": "false",
"repair": false,
"outputs": 1,
"x": 2330,
"y": 540,
"wires": [
[
"af1d46d32e7d572e"
]
]
},
{
"id": "4a0ee4c3c569cf57",
"type": "change",
"z": "f125f568d4e332ee",
"g": "360ce5f1d0de3811",
"name": "get url",
"rules": [
{
"t": "set",
"p": "url",
"pt": "msg",
"to": "payload['air conditioner']url",
"tot": "msg"
},
{
"t": "delete",
"p": "parts",
"pt": "msg"
},
{
"t": "delete",
"p": "payload",
"pt": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 2650,
"y": 540,
"wires": [
[
"bc238f831322f260",
"1ce065ee95e4bc96"
]
]
},
{
"id": "bc238f831322f260",
"type": "link call",
"z": "f125f568d4e332ee",
"g": "360ce5f1d0de3811",
"name": "",
"links": [
"a4813736579f6a19"
],
"linkType": "static",
"timeout": "30",
"x": 2860,
"y": 540,
"wires": [
[
"5c02d7293ada883c"
]
]
},
{
"id": "5c02d7293ada883c",
"type": "split",
"z": "f125f568d4e332ee",
"g": "360ce5f1d0de3811",
"name": "",
"splt": "\\n",
"spltType": "str",
"arraySplt": 1,
"arraySpltType": "len",
"stream": false,
"addname": "field",
"x": 3070,
"y": 540,
"wires": [
[
"873fffb1d263db71"
]
]
},
{
"id": "873fffb1d263db71",
"type": "change",
"z": "f125f568d4e332ee",
"g": "360ce5f1d0de3811",
"name": "set metric",
"rules": [
{
"t": "set",
"p": "measurement",
"pt": "msg",
"to": "air conditioner",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 3240,
"y": 540,
"wires": [
[
"7634941bff66a6dd",
"1717b4b42c3de1df"
]
]
},
{
"id": "8156394d9b7d6e42",
"type": "catch",
"z": "f125f568d4e332ee",
"g": "360ce5f1d0de3811",
"name": "catch query timeout (see query)",
"scope": "group",
"uncaught": false,
"x": 2890,
"y": 480,
"wires": [
[]
]
},
{
"id": "1ce065ee95e4bc96",
"type": "change",
"z": "f125f568d4e332ee",
"g": "360ce5f1d0de3811",
"name": "sensor url",
"rules": [
{
"t": "set",
"p": "url",
"pt": "msg",
"to": "'http://'&msg.url&'/aircon/get_sensor_info'",
"tot": "jsonata"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 2020,
"y": 660,
"wires": [
[
"da2926c9f2b6bf96"
]
]
},
{
"id": "da2926c9f2b6bf96",
"type": "http request",
"z": "f125f568d4e332ee",
"g": "360ce5f1d0de3811",
"name": "",
"method": "GET",
"ret": "txt",
"paytoqs": "ignore",
"url": "",
"tls": "",
"persist": false,
"proxy": "",
"insecureHTTPParser": false,
"authType": "",
"senderr": false,
"headers": [],
"x": 2210,
"y": 660,
"wires": [
[
"30827d65144b688f"
]
]
},
{
"id": "30827d65144b688f",
"type": "switch",
"z": "f125f568d4e332ee",
"g": "360ce5f1d0de3811",
"name": "status",
"property": "statusCode",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "200",
"vt": "num"
}
],
"checkall": "false",
"repair": false,
"outputs": 1,
"x": 2390,
"y": 660,
"wires": [
[
"c578d346dcc9f38e"
]
]
},
{
"id": "c578d346dcc9f38e",
"type": "change",
"z": "f125f568d4e332ee",
"g": "360ce5f1d0de3811",
"name": "decode",
"rules": [
{
"t": "set",
"p": "ac[msg.bucket]",
"pt": "flow",
"to": "{}",
"tot": "jsonata"
},
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "$decodeUrl(msg.payload)",
"tot": "jsonata"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 2560,
"y": 660,
"wires": [
[
"6c341edbdc85864c"
]
]
},
{
"id": "6c341edbdc85864c",
"type": "split",
"z": "f125f568d4e332ee",
"g": "360ce5f1d0de3811",
"name": "pair",
"splt": ",",
"spltType": "str",
"arraySplt": 1,
"arraySpltType": "len",
"stream": false,
"addname": "",
"x": 2730,
"y": 660,
"wires": [
[
"05632f2f980cdf7b"
]
]
},
{
"id": "05632f2f980cdf7b",
"type": "change",
"z": "f125f568d4e332ee",
"g": "360ce5f1d0de3811",
"name": "split",
"rules": [
{
"t": "set",
"p": "pair",
"pt": "msg",
"to": "$split(msg.payload,'=')",
"tot": "jsonata"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 2890,
"y": 660,
"wires": [
[
"9ef2d8276441403e"
]
]
},
{
"id": "9ef2d8276441403e",
"type": "switch",
"z": "f125f568d4e332ee",
"g": "360ce5f1d0de3811",
"name": "key",
"property": "pair[0]",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "mompow",
"vt": "str"
},
{
"t": "eq",
"v": "htemp",
"vt": "str"
}
],
"checkall": "false",
"repair": false,
"outputs": 2,
"x": 3050,
"y": 660,
"wires": [
[
"99ba27f17405021f"
],
[
"0fb952b271143df6"
]
]
},
{
"id": "0fb952b271143df6",
"type": "change",
"z": "f125f568d4e332ee",
"g": "360ce5f1d0de3811",
"name": "temperature",
"rules": [
{
"t": "set",
"p": "measurement",
"pt": "msg",
"to": "temperature",
"tot": "str"
},
{
"t": "set",
"p": "field",
"pt": "msg",
"to": "air conditioner",
"tot": "str"
},
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "$number(msg.pair[1])-1",
"tot": "jsonata"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 3230,
"y": 660,
"wires": [
[
"1717b4b42c3de1df"
]
]
},
{
"id": "99ba27f17405021f",
"type": "change",
"z": "f125f568d4e332ee",
"g": "360ce5f1d0de3811",
"name": "power",
"rules": [
{
"t": "set",
"p": "measurement",
"pt": "msg",
"to": "power",
"tot": "str"
},
{
"t": "set",
"p": "field",
"pt": "msg",
"to": "air conditioner",
"tot": "str"
},
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "$number(msg.pair[1])",
"tot": "jsonata"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 3210,
"y": 600,
"wires": [
[
"1717b4b42c3de1df"
]
]
},
{
"id": "7efac7e387d141ec",
"type": "link in",
"z": "f125f568d4e332ee",
"g": "e7dd5536e7ec485b",
"name": "api - BRP069B45 - metric",
"links": [
"031a6afd8300356a"
],
"x": 3735,
"y": 540,
"wires": [
[
"876b1f20d9cf3e10"
]
]
},
{
"id": "ba235aab7dfb1657",
"type": "link out",
"z": "f125f568d4e332ee",
"g": "e7dd5536e7ec485b",
"name": "api - BRP069B45 - metric error",
"mode": "link",
"links": [],
"x": 5435,
"y": 540,
"wires": []
},
{
"id": "cfe63595d3b8995f",
"type": "change",
"z": "f125f568d4e332ee",
"g": "e7dd5536e7ec485b",
"name": "query",
"rules": [
{
"t": "set",
"p": "url",
"pt": "msg",
"to": "metrics[msg.bucket]['air conditioner']url",
"tot": "global"
},
{
"t": "set",
"p": "updated_payload",
"pt": "msg",
"to": "payload",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 4250,
"y": 540,
"wires": [
[
"d5788e29f1e344be"
]
]
},
{
"id": "876b1f20d9cf3e10",
"type": "switch",
"z": "f125f568d4e332ee",
"g": "e7dd5536e7ec485b",
"name": "measurement",
"property": "measurement",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "air conditioner",
"vt": "str"
}
],
"checkall": "false",
"repair": false,
"outputs": 1,
"x": 3900,
"y": 540,
"wires": [
[
"8148c9d62d0a05ab"
]
]
},
{
"id": "8148c9d62d0a05ab",
"type": "switch",
"z": "f125f568d4e332ee",
"g": "e7dd5536e7ec485b",
"name": "device",
"property": "devices[msg.bucket]['air conditioner']url.model",
"propertyType": "global",
"rules": [
{
"t": "eq",
"v": "BRP069B45",
"vt": "str"
}
],
"checkall": "false",
"repair": false,
"outputs": 1,
"x": 4090,
"y": 540,
"wires": [
[
"cfe63595d3b8995f"
]
]
},
{
"id": "f202d1365abe395c",
"type": "http request",
"z": "f125f568d4e332ee",
"g": "e7dd5536e7ec485b",
"name": "",
"method": "GET",
"ret": "txt",
"paytoqs": false,
"url": "",
"persist": false,
"insecureHTTPParser": false,
"authType": "",
"senderr": false,
"headers": [],
"x": 5130,
"y": 540,
"wires": [
[
"9d79f271f0274c74"
]
]
},
{
"id": "9d79f271f0274c74",
"type": "switch",
"z": "f125f568d4e332ee",
"g": "e7dd5536e7ec485b",
"name": "status",
"property": "statusCode",
"propertyType": "msg",
"rules": [
{
"t": "neq",
"v": "200",
"vt": "num"
}
],
"checkall": "false",
"repair": false,
"outputs": 1,
"x": 5310,
"y": 540,
"wires": [
[
"ed0961c2ec67452b",
"ba235aab7dfb1657"
]
]
},
{
"id": "ed0961c2ec67452b",
"type": "debug",
"z": "f125f568d4e332ee",
"g": "e7dd5536e7ec485b",
"name": "api - BRP069B45 - metric error",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 5560,
"y": 480,
"wires": []
},
{
"id": "8fa6a7c7df79344c",
"type": "switch",
"z": "f125f568d4e332ee",
"g": "e7dd5536e7ec485b",
"name": "check changes",
"property": "payload[msg.field]",
"propertyType": "msg",
"rules": [
{
"t": "neq",
"v": "updated_payload",
"vt": "msg"
}
],
"checkall": "false",
"repair": false,
"outputs": 1,
"x": 4700,
"y": 540,
"wires": [
[
"efec7c8362bd6496"
]
]
},
{
"id": "d5788e29f1e344be",
"type": "link call",
"z": "f125f568d4e332ee",
"g": "e7dd5536e7ec485b",
"name": "",
"links": [
"a4813736579f6a19"
],
"linkType": "static",
"timeout": "30",
"x": 4460,
"y": 540,
"wires": [
[
"8fa6a7c7df79344c"
]
]
},
{
"id": "efec7c8362bd6496",
"type": "change",
"z": "f125f568d4e332ee",
"g": "e7dd5536e7ec485b",
"name": "prepare query",
"rules": [
{
"t": "set",
"p": "payload[msg.field]",
"pt": "msg",
"to": "updated_payload",
"tot": "msg"
},
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "'pow='&(msg.payload.actif?1:0)&\t'&mode='&msg.payload.mode&\t'&adv='&msg.payload.advanced&\t'&stemp='&msg.payload.\"temperature setpoint\"&\t'&shum=0'&\t'&f_rate='&msg.payload.\"fan rate\"&\t'&f_dir='&msg.payload.\"fan direction\"",
"tot": "jsonata"
},
{
"t": "set",
"p": "url",
"pt": "msg",
"to": "'http://'&msg.url&'/aircon/set_control_info?'&msg.payload",
"tot": "jsonata"
},
{
"t": "delete",
"p": "old",
"pt": "msg"
},
{
"t": "delete",
"p": "new",
"pt": "msg"
},
{
"t": "delete",
"p": "updated_payload",
"pt": "msg"
},
{
"t": "delete",
"p": "headsers",
"pt": "msg"
},
{
"t": "delete",
"p": "statusCode",
"pt": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 4920,
"y": 540,
"wires": [
[
"f202d1365abe395c",
"bc4daaee49052e86"
]
]
},
{
"id": "2c35832edfa0d2fc",
"type": "comment",
"z": "f125f568d4e332ee",
"g": "e7dd5536e7ec485b",
"name": "query ac before sending order to see if there'are changes",
"info": "",
"x": 4090,
"y": 480,
"wires": []
},
{
"id": "1a5051a42ca6c504",
"type": "catch",
"z": "f125f568d4e332ee",
"g": "e7dd5536e7ec485b",
"name": "catch query timeout (see query)",
"scope": "group",
"uncaught": false,
"x": 4490,
"y": 480,
"wires": [
[]
]
},
{
"id": "bc4daaee49052e86",
"type": "debug",
"z": "f125f568d4e332ee",
"g": "e7dd5536e7ec485b",
"name": "api - BRP069B45 - metric",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 5170,
"y": 480,
"wires": []
},
{
"id": "786bfd43841bb244",
"type": "change",
"z": "f125f568d4e332ee",
"g": "c845a1c03f4d92c1",
"name": "control url",
"rules": [
{
"t": "set",
"p": "old_url",
"pt": "msg",
"to": "url",
"tot": "msg",
"dc": true
},
{
"t": "set",
"p": "url",
"pt": "msg",
"to": "'http://'&msg.url&'/aircon/get_control_info'",
"tot": "jsonata"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 4040,
"y": 720,
"wires": [
[
"f721ca03be8ff260"
]
]
},
{
"id": "f721ca03be8ff260",
"type": "http request",
"z": "f125f568d4e332ee",
"g": "c845a1c03f4d92c1",
"name": "",
"method": "GET",
"ret": "txt",
"paytoqs": "ignore",
"url": "",
"tls": "",
"persist": false,
"proxy": "",
"insecureHTTPParser": false,
"authType": "",
"senderr": false,
"headers": [],
"x": 4230,
"y": 720,
"wires": [
[
"0f9815dd4369b44e"
]
]
},
{
"id": "f2a95a5b30167059",
"type": "change",
"z": "f125f568d4e332ee",
"g": "c845a1c03f4d92c1",
"name": "decode",
"rules": [
{
"t": "set",
"p": "ac[msg.bucket]",
"pt": "flow",
"to": "{}",
"tot": "jsonata"
},
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "$decodeUrl(msg.payload)",
"tot": "jsonata"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 4580,
"y": 720,
"wires": [
[
"5d1d77696340830c",
"8f81968d65ec739b"
]
]
},
{
"id": "5d1d77696340830c",
"type": "split",
"z": "f125f568d4e332ee",
"g": "c845a1c03f4d92c1",
"name": "pair",
"splt": ",",
"spltType": "str",
"arraySplt": 1,
"arraySpltType": "len",
"stream": false,
"addname": "",
"x": 4750,
"y": 720,
"wires": [
[
"983cd159a0b40113"
]
]
},
{
"id": "983cd159a0b40113",
"type": "change",
"z": "f125f568d4e332ee",
"g": "c845a1c03f4d92c1",
"name": "split",
"rules": [
{
"t": "set",
"p": "pair",
"pt": "msg",
"to": "$split(msg.payload,'=')",
"tot": "jsonata"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 4910,
"y": 720,
"wires": [
[
"37d6df803145f6b3"
]
]
},
{
"id": "37d6df803145f6b3",
"type": "switch",
"z": "f125f568d4e332ee",
"g": "c845a1c03f4d92c1",
"name": "key",
"property": "pair[0]",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "stemp",
"vt": "str"
},
{
"t": "eq",
"v": "f_rate",
"vt": "str"
},
{
"t": "eq",
"v": "f_dir",
"vt": "str"
},
{
"t": "eq",
"v": "mode",
"vt": "str"
},
{
"t": "eq",
"v": "pow",
"vt": "str"
},
{
"t": "eq",
"v": "adv",
"vt": "str"
},
{
"t": "else"
}
],
"checkall": "false",
"repair": false,
"outputs": 7,
"x": 5070,
"y": 720,
"wires": [
[
"dedd7481c1232f2b"
],
[
"221ee97bfed13f5d"
],
[
"f8b304d5bd41013d"
],
[
"ced32d247bfe4ecd"
],
[
"37b01079e497bc64"
],
[
"c63d0c615d60abc8"
],
[
"1af45cb185475ea3"
]
]
},
{
"id": "0f9815dd4369b44e",
"type": "switch",
"z": "f125f568d4e332ee",
"g": "c845a1c03f4d92c1",
"name": "status",
"property": "statusCode",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "200",
"vt": "num"
}
],
"checkall": "false",
"repair": false,
"outputs": 1,
"x": 4410,
"y": 720,
"wires": [
[
"f2a95a5b30167059"
]
]
},
{
"id": "dedd7481c1232f2b",
"type": "change",
"z": "f125f568d4e332ee",
"g": "c845a1c03f4d92c1",
"name": "temperature setpoint",
"rules": [
{
"t": "set",
"p": "ac[msg.bucket]['temperature setpoint']",
"pt": "flow",
"to": "$number(msg.pair[1])",
"tot": "jsonata"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 5280,
"y": 660,
"wires": [
[
"aa72fc0611d255ca"
]
]
},
{
"id": "221ee97bfed13f5d",
"type": "change",
"z": "f125f568d4e332ee",
"g": "c845a1c03f4d92c1",
"name": "fan rate",
"rules": [
{
"t": "set",
"p": "ac[msg.bucket]['fan rate']",
"pt": "flow",
"to": "pair[1]",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 5240,
"y": 720,
"wires": [
[
"aa72fc0611d255ca"
]
]
},
{
"id": "f8b304d5bd41013d",
"type": "change",
"z": "f125f568d4e332ee",
"g": "c845a1c03f4d92c1",
"name": "fan direction",
"rules": [
{
"t": "set",
"p": "ac[msg.bucket]['fan direction']",
"pt": "flow",
"to": "pair[1]",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 5250,
"y": 780,
"wires": [
[
"aa72fc0611d255ca"
]
]
},
{
"id": "ced32d247bfe4ecd",
"type": "change",
"z": "f125f568d4e332ee",
"g": "c845a1c03f4d92c1",
"name": "mode",
"rules": [
{
"t": "set",
"p": "ac[msg.bucket]['mode']",
"pt": "flow",
"to": "pair[1]",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 5230,
"y": 840,
"wires": [
[
"aa72fc0611d255ca"
]
]
},
{
"id": "37b01079e497bc64",
"type": "change",
"z": "f125f568d4e332ee",
"g": "c845a1c03f4d92c1",
"name": "actif",
"rules": [
{
"t": "set",
"p": "ac[msg.bucket]['actif']",
"pt": "flow",
"to": "msg.pair[1]=\"1\"",
"tot": "jsonata"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 5230,
"y": 900,
"wires": [
[
"aa72fc0611d255ca"
]
]
},
{
"id": "a4813736579f6a19",
"type": "link in",
"z": "f125f568d4e332ee",
"g": "c845a1c03f4d92c1",
"name": "api - BRP069B45 - call",
"links": [],
"x": 3735,
"y": 720,
"wires": [
[
"54880878ed729b66"
]
]
},
{
"id": "54880878ed729b66",
"type": "switch",
"z": "f125f568d4e332ee",
"g": "c845a1c03f4d92c1",
"name": "has url",
"property": "url",
"propertyType": "msg",
"rules": [
{
"t": "nnull"
}
],
"checkall": "false",
"repair": false,
"outputs": 1,
"x": 3870,
"y": 720,
"wires": [
[
"786bfd43841bb244"
]
]
},
{
"id": "aa72fc0611d255ca",
"type": "join",
"z": "f125f568d4e332ee",
"g": "c845a1c03f4d92c1",
"name": "",
"mode": "auto",
"build": "object",
"property": "payload",
"propertyType": "msg",
"key": "topic",
"joiner": "\\n",
"joinerType": "str",
"accumulate": "false",
"timeout": "",
"count": "",
"reduceRight": false,
"x": 5490,
"y": 720,
"wires": [
[
"2aca27cd78517955"
]
]
},
{
"id": "1af45cb185475ea3",
"type": "change",
"z": "f125f568d4e332ee",
"g": "c845a1c03f4d92c1",
"name": "null",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "null",
"tot": "jsonata"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 5230,
"y": 1020,
"wires": [
[
"aa72fc0611d255ca"
]
]
},
{
"id": "2aca27cd78517955",
"type": "delay",
"z": "f125f568d4e332ee",
"g": "c845a1c03f4d92c1",
"name": "100 ms",
"pauseType": "delay",
"timeout": "100",
"timeoutUnits": "milliseconds",
"rate": "1",
"nbRateUnits": "1",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": false,
"allowrate": false,
"outputs": 1,
"x": 5660,
"y": 720,
"wires": [
[
"78056d2e854d07b8"
]
]
},
{
"id": "78056d2e854d07b8",
"type": "change",
"z": "f125f568d4e332ee",
"g": "c845a1c03f4d92c1",
"name": "from flow",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "ac[msg.bucket]",
"tot": "flow"
},
{
"t": "set",
"p": "url",
"pt": "msg",
"to": "old_url",
"tot": "msg"
},
{
"t": "delete",
"p": "headers",
"pt": "msg"
},
{
"t": "delete",
"p": "responseUrl",
"pt": "msg"
},
{
"t": "delete",
"p": "redirectList",
"pt": "msg"
},
{
"t": "delete",
"p": "retry",
"pt": "msg"
},
{
"t": "delete",
"p": "pair",
"pt": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 5820,
"y": 720,
"wires": [
[
"8919c8979775e43c"
]
]
},
{
"id": "8919c8979775e43c",
"type": "link out",
"z": "f125f568d4e332ee",
"g": "c845a1c03f4d92c1",
"name": "api - BRP069B45 - call",
"mode": "return",
"links": [],
"x": 5955,
"y": 720,
"wires": []
},
{
"id": "bbfde2c30bb24f53",
"type": "comment",
"z": "f125f568d4e332ee",
"g": "c845a1c03f4d92c1",
"name": "use flow.ac to memorise values during split",
"info": "",
"x": 4860,
"y": 840,
"wires": []
},
{
"id": "2efdb634d6eff450",
"type": "comment",
"z": "f125f568d4e332ee",
"g": "c845a1c03f4d92c1",
"name": "See : https://github.com/ehjortberg/daikin-control",
"info": "",
"x": 3900,
"y": 660,
"wires": []
},
{
"id": "d1e219d53c99be45",
"type": "debug",
"z": "f125f568d4e332ee",
"g": "c845a1c03f4d92c1",
"name": "timeout air conditioner",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 4500,
"y": 660,
"wires": []
},
{
"id": "17db5a87405dc4cb",
"type": "catch",
"z": "f125f568d4e332ee",
"g": "c845a1c03f4d92c1",
"name": "catch query timeout",
"scope": "group",
"uncaught": false,
"x": 4250,
"y": 660,
"wires": [
[
"d1e219d53c99be45"
]
]
},
{
"id": "8f81968d65ec739b",
"type": "debug",
"z": "f125f568d4e332ee",
"g": "c845a1c03f4d92c1",
"name": "query url BRP069B45 response",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 4830,
"y": 660,
"wires": []
},
{
"id": "c63d0c615d60abc8",
"type": "change",
"z": "f125f568d4e332ee",
"g": "c845a1c03f4d92c1",
"name": "advanced",
"rules": [
{
"t": "set",
"p": "ac[msg.bucket]['advanced']",
"pt": "flow",
"to": "$string(msg.pair[1])",
"tot": "jsonata"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 5240,
"y": 960,
"wires": [
[
"aa72fc0611d255ca"
]
]
},
{
"id": "68aeddd9bd26aa5b",
"type": "comment",
"z": "f125f568d4e332ee",
"g": "c845a1c03f4d92c1",
"name": "not working",
"info": "",
"x": 5450,
"y": 960,
"wires": []
},
{
"id": "16f4d5aef15c6bdd",
"type": "link in",
"z": "f125f568d4e332ee",
"g": "00798774fd655f5e",
"name": "api - BRP069B45 - update thermostat to air conditioner",
"links": [
"031a6afd8300356a"
],
"x": 1615,
"y": 900,
"wires": [
[
"08048d875b38ceb8"
]
]
},
{
"id": "08048d875b38ceb8",
"type": "switch",
"z": "f125f568d4e332ee",
"g": "00798774fd655f5e",
"name": "trigger",
"property": "path",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "salon/cible/pilot",
"vt": "str"
},
{
"t": "eq",
"v": "salon/air conditioner/actif",
"vt": "str"
},
{
"t": "eq",
"v": "salon/thermostat/temperature setpoint",
"vt": "str"
}
],
"checkall": "false",
"repair": false,
"outputs": 3,
"x": 1750,
"y": 900,
"wires": [
[
"a76580bfbb24a34e",
"8296521e661aabf6"
],
[
"e314d68876ac9938"
],
[
"1d16f018c9c5ace2"
]
]
},
{
"id": "d5cdd8f60040d125",
"type": "link out",
"z": "f125f568d4e332ee",
"g": "00798774fd655f5e",
"name": "api - BRP069B45 - update thermostat to air conditioner",
"mode": "link",
"links": [
"206c1fb4a48067df"
],
"x": 2315,
"y": 900,
"wires": []
},
{
"id": "1d16f018c9c5ace2",
"type": "change",
"z": "f125f568d4e332ee",
"g": "00798774fd655f5e",
"name": "air conditioner / temperature setpoint",
"rules": [
{
"t": "set",
"p": "measurement",
"pt": "msg",
"to": "air conditioner",
"tot": "str"
},
{
"t": "set",
"p": "field",
"pt": "msg",
"to": "temperature setpoint",
"tot": "str"
},
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "metrics[msg.bucket]thermostat['temperature setpoint']",
"tot": "global"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 2010,
"y": 960,
"wires": [
[
"d5cdd8f60040d125"
]
]
},
{
"id": "a76580bfbb24a34e",
"type": "change",
"z": "f125f568d4e332ee",
"g": "00798774fd655f5e",
"name": "ait conditioner / actif",
"rules": [
{
"t": "set",
"p": "measurement",
"pt": "msg",
"to": "air conditioner",
"tot": "str"
},
{
"t": "set",
"p": "field",
"pt": "msg",
"to": "actif",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1960,
"y": 840,
"wires": [
[
"517ffa31c1e561c3"
]
]
},
{
"id": "e314d68876ac9938",
"type": "change",
"z": "f125f568d4e332ee",
"g": "00798774fd655f5e",
"name": "thermostat / pilot",
"rules": [
{
"t": "set",
"p": "measurement",
"pt": "msg",
"to": "thermostat",
"tot": "str"
},
{
"t": "set",
"p": "field",
"pt": "msg",
"to": "pilot",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1950,
"y": 900,
"wires": [
[
"d5cdd8f60040d125"
]
]
},
{
"id": "192d06a39b1a1f66",
"type": "switch",
"z": "f125f568d4e332ee",
"g": "00798774fd655f5e",
"name": "if true",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "true"
}
],
"checkall": "false",
"repair": false,
"outputs": 1,
"x": 2170,
"y": 780,
"wires": [
[
"d5cdd8f60040d125"
]
]
},
{
"id": "517ffa31c1e561c3",
"type": "delay",
"z": "f125f568d4e332ee",
"g": "00798774fd655f5e",
"name": "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": 2180,
"y": 840,
"wires": [
[
"d5cdd8f60040d125"
]
]
},
{
"id": "8296521e661aabf6",
"type": "change",
"z": "f125f568d4e332ee",
"g": "00798774fd655f5e",
"name": "air conditioner / mode",
"rules": [
{
"t": "set",
"p": "measurement",
"pt": "msg",
"to": "air conditioner",
"tot": "str"
},
{
"t": "set",
"p": "field",
"pt": "msg",
"to": "mode",
"tot": "str"
},
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "4",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1960,
"y": 780,
"wires": [
[
"192d06a39b1a1f66"
]
]
},
{
"id": "b45f1179a641d133",
"type": "catch",
"z": "f125f568d4e332ee",
"g": "6c796c0f0a2e4a4b",
"name": "catch error",
"scope": null,
"uncaught": true,
"x": 620,
"y": 60,
"wires": [
[
"3df393955c61492b"
]
]
},
{
"id": "3df393955c61492b",
"type": "change",
"z": "f125f568d4e332ee",
"g": "6c796c0f0a2e4a4b",
"name": "topic",
"rules": [
{
"t": "set",
"p": "topic",
"pt": "msg",
"to": "api",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 790,
"y": 60,
"wires": [
[
"7a47df709c00596e"
]
]
},
{
"id": "7a47df709c00596e",
"type": "link out",
"z": "f125f568d4e332ee",
"g": "6c796c0f0a2e4a4b",
"name": "catch error",
"mode": "link",
"links": [
"a52f0e788cd4dca3"
],
"x": 915,
"y": 60,
"wires": []
},
{
"id": "42747e8a5076b140",
"type": "debug",
"z": "f125f568d4e332ee",
"g": "e3693344db474a0a",
"name": "api - ecu-c - source",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 4510,
"y": 1320,
"wires": []
},
{
"id": "0b2db761754711da",
"type": "change",
"z": "f125f568d4e332ee",
"g": "e3693344db474a0a",
"name": "power",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "payload.each_system_power",
"tot": "msg"
},
{
"t": "set",
"p": "field",
"pt": "msg",
"to": "power",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 4110,
"y": 1380,
"wires": [
[
"ba1b2e019bac57a0"
]
]
},
{
"id": "645a5c37a7442a3a",
"type": "link out",
"z": "f125f568d4e332ee",
"g": "e3693344db474a0a",
"name": "api - ecu-c - source",
"mode": "link",
"links": [
"206c1fb4a48067df"
],
"x": 4435,
"y": 1380,
"wires": []
},
{
"id": "ba1b2e019bac57a0",
"type": "function",
"z": "f125f568d4e332ee",
"g": "e3693344db474a0a",
"name": "cleanup",
"func": "var msg = msg;\nvar newmsg = {};\n\nnewmsg.payload = msg.payload\nnewmsg.bucket = msg.bucket;\nnewmsg.measurement = 'photovoltaic';\nnewmsg.field = msg.field;\n//newmsg.repeat = true;\n\nreturn newmsg;",
"outputs": 1,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 4300,
"y": 1320,
"wires": [
[
"42747e8a5076b140",
"645a5c37a7442a3a"
]
]
},
{
"id": "6b69eabc1b4262e7",
"type": "comment",
"z": "f125f568d4e332ee",
"g": "e3693344db474a0a",
"name": "api refresh rate is by 5 minutes",
"info": "",
"x": 1730,
"y": 1380,
"wires": []
},
{
"id": "ea470f779e4827f9",
"type": "change",
"z": "f125f568d4e332ee",
"g": "e3693344db474a0a",
"name": "url",
"rules": [
{
"t": "set",
"p": "topic",
"pt": "msg",
"to": "",
"tot": "str"
},
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "",
"tot": "str"
},
{
"t": "set",
"p": "url",
"pt": "msg",
"to": "'http://'&msg.url&'/index.php/meter/old_meter_power_graph'",
"tot": "jsonata"
},
{
"t": "set",
"p": "limit",
"pt": "msg",
"to": "$millis()-300000",
"tot": "jsonata"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 2530,
"y": 1320,
"wires": [
[
"b1329a14210f3a69"
]
]
},
{
"id": "b1329a14210f3a69",
"type": "http request",
"z": "f125f568d4e332ee",
"g": "e3693344db474a0a",
"name": "",
"method": "GET",
"ret": "txt",
"paytoqs": false,
"url": "",
"persist": false,
"insecureHTTPParser": false,
"authType": "",
"senderr": false,
"headers": [],
"x": 2710,
"y": 1320,
"wires": [
[
"2c5ef02ab2fd4b04"
]
]
},
{
"id": "2c5ef02ab2fd4b04",
"type": "switch",
"z": "f125f568d4e332ee",
"g": "e3693344db474a0a",
"name": "status",
"property": "statusCode",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "200",
"vt": "num"
}
],
"checkall": "false",
"repair": false,
"outputs": 1,
"x": 2890,
"y": 1320,
"wires": [
[
"6f09c4d0fd650430"
]
]
},
{
"id": "6f09c4d0fd650430",
"type": "json",
"z": "f125f568d4e332ee",
"g": "e3693344db474a0a",
"name": "",
"property": "payload",
"action": "",
"pretty": false,
"x": 3050,
"y": 1320,
"wires": [
[
"476acc2dcd7993ae",
"7f10b42898985d21"
]
]
},
{
"id": "735d536496e9ddda",
"type": "split",
"z": "f125f568d4e332ee",
"g": "e3693344db474a0a",
"name": "",
"splt": "\\n",
"spltType": "str",
"arraySplt": 1,
"arraySpltType": "len",
"stream": false,
"addname": "",
"x": 3790,
"y": 1320,
"wires": [
[
"9c8f46ffc099ab23"
]
]
},
{
"id": "fcb1ab6455b06283",
"type": "change",
"z": "f125f568d4e332ee",
"g": "e3693344db474a0a",
"name": "count",
"rules": [
{
"t": "set",
"p": "count",
"pt": "msg",
"to": "$count(msg.payload)-1",
"tot": "jsonata"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 3450,
"y": 1320,
"wires": [
[
"2242e0f8f199a633"
]
]
},
{
"id": "2242e0f8f199a633",
"type": "switch",
"z": "f125f568d4e332ee",
"g": "e3693344db474a0a",
"name": "has result",
"property": "count",
"propertyType": "msg",
"rules": [
{
"t": "gte",
"v": "0",
"vt": "num"
}
],
"checkall": "false",
"repair": false,
"outputs": 1,
"x": 3620,
"y": 1320,
"wires": [
[
"735d536496e9ddda"
]
]
},
{
"id": "476acc2dcd7993ae",
"type": "change",
"z": "f125f568d4e332ee",
"g": "e3693344db474a0a",
"name": "production power",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "payload.power1",
"tot": "msg"
},
{
"t": "set",
"p": "field",
"pt": "msg",
"to": "production power",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 3250,
"y": 1320,
"wires": [
[
"fcb1ab6455b06283"
]
]
},
{
"id": "9c8f46ffc099ab23",
"type": "switch",
"z": "f125f568d4e332ee",
"g": "e3693344db474a0a",
"name": "recent",
"property": "payload.time",
"propertyType": "msg",
"rules": [
{
"t": "gt",
"v": "limit",
"vt": "msg"
}
],
"checkall": "false",
"repair": false,
"outputs": 1,
"x": 3950,
"y": 1320,
"wires": [
[
"4433605232813be4"
]
]
},
{
"id": "7f10b42898985d21",
"type": "change",
"z": "f125f568d4e332ee",
"g": "e3693344db474a0a",
"name": "import power",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "payload.power2",
"tot": "msg"
},
{
"t": "set",
"p": "field",
"pt": "msg",
"to": "import power",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 3230,
"y": 1380,
"wires": [
[
"fcb1ab6455b06283"
]
]
},
{
"id": "4433605232813be4",
"type": "change",
"z": "f125f568d4e332ee",
"g": "e3693344db474a0a",
"name": "payload",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "payload.powerA",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 4120,
"y": 1320,
"wires": [
[
"ba1b2e019bac57a0"
]
]
},
{
"id": "626fbd5643a10cad",
"type": "change",
"z": "f125f568d4e332ee",
"g": "709f263740a61967",
"name": "photovoltaic / power / number / 0",
"rules": [
{
"t": "set",
"p": "measurement",
"pt": "msg",
"to": "photovoltaic",
"tot": "str"
},
{
"t": "set",
"p": "field",
"pt": "msg",
"to": "power",
"tot": "str"
},
{
"t": "set",
"p": "format",
"pt": "msg",
"to": "number",
"tot": "str"
},
{
"t": "set",
"p": "default",
"pt": "msg",
"to": "0",
"tot": "num"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 950,
"y": 1440,
"wires": [
[
"13df18e469dd5933"
]
]
},
{
"id": "d05a833bc0944694",
"type": "change",
"z": "f125f568d4e332ee",
"g": "709f263740a61967",
"name": "photovoltaic / production power / number / 0",
"rules": [
{
"t": "set",
"p": "measurement",
"pt": "msg",
"to": "photovoltaic",
"tot": "str"
},
{
"t": "set",
"p": "field",
"pt": "msg",
"to": "production power",
"tot": "str"
},
{
"t": "set",
"p": "format",
"pt": "msg",
"to": "number",
"tot": "str"
},
{
"t": "set",
"p": "default",
"pt": "msg",
"to": "0",
"tot": "num"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 990,
"y": 1500,
"wires": [
[
"13df18e469dd5933"
]
]
},
{
"id": "6bc13c7cf7683462",
"type": "change",
"z": "f125f568d4e332ee",
"g": "709f263740a61967",
"name": "photovoltaic / import power / number / 0",
"rules": [
{
"t": "set",
"p": "measurement",
"pt": "msg",
"to": "photovoltaic",
"tot": "str"
},
{
"t": "set",
"p": "field",
"pt": "msg",
"to": "import power",
"tot": "str"
},
{
"t": "set",
"p": "format",
"pt": "msg",
"to": "number",
"tot": "str"
},
{
"t": "set",
"p": "default",
"pt": "msg",
"to": "0",
"tot": "num"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 980,
"y": 1560,
"wires": [
[
"13df18e469dd5933"
]
]
},
{
"id": "de60b0422ab7f7a1",
"type": "change",
"z": "f125f568d4e332ee",
"g": "709f263740a61967",
"name": "photovoltaic / url / text / *",
"rules": [
{
"t": "set",
"p": "measurement",
"pt": "msg",
"to": "photovoltaic",
"tot": "str"
},
{
"t": "set",
"p": "field",
"pt": "msg",
"to": "url",
"tot": "str"
},
{
"t": "set",
"p": "format",
"pt": "msg",
"to": "text",
"tot": "str"
},
{
"t": "set",
"p": "default",
"pt": "msg",
"to": "msg.default?msg.default:''",
"tot": "jsonata"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 930,
"y": 1380,
"wires": [
[
"13df18e469dd5933"
]
]
},
{
"id": "d59e71f32dca20fe",
"type": "link in",
"z": "f125f568d4e332ee",
"g": "709f263740a61967",
"name": "api - ecu-c - device",
"links": [
"546f190f3ec0c90d"
],
"x": 575,
"y": 1320,
"wires": [
[
"9a4b65c56551cc5a"
]
]
},
{
"id": "9a4b65c56551cc5a",
"type": "switch",
"z": "f125f568d4e332ee",
"g": "709f263740a61967",
"name": "model",
"property": "model",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "ecu-c",
"vt": "str"
}
],
"checkall": "false",
"repair": false,
"outputs": 1,
"x": 710,
"y": 1320,
"wires": [
[
"196a9e3b2963d54d",
"de60b0422ab7f7a1",
"626fbd5643a10cad",
"d05a833bc0944694",
"6bc13c7cf7683462"
]
]
},
{
"id": "196a9e3b2963d54d",
"type": "change",
"z": "f125f568d4e332ee",
"d": true,
"g": "709f263740a61967",
"name": "brand",
"rules": [
{
"t": "set",
"p": "measurement",
"pt": "msg",
"to": "photovoltaic",
"tot": "str"
},
{
"t": "set",
"p": "field",
"pt": "msg",
"to": "url",
"tot": "str"
},
{
"t": "set",
"p": "brand",
"pt": "msg",
"to": "apsystems",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 870,
"y": 1320,
"wires": [
[
"13df18e469dd5933"
]
]
},
{
"id": "13df18e469dd5933",
"type": "change",
"z": "f125f568d4e332ee",
"g": "709f263740a61967",
"name": "protocol",
"rules": [
{
"t": "set",
"p": "protocol",
"pt": "msg",
"to": "url",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1300,
"y": 1320,
"wires": [
[
"2ed136ebd92695c1"
]
]
},
{
"id": "2ed136ebd92695c1",
"type": "link out",
"z": "f125f568d4e332ee",
"g": "709f263740a61967",
"name": "api - ecu-c - device",
"mode": "link",
"links": [
"3e1b4213132404be"
],
"x": 1435,
"y": 1320,
"wires": []
},
{
"id": "403ed8a53ec05449",
"type": "comment",
"z": "f125f568d4e332ee",
"g": "e3693344db474a0a",
"name": "todo: waiying for new tore...",
"info": "",
"x": 3860,
"y": 1380,
"wires": []
},
{
"id": "487c23a4a5a0bdc3",
"type": "link in",
"z": "f125f568d4e332ee",
"g": "c2f0571e97f072d9",
"name": "api- ecu-c - get url",
"links": [],
"x": 1615,
"y": 1500,
"wires": [
[
"61ad71f1a6e26708"
]
]
},
{
"id": "61ad71f1a6e26708",
"type": "change",
"z": "f125f568d4e332ee",
"g": "c2f0571e97f072d9",
"name": "from global",
"rules": [
{
"t": "set",
"p": "old_payload",
"pt": "msg",
"to": "payload",
"tot": "msg"
},
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "metrics",
"tot": "global"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1760,
"y": 1500,
"wires": [
[
"6e5199207c64c314"
]
]
},
{
"id": "6e5199207c64c314",
"type": "split",
"z": "f125f568d4e332ee",
"g": "c2f0571e97f072d9",
"name": "",
"splt": "\\n",
"spltType": "str",
"arraySplt": 1,
"arraySpltType": "len",
"stream": false,
"addname": "bucket",
"x": 1940,
"y": 1500,
"wires": [
[
"747be65a91f87907"
]
]
},
{
"id": "747be65a91f87907",
"type": "switch",
"z": "f125f568d4e332ee",
"g": "c2f0571e97f072d9",
"name": "measurement",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "hask",
"v": "photovoltaic",
"vt": "str"
}
],
"checkall": "false",
"repair": false,
"outputs": 1,
"x": 2130,
"y": 1500,
"wires": [
[
"9ab1093bbdb724bd"
]
]
},
{
"id": "9ab1093bbdb724bd",
"type": "switch",
"z": "f125f568d4e332ee",
"g": "c2f0571e97f072d9",
"name": "device",
"property": "devices[msg.bucket].photovoltaic.url.model",
"propertyType": "global",
"rules": [
{
"t": "eq",
"v": "ecu-c",
"vt": "str"
}
],
"checkall": "false",
"repair": false,
"outputs": 1,
"x": 2320,
"y": 1500,
"wires": [
[
"1630d20b18ae1ca5"
]
]
},
{
"id": "1630d20b18ae1ca5",
"type": "delay",
"z": "f125f568d4e332ee",
"g": "c2f0571e97f072d9",
"name": "50 ms",
"pauseType": "delay",
"timeout": "50",
"timeoutUnits": "milliseconds",
"rate": "1",
"nbRateUnits": "1",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": false,
"allowrate": false,
"outputs": 1,
"x": 2480,
"y": 1500,
"wires": [
[
"da2aec8e2b2edecf"
]
]
},
{
"id": "da2aec8e2b2edecf",
"type": "change",
"z": "f125f568d4e332ee",
"g": "c2f0571e97f072d9",
"name": "get url",
"rules": [
{
"t": "set",
"p": "url",
"pt": "msg",
"to": "payload.photovoltaic.url",
"tot": "msg"
},
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "old.payload",
"tot": "msg"
},
{
"t": "delete",
"p": "parts",
"pt": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 2640,
"y": 1500,
"wires": [
[
"6e55943b9d5ef0ee"
]
]
},
{
"id": "6e55943b9d5ef0ee",
"type": "link out",
"z": "f125f568d4e332ee",
"g": "c2f0571e97f072d9",
"name": "api- ecu-c - get url",
"mode": "return",
"links": [],
"x": 2765,
"y": 1500,
"wires": []
},
{
"id": "01722dc818a6feda",
"type": "link call",
"z": "f125f568d4e332ee",
"g": "e3693344db474a0a",
"name": "",
"links": [
"487c23a4a5a0bdc3"
],
"linkType": "static",
"timeout": "30",
"x": 2330,
"y": 1320,
"wires": [
[
"ea470f779e4827f9"
]
]
},
{
"id": "0df2f6e07a121689",
"type": "link in",
"z": "f125f568d4e332ee",
"g": "a839571a87dd2aa6",
"name": "api - ecu-c - model",
"links": [
"9cb906bf8066d37e"
],
"x": 135,
"y": 1320,
"wires": [
[
"c58419a94fdc0937"
]
]
},
{
"id": "c58419a94fdc0937",
"type": "change",
"z": "f125f568d4e332ee",
"g": "a839571a87dd2aa6",
"name": "model",
"rules": [
{
"t": "set",
"p": "brand",
"pt": "msg",
"to": "apsystems",
"tot": "str"
},
{
"t": "set",
"p": "model",
"pt": "msg",
"to": "ecu-c",
"tot": "str"
},
{
"t": "set",
"p": "protocol",
"pt": "msg",
"to": "api",
"tot": "str"
},
{
"t": "set",
"p": "measurement",
"pt": "msg",
"to": "photovoltaic",
"tot": "str"
},
{
"t": "set",
"p": "field",
"pt": "msg",
"to": "url",
"tot": "str"
},
{
"t": "set",
"p": "format",
"pt": "msg",
"to": "text",
"tot": "str"
},
{
"t": "set",
"p": "default",
"pt": "msg",
"to": "",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 270,
"y": 1320,
"wires": [
[
"ac9c9b4e7caf4c7c"
]
]
},
{
"id": "ac9c9b4e7caf4c7c",
"type": "link out",
"z": "f125f568d4e332ee",
"g": "a839571a87dd2aa6",
"name": "api - ecu-c - model",
"mode": "link",
"links": [
"94aa726ce8973d2c"
],
"x": 395,
"y": 1320,
"wires": []
},
{
"id": "40de83c24a607884",
"type": "link in",
"z": "f125f568d4e332ee",
"g": "56543977028aa001",
"name": "api - BRP069B45 - model",
"links": [
"9cb906bf8066d37e"
],
"x": 135,
"y": 480,
"wires": [
[
"291134c3ae70e68a"
]
]
},
{
"id": "291134c3ae70e68a",
"type": "change",
"z": "f125f568d4e332ee",
"g": "56543977028aa001",
"name": "model",
"rules": [
{
"t": "set",
"p": "brand",
"pt": "msg",
"to": "daikin",
"tot": "str"
},
{
"t": "set",
"p": "model",
"pt": "msg",
"to": "BRP069B45",
"tot": "str"
},
{
"t": "set",
"p": "protocol",
"pt": "msg",
"to": "api",
"tot": "str"
},
{
"t": "set",
"p": "measurement",
"pt": "msg",
"to": "air conditioner",
"tot": "str"
},
{
"t": "set",
"p": "field",
"pt": "msg",
"to": "url",
"tot": "str"
},
{
"t": "set",
"p": "format",
"pt": "msg",
"to": "text",
"tot": "str"
},
{
"t": "set",
"p": "default",
"pt": "msg",
"to": "",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 270,
"y": 480,
"wires": [
[
"72a29139af6e48a9"
]
]
},
{
"id": "72a29139af6e48a9",
"type": "link out",
"z": "f125f568d4e332ee",
"g": "56543977028aa001",
"name": "api - BRP069B45 - model",
"mode": "link",
"links": [
"94aa726ce8973d2c"
],
"x": 395,
"y": 480,
"wires": []
},
{
"id": "97176af7973174dd",
"type": "comment",
"z": "f125f568d4e332ee",
"g": "96eb2a79eb4c26b2",
"name": "photovoltaic / url",
"info": "",
"x": 200,
"y": 1400,
"wires": []
},
{
"id": "e31b48fc04ade3f3",
"type": "link in",
"z": "f125f568d4e332ee",
"g": "e9ac143262e4b9a0",
"name": "api - REOLINK - model",
"links": [
"9cb906bf8066d37e"
],
"x": 135,
"y": 240,
"wires": [
[
"3dc94638f08bfde6"
]
]
},
{
"id": "3dc94638f08bfde6",
"type": "change",
"z": "f125f568d4e332ee",
"g": "e9ac143262e4b9a0",
"name": "model",
"rules": [
{
"t": "set",
"p": "brand",
"pt": "msg",
"to": "reolink",
"tot": "str"
},
{
"t": "set",
"p": "model",
"pt": "msg",
"to": "REOLINK",
"tot": "str"
},
{
"t": "set",
"p": "protocol",
"pt": "msg",
"to": "api",
"tot": "str"
},
{
"t": "set",
"p": "measurement",
"pt": "msg",
"to": "camera",
"tot": "str"
},
{
"t": "set",
"p": "field",
"pt": "msg",
"to": "url",
"tot": "str"
},
{
"t": "set",
"p": "format",
"pt": "msg",
"to": "text",
"tot": "str"
},
{
"t": "set",
"p": "default",
"pt": "msg",
"to": "",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 270,
"y": 240,
"wires": [
[
"f5d43b55f6998570"
]
]
},
{
"id": "f5d43b55f6998570",
"type": "link out",
"z": "f125f568d4e332ee",
"g": "e9ac143262e4b9a0",
"name": "api - REOLINK - model",
"mode": "link",
"links": [
"94aa726ce8973d2c"
],
"x": 395,
"y": 240,
"wires": []
},
{
"id": "5616c2ce5c283bbd",
"type": "link in",
"z": "f125f568d4e332ee",
"g": "e3693344db474a0a",
"name": "api - ecu-c - source",
"links": [
"94c79b8f52f0b6ba"
],
"x": 1615,
"y": 1320,
"wires": [
[
"f1de6feff23055f5"
]
]
},
{
"id": "14040e777a789a38",
"type": "gate",
"z": "f125f568d4e332ee",
"g": "e3693344db474a0a",
"name": "",
"controlTopic": "gate",
"defaultState": "closed",
"openCmd": "open",
"closeCmd": "close",
"toggleCmd": "toggle",
"defaultCmd": "default",
"statusCmd": "status",
"persist": false,
"storeName": "default",
"x": 2130,
"y": 1320,
"wires": [
[
"01722dc818a6feda",
"f1de6feff23055f5"
]
]
},
{
"id": "f1de6feff23055f5",
"type": "trigger",
"z": "f125f568d4e332ee",
"g": "e3693344db474a0a",
"name": "gate and replay",
"op1": "",
"op2": "",
"op1type": "pay",
"op2type": "str",
"duration": "5",
"extend": true,
"overrideDelay": false,
"units": "min",
"reset": "",
"bytopic": "all",
"topic": "topic",
"outputs": 2,
"x": 1780,
"y": 1320,
"wires": [
[
"14040e777a789a38"
],
[
"5b23a7e32b5b478a"
]
]
},
{
"id": "5b23a7e32b5b478a",
"type": "change",
"z": "f125f568d4e332ee",
"g": "e3693344db474a0a",
"name": "clean",
"rules": [
{
"t": "set",
"p": "topic",
"pt": "msg",
"to": "",
"tot": "str"
},
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1970,
"y": 1380,
"wires": [
[
"14040e777a789a38"
]
]
},
{
"id": "8d88dcb327d3404d",
"type": "change",
"z": "f125f568d4e332ee",
"g": "b72b30ef40073df1",
"name": "cpu usage / server* / number / 0",
"rules": [
{
"t": "set",
"p": "measurement",
"pt": "msg",
"to": "cpu usage",
"tot": "str"
},
{
"t": "set",
"p": "field",
"pt": "msg",
"to": "msg.field?msg.field:'server'",
"tot": "jsonata"
},
{
"t": "set",
"p": "format",
"pt": "msg",
"to": "number",
"tot": "str"
},
{
"t": "set",
"p": "default",
"pt": "msg",
"to": "0",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 950,
"y": 1800,
"wires": [
[
"4d37e0a09b4ce70b"
]
]
},
{
"id": "efcf7b575d53e6c0",
"type": "change",
"z": "f125f568d4e332ee",
"g": "b72b30ef40073df1",
"name": "overload / server* / boolean / false",
"rules": [
{
"t": "set",
"p": "measurement",
"pt": "msg",
"to": "overload",
"tot": "str"
},
{
"t": "set",
"p": "field",
"pt": "msg",
"to": "msg.field?msg.field:'server'",
"tot": "jsonata"
},
{
"t": "set",
"p": "format",
"pt": "msg",
"to": "boolean",
"tot": "str"
},
{
"t": "set",
"p": "default",
"pt": "msg",
"to": "false",
"tot": "bool"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 960,
"y": 1860,
"wires": [
[
"4d37e0a09b4ce70b"
]
]
},
{
"id": "0b957131451db9ef",
"type": "link in",
"z": "f125f568d4e332ee",
"g": "6402ef93b3ea92bd",
"name": "api - nodered - source",
"links": [
"004bb30c27c94fb4"
],
"x": 1535,
"y": 1740,
"wires": [
[
"f8309e72971c027c"
]
]
},
{
"id": "f8309e72971c027c",
"type": "cpu",
"z": "f125f568d4e332ee",
"g": "6402ef93b3ea92bd",
"name": "",
"msgCore": false,
"msgOverall": true,
"msgArray": false,
"msgTemp": false,
"x": 1690,
"y": 1740,
"wires": [
[
"f6323a0b9073240d"
]
]
},
{
"id": "1f263044e8a9dd75",
"type": "change",
"z": "f125f568d4e332ee",
"g": "6402ef93b3ea92bd",
"name": "set metric",
"rules": [
{
"t": "set",
"p": "measurement",
"pt": "msg",
"to": "cpu usage",
"tot": "str"
},
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "old_payload",
"tot": "msg"
},
{
"t": "delete",
"p": "old_payload",
"pt": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 2800,
"y": 1740,
"wires": [
[
"17e9b81d88b1604a"
]
]
},
{
"id": "17e9b81d88b1604a",
"type": "link out",
"z": "f125f568d4e332ee",
"g": "6402ef93b3ea92bd",
"name": "api - nodered - source",
"mode": "link",
"links": [
"206c1fb4a48067df"
],
"x": 2935,
"y": 1740,
"wires": []
},
{
"id": "da360449dd96785f",
"type": "link in",
"z": "f125f568d4e332ee",
"g": "4b0e15b62cc0c407",
"name": "api - nodered - model",
"links": [
"9cb906bf8066d37e"
],
"x": 135,
"y": 1740,
"wires": [
[
"09dc99fbf771a617"
]
]
},
{
"id": "09dc99fbf771a617",
"type": "change",
"z": "f125f568d4e332ee",
"g": "4b0e15b62cc0c407",
"name": "model",
"rules": [
{
"t": "set",
"p": "brand",
"pt": "msg",
"to": "nodered",
"tot": "str"
},
{
"t": "set",
"p": "model",
"pt": "msg",
"to": "nodered",
"tot": "str"
},
{
"t": "set",
"p": "protocol",
"pt": "msg",
"to": "api",
"tot": "str"
},
{
"t": "set",
"p": "measurement",
"pt": "msg",
"to": "cpu usage",
"tot": "str"
},
{
"t": "set",
"p": "field",
"pt": "msg",
"to": "server",
"tot": "str"
},
{
"t": "set",
"p": "format",
"pt": "msg",
"to": "number",
"tot": "str"
},
{
"t": "set",
"p": "default",
"pt": "msg",
"to": "0",
"tot": "num"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 270,
"y": 1740,
"wires": [
[
"07107ca09790b060"
]
]
},
{
"id": "07107ca09790b060",
"type": "link out",
"z": "f125f568d4e332ee",
"g": "4b0e15b62cc0c407",
"name": "api - nodered - model",
"mode": "link",
"links": [
"94aa726ce8973d2c"
],
"x": 395,
"y": 1740,
"wires": []
},
{
"id": "c9eb3c5aa51745b0",
"type": "link in",
"z": "f125f568d4e332ee",
"g": "b72b30ef40073df1",
"name": "api - nodered - device",
"links": [
"546f190f3ec0c90d"
],
"x": 575,
"y": 1740,
"wires": [
[
"968b644498d1743a"
]
]
},
{
"id": "968b644498d1743a",
"type": "switch",
"z": "f125f568d4e332ee",
"g": "b72b30ef40073df1",
"name": "model",
"property": "model",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "nodered",
"vt": "str"
}
],
"checkall": "false",
"repair": false,
"outputs": 1,
"x": 710,
"y": 1740,
"wires": [
[
"6469fe2f046f5112",
"8d88dcb327d3404d",
"efcf7b575d53e6c0"
]
]
},
{
"id": "6469fe2f046f5112",
"type": "change",
"z": "f125f568d4e332ee",
"d": true,
"g": "b72b30ef40073df1",
"name": "brand",
"rules": [
{
"t": "set",
"p": "measurement",
"pt": "msg",
"to": "cpu usage",
"tot": "str"
},
{
"t": "set",
"p": "field",
"pt": "msg",
"to": "server",
"tot": "str"
},
{
"t": "set",
"p": "brand",
"pt": "msg",
"to": "nodered",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 870,
"y": 1740,
"wires": [
[
"4d37e0a09b4ce70b"
]
]
},
{
"id": "4d37e0a09b4ce70b",
"type": "change",
"z": "f125f568d4e332ee",
"g": "b72b30ef40073df1",
"name": "protocol",
"rules": [
{
"t": "set",
"p": "protocol",
"pt": "msg",
"to": "nodered",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1220,
"y": 1740,
"wires": [
[
"f064e16a50e5d575"
]
]
},
{
"id": "f064e16a50e5d575",
"type": "link out",
"z": "f125f568d4e332ee",
"g": "b72b30ef40073df1",
"name": "api - nodered - device",
"mode": "link",
"links": [
"3e1b4213132404be"
],
"x": 1355,
"y": 1740,
"wires": []
},
{
"id": "f6323a0b9073240d",
"type": "change",
"z": "f125f568d4e332ee",
"g": "6402ef93b3ea92bd",
"name": "from global",
"rules": [
{
"t": "set",
"p": "old_payload",
"pt": "msg",
"to": "payload",
"tot": "msg"
},
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "metrics",
"tot": "global"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1890,
"y": 1740,
"wires": [
[
"20d7953a9ead353a"
]
]
},
{
"id": "20d7953a9ead353a",
"type": "split",
"z": "f125f568d4e332ee",
"g": "6402ef93b3ea92bd",
"name": "buckets",
"splt": "\\n",
"spltType": "str",
"arraySplt": 1,
"arraySpltType": "len",
"stream": false,
"addname": "bucket",
"property": "payload",
"x": 2080,
"y": 1740,
"wires": [
[
"60efdc17c7f5ad29"
]
]
},
{
"id": "60efdc17c7f5ad29",
"type": "switch",
"z": "f125f568d4e332ee",
"g": "6402ef93b3ea92bd",
"name": "measurement",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "hask",
"v": "cpu usage",
"vt": "str"
}
],
"checkall": "false",
"repair": false,
"outputs": 1,
"x": 2280,
"y": 1740,
"wires": [
[
"babc2bc27fa9f0e2"
]
]
},
{
"id": "808db065967c9e6d",
"type": "switch",
"z": "f125f568d4e332ee",
"g": "6402ef93b3ea92bd",
"name": "device",
"property": "devices[msg.bucket]['cpu usage'][msg.field]model",
"propertyType": "global",
"rules": [
{
"t": "eq",
"v": "nodered",
"vt": "str"
}
],
"checkall": "false",
"repair": false,
"outputs": 1,
"x": 2630,
"y": 1740,
"wires": [
[
"1f263044e8a9dd75"
]
]
},
{
"id": "babc2bc27fa9f0e2",
"type": "split",
"z": "f125f568d4e332ee",
"g": "6402ef93b3ea92bd",
"name": "fields",
"splt": "\\n",
"spltType": "str",
"arraySplt": 1,
"arraySpltType": "len",
"stream": false,
"addname": "field",
"property": "payload['cpu usage']",
"x": 2470,
"y": 1740,
"wires": [
[
"808db065967c9e6d"
]
]
},
{
"id": "5b5a2f2cb0f13d57",
"type": "comment",
"z": "f125f568d4e332ee",
"g": "f415bb3d48bbe3f8",
"name": "cpu usage / server*",
"info": "",
"x": 210,
"y": 1820,
"wires": []
},
{
"id": "28812ef076d967f4",
"type": "link out",
"z": "f125f568d4e332ee",
"g": "a4306c9de01d4722",
"name": "api - clock - source - in",
"mode": "link",
"links": [
"42c36b63863ecb77",
"84aad657cc3015c1",
"151c140cd7171c80",
"3db710d8b9023738",
"f1ddd31035db0cc4"
],
"x": 1435,
"y": 2040,
"wires": []
},
{
"id": "7f0910ae6f903617",
"type": "change",
"z": "f125f568d4e332ee",
"g": "a4306c9de01d4722",
"name": "sync",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "sync",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1310,
"y": 2040,
"wires": [
[
"28812ef076d967f4"
]
]
},
{
"id": "85890de261cf2a1f",
"type": "link in",
"z": "f125f568d4e332ee",
"g": "a4306c9de01d4722",
"name": "api - clock - source - out",
"links": [
"2ecf7207d27bb785",
"e0ee48357ee30544",
"c469093ebb0005f9",
"e0395c593211c049",
"bbae4d26e41478ea"
],
"x": 1595,
"y": 2040,
"wires": [
[
"b9f3d00e902f65a2"
]
]
},
{
"id": "ac912f36def02119",
"type": "switch",
"z": "f125f568d4e332ee",
"g": "a4306c9de01d4722",
"name": "topic",
"property": "topic",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "day",
"vt": "str"
},
{
"t": "eq",
"v": "eve",
"vt": "str"
}
],
"checkall": "false",
"repair": false,
"outputs": 2,
"x": 2070,
"y": 2040,
"wires": [
[
"7a46605f38735c66"
],
[
"7a46605f38735c66"
]
]
},
{
"id": "ffb6d8f6427b4d52",
"type": "link out",
"z": "f125f568d4e332ee",
"g": "a4306c9de01d4722",
"name": "api - clock - source",
"mode": "link",
"links": [],
"x": 2385,
"y": 2040,
"wires": []
},
{
"id": "7a46605f38735c66",
"type": "change",
"z": "f125f568d4e332ee",
"g": "a4306c9de01d4722",
"name": "metric",
"rules": [
{
"t": "set",
"p": "bucket",
"pt": "msg",
"to": "room",
"tot": "msg"
},
{
"t": "set",
"p": "measurement",
"pt": "msg",
"to": "clock",
"tot": "str"
},
{
"t": "set",
"p": "field",
"pt": "msg",
"to": "'work '&msg.topic",
"tot": "jsonata"
},
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "$boolean(msg.payload)",
"tot": "jsonata"
},
{
"t": "set",
"p": "topic",
"pt": "msg",
"to": "",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 2250,
"y": 2040,
"wires": [
[
"ffb6d8f6427b4d52"
]
]
},
{
"id": "b9f3d00e902f65a2",
"type": "switch",
"z": "f125f568d4e332ee",
"g": "a4306c9de01d4722",
"name": "sync",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "sync",
"vt": "str"
},
{
"t": "else"
}
],
"checkall": "false",
"repair": false,
"outputs": 2,
"x": 1730,
"y": 2040,
"wires": [
[
"59e31b73c4ea2253",
"61f1ad5814d37ec9"
],
[
"1acc4b7b4c392c1f"
]
]
},
{
"id": "1acc4b7b4c392c1f",
"type": "delay",
"z": "f125f568d4e332ee",
"g": "a4306c9de01d4722",
"name": "250 ms",
"pauseType": "delay",
"timeout": "250",
"timeoutUnits": "milliseconds",
"rate": "1",
"nbRateUnits": "1",
"rateUnits": "second",
"randomFirst": "1",
"randomLast": "5",
"randomUnits": "seconds",
"drop": false,
"allowrate": false,
"outputs": 1,
"x": 1900,
"y": 2160,
"wires": [
[
"ac912f36def02119"
]
]
},
{
"id": "59e31b73c4ea2253",
"type": "change",
"z": "f125f568d4e332ee",
"g": "a4306c9de01d4722",
"name": "work day",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "0",
"tot": "num"
},
{
"t": "set",
"p": "topic",
"pt": "msg",
"to": "day",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1900,
"y": 2040,
"wires": [
[
"ac912f36def02119"
]
]
},
{
"id": "5e6d3072053bc3d4",
"type": "link in",
"z": "f125f568d4e332ee",
"g": "a4306c9de01d4722",
"name": "api - clock - source",
"links": [
"074a67bf0fcf09ad"
],
"x": 1175,
"y": 2040,
"wires": [
[
"7f0910ae6f903617"
]
]
},
{
"id": "61f1ad5814d37ec9",
"type": "change",
"z": "f125f568d4e332ee",
"g": "a4306c9de01d4722",
"name": "work eve",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "0",
"tot": "num"
},
{
"t": "set",
"p": "topic",
"pt": "msg",
"to": "eve",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1900,
"y": 2100,
"wires": [
[
"ac912f36def02119"
]
]
},
{
"id": "685a0ab8aaa24747",
"type": "change",
"z": "f125f568d4e332ee",
"g": "69645e55501064d8",
"name": "clock / work day / boolean / false",
"rules": [
{
"t": "set",
"p": "bucket",
"pt": "msg",
"to": "room",
"tot": "msg"
},
{
"t": "set",
"p": "measurement",
"pt": "msg",
"to": "clock",
"tot": "str"
},
{
"t": "set",
"p": "field",
"pt": "msg",
"to": "work day",
"tot": "str"
},
{
"t": "set",
"p": "format",
"pt": "msg",
"to": "boolean",
"tot": "str"
},
{
"t": "set",
"p": "default",
"pt": "msg",
"to": "false",
"tot": "bool"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 770,
"y": 2040,
"wires": [
[
"260725a140f7cb61"
]
]
},
{
"id": "260725a140f7cb61",
"type": "link out",
"z": "f125f568d4e332ee",
"g": "69645e55501064d8",
"name": "api - clock - device",
"mode": "link",
"links": [
"bfa594bf1f876c92"
],
"x": 995,
"y": 2040,
"wires": []
},
{
"id": "62d9811cb83cb6dd",
"type": "link in",
"z": "f125f568d4e332ee",
"g": "69645e55501064d8",
"name": "api - clock - device",
"links": [
"25445f5a9b787a0a"
],
"x": 135,
"y": 2040,
"wires": [
[
"0acceaea33c8972d"
]
]
},
{
"id": "44266579fe2f82fd",
"type": "change",
"z": "f125f568d4e332ee",
"g": "69645e55501064d8",
"name": "clock/ work eve / boolean / false",
"rules": [
{
"t": "set",
"p": "bucket",
"pt": "msg",
"to": "room",
"tot": "msg"
},
{
"t": "set",
"p": "measurement",
"pt": "msg",
"to": "clock",
"tot": "str"
},
{
"t": "set",
"p": "field",
"pt": "msg",
"to": "work eve",
"tot": "str"
},
{
"t": "set",
"p": "format",
"pt": "msg",
"to": "boolean",
"tot": "str"
},
{
"t": "set",
"p": "default",
"pt": "msg",
"to": "false",
"tot": "bool"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 770,
"y": 2100,
"wires": [
[
"260725a140f7cb61"
]
]
},
{
"id": "0acceaea33c8972d",
"type": "link out",
"z": "f125f568d4e332ee",
"g": "69645e55501064d8",
"name": "api - clock - device - in",
"mode": "link",
"links": [
"540ed3f299c779d4",
"0ec19ecfc3edabbd",
"170b7bbf9e361ce2",
"7faf686a74225948",
"41856b3f50fd450b"
],
"x": 235,
"y": 2040,
"wires": []
},
{
"id": "4a4b8dcde9348a97",
"type": "link in",
"z": "f125f568d4e332ee",
"g": "69645e55501064d8",
"name": "api - clock - device - out",
"links": [
"d47a5d29139aca1c",
"100b75c92fbd601d",
"b8690e2acb308498",
"021ed4766414be0d",
"ad43a0610ba77d34"
],
"x": 395,
"y": 2040,
"wires": [
[
"7f8e16b6edfac5e4"
]
]
},
{
"id": "7f8e16b6edfac5e4",
"type": "switch",
"z": "f125f568d4e332ee",
"g": "69645e55501064d8",
"name": "room",
"property": "room",
"propertyType": "msg",
"rules": [
{
"t": "istype",
"v": "string",
"vt": "string"
}
],
"checkall": "false",
"repair": false,
"outputs": 1,
"x": 530,
"y": 2040,
"wires": [
[
"685a0ab8aaa24747",
"44266579fe2f82fd"
]
]
}
]