iotredloop/flows/P.API.json

5019 lines
No EOL
91 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": 254
},
{
"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": 473,
"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": [
"2a395b7046ce9a55",
"e3693344db474a0a",
"709f263740a61967",
"c2f0571e97f072d9",
"a839571a87dd2aa6",
"97176af7973174dd"
],
"x": 68,
"y": 1313,
"w": 5624,
"h": 374
},
{
"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",
"ca0e3054dd71a6a8"
],
"x": 534,
"y": 199,
"w": 862,
"h": 202
},
{
"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": 499,
"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": 499,
"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": 499,
"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": 679,
"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": 799,
"w": 782,
"h": 262
},
{
"id": "2a395b7046ce9a55",
"type": "group",
"z": "f125f568d4e332ee",
"g": "96eb2a79eb4c26b2",
"name": "api - ecu - ui",
"style": {
"fill": "#6f2fa0",
"fill-opacity": "0.05",
"label": true
},
"nodes": [
"bbdfc8668282860e",
"6f71034627ce41c8",
"41fce6a2ccb96e9c",
"a917e4aa4ccb7790",
"00253031bbae4616",
"65c543a69d403cd7",
"9319869767e90c51",
"e0343612736a3dc9",
"d56dc907d5c1acec",
"fcfa41510d4d881d",
"6f98aa04e4ad50e2"
],
"x": 4754,
"y": 1339,
"w": 912,
"h": 202
},
{
"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": 1339,
"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": 1339,
"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": 1519,
"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": 1339,
"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": 499,
"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": "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",
"ca0e3054dd71a6a8"
]
]
},
{
"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": 540,
"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": 660,
"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": 720,
"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": 780,
"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": 840,
"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": 960,
"wires": [
[
"ddd2fdbcdb9c86c1"
]
]
},
{
"id": "2a9e3b488590c435",
"type": "link out",
"z": "f125f568d4e332ee",
"g": "9cdc88788fe441f1",
"name": "api - BRP069B45 - device",
"mode": "link",
"links": [
"3e1b4213132404be"
],
"x": 1435,
"y": 540,
"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": 600,
"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": 540,
"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": 540,
"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": 540,
"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": 620,
"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": 1020,
"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": 1080,
"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": 1140,
"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": 1200,
"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": 900,
"wires": [
[
"ddd2fdbcdb9c86c1"
]
]
},
{
"id": "f71143d4a1e865c3",
"type": "link in",
"z": "f125f568d4e332ee",
"g": "360ce5f1d0de3811",
"name": "api - BRP069B45 - source",
"links": [
"004bb30c27c94fb4"
],
"x": 1615,
"y": 600,
"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": 600,
"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": 600,
"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": 600,
"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": 540,
"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": 600,
"wires": [
[
"4a0ee4c3c569cf57"
]
]
},
{
"id": "1717b4b42c3de1df",
"type": "link out",
"z": "f125f568d4e332ee",
"g": "360ce5f1d0de3811",
"name": "api - BRP069B45 - source",
"mode": "link",
"links": [
"206c1fb4a48067df"
],
"x": 3375,
"y": 600,
"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": 540,
"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": 600,
"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": 600,
"wires": [
[
"bc238f831322f260",
"1ce065ee95e4bc96"
]
]
},
{
"id": "bc238f831322f260",
"type": "link call",
"z": "f125f568d4e332ee",
"g": "360ce5f1d0de3811",
"name": "",
"links": [
"a4813736579f6a19"
],
"linkType": "static",
"timeout": "30",
"x": 2860,
"y": 600,
"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": 600,
"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": 600,
"wires": [
[
"7634941bff66a6dd",
"1717b4b42c3de1df"
]
]
},
{
"id": "8156394d9b7d6e42",
"type": "catch",
"z": "f125f568d4e332ee",
"g": "360ce5f1d0de3811",
"name": "catch query timeout (see query)",
"scope": "group",
"uncaught": false,
"x": 2890,
"y": 540,
"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": 720,
"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": 720,
"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": 720,
"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": 720,
"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": 720,
"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": 720,
"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": 720,
"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": 720,
"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": 660,
"wires": [
[
"1717b4b42c3de1df"
]
]
},
{
"id": "7efac7e387d141ec",
"type": "link in",
"z": "f125f568d4e332ee",
"g": "e7dd5536e7ec485b",
"name": "api - BRP069B45 - metric",
"links": [
"031a6afd8300356a"
],
"x": 3735,
"y": 600,
"wires": [
[
"876b1f20d9cf3e10"
]
]
},
{
"id": "ba235aab7dfb1657",
"type": "link out",
"z": "f125f568d4e332ee",
"g": "e7dd5536e7ec485b",
"name": "api - BRP069B45 - metric error",
"mode": "link",
"links": [],
"x": 5435,
"y": 600,
"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": 600,
"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": 600,
"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": 600,
"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": 600,
"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": 600,
"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": 540,
"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": 600,
"wires": [
[
"efec7c8362bd6496"
]
]
},
{
"id": "d5788e29f1e344be",
"type": "link call",
"z": "f125f568d4e332ee",
"g": "e7dd5536e7ec485b",
"name": "",
"links": [
"a4813736579f6a19"
],
"linkType": "static",
"timeout": "30",
"x": 4460,
"y": 600,
"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": 600,
"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": 540,
"wires": []
},
{
"id": "1a5051a42ca6c504",
"type": "catch",
"z": "f125f568d4e332ee",
"g": "e7dd5536e7ec485b",
"name": "catch query timeout (see query)",
"scope": "group",
"uncaught": false,
"x": 4490,
"y": 540,
"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": 540,
"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": 780,
"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": 780,
"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": 780,
"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": 780,
"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": 780,
"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": 780,
"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": 780,
"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": 720,
"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": 780,
"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": 840,
"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": 900,
"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": 960,
"wires": [
[
"aa72fc0611d255ca"
]
]
},
{
"id": "a4813736579f6a19",
"type": "link in",
"z": "f125f568d4e332ee",
"g": "c845a1c03f4d92c1",
"name": "api - BRP069B45 - call",
"links": [],
"x": 3735,
"y": 780,
"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": 780,
"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": 780,
"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": 1080,
"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": 780,
"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": 780,
"wires": [
[
"8919c8979775e43c"
]
]
},
{
"id": "8919c8979775e43c",
"type": "link out",
"z": "f125f568d4e332ee",
"g": "c845a1c03f4d92c1",
"name": "api - BRP069B45 - call",
"mode": "return",
"links": [],
"x": 5955,
"y": 780,
"wires": []
},
{
"id": "bbfde2c30bb24f53",
"type": "comment",
"z": "f125f568d4e332ee",
"g": "c845a1c03f4d92c1",
"name": "use flow.ac to memorise values during split",
"info": "",
"x": 4860,
"y": 900,
"wires": []
},
{
"id": "2efdb634d6eff450",
"type": "comment",
"z": "f125f568d4e332ee",
"g": "c845a1c03f4d92c1",
"name": "See : https://github.com/ehjortberg/daikin-control",
"info": "",
"x": 3900,
"y": 720,
"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": 720,
"wires": []
},
{
"id": "17db5a87405dc4cb",
"type": "catch",
"z": "f125f568d4e332ee",
"g": "c845a1c03f4d92c1",
"name": "catch query timeout",
"scope": "group",
"uncaught": false,
"x": 4250,
"y": 720,
"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": 720,
"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": 1020,
"wires": [
[
"aa72fc0611d255ca"
]
]
},
{
"id": "68aeddd9bd26aa5b",
"type": "comment",
"z": "f125f568d4e332ee",
"g": "c845a1c03f4d92c1",
"name": "not working",
"info": "",
"x": 5450,
"y": 1020,
"wires": []
},
{
"id": "16f4d5aef15c6bdd",
"type": "link in",
"z": "f125f568d4e332ee",
"g": "00798774fd655f5e",
"name": "api - BRP069B45 - update thermostat to air conditioner",
"links": [
"031a6afd8300356a"
],
"x": 1615,
"y": 960,
"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": 960,
"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": 960,
"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": 1020,
"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": 900,
"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": 960,
"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": 840,
"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": 900,
"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": 840,
"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": "bbdfc8668282860e",
"type": "link in",
"z": "f125f568d4e332ee",
"g": "2a395b7046ce9a55",
"name": "home - ecu - ui - metric",
"links": [
"031a6afd8300356a"
],
"x": 4795,
"y": 1380,
"wires": [
[
"6f71034627ce41c8"
]
]
},
{
"id": "6f71034627ce41c8",
"type": "switch",
"z": "f125f568d4e332ee",
"g": "2a395b7046ce9a55",
"name": "xxx/photovoltaic/xxx",
"property": "path",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "msg.bucket & '/photovoltaic/production power'",
"vt": "jsonata"
},
{
"t": "eq",
"v": "msg.bucket & '/photovoltaic/import power'",
"vt": "jsonata"
}
],
"checkall": "false",
"repair": false,
"outputs": 2,
"x": 5120,
"y": 1380,
"wires": [
[
"41fce6a2ccb96e9c"
],
[
"d56dc907d5c1acec"
]
]
},
{
"id": "41fce6a2ccb96e9c",
"type": "change",
"z": "f125f568d4e332ee",
"g": "2a395b7046ce9a55",
"name": "payload",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "msg.payload&'W'",
"tot": "jsonata"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 5340,
"y": 1380,
"wires": [
[
"a917e4aa4ccb7790"
]
]
},
{
"id": "a917e4aa4ccb7790",
"type": "ui-text",
"z": "f125f568d4e332ee",
"g": "2a395b7046ce9a55",
"group": "241fa70e798648e8",
"order": 7,
"width": "6",
"height": "1",
"name": "production power",
"label": "Production",
"format": "{{msg.payload}}",
"layout": "row-spread",
"style": false,
"font": "",
"fontSize": 16,
"color": "#717171",
"className": "",
"x": 5550,
"y": 1380,
"wires": []
},
{
"id": "00253031bbae4616",
"type": "change",
"z": "f125f568d4e332ee",
"g": "2a395b7046ce9a55",
"name": "set metric",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "metrics[msg.bucket]photovoltaic['production power']",
"tot": "global"
},
{
"t": "delete",
"p": "parts",
"pt": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 5160,
"y": 1440,
"wires": [
[
"41fce6a2ccb96e9c"
]
]
},
{
"id": "65c543a69d403cd7",
"type": "link in",
"z": "f125f568d4e332ee",
"g": "2a395b7046ce9a55",
"name": "home - ecu - ui - load",
"links": [
"25445f5a9b787a0a"
],
"x": 4795,
"y": 1440,
"wires": [
[
"9319869767e90c51"
]
]
},
{
"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": 1380,
"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": 1440,
"wires": [
[
"ba1b2e019bac57a0"
]
]
},
{
"id": "645a5c37a7442a3a",
"type": "link out",
"z": "f125f568d4e332ee",
"g": "e3693344db474a0a",
"name": "api - ecu-c - source",
"mode": "link",
"links": [
"206c1fb4a48067df"
],
"x": 4435,
"y": 1440,
"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": 1380,
"wires": [
[
"42747e8a5076b140",
"645a5c37a7442a3a"
]
]
},
{
"id": "6b69eabc1b4262e7",
"type": "comment",
"z": "f125f568d4e332ee",
"g": "e3693344db474a0a",
"name": "api refresh rate is by 5 minutes",
"info": "",
"x": 1730,
"y": 1440,
"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": 1380,
"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": 1380,
"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": 1380,
"wires": [
[
"6f09c4d0fd650430"
]
]
},
{
"id": "6f09c4d0fd650430",
"type": "json",
"z": "f125f568d4e332ee",
"g": "e3693344db474a0a",
"name": "",
"property": "payload",
"action": "",
"pretty": false,
"x": 3050,
"y": 1380,
"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": 1380,
"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": 1380,
"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": 1380,
"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": 1380,
"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": 1380,
"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": 1440,
"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": 1380,
"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": 1500,
"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": 1560,
"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": 1620,
"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": 1440,
"wires": [
[
"13df18e469dd5933"
]
]
},
{
"id": "d59e71f32dca20fe",
"type": "link in",
"z": "f125f568d4e332ee",
"g": "709f263740a61967",
"name": "api - ecu-c - device",
"links": [
"546f190f3ec0c90d"
],
"x": 575,
"y": 1380,
"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": 1380,
"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": 1380,
"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": 1380,
"wires": [
[
"2ed136ebd92695c1"
]
]
},
{
"id": "2ed136ebd92695c1",
"type": "link out",
"z": "f125f568d4e332ee",
"g": "709f263740a61967",
"name": "api - ecu-c - device",
"mode": "link",
"links": [
"3e1b4213132404be"
],
"x": 1435,
"y": 1380,
"wires": []
},
{
"id": "403ed8a53ec05449",
"type": "comment",
"z": "f125f568d4e332ee",
"g": "e3693344db474a0a",
"name": "todo: waiying for new tore...",
"info": "",
"x": 3860,
"y": 1440,
"wires": []
},
{
"id": "487c23a4a5a0bdc3",
"type": "link in",
"z": "f125f568d4e332ee",
"g": "c2f0571e97f072d9",
"name": "api- ecu-c - get url",
"links": [],
"x": 1615,
"y": 1560,
"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": 1560,
"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": 1560,
"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": 1560,
"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": 1560,
"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": 1560,
"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": 1560,
"wires": [
[
"6e55943b9d5ef0ee"
]
]
},
{
"id": "6e55943b9d5ef0ee",
"type": "link out",
"z": "f125f568d4e332ee",
"g": "c2f0571e97f072d9",
"name": "api- ecu-c - get url",
"mode": "return",
"links": [],
"x": 2765,
"y": 1560,
"wires": []
},
{
"id": "01722dc818a6feda",
"type": "link call",
"z": "f125f568d4e332ee",
"g": "e3693344db474a0a",
"name": "",
"links": [
"487c23a4a5a0bdc3"
],
"linkType": "static",
"timeout": "30",
"x": 2330,
"y": 1380,
"wires": [
[
"ea470f779e4827f9"
]
]
},
{
"id": "9319869767e90c51",
"type": "link call",
"z": "f125f568d4e332ee",
"g": "2a395b7046ce9a55",
"name": "",
"links": [
"487c23a4a5a0bdc3"
],
"linkType": "static",
"timeout": "30",
"x": 4950,
"y": 1440,
"wires": [
[
"00253031bbae4616",
"6f98aa04e4ad50e2"
]
]
},
{
"id": "e0343612736a3dc9",
"type": "ui-text",
"z": "f125f568d4e332ee",
"g": "2a395b7046ce9a55",
"group": "241fa70e798648e8",
"order": 8,
"width": "6",
"height": "1",
"name": "import power",
"label": "Importation",
"format": "{{msg.payload}}",
"layout": "row-spread",
"style": false,
"font": "",
"fontSize": 16,
"color": "#717171",
"className": "",
"x": 5530,
"y": 1440,
"wires": []
},
{
"id": "d56dc907d5c1acec",
"type": "change",
"z": "f125f568d4e332ee",
"g": "2a395b7046ce9a55",
"name": "payload",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "msg.payload&'W'",
"tot": "jsonata"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 5340,
"y": 1440,
"wires": [
[
"e0343612736a3dc9"
]
]
},
{
"id": "fcfa41510d4d881d",
"type": "comment",
"z": "f125f568d4e332ee",
"g": "2a395b7046ce9a55",
"name": "on linky dashboard",
"info": "",
"x": 5550,
"y": 1500,
"wires": []
},
{
"id": "6f98aa04e4ad50e2",
"type": "change",
"z": "f125f568d4e332ee",
"g": "2a395b7046ce9a55",
"name": "set metric",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "metrics[msg.bucket]photovoltaic['import power']",
"tot": "global"
},
{
"t": "delete",
"p": "parts",
"pt": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 5160,
"y": 1500,
"wires": [
[
"d56dc907d5c1acec"
]
]
},
{
"id": "0df2f6e07a121689",
"type": "link in",
"z": "f125f568d4e332ee",
"g": "a839571a87dd2aa6",
"name": "api - ecu-c - model",
"links": [
"9cb906bf8066d37e"
],
"x": 135,
"y": 1380,
"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": 1380,
"wires": [
[
"ac9c9b4e7caf4c7c"
]
]
},
{
"id": "ac9c9b4e7caf4c7c",
"type": "link out",
"z": "f125f568d4e332ee",
"g": "a839571a87dd2aa6",
"name": "api - ecu-c - model",
"mode": "link",
"links": [
"94aa726ce8973d2c"
],
"x": 395,
"y": 1380,
"wires": []
},
{
"id": "40de83c24a607884",
"type": "link in",
"z": "f125f568d4e332ee",
"g": "56543977028aa001",
"name": "api - BRP069B45 - model",
"links": [
"9cb906bf8066d37e"
],
"x": 135,
"y": 540,
"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": 540,
"wires": [
[
"72a29139af6e48a9"
]
]
},
{
"id": "72a29139af6e48a9",
"type": "link out",
"z": "f125f568d4e332ee",
"g": "56543977028aa001",
"name": "api - BRP069B45 - model",
"mode": "link",
"links": [
"94aa726ce8973d2c"
],
"x": 395,
"y": 540,
"wires": []
},
{
"id": "97176af7973174dd",
"type": "comment",
"z": "f125f568d4e332ee",
"g": "96eb2a79eb4c26b2",
"name": "photovoltaic / url",
"info": "",
"x": 200,
"y": 1460,
"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": 1380,
"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": 1380,
"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": 1380,
"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": 1440,
"wires": [
[
"14040e777a789a38"
]
]
},
{
"id": "ca0e3054dd71a6a8",
"type": "change",
"z": "f125f568d4e332ee",
"g": "636790a6de6bdeca",
"name": "camera / snpshot / boolean / false",
"rules": [
{
"t": "set",
"p": "measurement",
"pt": "msg",
"to": "camera",
"tot": "str"
},
{
"t": "set",
"p": "field",
"pt": "msg",
"to": "snapshot",
"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": 360,
"wires": [
[
"61651b0ee41123b7"
]
]
}
]