Raspberry pi
node-red v3.0.2
dashboard 3.6.0
node 12.22.9
[
{
"id": "c31640d81bf733c7",
"type": "tab",
"label": "Boiler Demo",
"disabled": false,
"info": "",
"env": []
},
{
"id": "d25954b36544f696",
"type": "ui_template",
"z": "c31640d81bf733c7",
"group": "be8cd6b09a8d7d5d",
"name": "CSS",
"order": 14,
"width": 0,
"height": 0,
"format": "<style>\n .boiler {\n height: 200px;\n width: 120px;\n border: 4px solid black;\n background: linear-gradient(0deg, var(--bottom) 0% 10%, var(--middle) 55% 65% , var(--top) 90% 100%);\n }\n</style>\n",
"storeOutMessages": true,
"fwdInMessages": true,
"resendOnRefresh": true,
"templateScope": "global",
"className": "",
"x": 770,
"y": 120,
"wires": [
[]
]
},
{
"id": "f3c43fd0cfc8b280",
"type": "ui_template",
"z": "c31640d81bf733c7",
"group": "2a81558c7ec1f470",
"name": "",
"order": 7,
"width": 3,
"height": "6",
"format": "<div class=\"boiler\" style=\"--bottom: {{msg.bottom}}; --middle: {{msg.middle}}; --top: {{msg.top}};\">\n</div>",
"storeOutMessages": true,
"fwdInMessages": true,
"resendOnRefresh": true,
"templateScope": "local",
"className": "",
"x": 780,
"y": 160,
"wires": [
[]
]
},
{
"id": "0d04e96dc9578de1",
"type": "function",
"z": "c31640d81bf733c7",
"name": "Convert temp to colour",
"func": "if (msg.payload >= 80) {\n msg.colour = '#600000';\n}\nelse if (msg.payload >= 70) {\n msg.colour = '#8b1600';\n}\nelse if (msg.payload >= 65) {\n msg.colour = '#932700';\n}\nelse if (msg.payload >= 60) {\n msg.colour = '#983400';\n}\nelse if (msg.payload >= 55) {\n msg.colour = '#9f4300';\n}\nelse if (msg.payload >= 50) {\n msg.colour = '#a75700';\n}\nelse if (msg.payload >= 45) {\n msg.colour = '#b16d00';\n}\nelse if (msg.payload >= 40) {\n msg.colour = '#b88000';\n}\nelse if (msg.payload >= 35) {\n msg.colour = '#a58414';\n}\nelse if (msg.payload >= 30) {\n msg.colour = '#5f614d';\n}\nelse if (msg.payload >= 20) {\n msg.colour = '#103b8c';\n}\nelse if (msg.payload < 20) {\n msg.colour = '#000080';\n}\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 200,
"y": 40,
"wires": [
[
"5cff6b93cae4a69d"
]
]
},
{
"id": "3831f2b421e734d8",
"type": "ui_slider",
"z": "c31640d81bf733c7",
"name": "",
"label": "Top Sensor",
"tooltip": "",
"group": "2a81558c7ec1f470",
"order": 2,
"width": 0,
"height": 0,
"passthru": true,
"outs": "end",
"topic": "topic",
"topicType": "msg",
"min": 0,
"max": "100",
"step": 1,
"className": "",
"x": 90,
"y": 120,
"wires": [
[
"f3da952e5ed1c591"
]
]
},
{
"id": "6529859cd44d0fce",
"type": "ui_slider",
"z": "c31640d81bf733c7",
"name": "",
"label": "Middle Sensor",
"tooltip": "",
"group": "2a81558c7ec1f470",
"order": 3,
"width": 0,
"height": 0,
"passthru": true,
"outs": "end",
"topic": "topic",
"topicType": "msg",
"min": 0,
"max": "100",
"step": 1,
"className": "",
"x": 100,
"y": 160,
"wires": [
[
"cf2ee47352f01a60"
]
]
},
{
"id": "1c097ca07f7c0d6f",
"type": "ui_slider",
"z": "c31640d81bf733c7",
"name": "",
"label": "Bottom Sensor",
"tooltip": "",
"group": "2a81558c7ec1f470",
"order": 4,
"width": 0,
"height": 0,
"passthru": true,
"outs": "end",
"topic": "topic",
"topicType": "msg",
"min": 0,
"max": "100",
"step": 1,
"className": "",
"x": 100,
"y": 200,
"wires": [
[
"a388b5497055a426"
]
]
},
{
"id": "d648d364970f0816",
"type": "link in",
"z": "c31640d81bf733c7",
"name": "link in 2",
"links": [],
"x": 55,
"y": 40,
"wires": [
[
"0d04e96dc9578de1"
]
]
},
{
"id": "5cff6b93cae4a69d",
"type": "link out",
"z": "c31640d81bf733c7",
"name": "link out 2",
"mode": "return",
"links": [],
"x": 355,
"y": 40,
"wires": []
},
{
"id": "f3da952e5ed1c591",
"type": "link call",
"z": "c31640d81bf733c7",
"name": "",
"links": [
"d648d364970f0816"
],
"linkType": "static",
"timeout": "30",
"x": 260,
"y": 120,
"wires": [
[
"45adf6b29841bb7b"
]
]
},
{
"id": "cf2ee47352f01a60",
"type": "link call",
"z": "c31640d81bf733c7",
"name": "",
"links": [
"d648d364970f0816"
],
"linkType": "static",
"timeout": "30",
"x": 260,
"y": 160,
"wires": [
[
"ab18517f066b5022"
]
]
},
{
"id": "a388b5497055a426",
"type": "link call",
"z": "c31640d81bf733c7",
"name": "",
"links": [
"d648d364970f0816"
],
"linkType": "static",
"timeout": "30",
"x": 260,
"y": 200,
"wires": [
[
"d3186ffd51763c63"
]
]
},
{
"id": "45adf6b29841bb7b",
"type": "change",
"z": "c31640d81bf733c7",
"name": "",
"rules": [
{
"t": "set",
"p": "top",
"pt": "flow",
"to": "colour",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 410,
"y": 120,
"wires": [
[
"30a0aba554bc7f6d"
]
]
},
{
"id": "ab18517f066b5022",
"type": "change",
"z": "c31640d81bf733c7",
"name": "",
"rules": [
{
"t": "set",
"p": "middle",
"pt": "flow",
"to": "colour",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 420,
"y": 160,
"wires": [
[
"30a0aba554bc7f6d"
]
]
},
{
"id": "d3186ffd51763c63",
"type": "change",
"z": "c31640d81bf733c7",
"name": "",
"rules": [
{
"t": "set",
"p": "bottom",
"pt": "flow",
"to": "colour",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 420,
"y": 200,
"wires": [
[
"30a0aba554bc7f6d"
]
]
},
{
"id": "30a0aba554bc7f6d",
"type": "function",
"z": "c31640d81bf733c7",
"name": "function 52",
"func": "msg.top = flow.get(\"top\") ?? 0\nmsg.middle = flow.get(\"middle\") ?? 0\nmsg.bottom = flow.get(\"bottom\") ?? 0\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 610,
"y": 160,
"wires": [
[
"f3c43fd0cfc8b280"
]
]
},
{
"id": "be8cd6b09a8d7d5d",
"type": "ui_group",
"name": "Labels",
"tab": "704020d306ae5506",
"order": 1,
"disp": false,
"width": 2,
"collapse": false,
"className": ""
},
{
"id": "2a81558c7ec1f470",
"type": "ui_group",
"name": "Boiler",
"tab": "1e5db0123cb5abe5",
"order": 1,
"disp": true,
"width": "6",
"collapse": false,
"className": ""
},
{
"id": "704020d306ae5506",
"type": "ui_tab",
"name": "ESP BME",
"icon": "dashboard",
"order": 1,
"disabled": false,
"hidden": false
},
{
"id": "1e5db0123cb5abe5",
"type": "ui_tab",
"name": "Boiler",
"icon": "dashboard",
"disabled": false,
"hidden": false
}
]