2
0
This commit is contained in:
2026-01-09 09:25:37 +01:00
parent 6d7bd63630
commit 18095fc631
4 changed files with 758 additions and 12 deletions

View File

@@ -225,7 +225,7 @@
"type": "function",
"z": "41526b8c80d5a5f7",
"name": "format mqtt",
"func": "let marche = Number(flow.get(\"marche\") || 0);\nlet b0 = Number(flow.get(\"b0\") || 0);\nlet b1 = Number(flow.get(\"b1\") || 0);\nlet b2 = Number(flow.get(\"b2\") || 0);\n\nmsg.payload = {\n \"marche\": marche,\n \"b0\": b0,\n \"b1\": b1,\n \"b2\": b2\n};\n\nreturn msg;",
"func": "let marche = Number(flow.get(\"marche\") || 0);\nlet b0 = Number(flow.get(\"b0\") || 0);\nlet b1 = Number(flow.get(\"b1\") || 0);\nlet b2 = Number(flow.get(\"b2\") || 0);\nlet b3 = Number(flow.get(\"b3\") || 0);\n\nmsg.payload = {\n \"marche\": marche,\n \"b0\": b0,\n \"b1\": b1,\n \"b2\": b2,\n \"b3\": b3\n};\n\nreturn msg;",
"outputs": 1,
"timeout": 0,
"noerr": 0,
@@ -284,8 +284,15 @@
},
{
"t": "set",
"p": "b1",
"pt": "msg",
"p": "s0",
"pt": "flow",
"to": "0",
"tot": "num"
},
{
"t": "set",
"p": "b0",
"pt": "flow",
"to": "0",
"tot": "num"
}
@@ -420,7 +427,8 @@
"y": 580,
"wires": [
[
"31ef90b8227cd6cb"
"31ef90b8227cd6cb",
"9ef1bb67f51b254c"
]
]
},
@@ -436,9 +444,163 @@
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 740,
"y": 460,
"wires": []
},
{
"id": "309cae1a9bcc718b",
"type": "ui-text",
"z": "41526b8c80d5a5f7",
"group": "c3dd11d0778f9e67",
"order": 4,
"width": 0,
"height": 0,
"name": "",
"label": "s0",
"format": "{{msg.payload}}",
"layout": "row-spread",
"style": false,
"font": "",
"fontSize": 16,
"color": "#717171",
"wrapText": false,
"className": "",
"value": "payload",
"valueType": "msg",
"x": 870,
"y": 520,
"wires": []
},
{
"id": "6bd900b695c3a793",
"type": "ui-text",
"z": "41526b8c80d5a5f7",
"group": "c3dd11d0778f9e67",
"order": 3,
"width": 0,
"height": 0,
"name": "",
"label": "s1",
"format": "{{msg.payload}}",
"layout": "row-spread",
"style": false,
"font": "",
"fontSize": 16,
"color": "#717171",
"wrapText": false,
"className": "",
"value": "payload",
"valueType": "msg",
"x": 870,
"y": 560,
"wires": []
},
{
"id": "cdc7f0e7741ad210",
"type": "ui-text",
"z": "41526b8c80d5a5f7",
"group": "c3dd11d0778f9e67",
"order": 2,
"width": 0,
"height": 0,
"name": "",
"label": "s2",
"format": "{{msg.payload}}",
"layout": "row-spread",
"style": false,
"font": "",
"fontSize": 16,
"color": "#717171",
"wrapText": false,
"className": "",
"value": "payload",
"valueType": "msg",
"x": 870,
"y": 600,
"wires": []
},
{
"id": "9ef1bb67f51b254c",
"type": "function",
"z": "41526b8c80d5a5f7",
"name": "function 1",
"func": "flow.set(\"s0\", !Number(msg.payload.s0));\nflow.set(\"s1\", !Number(msg.payload.s1));\nflow.set(\"s2\", !Number(msg.payload.s2));\n\nreturn msg;",
"outputs": 1,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 380,
"y": 580,
"wires": []
"wires": [
[
"9dad44eccec1d282",
"fc568b731fec8026",
"6179e102d7866a82"
]
]
},
{
"id": "9dad44eccec1d282",
"type": "function",
"z": "41526b8c80d5a5f7",
"name": "s0",
"func": "msg.payload = Number(flow.get(\"s0\")) ? \"🟥\" : \"🟩\";\n\nreturn msg;",
"outputs": 1,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 690,
"y": 520,
"wires": [
[
"309cae1a9bcc718b"
]
]
},
{
"id": "fc568b731fec8026",
"type": "function",
"z": "41526b8c80d5a5f7",
"name": "s1",
"func": "msg.payload = Number(flow.get(\"s1\")) ? \"🟥\" : \"🟩\";\n\nreturn msg;",
"outputs": 1,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 690,
"y": 560,
"wires": [
[
"6bd900b695c3a793"
]
]
},
{
"id": "6179e102d7866a82",
"type": "function",
"z": "41526b8c80d5a5f7",
"name": "s0",
"func": "msg.payload = Number(flow.get(\"s2\")) ? \"🟥\" : \"🟩\";\n\nreturn msg;",
"outputs": 1,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 690,
"y": 600,
"wires": [
[
"cdc7f0e7741ad210"
]
]
},
{
"id": "5fe915fcd26e78ae",
@@ -447,7 +609,7 @@
"page": "bb436fe040268d40",
"width": "2",
"height": 1,
"order": 1,
"order": 2,
"showTitle": true,
"className": "",
"visible": "true",
@@ -485,6 +647,20 @@
"userProps": "",
"sessionExpiry": ""
},
{
"id": "c3dd11d0778f9e67",
"type": "ui-group",
"name": "Voyants",
"page": "bb436fe040268d40",
"width": "3",
"height": 1,
"order": 1,
"showTitle": true,
"className": "",
"visible": "true",
"disabled": "false",
"groupType": "default"
},
{
"id": "bb436fe040268d40",
"type": "ui-page",
@@ -561,11 +737,11 @@
}
},
{
"id": "925a608e1a2d82a3",
"id": "7514f74ba5dcf202",
"type": "global-config",
"env": [],
"modules": {
"@flowfuse/node-red-dashboard": "1.29.0"
"@flowfuse/node-red-dashboard": "1.30.1"
}
}
]