diff --git a/flows/main.json b/flows/main.json index 0116a49..19c5e14 100644 --- a/flows/main.json +++ b/flows/main.json @@ -964,6 +964,26 @@ "width": 1, "height": 1 }, + { + "id": "f3ca28ef.4df0a8", + "type": "ui_group", + "z": "", + "name": "Shutdown", + "tab": "3a6bb13f.c9703e", + "order": 7, + "disp": true, + "width": 4, + "collapse": false + }, + { + "id": "3dfd8a69.69ed56", + "type": "ui_spacer", + "name": "spacer", + "group": "f3ca28ef.4df0a8", + "order": 3, + "width": 4, + "height": 1 + }, { "id": "4e78af2d.90be7", "type": "ui_ui_control", @@ -8547,5 +8567,310 @@ "x": 690, "y": 980, "wires": [] + }, + { + "id": "dab82064.26a8d", + "type": "ui_button", + "z": "eaae323a.31b3", + "name": "Unlock button", + "group": "f3ca28ef.4df0a8", + "order": 2, + "width": 0, + "height": 0, + "passthru": false, + "label": "Unlock button", + "tooltip": "", + "color": "", + "bgcolor": "", + "icon": "", + "payload": "shutdown", + "payloadType": "flow", + "topic": "", + "x": 140, + "y": 400, + "wires": [ + [ + "6c3a3b4.78cad44" + ] + ] + }, + { + "id": "1c658761.b852a1", + "type": "ui_toast", + "z": "eaae323a.31b3", + "position": "dialog", + "displayTime": "3", + "highlight": "", + "sendall": true, + "outputs": 1, + "ok": "YES PLEASE", + "cancel": "NO!", + "raw": false, + "topic": "Are you sure?", + "name": "Confirmation message", + "x": 800, + "y": 380, + "wires": [ + [ + "8f1b8e23.daafe" + ] + ] + }, + { + "id": "a48ff63f.db5e18", + "type": "inject", + "z": "eaae323a.31b3", + "name": "disabled", + "props": [ + { + "p": "enabled", + "v": "false", + "vt": "bool" + } + ], + "repeat": "", + "crontab": "", + "once": true, + "onceDelay": 0.1, + "topic": "", + "x": 160, + "y": 360, + "wires": [ + [ + "d58039a9.6e7928" + ] + ] + }, + { + "id": "b67a7147.65fcd8", + "type": "ui_button", + "z": "eaae323a.31b3", + "name": "Shutdown button", + "group": "f3ca28ef.4df0a8", + "order": 4, + "width": 0, + "height": 0, + "passthru": false, + "label": "Shutdown", + "tooltip": "", + "color": "", + "bgcolor": "#AD1625", + "icon": "fa-power-off fa-2x", + "payload": "Do you want to turn the machine off now?", + "payloadType": "str", + "topic": "", + "x": 570, + "y": 380, + "wires": [ + [ + "1c658761.b852a1" + ] + ] + }, + { + "id": "d58039a9.6e7928", + "type": "change", + "z": "eaae323a.31b3", + "name": "", + "rules": [ + { + "t": "set", + "p": "shutdown", + "pt": "flow", + "to": "false", + "tot": "bool" + }, + { + "t": "set", + "p": "enabled", + "pt": "msg", + "to": "shutdown", + "tot": "flow" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 340, + "y": 360, + "wires": [ + [ + "b67a7147.65fcd8" + ] + ] + }, + { + "id": "6c3a3b4.78cad44", + "type": "function", + "z": "eaae323a.31b3", + "name": "Toggle", + "func": "flow.set(\"shutdown\", !flow.get(\"shutdown\"))\nmsg.enabled = flow.get(\"shutdown\")\nreturn msg;", + "outputs": 1, + "noerr": 0, + "initialize": "", + "finalize": "", + "x": 310, + "y": 400, + "wires": [ + [ + "b67a7147.65fcd8" + ] + ] + }, + { + "id": "d1153ad6.40d738", + "type": "ui_template", + "z": "eaae323a.31b3", + "group": "f3ca28ef.4df0a8", + "name": "Shutdown information", + "order": 1, + "width": 0, + "height": 0, + "format": "