diff --git a/.devcontainer/nodered/flows.json b/.devcontainer/nodered/flows.json index e3eb3a9..30305cb 100644 --- a/.devcontainer/nodered/flows.json +++ b/.devcontainer/nodered/flows.json @@ -7,6 +7,223 @@ "info": "", "env": [] }, + { + "id": "b5e17af18ea9731a", + "type": "tab", + "label": "Flux 2", + "disabled": false, + "info": "", + "env": [] + }, + { + "id": "3dc18e328806e2f6", + "type": "global-config", + "env": [], + "modules": { + "@flowfuse/node-red-dashboard": "1.29.0" + } + }, + { + "id": "5bf949eb0a1b50a7", + "type": "mqtt-broker", + "name": "", + "broker": "rabbitmq", + "port": 1883, + "clientid": "", + "autoConnect": true, + "usetls": false, + "protocolVersion": 4, + "keepalive": 60, + "cleansession": true, + "autoUnsubscribe": true, + "birthTopic": "", + "birthQos": "0", + "birthRetain": "false", + "birthPayload": "", + "birthMsg": {}, + "closeTopic": "", + "closeQos": "0", + "closeRetain": "false", + "closePayload": "", + "closeMsg": {}, + "willTopic": "", + "willQos": "0", + "willRetain": "false", + "willPayload": "", + "willMsg": {}, + "userProps": "", + "sessionExpiry": "" + }, + { + "id": "92537b03143c5e06", + "type": "ui-base", + "name": "My Dashboard", + "path": "/dashboard", + "appIcon": "", + "includeClientData": true, + "acceptsClientConfig": [ + "ui-notification", + "ui-control" + ], + "showPathInSidebar": false, + "headerContent": "page", + "navigationStyle": "default", + "titleBarStyle": "default", + "showReconnectNotification": true, + "notificationDisplayTime": 1, + "showDisconnectNotification": true, + "allowInstall": false + }, + { + "id": "ea2bf5532fa513eb", + "type": "ui-theme", + "name": "Default Theme", + "colors": { + "surface": "#ffffff", + "primary": "#0094CE", + "bgPage": "#eeeeee", + "groupBg": "#ffffff", + "groupOutline": "#cccccc" + }, + "sizes": { + "density": "default", + "pagePadding": "12px", + "groupGap": "12px", + "groupBorderRadius": "4px", + "widgetGap": "12px" + } + }, + { + "id": "bb436fe040268d40", + "type": "ui-page", + "name": "LP SARII", + "ui": "92537b03143c5e06", + "path": "/page1", + "icon": "home", + "layout": "grid", + "theme": "ea2bf5532fa513eb", + "breakpoints": [ + { + "name": "Default", + "px": "0", + "cols": "3" + }, + { + "name": "Tablet", + "px": "576", + "cols": "6" + }, + { + "name": "Small Desktop", + "px": "768", + "cols": "9" + }, + { + "name": "Desktop", + "px": "1024", + "cols": "12" + } + ], + "order": 1, + "className": "", + "visible": "true", + "disabled": "false" + }, + { + "id": "5fe915fcd26e78ae", + "type": "ui-group", + "name": "Boutons", + "page": "bb436fe040268d40", + "width": "2", + "height": 1, + "order": 2, + "showTitle": true, + "className": "", + "visible": "true", + "disabled": "false", + "groupType": "default" + }, + { + "id": "02fab8cbf37e2bb7", + "type": "ui-group", + "name": "Alimentation", + "page": "bb436fe040268d40", + "width": "2", + "height": 1, + "order": 1, + "showTitle": true, + "className": "", + "visible": "true", + "disabled": "false", + "groupType": "default" + }, + { + "id": "c3dd11d0778f9e67", + "type": "ui-group", + "name": "Voyants", + "page": "bb436fe040268d40", + "width": "2", + "height": 1, + "order": 4, + "showTitle": true, + "className": "", + "visible": "true", + "disabled": "false", + "groupType": "default" + }, + { + "id": "00ea85a0e0b38df3", + "type": "ui-group", + "name": "Interrupteurs", + "page": "bb436fe040268d40", + "width": "2", + "height": 1, + "order": 3, + "showTitle": true, + "className": "", + "visible": "true", + "disabled": "false", + "groupType": "default" + }, + { + "id": "b1bde11bdd78b9f1", + "type": "ui-group", + "name": "Afficheur", + "page": "bb436fe040268d40", + "width": "8", + "height": 1, + "order": 6, + "showTitle": true, + "className": "", + "visible": "true", + "disabled": "false", + "groupType": "default" + }, + { + "id": "6b44d4b22cd7b3dc", + "type": "ui-group", + "name": "Moteurs", + "page": "bb436fe040268d40", + "width": "4", + "height": 1, + "order": 5, + "showTitle": true, + "className": "", + "visible": "true", + "disabled": "false", + "groupType": "default" + }, + { + "id": "34e2708f001f89c4", + "type": "ui-spacer", + "group": "6b44d4b22cd7b3dc", + "name": "spacer", + "tooltip": "", + "order": 11, + "width": 1, + "height": 1, + "className": "" + }, { "id": "699fb0d470d36c5f", "type": "ui-button", @@ -38,7 +255,7 @@ "enablePointerup": false, "pointerupPayload": "", "pointerupPayloadType": "str", - "x": 690, + "x": 710, "y": 680, "wires": [ [ @@ -77,7 +294,7 @@ "enablePointerup": false, "pointerupPayload": "", "pointerupPayloadType": "str", - "x": 690, + "x": 710, "y": 720, "wires": [ [ @@ -116,7 +333,7 @@ "enablePointerup": false, "pointerupPayload": "", "pointerupPayloadType": "str", - "x": 690, + "x": 710, "y": 760, "wires": [ [ @@ -155,7 +372,7 @@ "enablePointerup": false, "pointerupPayload": "", "pointerupPayloadType": "str", - "x": 690, + "x": 710, "y": 800, "wires": [ [ @@ -212,7 +429,7 @@ "enablePointerup": false, "pointerupPayload": "", "pointerupPayloadType": "str", - "x": 700, + "x": 720, "y": 560, "wires": [ [ @@ -237,12 +454,11 @@ "topic": "", "payload": "", "payloadType": "date", - "x": 110, - "y": 40, + "x": 130, + "y": 400, "wires": [ [ - "66094b9e85ac4d5b", - "f6a658f341548fb3" + "48e613c44cc4f340" ] ] }, @@ -258,7 +474,7 @@ "initialize": "", "finalize": "", "libs": [], - "x": 870, + "x": 890, "y": 560, "wires": [ [ @@ -278,7 +494,7 @@ "initialize": "", "finalize": "", "libs": [], - "x": 860, + "x": 880, "y": 720, "wires": [ [ @@ -298,7 +514,7 @@ "initialize": "", "finalize": "", "libs": [], - "x": 860, + "x": 880, "y": 760, "wires": [ [ @@ -310,7 +526,7 @@ "id": "8ec37a1598f36eab", "type": "function", "z": "86a34ee77bf6db10", - "name": "set b3", + "name": "send b3", "func": "msg.payload = {\n \"b3\": 1\n};\n\nreturn msg;", "outputs": 1, "timeout": 0, @@ -318,7 +534,7 @@ "initialize": "", "finalize": "", "libs": [], - "x": 850, + "x": 880, "y": 800, "wires": [ [ @@ -368,7 +584,7 @@ "value": "payload", "valueType": "msg", "x": 870, - "y": 1080, + "y": 1100, "wires": [] }, { @@ -392,7 +608,7 @@ "value": "payload", "valueType": "msg", "x": 870, - "y": 1120, + "y": 1140, "wires": [] }, { @@ -416,47 +632,9 @@ "value": "payload", "valueType": "msg", "x": 870, - "y": 1160, + "y": 1180, "wires": [] }, - { - "id": "586e5d5f736036fc", - "type": "function", - "z": "86a34ee77bf6db10", - "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));\nflow.set(\"s3\", Number(msg.payload.s3));\nflow.set(\"s4\", Number(msg.payload.s4));\nflow.set(\"s5\", Number(msg.payload.s5));\nflow.set(\"s6\", Number(msg.payload.s6));\nflow.set(\"s7\", Number(msg.payload.s7));\n\nreturn msg;", - "outputs": 1, - "timeout": 0, - "noerr": 0, - "initialize": "", - "finalize": "", - "libs": [], - "x": 380, - "y": 1480, - "wires": [ - [ - "b10ff790c2c745e2", - "3243dba201971bd7", - "051388bb768084d7", - "c793fceafb6fb3f0", - "65723f43ca71069b", - "3ceeaa9da55ccbb8", - "53e82b867be45c4a", - "4fe669c3987dcfe4", - "87bd077b61c6e623", - "17f45fa5a72be929", - "96a15b4c506aa11a", - "10a21959cbd3cc1e", - "1cd3d290f7f7d539", - "88310a9e40d564fc", - "b543660f60319f21", - "cefd0feeeaf4227c", - "0ddd646c0134e82c", - "3331b1d0398a3348", - "696cf5af60cf4b64" - ] - ] - }, { "id": "b10ff790c2c745e2", "type": "function", @@ -470,7 +648,7 @@ "finalize": "", "libs": [], "x": 690, - "y": 1080, + "y": 1100, "wires": [ [ "9a23c6f558ea0378" @@ -490,7 +668,7 @@ "finalize": "", "libs": [], "x": 690, - "y": 1120, + "y": 1140, "wires": [ [ "a80fa1a313f076c8" @@ -510,7 +688,7 @@ "finalize": "", "libs": [], "x": 690, - "y": 1160, + "y": 1180, "wires": [ [ "10e55237847991c9" @@ -538,7 +716,7 @@ "value": "payload", "valueType": "msg", "x": 870, - "y": 1200, + "y": 1220, "wires": [] }, { @@ -562,7 +740,7 @@ "value": "payload", "valueType": "msg", "x": 870, - "y": 1240, + "y": 1260, "wires": [] }, { @@ -586,7 +764,7 @@ "value": "payload", "valueType": "msg", "x": 870, - "y": 1280, + "y": 1300, "wires": [] }, { @@ -610,7 +788,7 @@ "value": "payload", "valueType": "msg", "x": 870, - "y": 1320, + "y": 1340, "wires": [] }, { @@ -634,7 +812,7 @@ "value": "payload", "valueType": "msg", "x": 870, - "y": 1360, + "y": 1380, "wires": [] }, { @@ -650,7 +828,7 @@ "finalize": "", "libs": [], "x": 690, - "y": 1200, + "y": 1220, "wires": [ [ "38d83b28a85004c7" @@ -670,7 +848,7 @@ "finalize": "", "libs": [], "x": 690, - "y": 1240, + "y": 1260, "wires": [ [ "d8918e528c0bab75" @@ -690,7 +868,7 @@ "finalize": "", "libs": [], "x": 690, - "y": 1280, + "y": 1300, "wires": [ [ "d82070a29ee7072c" @@ -710,7 +888,7 @@ "finalize": "", "libs": [], "x": 690, - "y": 1320, + "y": 1340, "wires": [ [ "04f3fd26b7f05cd2" @@ -730,7 +908,7 @@ "finalize": "", "libs": [], "x": 690, - "y": 1360, + "y": 1380, "wires": [ [ "b2154eb18bb4e996" @@ -742,18 +920,27 @@ "type": "function", "z": "86a34ee77bf6db10", "name": "reset", - "func": "flow.set(\"i0\", 0);\nflow.set(\"i1\", 0);\nflow.set(\"i2\", 0);\nflow.set(\"i3\", 0);\nflow.set(\"i4\", 0);\nflow.set(\"i5\", 0);\nflow.set(\"i6\", 0);\nflow.set(\"i7\", 0);\n\nflow.set(\"a0\", 0);\nflow.set(\"a1\", 0);\nflow.set(\"a2\", 0);\nflow.set(\"a3\", 0);\nflow.set(\"a4\", 0);\nflow.set(\"a5\", 0);\nflow.set(\"a6\", 0);\nflow.set(\"a7\", 0);\n\nflow.set(\"m0\", 0);\nflow.set(\"m1\", 0);\nflow.set(\"m2\", 0);\nflow.set(\"m3\", 0);\n\nflow.set(\"p0\", 0);\nflow.set(\"v0\", 0);\n\nflow.set(\"c0\", 1);\nflow.set(\"c1\", 0);\nflow.set(\"c2\", 0);\nflow.set(\"c3\", 0);\nflow.set(\"c4\", 0);\nflow.set(\"c5\", 0);\nflow.set(\"c6\", 0);\nflow.set(\"c7\", 0);\n\nflow.set(\"flag0\", 0);\n\nreturn msg;", + "func": "flow.set(\"i0\", 0);\nflow.set(\"i1\", 0);\nflow.set(\"i2\", 0);\nflow.set(\"i3\", 0);\nflow.set(\"i4\", 0);\nflow.set(\"i5\", 0);\nflow.set(\"i6\", 0);\nflow.set(\"i7\", 0);\n\nglobal.set(\"a0\", 0);\nglobal.set(\"a1\", 0);\nglobal.set(\"a2\", 0);\nglobal.set(\"a3\", 0);\nglobal.set(\"a4\", 0);\nglobal.set(\"a5\", 0);\nglobal.set(\"a6\", 0);\nglobal.set(\"a7\", 0);\n\nflow.set(\"m0\", 0);\nflow.set(\"m1\", 0);\nflow.set(\"m2\", 0);\nflow.set(\"m3\", 0);\n\nglobal.set(\"p0\", 0);\n\nflow.set(\"v0\", 0);\n\nglobal.set(\"c0\", 1);\nglobal.set(\"c1\", 1);\nglobal.set(\"c2\", 0);\nglobal.set(\"c3\", 0);\nglobal.set(\"c4\", 0);\nglobal.set(\"c5\", 0);\nglobal.set(\"c6\", 0);\nglobal.set(\"c7\", 0);\n\nglobal.set(\"flag0\", 0);\n\nmsg.payload = false;\n\nreturn msg;", "outputs": 1, "timeout": 0, "noerr": 0, "initialize": "", "finalize": "", "libs": [], - "x": 870, - "y": 40, + "x": 430, + "y": 520, "wires": [ [ - "37bdef06b07499f2" + "37bdef06b07499f2", + "ef83bfa989b6d72a", + "7bfba44b320a1826", + "929ad4eb2a0bbb68", + "1805fe84b15e252a", + "5a52593d8e054e97", + "b677272b111f5855", + "961e284427aa8f71", + "9cdcb36a20d2892f", + "1f3e907130059c8c" ] ] }, @@ -788,7 +975,7 @@ "enablePointerup": false, "pointerupPayload": "", "pointerupPayloadType": "str", - "x": 690, + "x": 710, "y": 840, "wires": [ [ @@ -827,7 +1014,7 @@ "enablePointerup": false, "pointerupPayload": "", "pointerupPayloadType": "str", - "x": 690, + "x": 710, "y": 880, "wires": [ [ @@ -866,7 +1053,7 @@ "enablePointerup": false, "pointerupPayload": "", "pointerupPayloadType": "str", - "x": 690, + "x": 710, "y": 920, "wires": [ [ @@ -905,7 +1092,7 @@ "enablePointerup": false, "pointerupPayload": "", "pointerupPayloadType": "str", - "x": 690, + "x": 710, "y": 960, "wires": [ [ @@ -917,7 +1104,7 @@ "id": "b5a2e6d66f70685c", "type": "function", "z": "86a34ee77bf6db10", - "name": "set b4", + "name": "send b4", "func": "msg.payload = {\n \"b4\": 1\n};\n\nreturn msg;", "outputs": 1, "timeout": 0, @@ -925,7 +1112,7 @@ "initialize": "", "finalize": "", "libs": [], - "x": 850, + "x": 880, "y": 840, "wires": [ [ @@ -937,7 +1124,7 @@ "id": "925464e2aac8a2e6", "type": "function", "z": "86a34ee77bf6db10", - "name": "set b5", + "name": "send b5", "func": "msg.payload = {\n \"b5\": 1\n};\n\nreturn msg;", "outputs": 1, "timeout": 0, @@ -945,7 +1132,7 @@ "initialize": "", "finalize": "", "libs": [], - "x": 850, + "x": 880, "y": 880, "wires": [ [ @@ -957,7 +1144,7 @@ "id": "3d73b77fe116a743", "type": "function", "z": "86a34ee77bf6db10", - "name": "set b6", + "name": "send b6", "func": "msg.payload = {\n \"b6\": 1\n};\n\nreturn msg;", "outputs": 1, "timeout": 0, @@ -965,7 +1152,7 @@ "initialize": "", "finalize": "", "libs": [], - "x": 850, + "x": 880, "y": 920, "wires": [ [ @@ -1058,7 +1245,7 @@ "enablePointerup": false, "pointerupPayload": "", "pointerupPayloadType": "str", - "x": 700, + "x": 720, "y": 600, "wires": [ [ @@ -1078,7 +1265,7 @@ "initialize": "", "finalize": "", "libs": [], - "x": 860, + "x": 880, "y": 680, "wires": [ [ @@ -1091,7 +1278,7 @@ "type": "function", "z": "86a34ee77bf6db10", "name": "format mqtt", - "func": "let i0 = Number(flow.get(\"i0\")) || 0;\nlet i1 = Number(flow.get(\"i1\")) || 0;\nlet i2 = Number(flow.get(\"i2\")) || 0;\nlet i3 = Number(flow.get(\"i3\")) || 0;\nlet i4 = Number(flow.get(\"i4\")) || 0;\nlet i5 = Number(flow.get(\"i5\")) || 0;\nlet i6 = Number(flow.get(\"i6\")) || 0;\nlet i7 = Number(flow.get(\"i7\")) || 0;\n\nlet v0 = Number(flow.get(\"v0\")) || 0;\n\nif (typeof msg.payload[\"arret\"] === 'undefined') msg.payload[\"arret\"] = 1;\nif (typeof msg.payload[\"marche\"] === 'undefined') msg.payload[\"marche\"] = 0;\n\nif (typeof msg.payload[\"b0\"] === 'undefined') msg.payload[\"b0\"] = 0;\nif (typeof msg.payload[\"b1\"] === 'undefined') msg.payload[\"b1\"] = 0;\nif (typeof msg.payload[\"b2\"] === 'undefined') msg.payload[\"b2\"] = 0;\nif (typeof msg.payload[\"b3\"] === 'undefined') msg.payload[\"b3\"] = 0;\nif (typeof msg.payload[\"b4\"] === 'undefined') msg.payload[\"b4\"] = 0;\nif (typeof msg.payload[\"b5\"] === 'undefined') msg.payload[\"b5\"] = 0;\nif (typeof msg.payload[\"b6\"] === 'undefined') msg.payload[\"b6\"] = 0;\nif (typeof msg.payload[\"b7\"] === 'undefined') msg.payload[\"b7\"] = 0;\n\nmsg.payload[\"i0\"] = i0;\nmsg.payload[\"i1\"] = i1;\nmsg.payload[\"i2\"] = i2;\nmsg.payload[\"i3\"] = i3;\nmsg.payload[\"i4\"] = i4;\nmsg.payload[\"i5\"] = i5;\nmsg.payload[\"i6\"] = i6;\nmsg.payload[\"i7\"] = i7;\n\nlet c0 = Number(flow.get(\"c0\")) || 0;\nlet c1 = Number(flow.get(\"c1\")) || 0;\nlet c2 = Number(flow.get(\"c2\")) || 0;\nlet c3 = Number(flow.get(\"c3\")) || 0;\nlet c4 = Number(flow.get(\"c4\")) || 0;\nlet c5 = Number(flow.get(\"c5\")) || 0;\nlet c6 = Number(flow.get(\"c6\")) || 0;\nlet c7 = Number(flow.get(\"c7\")) || 0;\n\nmsg.payload[\"c0\"] = c0;\nmsg.payload[\"c1\"] = c1;\nmsg.payload[\"c2\"] = c2;\nmsg.payload[\"c3\"] = c3;\nmsg.payload[\"c4\"] = c4;\nmsg.payload[\"c5\"] = c5;\nmsg.payload[\"c6\"] = c6;\nmsg.payload[\"c7\"] = c7;\n\nmsg.payload[\"v0\"] = v0;\n\nreturn msg;", + "func": "let i0 = Number(flow.get(\"i0\")) || 0;\nlet i1 = Number(flow.get(\"i1\")) || 0;\nlet i2 = Number(flow.get(\"i2\")) || 0;\nlet i3 = Number(flow.get(\"i3\")) || 0;\nlet i4 = Number(flow.get(\"i4\")) || 0;\nlet i5 = Number(flow.get(\"i5\")) || 0;\nlet i6 = Number(flow.get(\"i6\")) || 0;\nlet i7 = Number(flow.get(\"i7\")) || 0;\n\nlet v0 = Number(flow.get(\"v0\")) || 0;\n\nif (typeof msg.payload[\"arret\"] === 'undefined') msg.payload[\"arret\"] = 1;\nif (typeof msg.payload[\"marche\"] === 'undefined') msg.payload[\"marche\"] = 0;\n\nif (typeof msg.payload[\"b0\"] === 'undefined') msg.payload[\"b0\"] = 0;\nif (typeof msg.payload[\"b1\"] === 'undefined') msg.payload[\"b1\"] = 0;\nif (typeof msg.payload[\"b2\"] === 'undefined') msg.payload[\"b2\"] = 0;\nif (typeof msg.payload[\"b3\"] === 'undefined') msg.payload[\"b3\"] = 0;\nif (typeof msg.payload[\"b4\"] === 'undefined') msg.payload[\"b4\"] = 0;\nif (typeof msg.payload[\"b5\"] === 'undefined') msg.payload[\"b5\"] = 0;\nif (typeof msg.payload[\"b6\"] === 'undefined') msg.payload[\"b6\"] = 0;\nif (typeof msg.payload[\"b7\"] === 'undefined') msg.payload[\"b7\"] = 0;\n\nmsg.payload[\"i0\"] = i0;\nmsg.payload[\"i1\"] = i1;\nmsg.payload[\"i2\"] = i2;\nmsg.payload[\"i3\"] = i3;\nmsg.payload[\"i4\"] = i4;\nmsg.payload[\"i5\"] = i5;\nmsg.payload[\"i6\"] = i6;\nmsg.payload[\"i7\"] = i7;\n\nmsg.payload[\"c0\"] = Number(global.get(\"c0\")) || 0;\nmsg.payload[\"c1\"] = Number(global.get(\"c1\")) || 0;\nmsg.payload[\"c2\"] = Number(global.get(\"c2\")) || 0;\nmsg.payload[\"c3\"] = Number(global.get(\"c3\")) || 0;\nmsg.payload[\"c4\"] = Number(global.get(\"c4\")) || 0;\nmsg.payload[\"c5\"] = Number(global.get(\"c5\")) || 0;\nmsg.payload[\"c6\"] = Number(global.get(\"c6\")) || 0;\nmsg.payload[\"c7\"] = Number(global.get(\"c7\")) || 0;\n\nmsg.payload[\"v0\"] = v0;\n\nreturn msg;", "outputs": 1, "timeout": 0, "noerr": 0, @@ -1111,7 +1298,7 @@ "id": "2ad23092aec0c7c0", "type": "function", "z": "86a34ee77bf6db10", - "name": "set b7", + "name": "send b7", "func": "msg.payload = {\n \"b7\": 1\n};\n\nreturn msg;", "outputs": 1, "timeout": 0, @@ -1119,7 +1306,7 @@ "initialize": "", "finalize": "", "libs": [], - "x": 850, + "x": 880, "y": 960, "wires": [ [ @@ -1522,41 +1709,6 @@ "y": 500, "wires": [] }, - { - "id": "f6a658f341548fb3", - "type": "change", - "z": "86a34ee77bf6db10", - "name": "", - "rules": [ - { - "t": "set", - "p": "payload", - "pt": "msg", - "to": "false", - "tot": "bool" - } - ], - "action": "", - "property": "", - "from": "", - "to": "", - "reg": false, - "x": 350, - "y": 160, - "wires": [ - [ - "ef83bfa989b6d72a", - "7bfba44b320a1826", - "929ad4eb2a0bbb68", - "9cdcb36a20d2892f", - "961e284427aa8f71", - "b677272b111f5855", - "5a52593d8e054e97", - "1805fe84b15e252a", - "1f3e907130059c8c" - ] - ] - }, { "id": "be228653fc2bdb0f", "type": "function", @@ -1569,7 +1721,7 @@ "initialize": "", "finalize": "", "libs": [], - "x": 860, + "x": 880, "y": 600, "wires": [ [ @@ -1658,7 +1810,7 @@ "height": 0, "color": "", "className": "", - "x": 1720, + "x": 1660, "y": 40, "wires": [] }, @@ -1747,7 +1899,7 @@ "type": "function", "z": "86a34ee77bf6db10", "name": "function 2", - "func": "let p0 = Number(flow.get(\"p0\")) || 0;\n\nif (flow.get(\"m0\")) {\n p0++;\n if (p0 > 100) p0 = 100;\n flow.set(\"p0\", p0);\n}\n\nif (flow.get(\"m1\")) {\n p0--;\n if (p0 < 0) p0 = 0;\n flow.set(\"p0\", p0);\n}\n\nmsg.payload = p0;\n\nreturn msg;", + "func": "let p0 = Number(global.get(\"p0\")) || 0;\n\nif (flow.get(\"m0\")) {\n p0++;\n if (p0 > 100) p0 = 100;\n global.set(\"p0\", p0);\n}\n\nif (flow.get(\"m1\")) {\n p0--;\n if (p0 < 0) p0 = 0;\n global.set(\"p0\", p0);\n}\n\nmsg.payload = p0;\n\nreturn msg;", "outputs": 1, "timeout": 0, "noerr": 0, @@ -1777,7 +1929,9 @@ "x": 870, "y": 480, "wires": [ - [] + [ + "37bdef06b07499f2" + ] ] }, { @@ -1785,23 +1939,23 @@ "type": "ui-text", "z": "86a34ee77bf6db10", "group": "02fab8cbf37e2bb7", - "order": 5, - "width": 0, - "height": 0, + "order": 9, + "width": "1", + "height": "1", "name": "", "label": "", "format": "{{msg.payload}}", "layout": "row-right", - "style": false, + "style": true, "font": "", - "fontSize": 16, + "fontSize": "24", "color": "#717171", "wrapText": false, "className": "", "value": "payload", "valueType": "msg", - "x": 850, - "y": 1740, + "x": 870, + "y": 1700, "wires": [] }, { @@ -1809,23 +1963,23 @@ "type": "ui-text", "z": "86a34ee77bf6db10", "group": "02fab8cbf37e2bb7", - "order": 4, - "width": 0, - "height": 0, + "order": 7, + "width": "1", + "height": "1", "name": "", "label": "", "format": "{{msg.payload}}", - "layout": "row-spread", - "style": false, + "layout": "row-right", + "style": true, "font": "", - "fontSize": 16, + "fontSize": "24", "color": "#717171", "wrapText": false, "className": "", "value": "payload", "valueType": "msg", - "x": 850, - "y": 1700, + "x": 870, + "y": 1660, "wires": [] }, { @@ -1833,31 +1987,31 @@ "type": "ui-text", "z": "86a34ee77bf6db10", "group": "02fab8cbf37e2bb7", - "order": 3, - "width": 0, - "height": 0, + "order": 5, + "width": "1", + "height": "1", "name": "", "label": "", "format": "{{msg.payload}}", - "layout": "row-spread", - "style": false, + "layout": "row-right", + "style": true, "font": "", - "fontSize": 16, + "fontSize": "24", "color": "#717171", "wrapText": false, "className": "", "value": "payload", "valueType": "msg", - "x": 850, - "y": 1660, + "x": 870, + "y": 1620, "wires": [] }, { "id": "1cd3d290f7f7d539", "type": "function", "z": "86a34ee77bf6db10", - "name": "l1", - "func": "msg.payload = Number(msg.payload.light) == 1 ? \"🟢\" : \"⚪\";\n\nreturn msg;", + "name": "s8", + "func": "msg.payload = Number(msg.payload.s8) == 1 ? \"🟢\" : \"⚪\";\n\nreturn msg;", "outputs": 1, "timeout": 0, "noerr": 0, @@ -1865,7 +2019,7 @@ "finalize": "", "libs": [], "x": 690, - "y": 1740, + "y": 1700, "wires": [ [ "aff33a1ec25cb285" @@ -1876,8 +2030,8 @@ "id": "88310a9e40d564fc", "type": "function", "z": "86a34ee77bf6db10", - "name": "l2", - "func": "msg.payload = Number(msg.payload.light) == 2 ? \"🟠\" : \"⚪\";\n\nreturn msg;", + "name": "s8", + "func": "msg.payload = Number(msg.payload.s8) == 2 ? \"🟠\" : \"⚪\";\n\nreturn msg;", "outputs": 1, "timeout": 0, "noerr": 0, @@ -1885,7 +2039,7 @@ "finalize": "", "libs": [], "x": 690, - "y": 1700, + "y": 1660, "wires": [ [ "697cc7b491485ee5" @@ -1896,8 +2050,8 @@ "id": "b543660f60319f21", "type": "function", "z": "86a34ee77bf6db10", - "name": "l3", - "func": "msg.payload = Number(msg.payload.light) == 3 ? \"🔴\" : \"⚪\";\n\nreturn msg;", + "name": "s8", + "func": "msg.payload = Number(msg.payload.s8) == 3 ? \"🔴\" : \"⚪\";\n\nreturn msg;", "outputs": 1, "timeout": 0, "noerr": 0, @@ -1905,7 +2059,7 @@ "finalize": "", "libs": [], "x": 690, - "y": 1660, + "y": 1620, "wires": [ [ "3b6fc91887629b43" @@ -2128,381 +2282,6 @@ [] ] }, - { - "id": "cefd0feeeaf4227c", - "type": "function", - "z": "86a34ee77bf6db10", - "name": "a0", - "func": "flow.set(\"a0\", Number(msg.payload.a0));\nmsg.payload = msg.payload.a0;\nreturn msg;", - "outputs": 1, - "timeout": 0, - "noerr": 0, - "initialize": "", - "finalize": "", - "libs": [], - "x": 690, - "y": 1820, - "wires": [ - [ - "faccd817ca7a8365" - ] - ] - }, - { - "id": "faccd817ca7a8365", - "type": "rbe", - "z": "86a34ee77bf6db10", - "name": "", - "func": "rbe", - "gap": "", - "start": "", - "inout": "out", - "septopics": false, - "property": "payload", - "topi": "topic", - "x": 830, - "y": 1820, - "wires": [ - [ - "4986d82da7142a49" - ] - ] - }, - { - "id": "f6f1221e4d6b3682", - "type": "delay", - "z": "86a34ee77bf6db10", - "name": "sortie verrin", - "pauseType": "delay", - "timeout": "800", - "timeoutUnits": "milliseconds", - "rate": "1", - "nbRateUnits": "1", - "rateUnits": "second", - "randomFirst": "1", - "randomLast": "5", - "randomUnits": "seconds", - "drop": false, - "allowrate": false, - "outputs": 1, - "x": 1210, - "y": 1900, - "wires": [ - [ - "5aedb839421d6b67" - ] - ] - }, - { - "id": "5aedb839421d6b67", - "type": "function", - "z": "86a34ee77bf6db10", - "name": "c6 = 1", - "func": "flow.set(\"c6\", 1);\nflow.set(\"flag0\", 1);\nreturn msg;", - "outputs": 1, - "timeout": 0, - "noerr": 0, - "initialize": "", - "finalize": "", - "libs": [], - "x": 1390, - "y": 1900, - "wires": [ - [] - ] - }, - { - "id": "4986d82da7142a49", - "type": "switch", - "z": "86a34ee77bf6db10", - "name": "", - "property": "payload", - "propertyType": "msg", - "rules": [ - { - "t": "eq", - "v": "0", - "vt": "num" - }, - { - "t": "eq", - "v": "1", - "vt": "num" - } - ], - "checkall": "false", - "repair": false, - "outputs": 2, - "x": 1000, - "y": 1820, - "wires": [ - [ - "a0c18759a1ad2b61" - ], - [ - "27bcdd18caf20c38", - "f6f1221e4d6b3682" - ] - ] - }, - { - "id": "27bcdd18caf20c38", - "type": "function", - "z": "86a34ee77bf6db10", - "name": "c0 = 0", - "func": "flow.set(\"c0\", 0);\nreturn msg;", - "outputs": 1, - "timeout": 0, - "noerr": 0, - "initialize": "", - "finalize": "", - "libs": [], - "x": 1190, - "y": 1860, - "wires": [ - [] - ] - }, - { - "id": "a0c18759a1ad2b61", - "type": "delay", - "z": "86a34ee77bf6db10", - "name": "retour verrin", - "pauseType": "delay", - "timeout": "1200", - "timeoutUnits": "milliseconds", - "rate": "1", - "nbRateUnits": "1", - "rateUnits": "second", - "randomFirst": "1", - "randomLast": "5", - "randomUnits": "seconds", - "drop": false, - "allowrate": false, - "outputs": 1, - "x": 1210, - "y": 1800, - "wires": [ - [ - "47209e9117e4de74" - ] - ] - }, - { - "id": "47209e9117e4de74", - "type": "function", - "z": "86a34ee77bf6db10", - "name": "c0 = 1", - "func": "flow.set(\"c0\", 1);\nreturn msg;", - "outputs": 1, - "timeout": 0, - "noerr": 0, - "initialize": "", - "finalize": "", - "libs": [], - "x": 1390, - "y": 1800, - "wires": [ - [] - ] - }, - { - "id": "0ddd646c0134e82c", - "type": "function", - "z": "86a34ee77bf6db10", - "name": "a1", - "func": "flow.set(\"a1\", Number(msg.payload.a1));\nmsg.payload = msg.payload.a1;\nreturn msg;", - "outputs": 1, - "timeout": 0, - "noerr": 0, - "initialize": "", - "finalize": "", - "libs": [], - "x": 690, - "y": 2040, - "wires": [ - [ - "fed6f62ccc31d96a" - ] - ] - }, - { - "id": "fed6f62ccc31d96a", - "type": "rbe", - "z": "86a34ee77bf6db10", - "name": "", - "func": "rbe", - "gap": "", - "start": "", - "inout": "out", - "septopics": true, - "property": "payload", - "topi": "topic", - "x": 830, - "y": 2040, - "wires": [ - [ - "0168dbe453be398a" - ] - ] - }, - { - "id": "0168dbe453be398a", - "type": "switch", - "z": "86a34ee77bf6db10", - "name": "", - "property": "payload", - "propertyType": "msg", - "rules": [ - { - "t": "eq", - "v": "0", - "vt": "num" - }, - { - "t": "eq", - "v": "1", - "vt": "num" - } - ], - "checkall": "false", - "repair": false, - "outputs": 2, - "x": 1000, - "y": 2040, - "wires": [ - [ - "e2d0c6d3f5b5c7c8", - "4aa7b6db9b990fa0" - ], - [ - "57189f4df55ec290", - "6f8042f0cd1f9dd2" - ] - ] - }, - { - "id": "4aa7b6db9b990fa0", - "type": "function", - "z": "86a34ee77bf6db10", - "name": "c2 = 0", - "func": "flow.set(\"c2\", 0);\nreturn msg;", - "outputs": 1, - "timeout": 0, - "noerr": 0, - "initialize": "", - "finalize": "", - "libs": [], - "x": 1210, - "y": 1980, - "wires": [ - [] - ] - }, - { - "id": "57189f4df55ec290", - "type": "function", - "z": "86a34ee77bf6db10", - "name": "c1 = 0", - "func": "flow.set(\"c1\", 0);\nreturn msg;", - "outputs": 1, - "timeout": 0, - "noerr": 0, - "initialize": "", - "finalize": "", - "libs": [], - "x": 1210, - "y": 2080, - "wires": [ - [] - ] - }, - { - "id": "6f8042f0cd1f9dd2", - "type": "delay", - "z": "86a34ee77bf6db10", - "name": "sortie verrin", - "pauseType": "delay", - "timeout": "800", - "timeoutUnits": "milliseconds", - "rate": "1", - "nbRateUnits": "1", - "rateUnits": "second", - "randomFirst": "1", - "randomLast": "5", - "randomUnits": "seconds", - "drop": false, - "allowrate": false, - "outputs": 1, - "x": 1230, - "y": 2120, - "wires": [ - [ - "fb3f9295012fd03e" - ] - ] - }, - { - "id": "fb3f9295012fd03e", - "type": "function", - "z": "86a34ee77bf6db10", - "name": "c2 = 1", - "func": "flow.set(\"c2\", 1);\nreturn msg;", - "outputs": 1, - "timeout": 0, - "noerr": 0, - "initialize": "", - "finalize": "", - "libs": [], - "x": 1390, - "y": 2120, - "wires": [ - [] - ] - }, - { - "id": "e2d0c6d3f5b5c7c8", - "type": "delay", - "z": "86a34ee77bf6db10", - "name": "retour verrin", - "pauseType": "delay", - "timeout": "1200", - "timeoutUnits": "milliseconds", - "rate": "1", - "nbRateUnits": "1", - "rateUnits": "second", - "randomFirst": "1", - "randomLast": "5", - "randomUnits": "seconds", - "drop": false, - "allowrate": false, - "outputs": 1, - "x": 1230, - "y": 2020, - "wires": [ - [ - "aa06273eb1db7d1a" - ] - ] - }, - { - "id": "aa06273eb1db7d1a", - "type": "function", - "z": "86a34ee77bf6db10", - "name": "c1 = 1", - "func": "flow.set(\"c1\", 1);\nreturn msg;", - "outputs": 1, - "timeout": 0, - "noerr": 0, - "initialize": "", - "finalize": "", - "libs": [], - "x": 1390, - "y": 2020, - "wires": [ - [] - ] - }, { "id": "3a4fc72ec7ac5e24", "type": "ui-text", @@ -2580,7 +2359,7 @@ "type": "function", "z": "86a34ee77bf6db10", "name": "c0", - "func": "const value = flow.get(\"c0\");\nmsg.payload = value ? \"🟩\" : \"🟥\";\n\nreturn msg;", + "func": "const value = global.get(\"c0\");\nmsg.payload = value ? \"🟩\" : \"🟥\";\n\nreturn msg;", "outputs": 1, "timeout": 0, "noerr": 0, @@ -2600,7 +2379,7 @@ "type": "function", "z": "86a34ee77bf6db10", "name": "c1", - "func": "const value = flow.get(\"c1\");\nmsg.payload = value ? \"🟩\" : \"🟥\";\n\nreturn msg;", + "func": "const value = global.get(\"c1\");\nmsg.payload = value ? \"🟩\" : \"🟥\";\n\nreturn msg;", "outputs": 1, "timeout": 0, "noerr": 0, @@ -2620,7 +2399,7 @@ "type": "function", "z": "86a34ee77bf6db10", "name": "c2", - "func": "const value = flow.get(\"c2\");\nmsg.payload = value ? \"🟩\" : \"🟥\";\n\nreturn msg;", + "func": "const value = global.get(\"c2\");\nmsg.payload = value ? \"🟩\" : \"🟥\";\n\nreturn msg;", "outputs": 1, "timeout": 0, "noerr": 0, @@ -2670,7 +2449,7 @@ "name": "", "label": "c4", "format": "{{msg.payload}}", - "layout": "row-spread", + "layout": "row-left", "style": false, "font": "", "fontSize": 16, @@ -2742,7 +2521,7 @@ "name": "", "label": "c7", "format": "{{msg.payload}}", - "layout": "row-spread", + "layout": "row-right", "style": false, "font": "", "fontSize": 16, @@ -2760,7 +2539,7 @@ "type": "function", "z": "86a34ee77bf6db10", "name": "c3", - "func": "const value = flow.get(\"c3\");\nmsg.payload = value ? \"🟩\" : \"🟥\";\n\nreturn msg;", + "func": "const value = global.get(\"c3\");\nmsg.payload = value ? \"🟩\" : \"🟥\";\n\nreturn msg;", "outputs": 1, "timeout": 0, "noerr": 0, @@ -2780,7 +2559,7 @@ "type": "function", "z": "86a34ee77bf6db10", "name": "c4", - "func": "const value = flow.get(\"c4\");\nmsg.payload = value ? \"🟩\" : \"🟥\";\n\nreturn msg;", + "func": "const value = global.get(\"c4\");\nmsg.payload = value ? \"🟩\" : \"🟥\";\n\nreturn msg;", "outputs": 1, "timeout": 0, "noerr": 0, @@ -2800,7 +2579,7 @@ "type": "function", "z": "86a34ee77bf6db10", "name": "c5", - "func": "const value = flow.get(\"c5\");\nmsg.payload = value ? \"🟩\" : \"🟥\";\n\nreturn msg;", + "func": "const value = global.get(\"c5\");\nmsg.payload = value ? \"🟩\" : \"🟥\";\n\nreturn msg;", "outputs": 1, "timeout": 0, "noerr": 0, @@ -2820,7 +2599,7 @@ "type": "function", "z": "86a34ee77bf6db10", "name": "c6", - "func": "const value = flow.get(\"c6\");\nmsg.payload = value ? \"🟩\" : \"🟥\";\n\nreturn msg;", + "func": "const value = global.get(\"c6\");\nmsg.payload = value ? \"🟩\" : \"🟥\";\n\nreturn msg;", "outputs": 1, "timeout": 0, "noerr": 0, @@ -2840,7 +2619,7 @@ "type": "function", "z": "86a34ee77bf6db10", "name": "c7", - "func": "const value = flow.get(\"c7\");\nmsg.payload = value ? \"🟩\" : \"🟥\";\n\nreturn msg;", + "func": "const value = global.get(\"c7\");\nmsg.payload = value ? \"🟩\" : \"🟥\";\n\nreturn msg;", "outputs": 1, "timeout": 0, "noerr": 0, @@ -2855,429 +2634,6 @@ ] ] }, - { - "id": "3331b1d0398a3348", - "type": "function", - "z": "86a34ee77bf6db10", - "name": "a2", - "func": "flow.set(\"a2\", Number(msg.payload.a2));\nmsg.payload = msg.payload.a2;\nreturn msg;", - "outputs": 1, - "timeout": 0, - "noerr": 0, - "initialize": "", - "finalize": "", - "libs": [], - "x": 690, - "y": 2240, - "wires": [ - [ - "52cc761676e02b0f" - ] - ] - }, - { - "id": "52cc761676e02b0f", - "type": "rbe", - "z": "86a34ee77bf6db10", - "name": "", - "func": "rbe", - "gap": "", - "start": "", - "inout": "out", - "septopics": true, - "property": "payload", - "topi": "topic", - "x": 830, - "y": 2240, - "wires": [ - [ - "3a0b09b9dc5fabce" - ] - ] - }, - { - "id": "3a0b09b9dc5fabce", - "type": "switch", - "z": "86a34ee77bf6db10", - "name": "", - "property": "payload", - "propertyType": "msg", - "rules": [ - { - "t": "eq", - "v": "0", - "vt": "num" - }, - { - "t": "eq", - "v": "1", - "vt": "num" - } - ], - "checkall": "false", - "repair": false, - "outputs": 2, - "x": 1000, - "y": 2240, - "wires": [ - [ - "70967b168ac9ceb6" - ], - [ - "cd93246cd9e0f59b" - ] - ] - }, - { - "id": "cd93246cd9e0f59b", - "type": "delay", - "z": "86a34ee77bf6db10", - "name": "sortie verrin", - "pauseType": "delay", - "timeout": "800", - "timeoutUnits": "milliseconds", - "rate": "1", - "nbRateUnits": "1", - "rateUnits": "second", - "randomFirst": "1", - "randomLast": "5", - "randomUnits": "seconds", - "drop": false, - "allowrate": false, - "outputs": 1, - "x": 1230, - "y": 2280, - "wires": [ - [ - "9b3a271ba664c506" - ] - ] - }, - { - "id": "9b3a271ba664c506", - "type": "function", - "z": "86a34ee77bf6db10", - "name": "c3 = 1", - "func": "flow.set(\"c3\", 1);\nflow.set(\"c6\", 0);\n\nif (Number(flow.get(\"flag0\")) == 1) {\n flow.set(\"flag0\", 0);\n flow.set(\"c5\", 1);\n}\n\nreturn msg;", - "outputs": 1, - "timeout": 0, - "noerr": 0, - "initialize": "", - "finalize": "", - "libs": [], - "x": 1390, - "y": 2280, - "wires": [ - [] - ] - }, - { - "id": "70967b168ac9ceb6", - "type": "function", - "z": "86a34ee77bf6db10", - "name": "c3 = 0", - "func": "flow.set(\"c3\", 0);\nreturn msg;", - "outputs": 1, - "timeout": 0, - "noerr": 0, - "initialize": "", - "finalize": "", - "libs": [], - "x": 1210, - "y": 2200, - "wires": [ - [] - ] - }, - { - "id": "696cf5af60cf4b64", - "type": "function", - "z": "86a34ee77bf6db10", - "name": "a3", - "func": "flow.set(\"a3\", Number(msg.payload.a3));\nmsg.payload = msg.payload.a3;\nreturn msg;", - "outputs": 1, - "timeout": 0, - "noerr": 0, - "initialize": "", - "finalize": "", - "libs": [], - "x": 690, - "y": 2360, - "wires": [ - [ - "d90023d094b7e43d" - ] - ] - }, - { - "id": "d90023d094b7e43d", - "type": "rbe", - "z": "86a34ee77bf6db10", - "name": "", - "func": "rbe", - "gap": "", - "start": "", - "inout": "out", - "septopics": true, - "property": "payload", - "topi": "topic", - "x": 830, - "y": 2360, - "wires": [ - [ - "65b5c174d03f4048" - ] - ] - }, - { - "id": "65b5c174d03f4048", - "type": "switch", - "z": "86a34ee77bf6db10", - "name": "", - "property": "payload", - "propertyType": "msg", - "rules": [ - { - "t": "eq", - "v": "0", - "vt": "num" - }, - { - "t": "eq", - "v": "1", - "vt": "num" - } - ], - "checkall": "false", - "repair": false, - "outputs": 2, - "x": 1000, - "y": 2360, - "wires": [ - [], - [ - "a4029ba85e639676" - ] - ] - }, - { - "id": "13d74fea2023a497", - "type": "function", - "z": "86a34ee77bf6db10", - "name": "c5 = 0", - "func": "flow.set(\"c5\", 0);\nreturn msg;", - "outputs": 1, - "timeout": 0, - "noerr": 0, - "initialize": "", - "finalize": "", - "libs": [], - "x": 1390, - "y": 2420, - "wires": [ - [] - ] - }, - { - "id": "d64c41e23b4c2c83", - "type": "inject", - "z": "86a34ee77bf6db10", - "name": "sortie a0", - "props": [ - { - "p": "payload" - } - ], - "repeat": "", - "crontab": "", - "once": false, - "onceDelay": 0.1, - "topic": "", - "payload": "{\"a0\":1}", - "payloadType": "json", - "x": 400, - "y": 1800, - "wires": [ - [ - "cefd0feeeaf4227c" - ] - ] - }, - { - "id": "182406188164351f", - "type": "inject", - "z": "86a34ee77bf6db10", - "name": "retour a0", - "props": [ - { - "p": "payload" - } - ], - "repeat": "", - "crontab": "", - "once": false, - "onceDelay": 0.1, - "topic": "", - "payload": "{\"a0\":0}", - "payloadType": "json", - "x": 400, - "y": 1840, - "wires": [ - [ - "cefd0feeeaf4227c" - ] - ] - }, - { - "id": "d4d595cda525c169", - "type": "inject", - "z": "86a34ee77bf6db10", - "name": "sortie a1", - "props": [ - { - "p": "payload" - } - ], - "repeat": "", - "crontab": "", - "once": false, - "onceDelay": 0.1, - "topic": "", - "payload": "{\"a1\":1}", - "payloadType": "json", - "x": 400, - "y": 2020, - "wires": [ - [ - "0ddd646c0134e82c" - ] - ] - }, - { - "id": "a3108919b481a583", - "type": "inject", - "z": "86a34ee77bf6db10", - "name": "retour a1", - "props": [ - { - "p": "payload" - } - ], - "repeat": "", - "crontab": "", - "once": false, - "onceDelay": 0.1, - "topic": "", - "payload": "{\"a1\":0}", - "payloadType": "json", - "x": 400, - "y": 2060, - "wires": [ - [ - "0ddd646c0134e82c" - ] - ] - }, - { - "id": "d21d6bdbad082c02", - "type": "inject", - "z": "86a34ee77bf6db10", - "name": "retour a2", - "props": [ - { - "p": "payload" - } - ], - "repeat": "", - "crontab": "", - "once": false, - "onceDelay": 0.1, - "topic": "", - "payload": "{\"a2\":0}", - "payloadType": "json", - "x": 400, - "y": 2240, - "wires": [ - [ - "3331b1d0398a3348" - ] - ] - }, - { - "id": "240c384cfd37aa35", - "type": "inject", - "z": "86a34ee77bf6db10", - "name": "retour a3", - "props": [ - { - "p": "payload" - } - ], - "repeat": "", - "crontab": "", - "once": false, - "onceDelay": 0.1, - "topic": "", - "payload": "{\"a3\":0}", - "payloadType": "json", - "x": 400, - "y": 2380, - "wires": [ - [ - "696cf5af60cf4b64" - ] - ] - }, - { - "id": "cf5a2a9fba2009f1", - "type": "inject", - "z": "86a34ee77bf6db10", - "name": "sortie a2", - "props": [ - { - "p": "payload" - } - ], - "repeat": "", - "crontab": "", - "once": false, - "onceDelay": 0.1, - "topic": "", - "payload": "{\"a2\":1}", - "payloadType": "json", - "x": 400, - "y": 2200, - "wires": [ - [ - "3331b1d0398a3348" - ] - ] - }, - { - "id": "746e5cf4ca1a8fa7", - "type": "inject", - "z": "86a34ee77bf6db10", - "name": "sortie a3", - "props": [ - { - "p": "payload" - } - ], - "repeat": "", - "crontab": "", - "once": false, - "onceDelay": 0.1, - "topic": "", - "payload": "{\"a3\":1}", - "payloadType": "json", - "x": 400, - "y": 2340, - "wires": [ - [ - "696cf5af60cf4b64" - ] - ] - }, { "id": "c219b897538f7dfd", "type": "ui-text", @@ -3374,10 +2730,1055 @@ "y": 220, "wires": [] }, + { + "id": "2faea28a74fc5ab6", + "type": "ui-text", + "z": "86a34ee77bf6db10", + "group": "02fab8cbf37e2bb7", + "order": 4, + "width": "1", + "height": "1", + "name": "", + "label": "", + "format": "{{msg.payload}}", + "layout": "row-left", + "style": true, + "font": "", + "fontSize": "44", + "color": "#717171", + "wrapText": false, + "className": "", + "value": "payload", + "valueType": "msg", + "x": 870, + "y": 1760, + "wires": [] + }, + { + "id": "d6912aeba1d9118b", + "type": "ui-text", + "z": "86a34ee77bf6db10", + "group": "02fab8cbf37e2bb7", + "order": 6, + "width": "1", + "height": "1", + "name": "", + "label": "", + "format": "{{msg.payload}}", + "layout": "row-left", + "style": true, + "font": "", + "fontSize": "44", + "color": "#717171", + "wrapText": false, + "className": "", + "value": "payload", + "valueType": "msg", + "x": 870, + "y": 1800, + "wires": [] + }, + { + "id": "397735dd2560f7cf", + "type": "link out", + "z": "86a34ee77bf6db10", + "name": "main_out", + "mode": "link", + "links": [ + "e5da08ba69fe6fb8" + ], + "x": 655, + "y": 1940, + "wires": [] + }, + { + "id": "1f5adfcb29a89bb1", + "type": "function", + "z": "86a34ee77bf6db10", + "name": "s9 🠙", + "func": "msg.payload = \"🠙\";\nmsg.ui_update = msg.payload.s9 == 1 ? { \"color\": \"#000\"} : { \"color\": \"#ddd\"};\nreturn msg;", + "outputs": 1, + "timeout": 0, + "noerr": 0, + "initialize": "", + "finalize": "", + "libs": [], + "x": 690, + "y": 1760, + "wires": [ + [ + "2faea28a74fc5ab6" + ] + ] + }, + { + "id": "963da6ffcbd90744", + "type": "function", + "z": "86a34ee77bf6db10", + "name": "s9 🠛", + "func": "msg.payload = \"🠛\"\nmsg.ui_update = msg.payload.s9 == 1 ? { \"color\": \"#000\"} : { \"color\": \"#ddd\"};\nreturn msg;", + "outputs": 1, + "timeout": 0, + "noerr": 0, + "initialize": "", + "finalize": "", + "libs": [], + "x": 690, + "y": 1800, + "wires": [ + [ + "d6912aeba1d9118b" + ] + ] + }, + { + "id": "dda34928984abfc5", + "type": "ui-text", + "z": "86a34ee77bf6db10", + "group": "02fab8cbf37e2bb7", + "order": 8, + "width": "1", + "height": "1", + "name": "", + "label": "", + "format": "{{msg.payload}}", + "layout": "row-left", + "style": true, + "font": "", + "fontSize": "24", + "color": "#717171", + "wrapText": false, + "className": "", + "value": "payload", + "valueType": "msg", + "x": 870, + "y": 1860, + "wires": [] + }, + { + "id": "100a58f1b621c53a", + "type": "function", + "z": "86a34ee77bf6db10", + "name": "s10", + "func": "msg.payload = Number(msg.payload.s10);\nreturn msg;", + "outputs": 1, + "timeout": 0, + "noerr": 0, + "initialize": "", + "finalize": "", + "libs": [], + "x": 690, + "y": 1860, + "wires": [ + [ + "dda34928984abfc5" + ] + ] + }, + { + "id": "48e613c44cc4f340", + "type": "ui-button", + "z": "86a34ee77bf6db10", + "group": "02fab8cbf37e2bb7", + "name": "", + "label": "RESET", + "order": 3, + "width": 0, + "height": 0, + "emulateClick": true, + "tooltip": "", + "color": "", + "bgcolor": "", + "className": "", + "icon": "", + "iconPosition": "left", + "payload": "0", + "payloadType": "num", + "topic": "topic", + "topicType": "msg", + "buttonColor": "#dddddd", + "textColor": "", + "iconColor": "", + "enableClick": true, + "enablePointerdown": false, + "pointerdownPayload": "", + "pointerdownPayloadType": "str", + "enablePointerup": false, + "pointerupPayload": "", + "pointerupPayloadType": "str", + "x": 320, + "y": 400, + "wires": [ + [ + "66094b9e85ac4d5b", + "306ef028c106a343" + ] + ] + }, + { + "id": "306ef028c106a343", + "type": "function", + "z": "86a34ee77bf6db10", + "name": "reset s", + "func": "msg.payload = {\n \"s0\": 0,\n \"s1\": 0,\n \"s2\": 0,\n \"s3\": 0,\n \"s4\": 0,\n \"s5\": 0,\n \"s6\": 0,\n \"s7\": 0,\n \"s8\": 0,\n \"s9\": 0,\n \"s10\": 0,\n \"s11\": 0,\n \"m0\": 0,\n \"m1\": 0,\n \"m2\": 0,\n \"m3\": 0\n}\n\nreturn msg;", + "outputs": 1, + "timeout": 0, + "noerr": 0, + "initialize": "", + "finalize": "", + "libs": [], + "x": 190, + "y": 940, + "wires": [ + [ + "586e5d5f736036fc" + ] + ] + }, + { + "id": "586e5d5f736036fc", + "type": "function", + "z": "86a34ee77bf6db10", + "name": "nop", + "func": "return msg;", + "outputs": 1, + "timeout": 0, + "noerr": 0, + "initialize": "", + "finalize": "", + "libs": [], + "x": 370, + "y": 1480, + "wires": [ + [ + "b10ff790c2c745e2", + "3243dba201971bd7", + "051388bb768084d7", + "c793fceafb6fb3f0", + "65723f43ca71069b", + "3ceeaa9da55ccbb8", + "53e82b867be45c4a", + "4fe669c3987dcfe4", + "87bd077b61c6e623", + "17f45fa5a72be929", + "96a15b4c506aa11a", + "10a21959cbd3cc1e", + "1cd3d290f7f7d539", + "88310a9e40d564fc", + "b543660f60319f21", + "397735dd2560f7cf", + "963da6ffcbd90744", + "1f5adfcb29a89bb1", + "100a58f1b621c53a" + ] + ] + }, + { + "id": "cefd0feeeaf4227c", + "type": "function", + "z": "b5e17af18ea9731a", + "name": "a0", + "func": "global.set(\"a0\", Number(msg.payload.a0));\nmsg.payload = msg.payload.a0;\nreturn msg;", + "outputs": 1, + "timeout": 0, + "noerr": 0, + "initialize": "", + "finalize": "", + "libs": [], + "x": 430, + "y": 120, + "wires": [ + [ + "faccd817ca7a8365" + ] + ] + }, + { + "id": "faccd817ca7a8365", + "type": "rbe", + "z": "b5e17af18ea9731a", + "name": "", + "func": "rbe", + "gap": "", + "start": "", + "inout": "out", + "septopics": false, + "property": "payload", + "topi": "topic", + "x": 570, + "y": 120, + "wires": [ + [ + "4986d82da7142a49", + "f86f3483ef4e1597" + ] + ] + }, + { + "id": "f6f1221e4d6b3682", + "type": "delay", + "z": "b5e17af18ea9731a", + "name": "sortie verrin", + "pauseType": "delay", + "timeout": "800", + "timeoutUnits": "milliseconds", + "rate": "1", + "nbRateUnits": "1", + "rateUnits": "second", + "randomFirst": "1", + "randomLast": "5", + "randomUnits": "seconds", + "drop": false, + "allowrate": false, + "outputs": 1, + "x": 950, + "y": 200, + "wires": [ + [ + "5aedb839421d6b67" + ] + ] + }, + { + "id": "5aedb839421d6b67", + "type": "function", + "z": "b5e17af18ea9731a", + "name": "c6 = 1", + "func": "global.set(\"c6\", 1);\nglobal.set(\"flag0\", 1);\nreturn msg;", + "outputs": 1, + "timeout": 0, + "noerr": 0, + "initialize": "", + "finalize": "", + "libs": [], + "x": 1130, + "y": 200, + "wires": [ + [] + ] + }, + { + "id": "4986d82da7142a49", + "type": "switch", + "z": "b5e17af18ea9731a", + "name": "", + "property": "payload", + "propertyType": "msg", + "rules": [ + { + "t": "eq", + "v": "0", + "vt": "num" + }, + { + "t": "eq", + "v": "1", + "vt": "num" + } + ], + "checkall": "false", + "repair": false, + "outputs": 2, + "x": 740, + "y": 120, + "wires": [ + [ + "a0c18759a1ad2b61" + ], + [ + "27bcdd18caf20c38", + "f6f1221e4d6b3682" + ] + ] + }, + { + "id": "27bcdd18caf20c38", + "type": "function", + "z": "b5e17af18ea9731a", + "name": "c0 = 0", + "func": "global.set(\"c0\", 0);\nreturn msg;", + "outputs": 1, + "timeout": 0, + "noerr": 0, + "initialize": "", + "finalize": "", + "libs": [], + "x": 930, + "y": 160, + "wires": [ + [] + ] + }, + { + "id": "a0c18759a1ad2b61", + "type": "delay", + "z": "b5e17af18ea9731a", + "name": "retour verrin", + "pauseType": "delay", + "timeout": "1200", + "timeoutUnits": "milliseconds", + "rate": "1", + "nbRateUnits": "1", + "rateUnits": "second", + "randomFirst": "1", + "randomLast": "5", + "randomUnits": "seconds", + "drop": false, + "allowrate": false, + "outputs": 1, + "x": 950, + "y": 100, + "wires": [ + [ + "47209e9117e4de74" + ] + ] + }, + { + "id": "47209e9117e4de74", + "type": "function", + "z": "b5e17af18ea9731a", + "name": "c0 = 1", + "func": "global.set(\"c0\", 1);\nreturn msg;", + "outputs": 1, + "timeout": 0, + "noerr": 0, + "initialize": "", + "finalize": "", + "libs": [], + "x": 1130, + "y": 100, + "wires": [ + [] + ] + }, + { + "id": "0ddd646c0134e82c", + "type": "function", + "z": "b5e17af18ea9731a", + "name": "a1", + "func": "global.set(\"a1\", Number(msg.payload.a1));\nmsg.payload = msg.payload.a1;\nreturn msg;", + "outputs": 1, + "timeout": 0, + "noerr": 0, + "initialize": "", + "finalize": "", + "libs": [], + "x": 430, + "y": 340, + "wires": [ + [ + "fed6f62ccc31d96a" + ] + ] + }, + { + "id": "fed6f62ccc31d96a", + "type": "rbe", + "z": "b5e17af18ea9731a", + "name": "", + "func": "rbe", + "gap": "", + "start": "", + "inout": "out", + "septopics": true, + "property": "payload", + "topi": "topic", + "x": 570, + "y": 340, + "wires": [ + [ + "0168dbe453be398a", + "162148e31177ef80" + ] + ] + }, + { + "id": "0168dbe453be398a", + "type": "switch", + "z": "b5e17af18ea9731a", + "name": "", + "property": "payload", + "propertyType": "msg", + "rules": [ + { + "t": "eq", + "v": "0", + "vt": "num" + }, + { + "t": "eq", + "v": "1", + "vt": "num" + } + ], + "checkall": "false", + "repair": false, + "outputs": 2, + "x": 740, + "y": 340, + "wires": [ + [ + "e2d0c6d3f5b5c7c8", + "4aa7b6db9b990fa0" + ], + [ + "57189f4df55ec290", + "6f8042f0cd1f9dd2" + ] + ] + }, + { + "id": "4aa7b6db9b990fa0", + "type": "function", + "z": "b5e17af18ea9731a", + "name": "c2 = 0", + "func": "global.set(\"c2\", 0);\nreturn msg;", + "outputs": 1, + "timeout": 0, + "noerr": 0, + "initialize": "", + "finalize": "", + "libs": [], + "x": 950, + "y": 280, + "wires": [ + [] + ] + }, + { + "id": "57189f4df55ec290", + "type": "function", + "z": "b5e17af18ea9731a", + "name": "c1 = 0", + "func": "global.set(\"c1\", 0);\nreturn msg;", + "outputs": 1, + "timeout": 0, + "noerr": 0, + "initialize": "", + "finalize": "", + "libs": [], + "x": 950, + "y": 380, + "wires": [ + [] + ] + }, + { + "id": "6f8042f0cd1f9dd2", + "type": "delay", + "z": "b5e17af18ea9731a", + "name": "sortie verrin", + "pauseType": "delay", + "timeout": "800", + "timeoutUnits": "milliseconds", + "rate": "1", + "nbRateUnits": "1", + "rateUnits": "second", + "randomFirst": "1", + "randomLast": "5", + "randomUnits": "seconds", + "drop": false, + "allowrate": false, + "outputs": 1, + "x": 970, + "y": 420, + "wires": [ + [ + "fb3f9295012fd03e" + ] + ] + }, + { + "id": "fb3f9295012fd03e", + "type": "function", + "z": "b5e17af18ea9731a", + "name": "c2 = 1", + "func": "global.set(\"c2\", 1);\nreturn msg;", + "outputs": 1, + "timeout": 0, + "noerr": 0, + "initialize": "", + "finalize": "", + "libs": [], + "x": 1130, + "y": 420, + "wires": [ + [] + ] + }, + { + "id": "e2d0c6d3f5b5c7c8", + "type": "delay", + "z": "b5e17af18ea9731a", + "name": "retour verrin", + "pauseType": "delay", + "timeout": "1200", + "timeoutUnits": "milliseconds", + "rate": "1", + "nbRateUnits": "1", + "rateUnits": "second", + "randomFirst": "1", + "randomLast": "5", + "randomUnits": "seconds", + "drop": false, + "allowrate": false, + "outputs": 1, + "x": 970, + "y": 320, + "wires": [ + [ + "aa06273eb1db7d1a" + ] + ] + }, + { + "id": "aa06273eb1db7d1a", + "type": "function", + "z": "b5e17af18ea9731a", + "name": "c1 = 1", + "func": "global.set(\"c1\", 1);\nreturn msg;", + "outputs": 1, + "timeout": 0, + "noerr": 0, + "initialize": "", + "finalize": "", + "libs": [], + "x": 1130, + "y": 320, + "wires": [ + [] + ] + }, + { + "id": "3331b1d0398a3348", + "type": "function", + "z": "b5e17af18ea9731a", + "name": "a2", + "func": "global.set(\"a2\", Number(msg.payload.a2));\nmsg.payload = msg.payload.a2;\nreturn msg;", + "outputs": 1, + "timeout": 0, + "noerr": 0, + "initialize": "", + "finalize": "", + "libs": [], + "x": 430, + "y": 540, + "wires": [ + [ + "52cc761676e02b0f" + ] + ] + }, + { + "id": "52cc761676e02b0f", + "type": "rbe", + "z": "b5e17af18ea9731a", + "name": "", + "func": "rbe", + "gap": "", + "start": "", + "inout": "out", + "septopics": true, + "property": "payload", + "topi": "topic", + "x": 570, + "y": 540, + "wires": [ + [ + "3a0b09b9dc5fabce", + "9d978e3e1104e039" + ] + ] + }, + { + "id": "3a0b09b9dc5fabce", + "type": "switch", + "z": "b5e17af18ea9731a", + "name": "", + "property": "payload", + "propertyType": "msg", + "rules": [ + { + "t": "eq", + "v": "0", + "vt": "num" + }, + { + "t": "eq", + "v": "1", + "vt": "num" + } + ], + "checkall": "false", + "repair": false, + "outputs": 2, + "x": 740, + "y": 540, + "wires": [ + [ + "70967b168ac9ceb6" + ], + [ + "cd93246cd9e0f59b" + ] + ] + }, + { + "id": "cd93246cd9e0f59b", + "type": "delay", + "z": "b5e17af18ea9731a", + "name": "sortie verrin", + "pauseType": "delay", + "timeout": "800", + "timeoutUnits": "milliseconds", + "rate": "1", + "nbRateUnits": "1", + "rateUnits": "second", + "randomFirst": "1", + "randomLast": "5", + "randomUnits": "seconds", + "drop": false, + "allowrate": false, + "outputs": 1, + "x": 970, + "y": 580, + "wires": [ + [ + "9b3a271ba664c506" + ] + ] + }, + { + "id": "9b3a271ba664c506", + "type": "function", + "z": "b5e17af18ea9731a", + "name": "c3 = 1", + "func": "global.set(\"c3\", 1);\nglobal.set(\"c6\", 0);\n\nif (Number(global.get(\"flag0\")) == 1) {\n global.set(\"flag0\", 0);\n global.set(\"c5\", 1);\n}\n\nreturn msg;", + "outputs": 1, + "timeout": 0, + "noerr": 0, + "initialize": "", + "finalize": "", + "libs": [], + "x": 1130, + "y": 580, + "wires": [ + [] + ] + }, + { + "id": "70967b168ac9ceb6", + "type": "function", + "z": "b5e17af18ea9731a", + "name": "c3 = 0", + "func": "global.set(\"c3\", 0);\nreturn msg;", + "outputs": 1, + "timeout": 0, + "noerr": 0, + "initialize": "", + "finalize": "", + "libs": [], + "x": 950, + "y": 500, + "wires": [ + [] + ] + }, + { + "id": "696cf5af60cf4b64", + "type": "function", + "z": "b5e17af18ea9731a", + "name": "a3", + "func": "global.set(\"a3\", Number(msg.payload.a3));\nmsg.payload = msg.payload.a3;\nreturn msg;", + "outputs": 1, + "timeout": 0, + "noerr": 0, + "initialize": "", + "finalize": "", + "libs": [], + "x": 430, + "y": 660, + "wires": [ + [ + "d90023d094b7e43d" + ] + ] + }, + { + "id": "d90023d094b7e43d", + "type": "rbe", + "z": "b5e17af18ea9731a", + "name": "", + "func": "rbe", + "gap": "", + "start": "", + "inout": "out", + "septopics": true, + "property": "payload", + "topi": "topic", + "x": 570, + "y": 660, + "wires": [ + [ + "65b5c174d03f4048", + "389a82807314ace7" + ] + ] + }, + { + "id": "65b5c174d03f4048", + "type": "switch", + "z": "b5e17af18ea9731a", + "name": "", + "property": "payload", + "propertyType": "msg", + "rules": [ + { + "t": "eq", + "v": "0", + "vt": "num" + }, + { + "t": "eq", + "v": "1", + "vt": "num" + } + ], + "checkall": "false", + "repair": false, + "outputs": 2, + "x": 740, + "y": 660, + "wires": [ + [], + [ + "a4029ba85e639676" + ] + ] + }, + { + "id": "13d74fea2023a497", + "type": "function", + "z": "b5e17af18ea9731a", + "name": "c5 = 0", + "func": "global.set(\"c5\", 0);\nreturn msg;", + "outputs": 1, + "timeout": 0, + "noerr": 0, + "initialize": "", + "finalize": "", + "libs": [], + "x": 1130, + "y": 720, + "wires": [ + [] + ] + }, + { + "id": "d64c41e23b4c2c83", + "type": "inject", + "z": "b5e17af18ea9731a", + "name": "sortie a0", + "props": [ + { + "p": "payload" + } + ], + "repeat": "", + "crontab": "", + "once": false, + "onceDelay": 0.1, + "topic": "", + "payload": "{\"a0\":1}", + "payloadType": "json", + "x": 140, + "y": 100, + "wires": [ + [ + "cefd0feeeaf4227c" + ] + ] + }, + { + "id": "182406188164351f", + "type": "inject", + "z": "b5e17af18ea9731a", + "name": "retour a0", + "props": [ + { + "p": "payload" + } + ], + "repeat": "", + "crontab": "", + "once": false, + "onceDelay": 0.1, + "topic": "", + "payload": "{\"a0\":0}", + "payloadType": "json", + "x": 140, + "y": 140, + "wires": [ + [ + "cefd0feeeaf4227c" + ] + ] + }, + { + "id": "d4d595cda525c169", + "type": "inject", + "z": "b5e17af18ea9731a", + "name": "sortie a1", + "props": [ + { + "p": "payload" + } + ], + "repeat": "", + "crontab": "", + "once": false, + "onceDelay": 0.1, + "topic": "", + "payload": "{\"a1\":1}", + "payloadType": "json", + "x": 140, + "y": 320, + "wires": [ + [ + "0ddd646c0134e82c" + ] + ] + }, + { + "id": "a3108919b481a583", + "type": "inject", + "z": "b5e17af18ea9731a", + "name": "retour a1", + "props": [ + { + "p": "payload" + } + ], + "repeat": "", + "crontab": "", + "once": false, + "onceDelay": 0.1, + "topic": "", + "payload": "{\"a1\":0}", + "payloadType": "json", + "x": 140, + "y": 360, + "wires": [ + [ + "0ddd646c0134e82c" + ] + ] + }, + { + "id": "d21d6bdbad082c02", + "type": "inject", + "z": "b5e17af18ea9731a", + "name": "retour a2", + "props": [ + { + "p": "payload" + } + ], + "repeat": "", + "crontab": "", + "once": false, + "onceDelay": 0.1, + "topic": "", + "payload": "{\"a2\":0}", + "payloadType": "json", + "x": 140, + "y": 540, + "wires": [ + [ + "3331b1d0398a3348" + ] + ] + }, + { + "id": "240c384cfd37aa35", + "type": "inject", + "z": "b5e17af18ea9731a", + "name": "retour a3", + "props": [ + { + "p": "payload" + } + ], + "repeat": "", + "crontab": "", + "once": false, + "onceDelay": 0.1, + "topic": "", + "payload": "{\"a3\":0}", + "payloadType": "json", + "x": 140, + "y": 680, + "wires": [ + [ + "696cf5af60cf4b64" + ] + ] + }, + { + "id": "cf5a2a9fba2009f1", + "type": "inject", + "z": "b5e17af18ea9731a", + "name": "sortie a2", + "props": [ + { + "p": "payload" + } + ], + "repeat": "", + "crontab": "", + "once": false, + "onceDelay": 0.1, + "topic": "", + "payload": "{\"a2\":1}", + "payloadType": "json", + "x": 140, + "y": 500, + "wires": [ + [ + "3331b1d0398a3348" + ] + ] + }, + { + "id": "746e5cf4ca1a8fa7", + "type": "inject", + "z": "b5e17af18ea9731a", + "name": "sortie a3", + "props": [ + { + "p": "payload" + } + ], + "repeat": "", + "crontab": "", + "once": false, + "onceDelay": 0.1, + "topic": "", + "payload": "{\"a3\":1}", + "payloadType": "json", + "x": 140, + "y": 640, + "wires": [ + [ + "696cf5af60cf4b64" + ] + ] + }, { "id": "a4029ba85e639676", "type": "delay", - "z": "86a34ee77bf6db10", + "z": "b5e17af18ea9731a", "name": "soufflage", "pauseType": "delay", "timeout": "500", @@ -3391,8 +3792,8 @@ "drop": false, "allowrate": false, "outputs": 1, - "x": 1220, - "y": 2420, + "x": 960, + "y": 720, "wires": [ [ "13d74fea2023a497" @@ -3400,201 +3801,100 @@ ] }, { - "id": "5fe915fcd26e78ae", - "type": "ui-group", - "name": "Boutons", - "page": "bb436fe040268d40", - "width": "2", - "height": 1, - "order": 2, - "showTitle": true, - "className": "", - "visible": "true", - "disabled": "false", - "groupType": "default" - }, - { - "id": "5bf949eb0a1b50a7", - "type": "mqtt-broker", - "name": "", - "broker": "rabbitmq", - "port": 1883, - "clientid": "", - "autoConnect": true, - "usetls": false, - "protocolVersion": 4, - "keepalive": 60, - "cleansession": true, - "autoUnsubscribe": true, - "birthTopic": "", - "birthQos": "0", - "birthRetain": "false", - "birthPayload": "", - "birthMsg": {}, - "closeTopic": "", - "closeQos": "0", - "closeRetain": "false", - "closePayload": "", - "closeMsg": {}, - "willTopic": "", - "willQos": "0", - "willRetain": "false", - "willPayload": "", - "willMsg": {}, - "userProps": "", - "sessionExpiry": "" - }, - { - "id": "02fab8cbf37e2bb7", - "type": "ui-group", - "name": "Alimentation", - "page": "bb436fe040268d40", - "width": "2", - "height": 1, - "order": 1, - "showTitle": true, - "className": "", - "visible": "true", - "disabled": "false", - "groupType": "default" - }, - { - "id": "c3dd11d0778f9e67", - "type": "ui-group", - "name": "Voyants", - "page": "bb436fe040268d40", - "width": "2", - "height": 1, - "order": 4, - "showTitle": true, - "className": "", - "visible": "true", - "disabled": "false", - "groupType": "default" - }, - { - "id": "00ea85a0e0b38df3", - "type": "ui-group", - "name": "Interrupteurs", - "page": "bb436fe040268d40", - "width": "2", - "height": 1, - "order": 3, - "showTitle": true, - "className": "", - "visible": "true", - "disabled": "false", - "groupType": "default" - }, - { - "id": "b1bde11bdd78b9f1", - "type": "ui-group", - "name": "Afficheur", - "page": "bb436fe040268d40", - "width": "8", - "height": 1, - "order": 6, - "showTitle": true, - "className": "", - "visible": "true", - "disabled": "false", - "groupType": "default" - }, - { - "id": "6b44d4b22cd7b3dc", - "type": "ui-group", - "name": "Moteurs", - "page": "bb436fe040268d40", - "width": "4", - "height": 1, - "order": 5, - "showTitle": true, - "className": "", - "visible": "true", - "disabled": "false", - "groupType": "default" - }, - { - "id": "bb436fe040268d40", - "type": "ui-page", - "name": "LP SARII", - "ui": "92537b03143c5e06", - "path": "/page1", - "icon": "home", - "layout": "grid", - "theme": "ea2bf5532fa513eb", - "breakpoints": [ - { - "name": "Default", - "px": "0", - "cols": "3" - }, - { - "name": "Tablet", - "px": "576", - "cols": "6" - }, - { - "name": "Small Desktop", - "px": "768", - "cols": "9" - }, - { - "name": "Desktop", - "px": "1024", - "cols": "12" - } + "id": "e5da08ba69fe6fb8", + "type": "link in", + "z": "b5e17af18ea9731a", + "name": "link in 1", + "links": [ + "397735dd2560f7cf" ], - "order": 1, - "className": "", - "visible": "true", - "disabled": "false" + "x": 215, + "y": 420, + "wires": [ + [ + "cefd0feeeaf4227c", + "0ddd646c0134e82c", + "3331b1d0398a3348", + "696cf5af60cf4b64" + ] + ] }, { - "id": "92537b03143c5e06", - "type": "ui-base", - "name": "My Dashboard", - "path": "/dashboard", - "appIcon": "", - "includeClientData": true, - "acceptsClientConfig": [ - "ui-notification", - "ui-control" - ], - "showPathInSidebar": false, - "headerContent": "page", - "navigationStyle": "default", - "titleBarStyle": "default", - "showReconnectNotification": true, - "notificationDisplayTime": 1, - "showDisconnectNotification": true, - "allowInstall": false + "id": "21ed11c5a39c33e4", + "type": "comment", + "z": "b5e17af18ea9731a", + "name": "Estampilleuse (18)", + "info": "", + "x": 150, + "y": 40, + "wires": [] }, { - "id": "ea2bf5532fa513eb", - "type": "ui-theme", - "name": "Default Theme", - "colors": { - "surface": "#ffffff", - "primary": "#0094CE", - "bgPage": "#eeeeee", - "groupBg": "#ffffff", - "groupOutline": "#cccccc" - }, - "sizes": { - "density": "default", - "pagePadding": "12px", - "groupGap": "12px", - "groupBorderRadius": "4px", - "widgetGap": "12px" - } + "id": "f86f3483ef4e1597", + "type": "debug", + "z": "b5e17af18ea9731a", + "name": "a0", + "active": false, + "tosidebar": true, + "console": false, + "tostatus": false, + "complete": "payload", + "targetType": "msg", + "statusVal": "", + "statusType": "auto", + "x": 730, + "y": 40, + "wires": [] }, { - "id": "dfc5297535cb8f75", - "type": "global-config", - "env": [], - "modules": { - "@flowfuse/node-red-dashboard": "1.29.0" - } + "id": "162148e31177ef80", + "type": "debug", + "z": "b5e17af18ea9731a", + "name": "a1", + "active": false, + "tosidebar": true, + "console": false, + "tostatus": false, + "complete": "payload", + "targetType": "msg", + "statusVal": "", + "statusType": "auto", + "x": 730, + "y": 240, + "wires": [] + }, + { + "id": "9d978e3e1104e039", + "type": "debug", + "z": "b5e17af18ea9731a", + "name": "a2", + "active": false, + "tosidebar": true, + "console": false, + "tostatus": false, + "complete": "payload", + "targetType": "msg", + "statusVal": "", + "statusType": "auto", + "x": 730, + "y": 460, + "wires": [] + }, + { + "id": "389a82807314ace7", + "type": "debug", + "z": "b5e17af18ea9731a", + "name": "a3", + "active": false, + "tosidebar": true, + "console": false, + "tostatus": false, + "complete": "payload", + "targetType": "msg", + "statusVal": "", + "statusType": "auto", + "x": 730, + "y": 600, + "wires": [] } ] \ No newline at end of file diff --git a/autom.cpp b/autom.cpp index fc0e600..284606b 100644 --- a/autom.cpp +++ b/autom.cpp @@ -53,7 +53,7 @@ int arret = 1; int light = 0; int b0, b1, b2, b3, b4, b5, b6, b7; int i0, i1, i2, i3, i4, i5, i6, i7; -int s0, s1, s2, s3, s4, s5, s6, s7; +int s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11; int m0, m1, m2, m3; int v0; @@ -194,7 +194,10 @@ void mqtt_send(mqtt::async_client *client) {"a5", a5}, {"a6", a6}, {"a7", a7}, - {"light", light}, + {"s8", s8}, + {"s9", s9}, + {"s10", s10}, + {"s11", s11}, }; std::string payload = obj.dump();