can you share temp. flow please
i mean the sensors part with locks , im trying to add my sensor door an windows
This one is all I have not posted so far I believe:
[{"id":"a6507369.ba2ec","type":"ui_template","z":"57a4d8d6.0fec38","group":"9e93b4e7.132c68","name":"heimdalAlarm","order":3,"width":2,"height":1,"format":"<span style=\"vertical-align:middle; font-size:15px; color: rgb(255, 255, 255); text-align: left; font-weight: bold;\" class=\"fr-class-transparency\">\n <table width=\"100%\">\n <tr>\n <td width=\"100%\"> <span>{{msg.payload}}</span></td>\n <td> <i style=\"color:{{msg.Iconcolor}}!important;\" class={{msg.IconShape}} aria-hidden=\"true\"></i> </td>\n </tr>\n </table>\n </span>","storeOutMessages":true,"fwdInMessages":true,"resendOnRefresh":true,"templateScope":"local","x":800,"y":700,"wires":[[]]},{"id":"1b7da5cf.ac62ba","type":"function","z":"57a4d8d6.0fec38","name":"","func":"var icnColor=\"#888888\";\nvar pl = \"\";\nvar icon=\"\";\n\nif (msg.payload==\"disarmed\")\n{\n icnColor=\"#44AAFF\"; \n icon=\"fa fa-unlock\";\n}\nelse if (msg.payload==\"armed\")\n{\n icnColor=\"#FF8888\"; \n icon=\"fa fa-lock\";\n}\nelse //partially_armed\n{\n icnColor=\"#FFFF88\"; \n icon=\"fa fa-unlock-alt\";\n}\npl = \"Heimdal\";\n\nmsg = {payload:pl, Iconcolor:icnColor, IconShape:icon};\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":580,"y":700,"wires":[["a6507369.ba2ec"]]},{"id":"9e93b4e7.132c68","type":"ui_group","z":"","name":"Alarm","tab":"f3407a3c.5a3af8","order":5,"disp":true,"width":4,"collapse":false},{"id":"f3407a3c.5a3af8","type":"ui_tab","z":"","name":"Huis","icon":"dashboard","order":4,"disabled":false,"hidden":false}]
i used this bottoms but doesnt work a don’t know why, i did everything but don’t change the color or light the lamp
can you share this flow with temperatures too =)
can you share this tempeture flow plz
First I just want to say thank you so much for this, it is exactly the missing element I needed and all your great information here has saved me so much time in deploying this solution.
I was playing around with the setup and I just want to add something which I could not confirm if anyone had mentioned before though I tried searching the topic replies.
Not sure if this is the method you were implying either but figured I’d share it anyway.
You can skip creating the function node all together if you just change the output of the mqtt node to JSON parsed object. This sends the data through in the correct format.
On initial testing it seems for everything to work the way i describe you also need to set the topic filter in the mqtt input node to the specific device you are talking to and leave message passthrough enabled on the switch.
Here are some screens for example of what I mean:
Working flow example
Input node setup
Switch setup
Output node setup
Hi @Kalle_Ektorne,
I am using 4 elements to make buttons work with lights:
- an MQTT In node, connected to my MQTT broker to receive messages
- a Switch node to filter for the topic (so not payload) of my light, for example the topic: homie/homeypro/tv-led-strip/onoff
- the button sends to the set topic of my light: homie/homeypro/tv-led-strip/onoff/set (did you see that the topic is similar but not the same?)
- an MQTT Out node, also connected to the broker to send messages
Note that in item ad 2) and ad 3) the topics must be aligned, otherwise the flows will not work
Note also that by default, a switch node looks for specific payload and you should change the filter from payload to topic.
Picture of my switch config:
Picture of my button config:
Part 1/3:
[
{
"id": "9235bbe0.d90a78",
"type": "tab",
"label": "Home",
"disabled": false,
"info": ""
},
{
"id": "f2fc1806.bd1748",
"type": "ui_template",
"z": "9235bbe0.d90a78",
"group": "325e0541.4119ea",
"name": "doelTemperaturKantoor",
"order": 14,
"width": 2,
"height": 1,
"format": "<span style=\"vertical-align:bottom; font-size:20px; color: rgb(255, 255, 255); text-align: center; font-weight: bold;\" class=\"fr-class-transparency\"><i style=\"color:#44AAFF!important;\" class=\"fa fa-bullseye\" aria-hidden=\"true\"></i> \n <span>{{msg.payload}}°C\n </span>\n </span>",
"storeOutMessages": true,
"fwdInMessages": true,
"resendOnRefresh": true,
"templateScope": "local",
"x": 510,
"y": 800,
"wires": [
[]
]
},
{
"id": "390a5d68.87f842",
"type": "ui_template",
"z": "9235bbe0.d90a78",
"group": "325e0541.4119ea",
"name": "doelTemperaturKapsalon",
"order": 6,
"width": 2,
"height": 1,
"format": "<span style=\"vertical-align:bottom; font-size:20px; color: rgb(255, 255, 255); text-align: center; font-weight: bold;\" class=\"fr-class-transparency\"><i style=\"color:#44AAFF!important;\" class=\"fa fa-bullseye\" aria-hidden=\"true\"></i> \n <span>{{msg.payload}}°C\n </span>\n </span>",
"storeOutMessages": true,
"fwdInMessages": true,
"resendOnRefresh": true,
"templateScope": "local",
"x": 510,
"y": 760,
"wires": [
[]
]
},
{
"id": "d7e9d76c.f426e8",
"type": "ui_button",
"z": "9235bbe0.d90a78",
"name": "warmerKapsalon",
"group": "325e0541.4119ea",
"order": 7,
"width": 1,
"height": 1,
"passthru": false,
"label": "",
"tooltip": "",
"color": "",
"bgcolor": "",
"icon": "fa-fire",
"payload": "+0.5",
"payloadType": "str",
"topic": "kapsalonSetTargetTemp",
"x": 970,
"y": 760,
"wires": [
[
"d252287a.f09c58"
]
]
},
{
"id": "44c3dd54.fb7c54",
"type": "ui_button",
"z": "9235bbe0.d90a78",
"name": "kouderKapsalon",
"group": "325e0541.4119ea",
"order": 5,
"width": 1,
"height": 1,
"passthru": false,
"label": "",
"tooltip": "",
"color": "",
"bgcolor": "",
"icon": "fa-snowflake-o",
"payload": "-0.5",
"payloadType": "str",
"topic": "kapsalonSetTargetTemp",
"x": 760,
"y": 760,
"wires": [
[
"d252287a.f09c58"
]
]
},
{
"id": "4ec0647d.3dbbec",
"type": "ui_button",
"z": "9235bbe0.d90a78",
"name": "kouderWoonkamer",
"group": "325e0541.4119ea",
"order": 9,
"width": 1,
"height": 1,
"passthru": false,
"label": "",
"tooltip": "",
"color": "",
"bgcolor": "",
"icon": "fa-snowflake-o",
"payload": "-0.5",
"payloadType": "str",
"topic": "woonkamerSetTargetTemp",
"x": 770,
"y": 720,
"wires": [
[
"3ade681e.35adf8"
]
]
},
{
"id": "3e670f3.c346af",
"type": "ui_button",
"z": "9235bbe0.d90a78",
"name": "warmerWoonkamer",
"group": "325e0541.4119ea",
"order": 11,
"width": 1,
"height": 1,
"passthru": false,
"label": "",
"tooltip": "",
"color": "",
"bgcolor": "",
"icon": "fa-fire",
"payload": "+0.5",
"payloadType": "str",
"topic": "woonkamerSetTargetTemp",
"x": 970,
"y": 720,
"wires": [
[
"3ade681e.35adf8"
]
]
},
{
"id": "a55bd3d1.5667c",
"type": "ui_template",
"z": "9235bbe0.d90a78",
"group": "325e0541.4119ea",
"name": "doelTemperaturWoonkamer",
"order": 10,
"width": 2,
"height": 1,
"format": "<span style=\"vertical-align:bottom; font-size:20px; color: rgb(255, 255, 255); text-align: center; font-weight: bold;\" class=\"fr-class-transparency\"><i style=\"color:#44AAFF!important;\" class=\"fa fa-bullseye\" aria-hidden=\"true\"></i> \n <span>{{msg.payload}}°C\n </span>\n </span>",
"storeOutMessages": true,
"fwdInMessages": true,
"resendOnRefresh": true,
"templateScope": "local",
"x": 520,
"y": 720,
"wires": [
[]
]
},
{
"id": "425f7243.22ed0c",
"type": "function",
"z": "9235bbe0.d90a78",
"name": "",
"func": "msg.payload = global.get(\"GlobalTime\");\n\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"x": 440,
"y": 160,
"wires": [
[
"13c95896.c9c577"
]
]
},
{
"id": "13c95896.c9c577",
"type": "ui_template",
"z": "9235bbe0.d90a78",
"group": "292659b4.da8d96",
"name": "tijd",
"order": 1,
"width": 3,
"height": 1,
"format": " <span style=\"vertical-align:bottom; font-size:25px; color: rgb(255, 255, 255); text-align: center; font-weight: bold;\" class=\"fr-class-transparency\">\n <span >{{msg.payload}}\n </span>\n </span>",
"storeOutMessages": true,
"fwdInMessages": true,
"resendOnRefresh": true,
"templateScope": "local",
"x": 590,
"y": 160,
"wires": [
[]
]
},
{
"id": "ea9d3b6a.7acd98",
"type": "function",
"z": "9235bbe0.d90a78",
"name": "",
"func": "msg.payload = global.get(\"GlobalDate\");\n\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"x": 440,
"y": 100,
"wires": [
[
"6ed3e542.1af7cc"
]
]
},
{
"id": "6ed3e542.1af7cc",
"type": "ui_template",
"z": "9235bbe0.d90a78",
"group": "292659b4.da8d96",
"name": "datum",
"order": 4,
"width": 7,
"height": 1,
"format": "<span style=\"vertical-align:middle; font-size:25px; color: rgb(255, 255, 255); text-align: center; font-weight: bold;\" class=\".nr-dashboard-theme\">\n <span >{{msg.payload}}\n </span>\n </span>",
"storeOutMessages": true,
"fwdInMessages": true,
"resendOnRefresh": true,
"templateScope": "local",
"x": 590,
"y": 100,
"wires": [
[]
]
},
{
"id": "68981407.9d0dfc",
"type": "mqtt in",
"z": "9235bbe0.d90a78",
"name": "",
"topic": "#",
"qos": "2",
"datatype": "auto",
"broker": "91e88251.9a6fb",
"x": 90,
"y": 460,
"wires": [
[
"43e81fe.fdcc2e",
"4c342aae.fcf024",
"39e8b603.b5e6aa",
"ab96548c.ed7748",
"79561b5a.227a94",
"c1f9e93d.676828",
"586d45bf.9657dc",
"38b0fa8b.c2bd06",
"5684d0f8.b355c"
]
]
},
{
"id": "43e81fe.fdcc2e",
"type": "switch",
"z": "9235bbe0.d90a78",
"name": "",
"property": "topic",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "homie/homeypro/anna/target-temperature",
"vt": "str"
},
{
"t": "eq",
"v": "homie/homeypro/kapsalon---begane-grond/target-temperature",
"vt": "str"
},
{
"t": "eq",
"v": "homie/homeypro/kantoor---begane-grond/target-temperature",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 3,
"x": 270,
"y": 760,
"wires": [
[
"a55bd3d1.5667c"
],
[
"390a5d68.87f842"
],
[
"f2fc1806.bd1748"
]
]
},
{
"id": "8926e47c.8c7518",
"type": "mqtt out",
"z": "9235bbe0.d90a78",
"name": "",
"topic": "",
"qos": "",
"retain": "",
"broker": "91e88251.9a6fb",
"x": 1570,
"y": 740,
"wires": []
},
{
"id": "fedad9c4.73d298",
"type": "inject",
"z": "9235bbe0.d90a78",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "1",
"crontab": "",
"once": true,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 220,
"y": 100,
"wires": [
[
"ea9d3b6a.7acd98",
"425f7243.22ed0c"
]
]
},
{
"id": "70cf8f80.c70c4",
"type": "ui_template",
"z": "9235bbe0.d90a78",
"group": "325e0541.4119ea",
"name": "tempKapsalon",
"order": 1,
"width": 6,
"height": 1,
"format": "<span style=\"vertical-align:middle; font-size:15px; color: rgb(255, 255, 255); text-align: center; font-weight: bold;\" class=\"fr-class-transparency\">Kapsalon</span>\n<span style=\"vertical-align:middle; font-size:25px; color: rgb(255, 255, 255); text-align: center; font-weight: bold;\" class=\"fr-class-transparency\"><i style=\"color:#44AAFF!important;\" class=\"fa fa-thermometer-three-quarters\" aria-hidden=\"true\"></i> \n <span>{{msg.payload}}°C\n </span>\n </span>",
"storeOutMessages": true,
"fwdInMessages": true,
"resendOnRefresh": true,
"templateScope": "local",
"x": 760,
"y": 180,
"wires": [
[]
]
},
{
"id": "306b249.7c845dc",
"type": "ui_template",
"z": "9235bbe0.d90a78",
"group": "325e0541.4119ea",
"name": "tempKantoor",
"order": 3,
"width": 6,
"height": 1,
"format": "<span style=\"vertical-align:middle; font-size:15px; color: rgb(255, 255, 255); text-align: center; font-weight: bold;\" class=\"fr-class-transparency\">Kantoor</span>\n<span style=\"vertical-align:middle; font-size:25px; color: rgb(255, 255, 255); text-align: center; font-weight: bold;\" class=\"fr-class-transparency\"><i style=\"color:#44AAFF!important;\" class=\"fa fa-thermometer-three-quarters\" aria-hidden=\"true\"></i> \n <span>{{msg.payload}}°C\n </span>\n </span>\n",
"storeOutMessages": true,
"fwdInMessages": true,
"resendOnRefresh": true,
"templateScope": "local",
"x": 750,
"y": 220,
"wires": [
[]
]
},
{
"id": "f0e37106.6406e",
"type": "function",
"z": "9235bbe0.d90a78",
"name": "",
"func": "var temp = msg.payload;\nvar decimalPos = temp.indexOf(\".\");\n\nif (decimalPos!=-1)\n{\n msg.payload = temp.substr(0, decimalPos+2);\n}\n\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"x": 740,
"y": 260,
"wires": [
[
"ebf3c430.410998"
]
]
},
{
"id": "ebf3c430.410998",
"type": "ui_template",
"z": "9235bbe0.d90a78",
"group": "325e0541.4119ea",
"name": "tempWoonkamer",
"order": 2,
"width": 6,
"height": 1,
"format": "<span style=\"vertical-align:middle; font-size:15px; color: rgb(255, 255, 255); text-align: center; font-weight: bold;\" class=\"fr-class-transparency\">Woonkamer</span>\n<span style=\"vertical-align:middle; font-size:25px; color: rgb(255, 255, 255); text-align: center; font-weight: bold;\" class=\"fr-class-transparency\"><i style=\"color:#44AAFF!important;\" class=\"fa fa-thermometer-three-quarters\" aria-hidden=\"true\"></i> \n <span>{{msg.payload}}°C\n </span>\n </span>\n\n",
"storeOutMessages": true,
"fwdInMessages": true,
"resendOnRefresh": true,
"templateScope": "local",
"x": 910,
"y": 260,
"wires": [
[]
]
},
{
"id": "4c342aae.fcf024",
"type": "switch",
"z": "9235bbe0.d90a78",
"name": "",
"property": "topic",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "homie/homeypro/motion-sensor-hair-salon/measure-temperature",
"vt": "str"
},
{
"t": "eq",
"v": "homie/homeypro/kantoor---begane-grond/measure-temperature",
"vt": "str"
},
{
"t": "eq",
"v": "homie/homeypro/anna/measure-temperature",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 3,
"x": 270,
"y": 280,
"wires": [
[
"70cf8f80.c70c4"
],
[
"306b249.7c845dc"
],
[
"f0e37106.6406e"
]
]
},
{
"id": "ab143c2b.a684e",
"type": "ui_text",
"z": "9235bbe0.d90a78",
"group": "292659b4.da8d96",
"order": 12,
"width": 3,
"height": 1,
"name": "",
"label": "Zon Op:",
"format": "{{msg.payload}}",
"layout": "row-left",
"x": 560,
"y": 420,
"wires": []
},
{
"id": "938b71f6.c945a",
"type": "ui_text",
"z": "9235bbe0.d90a78",
"group": "292659b4.da8d96",
"order": 14,
"width": 3,
"height": 1,
"name": "",
"label": "Zon Onder:",
"format": "{{msg.payload}}",
"layout": "row-right",
"x": 580,
"y": 460,
"wires": []
},
{
"id": "39e8b603.b5e6aa",
"type": "switch",
"z": "9235bbe0.d90a78",
"name": "",
"property": "topic",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "homie/homeypro/current-weather/sunrise",
"vt": "str"
},
{
"t": "eq",
"v": "homie/homeypro/current-weather/sunset",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 2,
"x": 270,
"y": 460,
"wires": [
[
"ab143c2b.a684e"
],
[
"938b71f6.c945a"
]
]
},
{
"id": "ab96548c.ed7748",
"type": "switch",
"z": "9235bbe0.d90a78",
"name": "",
"property": "topic",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "homie/homeypro/current-weather/measure-temperature",
"vt": "str"
},
{
"t": "eq",
"v": "homie/homeypro/current-weather/measure-humidity",
"vt": "str"
},
{
"t": "eq",
"v": "homie/homeypro/central-heating-boiler/boiler-state",
"vt": "str"
},
{
"t": "eq",
"v": "homie/homeypro/central-heating-boiler/dhw-state",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 4,
"x": 270,
"y": 580,
"wires": [
[
"b98fc01c.22f65"
],
[
"b8dfa532.fd1208"
],
[
"3a68f3dc.1f3fac"
],
[
"c7f696fb.9b7b08"
]
]
},
{
"id": "b98fc01c.22f65",
"type": "function",
"z": "9235bbe0.d90a78",
"name": "",
"func": "var temp = msg.payload;\nvar decimalPos = temp.indexOf(\".\");\n\nif (decimalPos!=-1)\n{\n msg.payload = temp.substr(0, decimalPos+2);\n}\n\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"x": 480,
"y": 540,
"wires": [
[
"980a8d14.8e16b"
]
]
},
{
"id": "980a8d14.8e16b",
"type": "ui_template",
"z": "9235bbe0.d90a78",
"group": "292659b4.da8d96",
"name": "tempBuiten",
"order": 8,
"width": 3,
"height": 1,
"format": "<span style=\"vertical-align:middle; font-size:30px; color: rgb(255, 255, 255); text-align: left; font-weight: bold;\" class=\"fr-class-transparency\"><i style=\"color:#88AAFF!important;\" class=\"fa fa-thermometer-three-quarters\" aria-hidden=\"true\"></i> \n <span>{{msg.payload}}°\n </span>\n </span>\n\n",
"storeOutMessages": true,
"fwdInMessages": true,
"resendOnRefresh": true,
"templateScope": "local",
"x": 650,
"y": 540,
"wires": [
[]
]
},
{
"id": "b8dfa532.fd1208",
"type": "ui_template",
"z": "9235bbe0.d90a78",
"group": "292659b4.da8d96",
"name": "luchtvochtigheid",
"order": 17,
"width": 3,
"height": 1,
"format": " <span style=\"vertical-align:middle; font-size:30px; color: rgb(255, 255, 255); text-align: left; font-weight: bold;\" class=\"fr-class-transparency\"><i style=\"color:#88AAFF!important;\" class=\"fa fa-tint\" aria-hidden=\"true\"></i> \n <span >{{msg.payload}}%\n </span>\n </span>\n\n",
"storeOutMessages": true,
"fwdInMessages": true,
"resendOnRefresh": true,
"templateScope": "local",
"x": 660,
"y": 580,
"wires": [
[]
]
},
{
"id": "3a68f3dc.1f3fac",
"type": "function",
"z": "9235bbe0.d90a78",
"name": "",
"func": "var Boilercolor=\"#AADDFF\";\nvar pl = \"\";\nvar flame=\"\";\n\nif (msg.payload==\"true\")\n{\n Boilercolor=\"#FFAA00\"; \n flame=\"fa fa-fire\";\n}\nelse\n{\n Boilercolor=\"#44AAFF\";\n flame=\"fa fa-fire\";\n}\n\nmsg = {payload:pl, Iconcolor:Boilercolor, IconFlame:flame};\n\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"x": 480,
"y": 620,
"wires": [
[
"802f80f1.7afda"
]
]
},
{
"id": "802f80f1.7afda",
"type": "ui_template",
"z": "9235bbe0.d90a78",
"group": "292659b4.da8d96",
"name": "burner",
"order": 3,
"width": 1,
"height": 1,
"format": "<span style=\"vertical-align:middle; font-size:30px; color: rgb(255, 255, 255); text-align: center; font-weight: bold;\" class=\"fr-class-transparency\">\n <i style=\"color:{{msg.Iconcolor}}!important;\" class={{msg.IconFlame}} aria-hidden=\"true\"></i> \n <span>{{msg.payload}}</span>\n </span>\n\n",
"storeOutMessages": true,
"fwdInMessages": true,
"resendOnRefresh": true,
"templateScope": "local",
"x": 630,
"y": 620,
"wires": [
[]
]
},
{
"id": "c7f696fb.9b7b08",
"type": "function",
"z": "9235bbe0.d90a78",
"name": "",
"func": "var icnColor=\"#888888\";\nvar pl = \"\";\nvar icon=\"\";\n\nif (msg.payload==\"true\")\n{\n icnColor=\"#FFAA00\"; \n icon=\"fa fa-bathtub\";\n}\nelse\n{\n icnColor=\"#44AAFF\"; \n icon=\"fa fa-bathtub\";\n}\nmsg = {payload:pl, Iconcolor:icnColor, IconShape:icon};\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"x": 480,
"y": 660,
"wires": [
[
"3d05fcf6.7c8c44"
]
]
},
{
"id": "3d05fcf6.7c8c44",
"type": "ui_template",
"z": "9235bbe0.d90a78",
"group": "292659b4.da8d96",
"name": "hotWaterState",
"order": 11,
"width": 1,
"height": 1,
"format": "\n <span style=\"vertical-align:middle; font-size:30px; color: rgb(255, 255, 255); text-align: center; font-weight: bold;\" class=\"fr-class-transparency\">\n <i style=\"color:{{msg.Iconcolor}}!important;\" class={{msg.IconShape}} aria-hidden=\"true\"></i> \n <span>{{msg.payload}}</span>\n </span>",
"storeOutMessages": true,
"fwdInMessages": true,
"resendOnRefresh": true,
"templateScope": "local",
"x": 660,
"y": 660,
"wires": [
[]
]
},
{
"id": "ab05bd3d.26e92",
"type": "ui_button",
"z": "9235bbe0.d90a78",
"name": "kouderKantoor2",
"group": "325e0541.4119ea",
"order": 13,
"width": 1,
"height": 1,
"passthru": false,
"label": "",
"tooltip": "",
"color": "",
"bgcolor": "",
"icon": "fa-snowflake-o",
"payload": "-0.5",
"payloadType": "str",
"topic": "kantoorSetTargetTemp",
"x": 760,
"y": 800,
"wires": [
[
"b40c769a.c53af8"
]
]
},
{
"id": "eebef299.b31a5",
"type": "ui_button",
"z": "9235bbe0.d90a78",
"name": "warmerKantoor2",
"group": "325e0541.4119ea",
"order": 15,
"width": 1,
"height": 1,
"passthru": false,
"label": "",
"tooltip": "",
"color": "",
"bgcolor": "",
"icon": "fa-fire",
"payload": "+0.5",
"payloadType": "str",
"topic": "kantoorSetTargetTemp",
"x": 960,
"y": 800,
"wires": [
[
"b40c769a.c53af8"
]
]
},
{
"id": "b40c769a.c53af8",
"type": "function",
"z": "9235bbe0.d90a78",
"name": "globalDoelTempKantoor",
"func": "var targetTemp = Number(global.get(\"doelTempKantoor\"));\nvar delta = Number(msg.payload);\n\nif (Number(targetTemp)==\"NaN\")\n{\n targetTemp=0;\n}\n\ntargetTemp = targetTemp + delta;\n\nglobal.set(\"doelTempKantoor\", targetTemp);\nmsg.payload=targetTemp;\nmsg.topic=\"kantoorSetTargetTemp\";\n\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"x": 1170,
"y": 800,
"wires": [
[
"4c54eb8b.b9dca4",
"f2fc1806.bd1748"
]
]
},
{
"id": "4c54eb8b.b9dca4",
"type": "stoptimer",
"z": "9235bbe0.d90a78",
"duration": "2",
"units": "Second",
"payloadtype": "num",
"payloadval": "0",
"name": "",
"x": 1400,
"y": 747,
"wires": [
[
"8926e47c.8c7518"
],
[]
]
},
{
"id": "79561b5a.227a94",
"type": "switch",
"z": "9235bbe0.d90a78",
"name": "",
"property": "topic",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "homie/homeypro/deurbel/onoff",
"vt": "str"
},
{
"t": "eq",
"v": "EVCharging",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 2,
"x": 270,
"y": 900,
"wires": [
[
"ef4145cf.ff1df8",
"71e07575.bbc6dc"
],
[
"8c4b4ba8.e7b978"
]
]
},
{
"id": "71e07575.bbc6dc",
"type": "stoptimer",
"z": "9235bbe0.d90a78",
"duration": "30",
"units": "Second",
"payloadtype": "str",
"payloadval": "OFF",
"name": "",
"x": 530,
"y": 920,
"wires": [
[],
[
"ef4145cf.ff1df8"
]
]
},
{
"id": "ef4145cf.ff1df8",
"type": "function",
"z": "9235bbe0.d90a78",
"name": "",
"func": "var icnColor=\"#FFAA88\";\nvar pl = \"\";\nvar icon=\"fa fa-bell-o\";\nvar classportal = \"\";\n\nif (msg.payload===true)\n{\n icnColor=\"#FFAA00\"; \n icon=\"fa fa-bell\";\n classportal = \"bell-glow\";\n}\nelse if (msg.payload==\"OFF\")\n{\n icnColor=\"#44AAFF\"; \n icon=\"fa fa-bell-o\"; \n classportal = \"bell-o-noglow\";\n}\nelse if (msg.payload==\"stopped\")\n{\n icnColor=\"#44AAFF\"; \n icon=\"fa fa-bell-o\"; \n classportal = \"bell-o-noglow\";\n}\nelse\n{\n icnColor=\"#FFAA00\"; \n icon=\"fa fa-bell-o\";\n classportal = \"bell-o-glow\";\n\n}\npl = \"\";\n\nmsg = {cportal:classportal, payload:pl, Iconcolor:icnColor, IconShape:icon};\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"x": 720,
"y": 900,
"wires": [
[
"1abb5f09.198651"
]
]
},
Part 2/3:
{
"id": "1abb5f09.198651",
"type": "ui_template",
"z": "9235bbe0.d90a78",
"group": "292659b4.da8d96",
"name": "deurbel",
"order": 2,
"width": 1,
"height": 1,
"format": "<span style=\"vertical-align:middle; font-size:25px; color: rgb(255, 255, 255); text-align: center; \" class=\"fr-class-transparency\">\n <div class=\"{{msg.cportal}}\"> <i style=\"color:{{msg.Iconcolor}}!important;\" class=\"{{msg.IconShape}}\" aria-hidden=\"true\"></i></div> \n <span>{{msg.payload}}</span>\n</span>\n",
"storeOutMessages": true,
"fwdInMessages": true,
"resendOnRefresh": true,
"templateScope": "local",
"x": 860,
"y": 900,
"wires": [
[]
]
},
{
"id": "d252287a.f09c58",
"type": "function",
"z": "9235bbe0.d90a78",
"name": "globalDoelTempKapsalon",
"func": "var targetTemp = Number(global.get(\"doelTempKapsalon\"));\nvar delta = Number(msg.payload);\n\nif (Number(targetTemp)==\"NaN\")\n{\n targetTemp=0;\n}\n\ntargetTemp = targetTemp + delta;\n\nglobal.set(\"doelTempKapsalon\", targetTemp);\nmsg.payload=targetTemp;\nmsg.topic=\"kapsalonSetTargetTemp\";\n\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"x": 1190,
"y": 760,
"wires": [
[
"4c54eb8b.b9dca4",
"390a5d68.87f842"
]
]
},
{
"id": "3ade681e.35adf8",
"type": "function",
"z": "9235bbe0.d90a78",
"name": "globalDoelTempWoonkamer",
"func": "var targetTemp = Number(global.get(\"doelTempWoonkamer\"));\nvar delta = Number(msg.payload);\n\nif (Number(targetTemp)==\"NaN\")\n{\n targetTemp=0;\n}\n\ntargetTemp = targetTemp + delta;\n\nglobal.set(\"doelTempWoonkamer\", targetTemp);\nmsg.payload=targetTemp;\nmsg.topic=\"woonkamerSetTargetTemp\";\n\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"x": 1200,
"y": 720,
"wires": [
[
"4c54eb8b.b9dca4",
"a55bd3d1.5667c"
]
]
},
{
"id": "8c4b4ba8.e7b978",
"type": "function",
"z": "9235bbe0.d90a78",
"name": "",
"func": "var icnColor=\"#888888\";\nvar pl = \"\";\nvar icon=\"\";\n\nif (msg.payload==\"True\")\n{\n icnColor=\"#FFAA00\"; \n icon=\"fa fa-car\";\n}\nelse\n{\n icnColor=\"#44AAFF\"; \n icon=\"fa fa-car\";\n}\n\npl = \"\";\n\nmsg = {payload:pl, Iconcolor:icnColor, IconShape:icon};\n\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"x": 500,
"y": 972,
"wires": [
[
"d3263c1c.31cc9"
]
]
},
{
"id": "d3263c1c.31cc9",
"type": "ui_template",
"z": "9235bbe0.d90a78",
"group": "292659b4.da8d96",
"name": "elektrische auto",
"order": 10,
"width": 1,
"height": 1,
"format": " <span style=\"vertical-align:middle; font-size:25px; color: rgb(255, 255, 255); text-align: center; \" class=\"fr-class-transparency\">\n <i style=\"color:{{msg.Iconcolor}}!important;\" class={{msg.IconShape}} aria-hidden=\"true\"></i> \n <span>{{msg.payload}}</span>\n </span>",
"storeOutMessages": true,
"fwdInMessages": true,
"resendOnRefresh": true,
"templateScope": "local",
"x": 880,
"y": 972,
"wires": [
[]
]
},
{
"id": "c1f9e93d.676828",
"type": "switch",
"z": "9235bbe0.d90a78",
"name": "",
"property": "topic",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "homie/homeypro/tv-led-strip/onoff",
"vt": "str"
},
{
"t": "eq",
"v": "homie/homeypro/light-book-shelf/onoff",
"vt": "str"
},
{
"t": "eq",
"v": "homie/homeypro/lights-living-room-front-window/onoff",
"vt": "str"
},
{
"t": "eq",
"v": "homie/homeypro/rgbw-design-lamp-tv/onoff",
"vt": "str"
},
{
"t": "eq",
"v": "homie/homeypro/innr-z3-rgbw-woonkamerraam/onoff",
"vt": "str"
},
{
"t": "eq",
"v": "homie/homeypro/vintage-led-lamp-dressior-links/onoff",
"vt": "str"
},
{
"t": "eq",
"v": "homie/homeypro/vintage-filament-led-dressoir-rechts/onoff",
"vt": "str"
},
{
"t": "eq",
"v": "homie/homeypro/light-dining-table/onoff",
"vt": "str"
},
{
"t": "eq",
"v": "homie/homeypro/aqara-led-bulb-tv-1/onoff",
"vt": "str"
},
{
"t": "eq",
"v": "homie/homeypro/aqara-led-bulb-tv-2/onoff",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 10,
"x": 270,
"y": 1180,
"wires": [
[
"6ad9f6c2.e1b458"
],
[
"4c3f2b7f.da9794"
],
[
"eb73d885.e1cd38"
],
[
"c775c7a9.cf80d8"
],
[
"856c6c61.44f7c"
],
[
"b356be3e.289b3"
],
[
"cf48b542.34c348"
],
[
"e4d66dde.3dc13"
],
[
"343ee146.b58bbe"
],
[
"5138f97c.0c3808"
]
]
},
{
"id": "5d73a8dc.7ca758",
"type": "ui_text",
"z": "9235bbe0.d90a78",
"group": "5101ae4d.d3f47",
"order": 2,
"width": 4,
"height": 1,
"name": "scnWoonkamerRegulier",
"label": "Woonkamer Regulier",
"format": "{{msg.payload}}",
"layout": "row-center",
"x": 890,
"y": 1020,
"wires": []
},
{
"id": "82878720.aec7d8",
"type": "ui_button",
"z": "9235bbe0.d90a78",
"name": "lightsceneOffWoonkamer",
"group": "5101ae4d.d3f47",
"order": 4,
"width": 1,
"height": 1,
"passthru": false,
"label": "",
"tooltip": "",
"color": "#444444",
"bgcolor": "",
"icon": "fa-stop",
"payload": "Uit",
"payloadType": "str",
"topic": "WoonkamerLightScene",
"x": 1130,
"y": 1020,
"wires": [
[
"8926e47c.8c7518"
]
]
},
{
"id": "2af07cb2.8b37b4",
"type": "ui_button",
"z": "9235bbe0.d90a78",
"name": "lightsceneOnRegulierWoonkamer",
"group": "5101ae4d.d3f47",
"order": 3,
"width": 1,
"height": 1,
"passthru": false,
"label": "",
"tooltip": "",
"color": "#FFAA00",
"bgcolor": "",
"icon": "fa-play",
"payload": "Aan",
"payloadType": "str",
"topic": "WoonkamerLightScene",
"x": 1400,
"y": 1020,
"wires": [
[
"8926e47c.8c7518"
]
]
},
{
"id": "3d0e4074.ce98e",
"type": "mqtt out",
"z": "9235bbe0.d90a78",
"name": "MQTT transmit",
"topic": "",
"qos": "",
"retain": "",
"broker": "91e88251.9a6fb",
"x": 1000,
"y": 1220,
"wires": []
},
{
"id": "36f1f46c.1cb0fc",
"type": "ui_button",
"z": "9235bbe0.d90a78",
"name": "TVLEDStrip",
"group": "e460e8a.9aac518",
"order": 1,
"width": 3,
"height": 1,
"passthru": false,
"label": "TV Led Strip",
"tooltip": "",
"color": "#FFFFFF!important",
"bgcolor": "{{kleur}}",
"icon": "fa-power-off",
"payload": "state",
"payloadType": "flow",
"topic": "homie/homeypro/tv-led-strip/onoff/set",
"x": 711,
"y": 1080,
"wires": [
[
"3d0e4074.ce98e"
]
]
},
{
"id": "6ad9f6c2.e1b458",
"type": "function",
"z": "9235bbe0.d90a78",
"name": "State2Color",
"func": "if (msg.payload === \"true\"){\n msg.kleur = \"#FFAA00\";\n flow.set(\"state\", \"false\");\n}\nelse {\n msg.kleur = \"#44AAFF\";\n flow.set(\"state\", \"true\");\n }\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"x": 490,
"y": 1080,
"wires": [
[
"36f1f46c.1cb0fc"
]
]
},
{
"id": "d2393ce2.1da33",
"type": "ui_button",
"z": "9235bbe0.d90a78",
"name": "Bookshelf",
"group": "e460e8a.9aac518",
"order": 3,
"width": 3,
"height": 1,
"passthru": false,
"label": "Bookshelf",
"tooltip": "",
"color": "#FFFFFF",
"bgcolor": "{{kleur}}",
"icon": "fa-power-off",
"payload": "state",
"payloadType": "flow",
"topic": "homie/homeypro/light-book-shelf/onoff/set",
"x": 701,
"y": 1120,
"wires": [
[
"3d0e4074.ce98e"
]
]
},
{
"id": "4c3f2b7f.da9794",
"type": "function",
"z": "9235bbe0.d90a78",
"name": "State2Color",
"func": "if (msg.payload === \"true\"){\n msg.kleur = \"#FFAA00\"; \n flow.set(\"state\", \"false\");\n}\nelse {\n msg.kleur = \"#44AAFF\";\n flow.set(\"state\", \"true\");\n }\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"x": 490,
"y": 1120,
"wires": [
[
"d2393ce2.1da33"
]
]
},
{
"id": "ddb82605.931048",
"type": "ui_button",
"z": "9235bbe0.d90a78",
"name": "ZijgevelRaam",
"group": "e460e8a.9aac518",
"order": 4,
"width": 3,
"height": 1,
"passthru": false,
"label": "Raam zijgevel",
"tooltip": "",
"color": "#FFFFFF",
"bgcolor": "{{kleur}}",
"icon": "fa-power-off",
"payload": "state",
"payloadType": "flow",
"topic": "homie/homeypro/lights-living-room-front-window/onoff/set",
"x": 720,
"y": 1160,
"wires": [
[
"3d0e4074.ce98e"
]
]
},
{
"id": "eb73d885.e1cd38",
"type": "function",
"z": "9235bbe0.d90a78",
"name": "State2Color",
"func": "if (msg.payload === \"true\"){\n msg.kleur = \"#FFAA00\"; \n flow.set(\"state\", \"false\");\n}\nelse {\n msg.kleur = \"#44AAFF\";\n flow.set(\"state\", \"true\");\n }\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"x": 489,
"y": 1160,
"wires": [
[
"ddb82605.931048"
]
]
},
{
"id": "f8cd6d9c.14431",
"type": "ui_button",
"z": "9235bbe0.d90a78",
"name": "DesignLamp",
"group": "e460e8a.9aac518",
"order": 2,
"width": 3,
"height": 1,
"passthru": false,
"label": "Design Lamp",
"tooltip": "",
"color": "#FFFFFF",
"bgcolor": "{{kleur}}",
"icon": "fa-power-off",
"payload": "state",
"payloadType": "flow",
"topic": "homie/homeypro/rgbw-design-lamp-tv/onoff/set",
"x": 710,
"y": 1200,
"wires": [
[
"3d0e4074.ce98e"
]
]
},
{
"id": "c775c7a9.cf80d8",
"type": "function",
"z": "9235bbe0.d90a78",
"name": "State2Color",
"func": "if (msg.payload === \"true\"){\n msg.kleur = \"#FFAA00\"; \n flow.set(\"state\", \"false\");\n}\nelse {\n msg.kleur = \"#44AAFF\";\n flow.set(\"state\", \"true\");\n }\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"x": 489,
"y": 1200,
"wires": [
[
"f8cd6d9c.14431"
]
]
},
{
"id": "96fb0ce5.62676",
"type": "ui_button",
"z": "9235bbe0.d90a78",
"name": "InnrFrontWindow",
"group": "e460e8a.9aac518",
"order": 9,
"width": 3,
"height": 1,
"passthru": false,
"label": "Raam Voren L",
"tooltip": "",
"color": "#FFFFFF",
"bgcolor": "{{kleur}}",
"icon": "fa-power-off",
"payload": "state",
"payloadType": "flow",
"topic": "homie/homeypro/innr-z3-rgbw-woonkamerraam/onoff/set",
"x": 730,
"y": 1240,
"wires": [
[
"3d0e4074.ce98e"
]
]
},
{
"id": "856c6c61.44f7c",
"type": "function",
"z": "9235bbe0.d90a78",
"name": "State2Color",
"func": "if (msg.payload === \"true\"){\n msg.kleur = \"#FFAA00\"; \n flow.set(\"state\", \"false\");\n}\nelse {\n msg.kleur = \"#44AAFF\";\n flow.set(\"state\", \"true\");\n }\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"x": 489,
"y": 1240,
"wires": [
[
"96fb0ce5.62676"
]
]
},
{
"id": "28d77c77.5752b4",
"type": "ui_button",
"z": "9235bbe0.d90a78",
"name": "DressoirL",
"group": "e460e8a.9aac518",
"order": 7,
"width": 3,
"height": 1,
"passthru": false,
"label": "Dressoir L",
"tooltip": "",
"color": "#FFFFFF",
"bgcolor": "{{kleur}}",
"icon": "fa-power-off",
"payload": "state",
"payloadType": "flow",
"topic": "homie/homeypro/vintage-led-lamp-dressior-links/onoff/set",
"x": 700,
"y": 1280,
"wires": [
[
"3d0e4074.ce98e"
]
]
},
{
"id": "b356be3e.289b3",
"type": "function",
"z": "9235bbe0.d90a78",
"name": "State2Color",
"func": "if (msg.payload === \"true\"){\n msg.kleur = \"#FFAA00\"; \n flow.set(\"state\", \"false\");\n}\nelse {\n msg.kleur = \"#44AAFF\";\n flow.set(\"state\", \"true\");\n }\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"x": 489,
"y": 1280,
"wires": [
[
"28d77c77.5752b4"
]
]
},
{
"id": "cf48b542.34c348",
"type": "function",
"z": "9235bbe0.d90a78",
"name": "State2Color",
"func": "if (msg.payload === \"true\"){\n msg.kleur = \"#FFAA00\"; \n flow.set(\"state\", \"false\");\n}\nelse {\n msg.kleur = \"#44AAFF\";\n flow.set(\"state\", \"true\");\n }\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"x": 489,
"y": 1320,
"wires": [
[
"c115e771.f13d78"
]
]
},
{
"id": "8e76ae10.62f24",
"type": "ui_button",
"z": "9235bbe0.d90a78",
"name": "Eettafel",
"group": "e460e8a.9aac518",
"order": 10,
"width": 3,
"height": 1,
"passthru": false,
"label": "Eetkamertafel",
"tooltip": "",
"color": "#FFFFFF",
"bgcolor": "{{kleur}}",
"icon": "fa-power-off",
"payload": "state",
"payloadType": "flow",
"topic": "homie/homeypro/light-dining-table/onoff/set",
"x": 700,
"y": 1360,
"wires": [
[
"3d0e4074.ce98e"
]
]
},
{
"id": "e4d66dde.3dc13",
"type": "function",
"z": "9235bbe0.d90a78",
"name": "State2Color",
"func": "if (msg.payload === \"true\"){\n msg.kleur = \"#FFAA00\"; \n flow.set(\"state\", \"false\");\n}\nelse {\n msg.kleur = \"#44AAFF\";\n flow.set(\"state\", \"true\");\n }\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"x": 489,
"y": 1360,
"wires": [
[
"8e76ae10.62f24"
]
]
},
{
"id": "c115e771.f13d78",
"type": "ui_button",
"z": "9235bbe0.d90a78",
"name": "DressoirR",
"group": "e460e8a.9aac518",
"order": 8,
"width": 3,
"height": 1,
"passthru": false,
"label": "Dressoir R",
"tooltip": "",
"color": "#FFFFFF",
"bgcolor": "{{kleur}}",
"icon": "fa-power-off",
"payload": "state",
"payloadType": "flow",
"topic": "homie/homeypro/vintage-filament-led-dressoir-rechts/onoff/set",
"x": 700,
"y": 1320,
"wires": [
[
"3d0e4074.ce98e"
]
]
},
{
"id": "fee74b32.754c68",
"type": "function",
"z": "9235bbe0.d90a78",
"name": "",
"func": "var icnColor=\"#888888\";\nvar pl = \"\";\nvar icon=\"\";\n\nif (msg.payload==\"armed\")\n{\n icnColor=\"#FFAA00\"; \n icon=\"fa fa-eye\";\n}\nelse if (msg.payload==\"disarmed\")\n{\n icnColor=\"#44AAFF\"; \n icon=\"fa fa-eye\";\n}\nelse\n{\n icnColor=\"#444444\"; \n icon=\"fa fa-eye-slash\";\n}\n\npl = \"\";\n\nmsg = {payload:pl, Iconcolor:icnColor, IconShape:icon};\n\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"x": 460,
"y": 340,
"wires": [
[
"b082faa4.ac4068"
]
]
},
{
"id": "b082faa4.ac4068",
"type": "ui_template",
"z": "9235bbe0.d90a78",
"group": "292659b4.da8d96",
"name": "alarm heimdal",
"order": 15,
"width": 1,
"height": 1,
"format": " <span style=\"vertical-align:middle; font-size:25px; color: rgb(255, 255, 255); text-align: center; \" class=\"fr-class-transparency\">\n <i style=\"color:{{msg.Iconcolor}}!important;\" class={{msg.IconShape}} aria-hidden=\"true\"></i> \n </span>",
"storeOutMessages": true,
"fwdInMessages": true,
"resendOnRefresh": true,
"templateScope": "local",
"x": 640,
"y": 340,
"wires": [
[]
]
},
{
"id": "586d45bf.9657dc",
"type": "switch",
"z": "9235bbe0.d90a78",
"name": "",
"property": "topic",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "TrashCollectedToday",
"vt": "str"
},
{
"t": "eq",
"v": "homie/homeypro/heimdall-surveillance-mode/homealarm-state",
"vt": "str"
},
{
"t": "eq",
"v": "homie/homeypro/verisure-alarm/homealarm-state",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 3,
"x": 270,
"y": 360,
"wires": [
[
"1ff0030a.3830ad"
],
[
"fee74b32.754c68"
],
[
"a2d5f718.16c348"
]
]
},
{
"id": "3f3141a4.9c990e",
"type": "ui_text",
"z": "9235bbe0.d90a78",
"group": "5101ae4d.d3f47",
"order": 5,
"width": 4,
"height": 1,
"name": "scnWoonkamerCozy",
"label": "Woonkamer Gezellig",
"format": "{{msg.payload}}",
"layout": "row-center",
"x": 900,
"y": 1060,
"wires": []
},
{
"id": "c55a6b70.68a2c8",
"type": "ui_button",
"z": "9235bbe0.d90a78",
"name": "lightsceneOffWoonkamer",
"group": "5101ae4d.d3f47",
"order": 1,
"width": 1,
"height": 1,
"passthru": false,
"label": "",
"tooltip": "",
"color": "#444444",
"bgcolor": "",
"icon": "fa-stop",
"payload": "Uit",
"payloadType": "str",
"topic": "WoonkamerLightScene",
"x": 1130,
"y": 1060,
"wires": [
[
"8926e47c.8c7518"
]
]
},
{
"id": "43bde67.2085518",
"type": "ui_button",
"z": "9235bbe0.d90a78",
"name": "lightsceneOnCozyWoonkamer",
"group": "5101ae4d.d3f47",
"order": 6,
"width": 1,
"height": 1,
"passthru": false,
"label": "",
"tooltip": "",
"color": "#FFAA00",
"bgcolor": "",
"icon": "fa-play",
"payload": "Cozy",
"payloadType": "str",
"topic": "WoonkamerLightScene",
"x": 1390,
"y": 1060,
"wires": [
[
"8926e47c.8c7518"
]
]
},
{
"id": "343ee146.b58bbe",
"type": "function",
"z": "9235bbe0.d90a78",
"name": "State2Color",
"func": "if (msg.payload === \"true\"){\n msg.kleur = \"#FFAA00\"; \n flow.set(\"state\", \"false\");\n}\nelse {\n msg.kleur = \"#44AAFF\";\n flow.set(\"state\", \"true\");\n }\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"x": 490,
"y": 1400,
"wires": [
[
"bc659519.9370a8"
]
]
},
{
"id": "bc659519.9370a8",
"type": "ui_button",
"z": "9235bbe0.d90a78",
"name": "AqaraFrontWindow1",
"group": "e460e8a.9aac518",
"order": 5,
"width": 3,
"height": 1,
"passthru": false,
"label": "Raam Voren R1",
"tooltip": "",
"color": "#FFFFFF",
"bgcolor": "{{kleur}}",
"icon": "fa-power-off",
"payload": "state",
"payloadType": "flow",
"topic": "homie/homeypro/aqara-led-bulb-tv-1/onoff/set",
"x": 741,
"y": 1400,
"wires": [
[
"3d0e4074.ce98e"
]
]
},
@Kalle or someone: please reply to this post so I can post the last set of lines 1701 and onwards…
thank you Roger
Part 3/3:
{
"id": "5138f97c.0c3808",
"type": "function",
"z": "9235bbe0.d90a78",
"name": "State2Color",
"func": "if (msg.payload === \"true\"){\n msg.kleur = \"#FFAA00\"; \n flow.set(\"state\", \"false\");\n}\nelse {\n msg.kleur = \"#44AAFF\";\n flow.set(\"state\", \"true\");\n }\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"x": 490,
"y": 1440,
"wires": [
[
"90cf7470.a143b8"
]
]
},
{
"id": "90cf7470.a143b8",
"type": "ui_button",
"z": "9235bbe0.d90a78",
"name": "AqaraFrontWindow2",
"group": "e460e8a.9aac518",
"order": 6,
"width": 3,
"height": 1,
"passthru": false,
"label": "Raam Voren R2",
"tooltip": "",
"color": "#FFFFFF",
"bgcolor": "{{kleur}}",
"icon": "fa-power-off",
"payload": "state",
"payloadType": "flow",
"topic": "homie/homeypro/aqara-led-bulb-tv-2/onoff/set",
"x": 740,
"y": 1440,
"wires": [
[
"3d0e4074.ce98e"
]
]
},
{
"id": "38b0fa8b.c2bd06",
"type": "switch",
"z": "9235bbe0.d90a78",
"name": "",
"property": "topic",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "homie/homeypro/dimmer-hallway-2nd-floor/onoff",
"vt": "str"
},
{
"t": "eq",
"v": "homie/homeypro/autocontrol-lights-ground-floor/onoff",
"vt": "str"
},
{
"t": "eq",
"v": "homie/homeypro/light-hallway-ground-floor/onoff",
"vt": "str"
},
{
"t": "eq",
"v": "homie/homeypro/dimmer---staircase-ground-floor/onoff",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 4,
"x": 270,
"y": 1600,
"wires": [
[
"ad53186f.c065f8"
],
[
"6e6fd5d2.c83b7c"
],
[
"e641b0a1.0c547"
],
[
"af1e0ce5.fff61"
]
]
},
{
"id": "ad53186f.c065f8",
"type": "function",
"z": "9235bbe0.d90a78",
"name": "State2Color",
"func": "if (msg.payload === \"true\"){\n msg.kleur = \"#FFAA00\";\n flow.set(\"state\", \"false\");\n}\nelse {\n msg.kleur = \"#44AAFF\";\n flow.set(\"state\", \"true\");\n }\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"x": 490,
"y": 1560,
"wires": [
[
"7a2384a0.a1463c"
]
]
},
{
"id": "7a2384a0.a1463c",
"type": "ui_button",
"z": "9235bbe0.d90a78",
"name": "LampHalBoven",
"group": "56f5946b.feb13c",
"order": 1,
"width": 3,
"height": 1,
"passthru": false,
"label": "Lamp Hal Boven",
"tooltip": "",
"color": "#FFFFFF!important",
"bgcolor": "{{kleur}}",
"icon": "fa-power-off",
"payload": "state",
"payloadType": "flow",
"topic": "homie/homeypro/dimmer-hallway-2nd-floor/onoff/set",
"x": 721,
"y": 1560,
"wires": [
[
"3d0e4074.ce98e"
]
]
},
{
"id": "e641b0a1.0c547",
"type": "function",
"z": "9235bbe0.d90a78",
"name": "State2Color",
"func": "if (msg.payload === \"true\"){\n msg.kleur = \"#FFAA00\";\n flow.set(\"state\", \"false\");\n}\nelse {\n msg.kleur = \"#44AAFF\";\n flow.set(\"state\", \"true\");\n }\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"x": 490,
"y": 1640,
"wires": [
[
"3b8858bc.94e448"
]
]
},
{
"id": "3b8858bc.94e448",
"type": "ui_button",
"z": "9235bbe0.d90a78",
"name": "LampHalBeneden",
"group": "56f5946b.feb13c",
"order": 3,
"width": 3,
"height": 1,
"passthru": false,
"label": "Lamp Hal BG",
"tooltip": "",
"color": "#FFFFFF!important",
"bgcolor": "{{kleur}}",
"icon": "fa-power-off",
"payload": "state",
"payloadType": "flow",
"topic": "homie/homeypro/light-hallway-ground-floor/onoff/set",
"x": 731,
"y": 1640,
"wires": [
[
"3d0e4074.ce98e"
]
]
},
{
"id": "af1e0ce5.fff61",
"type": "function",
"z": "9235bbe0.d90a78",
"name": "State2Color",
"func": "if (msg.payload === \"true\"){\n msg.kleur = \"#FFAA00\";\n flow.set(\"state\", \"false\");\n}\nelse {\n msg.kleur = \"#44AAFF\";\n flow.set(\"state\", \"true\");\n }\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"x": 490,
"y": 1680,
"wires": [
[
"b2fc2c4d.2168b"
]
]
},
{
"id": "b2fc2c4d.2168b",
"type": "ui_button",
"z": "9235bbe0.d90a78",
"name": "LampTrapBeneden",
"group": "56f5946b.feb13c",
"order": 4,
"width": 3,
"height": 1,
"passthru": false,
"label": "Lamp Trap BG",
"tooltip": "",
"color": "#FFFFFF!important",
"bgcolor": "{{kleur}}",
"icon": "fa-power-off",
"payload": "state",
"payloadType": "flow",
"topic": "homie/homeypro/dimmer---staircase-ground-floor/onoff/set",
"x": 731,
"y": 1680,
"wires": [
[
"3d0e4074.ce98e"
]
]
},
{
"id": "5684d0f8.b355c",
"type": "switch",
"z": "9235bbe0.d90a78",
"name": "",
"property": "topic",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "homie/homeypro/sp120-wasdroger/measure-power",
"vt": "str"
},
{
"t": "eq",
"v": "homie/homeypro/sp120-wasmachine/measure-power",
"vt": "str"
},
{
"t": "eq",
"v": "homie/homeypro/sp120-koelkast/measure-power",
"vt": "str"
},
{
"t": "eq",
"v": "homie/homeypro/sp120-diepvries/measure-power",
"vt": "str"
},
{
"t": "eq",
"v": "homie/homeypro/sp120-cv-ketel/measure-power",
"vt": "str"
},
{
"t": "eq",
"v": "homie/homeypro/sp120-kapsalon/measure-power",
"vt": "str"
},
{
"t": "eq",
"v": "homie/homeypro/airco-second-floor/measure-power",
"vt": "str"
},
{
"t": "eq",
"v": "homie/homeypro/power-vaatwasser/measure-power",
"vt": "str"
}
],
"checkall": "true",
"repair": false,
"outputs": 8,
"x": 270,
"y": 1780,
"wires": [
[
"26fe457f.c8cb1a"
],
[
"8b93231b.dddd8"
],
[
"7f6f7dc7.16bdb4"
],
[
"7105a67a.ad5058"
],
[
"f075c48.697f338"
],
[
"277ade5a.482242"
],
[
"12619ae0.89fca5"
],
[
"cb5686a7.d86be8"
]
]
},
{
"id": "2383fe9c.ac77c2",
"type": "ui_template",
"z": "9235bbe0.d90a78",
"group": "4adeb9e8.ee9d18",
"name": "wasdroger",
"order": 4,
"width": 3,
"height": 1,
"format": "<span style=\"vertical-align:middle; font-size:15px; color: rgb(255, 255, 255); text-align: left; \" class=\"fr-class-transparency\">\n <i style=\"color:{{msg.Iconcolor}}!important;\" class={{msg.IconShape}} aria-hidden=\"true\"></i> \n <span>{{msg.payload}}</span>\n </span>",
"storeOutMessages": true,
"fwdInMessages": true,
"resendOnRefresh": true,
"templateScope": "local",
"x": 710,
"y": 1760,
"wires": [
[]
]
},
{
"id": "26fe457f.c8cb1a",
"type": "function",
"z": "9235bbe0.d90a78",
"name": "",
"func": "var icnColor=\"#888888\";\nvar pl = \"Wasdroger\";\nvar icon=\"\";\n\nvar power = Number(msg.payload);\nif (power>10)\n{\n icnColor=\"#FFAA00\"; \n icon=\"fa fa-refresh fa-spin\";\n}\nelse\n{\n icnColor=\"#44AAFF\"; \n icon=\"fa fa-power-off\";\n}\n\nvar gvb = new Map(global.get(\"GrootverbruikersMap\"));\ngvb.set(pl, power);\nglobal.set(\"GrootverbruikersMap\", gvb);\n\npl = pl + \" \\[\" + power+ \"W\\]\";\n\nmsg = {payload:pl, Iconcolor:icnColor, IconShape:icon};\n\nreturn msg;\n\n\n/*\nconst singers = [\n { name: 'Steven Tyler', band: 'Aerosmith', born: 1948 },\n { name: 'Karen Carpenter', band: 'The Carpenters', born: 1950 },\n { name: 'Kurt Cobain', band: 'Nirvana', born: 1967 },\n { name: 'Stevie Nicks', band: 'Fleetwood Mac', born: 1948 },\n]; \n*/",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"x": 480,
"y": 1760,
"wires": [
[
"2383fe9c.ac77c2"
]
]
},
{
"id": "b55e639a.e98b3",
"type": "ui_template",
"z": "9235bbe0.d90a78",
"group": "4adeb9e8.ee9d18",
"name": "wasmachine",
"order": 3,
"width": 3,
"height": 1,
"format": "<span style=\"vertical-align:middle; font-size:15px; color: rgb(255, 255, 255); text-align: left; \" class=\"fr-class-transparency\">\n <i style=\"color:{{msg.Iconcolor}}!important;\" class={{msg.IconShape}} aria-hidden=\"true\"></i> \n <span>{{msg.payload}}</span>\n </span>",
"storeOutMessages": true,
"fwdInMessages": true,
"resendOnRefresh": true,
"templateScope": "local",
"x": 710,
"y": 1800,
"wires": [
[]
]
},
{
"id": "8b93231b.dddd8",
"type": "function",
"z": "9235bbe0.d90a78",
"name": "",
"func": "var icnColor=\"#888888\";\nvar pl = \"Wasmachine\";\nvar icon=\"\";\n\nvar power = Number(msg.payload);\nif (power>10)\n{\n icnColor=\"#FFAA00\"; \n icon=\"fa fa-refresh fa-spin\";\n}\nelse\n{\n icnColor=\"#44AAFF\"; \n icon=\"fa fa-power-off\";\n}\n\nvar gvb = new Map(global.get(\"GrootverbruikersMap\"));\ngvb.set(pl, power);\nglobal.set(\"GrootverbruikersMap\", gvb);\n\npl = pl + \" \\[\" + power+ \"W\\]\";\n\nmsg = {payload:pl, Iconcolor:icnColor, IconShape:icon};\n\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"x": 480,
"y": 1800,
"wires": [
[
"b55e639a.e98b3"
]
]
},
{
"id": "17b70653.dcfc1a",
"type": "ui_template",
"z": "9235bbe0.d90a78",
"group": "4adeb9e8.ee9d18",
"name": "koelkast",
"order": 5,
"width": 3,
"height": 1,
"format": "<span style=\"vertical-align:middle; font-size:15px; color: rgb(255, 255, 255); text-align: left; \" class=\"fr-class-transparency\">\n <i style=\"color:{{msg.Iconcolor}}!important;\" class={{msg.IconShape}} aria-hidden=\"true\"></i> \n <span>{{msg.payload}}</span>\n </span>",
"storeOutMessages": true,
"fwdInMessages": true,
"resendOnRefresh": true,
"templateScope": "local",
"x": 700,
"y": 1840,
"wires": [
[]
]
},
{
"id": "7f6f7dc7.16bdb4",
"type": "function",
"z": "9235bbe0.d90a78",
"name": "",
"func": "var icnColor=\"#888888\";\nvar pl = \"Koelkast\";\nvar icon=\"\";\n\nvar power = Number(msg.payload);\nif (power>10)\n{\n icnColor=\"#FFAA00\"; \n icon=\"fa fa-refresh fa-spin\";\n}\nelse\n{\n icnColor=\"#44AAFF\"; \n icon=\"fa fa-power-off\";\n}\n\nvar gvb = new Map(global.get(\"GrootverbruikersMap\"));\ngvb.set(pl, power);\nglobal.set(\"GrootverbruikersMap\", gvb);\n\npl = pl + \" \\[\" + power+ \"W\\]\";\n\nmsg = {payload:pl, Iconcolor:icnColor, IconShape:icon};\n\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"x": 480,
"y": 1840,
"wires": [
[
"17b70653.dcfc1a"
]
]
},
{
"id": "3365d6b8.47ccca",
"type": "ui_template",
"z": "9235bbe0.d90a78",
"group": "4adeb9e8.ee9d18",
"name": "diepvries",
"order": 6,
"width": 3,
"height": 1,
"format": "<span style=\"vertical-align:middle; font-size:15px; color: rgb(255, 255, 255); text-align: left; \" class=\"fr-class-transparency\">\n <i style=\"color:{{msg.Iconcolor}}!important;\" class={{msg.IconShape}} aria-hidden=\"true\"></i> \n <span>{{msg.payload}}</span>\n </span>",
"storeOutMessages": true,
"fwdInMessages": true,
"resendOnRefresh": true,
"templateScope": "local",
"x": 700,
"y": 1880,
"wires": [
[]
]
},
{
"id": "7105a67a.ad5058",
"type": "function",
"z": "9235bbe0.d90a78",
"name": "",
"func": "var icnColor=\"#888888\";\nvar pl = \"Diepvries\";\nvar icon=\"\";\n\nvar power = Number(msg.payload);\nif (power>10)\n{\n icnColor=\"#FFAA00\"; \n icon=\"fa fa-refresh fa-spin\";\n}\nelse\n{\n icnColor=\"#44AAFF\"; \n icon=\"fa fa-power-off\";\n}\n\nvar gvb = new Map(global.get(\"GrootverbruikersMap\"));\ngvb.set(pl, power);\nglobal.set(\"GrootverbruikersMap\", gvb);\n\npl = pl + \" \\[\" + power+ \"W\\]\";\n\nmsg = {payload:pl, Iconcolor:icnColor, IconShape:icon};\n\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"x": 480,
"y": 1880,
"wires": [
[
"3365d6b8.47ccca"
]
]
},
{
"id": "e6be48b.fc20fb8",
"type": "ui_template",
"z": "9235bbe0.d90a78",
"group": "4adeb9e8.ee9d18",
"name": "CV Ketel",
"order": 8,
"width": 3,
"height": 1,
"format": "<span style=\"vertical-align:middle; font-size:15px; color: rgb(255, 255, 255); text-align: left; \" class=\"fr-class-transparency\">\n <i style=\"color:{{msg.Iconcolor}}!important;\" class={{msg.IconShape}} aria-hidden=\"true\"></i> \n <span>{{msg.payload}}</span>\n </span>",
"storeOutMessages": true,
"fwdInMessages": true,
"resendOnRefresh": true,
"templateScope": "local",
"x": 700,
"y": 1920,
"wires": [
[]
]
},
{
"id": "f075c48.697f338",
"type": "function",
"z": "9235bbe0.d90a78",
"name": "",
"func": "var icnColor=\"#888888\";\nvar pl = \"CV Ketel\";\nvar icon=\"\";\n\nvar power = Number(msg.payload);\nif (power>10)\n{\n icnColor=\"#FFAA00\"; \n icon=\"fa fa-refresh fa-spin\";\n}\nelse\n{\n icnColor=\"#44AAFF\"; \n icon=\"fa fa-power-off\";\n}\n\nvar gvb = new Map(global.get(\"GrootverbruikersMap\"));\ngvb.set(pl, power);\nglobal.set(\"GrootverbruikersMap\", gvb);\n\npl = pl + \" \\[\" + power+ \"W\\]\";\n\nmsg = {payload:pl, Iconcolor:icnColor, IconShape:icon};\n\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"x": 480,
"y": 1920,
"wires": [
[
"e6be48b.fc20fb8"
]
]
},
{
"id": "8e37ec09.bd009",
"type": "ui_template",
"z": "9235bbe0.d90a78",
"group": "4adeb9e8.ee9d18",
"name": "Airco Kapsalon",
"order": 2,
"width": 3,
"height": 1,
"format": "<span style=\"vertical-align:middle; font-size:15px; color: rgb(255, 255, 255); text-align: left; \" class=\"fr-class-transparency\">\n <i style=\"color:{{msg.Iconcolor}}!important;\" class={{msg.IconShape}} aria-hidden=\"true\"></i> \n <span>{{msg.payload}}</span>\n </span>",
"storeOutMessages": true,
"fwdInMessages": true,
"resendOnRefresh": true,
"templateScope": "local",
"x": 720,
"y": 1960,
"wires": [
[]
]
},
{
"id": "277ade5a.482242",
"type": "function",
"z": "9235bbe0.d90a78",
"name": "",
"func": "var icnColor=\"#888888\";\nvar pl = \"AC Kapsalon\";\nvar icon=\"\";\n\nvar power = Number(msg.payload);\nif (power>10)\n{\n icnColor=\"#FFAA00\"; \n icon=\"fa fa-refresh fa-spin\";\n}\nelse\n{\n icnColor=\"#44AAFF\"; \n icon=\"fa fa-power-off\";\n}\n\nvar gvb = new Map(global.get(\"GrootverbruikersMap\"));\ngvb.set(pl, power);\nglobal.set(\"GrootverbruikersMap\", gvb);\n\npl = pl + \" \\[\" + power+ \"W\\]\";\n\nmsg = {payload:pl, Iconcolor:icnColor, IconShape:icon};\n\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"x": 480,
"y": 1960,
"wires": [
[
"8e37ec09.bd009"
]
]
},
{
"id": "64cd2346.69127c",
"type": "ui_template",
"z": "9235bbe0.d90a78",
"group": "4adeb9e8.ee9d18",
"name": "Airco Hal Boven",
"order": 1,
"width": 3,
"height": 1,
"format": "<span style=\"vertical-align:middle; font-size:15px; color: rgb(255, 255, 255); text-align: left; \" class=\"fr-class-transparency\">\n <i style=\"color:{{msg.Iconcolor}}!important;\" class={{msg.IconShape}} aria-hidden=\"true\"></i> \n <span>{{msg.payload}}</span>\n </span>",
"storeOutMessages": true,
"fwdInMessages": true,
"resendOnRefresh": true,
"templateScope": "local",
"x": 720,
"y": 2000,
"wires": [
[]
]
},
{
"id": "12619ae0.89fca5",
"type": "function",
"z": "9235bbe0.d90a78",
"name": "",
"func": "var icnColor=\"#888888\";\nvar pl = \"AC Boven\";\nvar icon=\"\";\n\nvar power = Number(msg.payload);\nif (power>10)\n{\n icnColor=\"#FFAA00\"; \n icon=\"fa fa-refresh fa-spin\";\n}\nelse\n{\n icnColor=\"#44AAFF\"; \n icon=\"fa fa-power-off\";\n}\n\nvar gvb = new Map(global.get(\"GrootverbruikersMap\"));\ngvb.set(pl, power);\nglobal.set(\"GrootverbruikersMap\", gvb);\n\npl = pl + \" \\[\" + power+ \"W\\]\";\n\nmsg = {payload:pl, Iconcolor:icnColor, IconShape:icon};\n\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"x": 480,
"y": 2000,
"wires": [
[
"64cd2346.69127c"
]
]
},
{
"id": "b7367e56.f9456",
"type": "ui_template",
"z": "9235bbe0.d90a78",
"group": "4adeb9e8.ee9d18",
"name": "Vaatwasser",
"order": 7,
"width": 3,
"height": 1,
"format": "<span style=\"vertical-align:middle; font-size:15px; color: rgb(255, 255, 255); text-align: left; \" class=\"fr-class-transparency\">\n <i style=\"color:{{msg.Iconcolor}}!important;\" class={{msg.IconShape}} aria-hidden=\"true\"></i> \n <span>{{msg.payload}}</span>\n </span>",
"storeOutMessages": true,
"fwdInMessages": true,
"resendOnRefresh": true,
"templateScope": "local",
"x": 710,
"y": 2040,
"wires": [
[]
]
},
{
"id": "cb5686a7.d86be8",
"type": "function",
"z": "9235bbe0.d90a78",
"name": "",
"func": "var icnColor=\"#888888\";\nvar pl = \"Vaatwasser\";\nvar icon=\"\";\n\nvar power = Number(msg.payload);\nif (power>10)\n{\n icnColor=\"#FFAA00\"; \n icon=\"fa fa-refresh fa-spin\";\n}\nelse\n{\n icnColor=\"#44AAFF\"; \n icon=\"fa fa-power-off\";\n}\n\nvar gvb = new Map(global.get(\"GrootverbruikersMap\"));\ngvb.set(pl, power);\nglobal.set(\"GrootverbruikersMap\", gvb);\n\npl = pl + \" \\[\" + power+ \"W\\]\";\n\nmsg = {payload:pl, Iconcolor:icnColor, IconShape:icon};\n\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"x": 480,
"y": 2040,
"wires": [
[
"b7367e56.f9456"
]
]
},
{
"id": "c30332a9.8b807",
"type": "function",
"z": "9235bbe0.d90a78",
"name": "createGlobal Map object for grootverbruikers",
"func": "var map = new Map();\nglobal.set(\"GrootverbruikersMap\", map);\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"x": 1190,
"y": 1760,
"wires": [
[]
]
},
{
"id": "a2d5f718.16c348",
"type": "function",
"z": "9235bbe0.d90a78",
"name": "",
"func": "var icnColor=\"#888888\";\nvar pl = \"\";\nvar icon=\"\";\n\nif (msg.payload==\"disarmed\")\n{\n icnColor=\"#44AAFF\"; \n icon=\"fa fa-shield\";\n}\nelse if (msg.payload==\"armed\")\n{\n icnColor=\"#FF8888\"; \n icon=\"fa fa-shield\";\n}\nelse //partially_armed\n{\n icnColor=\"#FFFF88\"; \n icon=\"fa fa-shield\";\n}\npl = \"\";\n\nmsg = {payload:pl, Iconcolor:icnColor, IconShape:icon};\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"x": 460,
"y": 380,
"wires": [
[
"f7ac1794.c31c48"
]
]
},
{
"id": "f7ac1794.c31c48",
"type": "ui_template",
"z": "9235bbe0.d90a78",
"group": "292659b4.da8d96",
"name": "verisureAlarm",
"order": 5,
"width": 1,
"height": 1,
"format": "<span style=\"vertical-align:middle; font-size:25px; color: rgb(255, 255, 255); text-align: center; font-weight: bold;\" class=\"fr-class-transparency\">\n <i style=\"color:{{msg.Iconcolor}}!important;\" class={{msg.IconShape}} aria-hidden=\"true\"></i>\n </span>",
"storeOutMessages": true,
"fwdInMessages": true,
"resendOnRefresh": true,
"templateScope": "local",
"x": 640,
"y": 380,
"wires": [
[]
]
},
{
"id": "1ff0030a.3830ad",
"type": "function",
"z": "9235bbe0.d90a78",
"name": "",
"func": "var icnColor=\"#888888\";\nvar pl = \"\";\nvar icon=\"\";\n\nif (msg.payload==\"Nothing is collected today \")\n{\n icnColor=\"#44AAFF\"; \n icon=\"fa fa-trash-o\";\n}\nelse \n{\n icnColor=\"#FFAA00\";\n icon=\"fa fa-trash\";\n}\n\n\npl = \"\";\n\nmsg = {payload:pl, Iconcolor:icnColor, IconShape:icon};\n\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"x": 460,
"y": 300,
"wires": [
[
"57e3a797.dc4598"
]
]
},
{
"id": "57e3a797.dc4598",
"type": "ui_template",
"z": "9235bbe0.d90a78",
"group": "292659b4.da8d96",
"name": "afval vandaag",
"order": 6,
"width": 1,
"height": 1,
"format": " <span style=\"vertical-align:middle; font-size:25px; color: rgb(255, 255, 255); text-align: center; \" class=\"fr-class-transparency\">\n <i style=\"color:{{msg.Iconcolor}}!important;\" class={{msg.IconShape}} aria-hidden=\"true\"></i> \n </span>",
"storeOutMessages": true,
"fwdInMessages": true,
"resendOnRefresh": true,
"templateScope": "local",
"x": 640,
"y": 300,
"wires": [
[]
]
},
{
"id": "6e6fd5d2.c83b7c",
"type": "function",
"z": "9235bbe0.d90a78",
"name": "State2Color",
"func": "if (msg.payload === \"true\"){\n msg.kleur = \"#FFAA00\";\n flow.set(\"state\", \"false\");\n}\nelse {\n msg.kleur = \"#44AAFF\";\n flow.set(\"state\", \"true\");\n }\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"x": 490,
"y": 1600,
"wires": [
[
"fcc6954a.c61748"
]
]
},
{
"id": "fcc6954a.c61748",
"type": "ui_button",
"z": "9235bbe0.d90a78",
"name": "bewegingsautomaat lamp hal beneden",
"group": "56f5946b.feb13c",
"order": 2,
"width": 3,
"height": 1,
"passthru": false,
"label": "Autom. Lamp Hal ",
"tooltip": "",
"color": "#FFFFFF!important",
"bgcolor": "{{kleur}}",
"icon": "fa-magic",
"payload": "state",
"payloadType": "flow",
"topic": "homie/homeypro/autocontrol-lights-ground-floor/onoff/set",
"x": 791,
"y": 1600,
"wires": [
[
"3d0e4074.ce98e"
]
]
},
{
"id": "325e0541.4119ea",
"type": "ui_group",
"z": "",
"name": "Verwarming",
"tab": "231f8919.1c14b6",
"order": 2,
"disp": false,
"width": "18",
"collapse": false
},
{
"id": "292659b4.da8d96",
"type": "ui_group",
"z": "",
"name": "Vandaag",
"tab": "231f8919.1c14b6",
"order": 1,
"disp": false,
"width": "18",
"collapse": false
},
{
"id": "91e88251.9a6fb",
"type": "mqtt-broker",
"z": "",
"name": "ds920 mqtt broker",
"broker": "192.168.1.36",
"port": "1883",
"clientid": "nodered",
"usetls": false,
"compatmode": true,
"keepalive": "60",
"cleansession": false,
"birthTopic": "",
"birthQos": "0",
"birthPayload": "",
"closeTopic": "",
"closeQos": "0",
"closePayload": "",
"willTopic": "",
"willQos": "0",
"willPayload": ""
},
{
"id": "5101ae4d.d3f47",
"type": "ui_group",
"z": "",
"name": "Scenes",
"tab": "231f8919.1c14b6",
"order": 4,
"disp": true,
"width": 6,
"collapse": true
},
{
"id": "e460e8a.9aac518",
"type": "ui_group",
"z": "",
"name": "Verlichting Woonkamer",
"tab": "231f8919.1c14b6",
"order": 3,
"disp": true,
"width": "6",
"collapse": true
},
{
"id": "56f5946b.feb13c",
"type": "ui_group",
"z": "",
"name": "Verlichting Overig",
"tab": "231f8919.1c14b6",
"order": 6,
"disp": true,
"width": "6",
"collapse": true
},
{
"id": "4adeb9e8.ee9d18",
"type": "ui_group",
"z": "",
"name": "Grootverbruikers",
"tab": "231f8919.1c14b6",
"order": 5,
"disp": true,
"width": "6",
"collapse": true
},
{
"id": "231f8919.1c14b6",
"type": "ui_tab",
"z": "",
"name": "Home",
"icon": "dashboard",
"order": 1,
"disabled": false,
"hidden": false
}
]
thank i guess copy and paste and thats it =)
- And lots of configuration of topics on MQTT
- And some flows on Homey to make the thermostat setting working
Hi,
That first screenshot of the ipad on the wall is that your installation? What frame did you use?
Nice extended tutorial / blog btw
Thanks. It’s just some aluminium corner extrusion I cut together. The wall is actually a large hatch see:
is there a chance to control the brightness of an ipad via homey e.g. if no movement (via motion sensor) in front of the ipad then set the brightness of the ipad to 0…?
I think with the homey dashboard there was a virtual device… but how can I realize this with node red and homey?
You could probably change the stylesheet based on a incoming MQTT message. But I personally don’t think it’s worth the hassle. Dimming the light by adjusting colors on a webpage won’t conserve energy (on non-oled display’s) or prolong the lifetime of the device. Unless you are bothered by the light? There is an dark theme available inside node-red.
When I’m not around I turn the homescreen off with the help of homeyduino and a wire soldered to the magnetic smart cover sensor. I’ve also made a less intrusive solution by using an ESP32 to emulate a Bluetooth keyboard to lock and unlock the ipad with Homey:
Sadly this wont work with my old iPad2. It needs to support Bluetooth BLE to work.
One question related to Node Red. I have been trying to make code to sort array. In my point of view the output message should have following: Test_m_out=empty, m_out=original values and m_out_sorted=sorted values. But the output of the all arrays are sorted values. I don’t get it, help is needed. What am I missing.
[{"id":"94931480.7c10f8","type":"inject","z":"e728dd25.c0c07","name":"","topic":"","payload":"","payloadType":"date","repeat":"3600","crontab":"","once":false,"onceDelay":0.1,"x":230,"y":640,"wires":[["f5220f0f.6d486"]]},{"id":"f5220f0f.6d486","type":"function","z":"e728dd25.c0c07","name":"SortEmOut","func":"var msg1={}\n\nvar m_out=[]\n\nvar m_out_sorted=[]\n\nmsg1.Test_m_out=m_out //This should be empty\n\nm_out[0]=3\nm_out[1]=2\nm_out[2]=4\nm_out[3]=5\nm_out[4]=1\nm_out[5]=7\n\nm_out_sorted = m_out\nm_out_sorted = m_out_sorted.sort((a,b) => a-b)\n\nmsg1.m_out=m_out //This should have original values\nmsg1.m_out_sorted=m_out_sorted //This should have sorted values\n\nreturn msg1","outputs":1,"noerr":0,"x":390,"y":640,"wires":[["e9841710.80f4d8"]]},{"id":"e9841710.80f4d8","type":"debug","z":"e728dd25.c0c07","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":550,"y":640,"wires":[]}]
Hi, can this post help?