[ { "id": "1e310cb8e70deb4a", "type": "tab", "label": "Flow 1", "disabled": false, "info": "", "env": [] }, { "id": "2c2aec19c34d8ca7", "type": "ui_tab", "name": "Node-Red", "icon": "dashboard", "disabled": false, "hidden": false }, { "id": "b184d5fd024b8ae7", "type": "ui_base", "theme": { "name": "theme-light", "lightTheme": { "default": "#0094CE", "baseColor": "#0094CE", "baseFont": "-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif", "edited": true, "reset": false }, "darkTheme": { "default": "#097479", "baseColor": "#097479", "baseFont": "-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif", "edited": false }, "customTheme": { "name": "Untitled Theme 1", "default": "#4B7930", "baseColor": "#4B7930", "baseFont": "-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif" }, "themeState": { "base-color": { "default": "#0094CE", "value": "#0094CE", "edited": false }, "page-titlebar-backgroundColor": { "value": "#0094CE", "edited": false }, "page-backgroundColor": { "value": "#fafafa", "edited": false }, "page-sidebar-backgroundColor": { "value": "#ffffff", "edited": false }, "group-textColor": { "value": "#1bbfff", "edited": false }, "group-borderColor": { "value": "#ffffff", "edited": false }, "group-backgroundColor": { "value": "#ffffff", "edited": false }, "widget-textColor": { "value": "#111111", "edited": false }, "widget-backgroundColor": { "value": "#0094ce", "edited": false }, "widget-borderColor": { "value": "#ffffff", "edited": false }, "base-font": { "value": "-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif" } }, "angularTheme": { "primary": "indigo", "accents": "blue", "warn": "red", "background": "grey", "palette": "light" } }, "site": { "name": "Node-RED Dashboard", "hideToolbar": "false", "allowSwipe": "false", "lockMenu": "false", "allowTempTheme": "true", "dateFormat": "DD/MM/YYYY", "sizes": { "sx": 48, "sy": 48, "gx": 6, "gy": 6, "cx": 6, "cy": 6, "px": 0, "py": 0 } } }, { "id": "96ec2cd59e6ac58e", "type": "ui_group", "name": "Default", "tab": "2c2aec19c34d8ca7", "order": 1, "disp": false, "width": "19", "collapse": false, "className": "" }, { "id": "98ae9496003e39a0", "type": "OS", "z": "1e310cb8e70deb4a", "name": "", "x": 430, "y": 100, "wires": [ [ "32964ca78c464c5c" ] ] }, { "id": "3a538fb3d57ae296", "type": "NetworkIntf", "z": "1e310cb8e70deb4a", "name": "", "x": 410, "y": 220, "wires": [ [ "9f88b42122960be1" ] ] }, { "id": "695e5f05d7c10751", "type": "inject", "z": "1e310cb8e70deb4a", "name": "", "props": [ { "p": "payload" }, { "p": "topic", "vt": "str" } ], "repeat": "1", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "payload": "", "payloadType": "date", "x": 170, "y": 280, "wires": [ [ "3a538fb3d57ae296", "6fc11cda053657ae", "3c3bb512eb7c5025", "1c3f730dde069adf" ] ] }, { "id": "1c3f730dde069adf", "type": "Uptime", "z": "1e310cb8e70deb4a", "name": "", "x": 400, "y": 300, "wires": [ [ "456d90d96e9f4d7a" ] ] }, { "id": "639f83ad77628fca", "type": "ui_text", "z": "1e310cb8e70deb4a", "group": "96ec2cd59e6ac58e", "order": 1, "width": 0, "height": 0, "name": "", "label": "Platform:", "format": "{{msg.payload}}", "layout": "row-left", "className": "", "style": true, "font": "Arial,Arial,Helvetica,sans-serif", "fontSize": "28", "color": "#000000", "x": 760, "y": 100, "wires": [] }, { "id": "32964ca78c464c5c", "type": "function", "z": "1e310cb8e70deb4a", "name": "function 1", "func": "const Type = msg.payload.type;\nconst Arct = msg.payload.arch;\nmsg.payload = Type + \" - \" + Arct;\nreturn msg;", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 580, "y": 100, "wires": [ [ "639f83ad77628fca" ] ] }, { "id": "6fc11cda053657ae", "type": "rbe", "z": "1e310cb8e70deb4a", "name": "", "func": "rbe", "gap": "", "start": "", "inout": "out", "septopics": false, "property": "payload", "topi": "topic", "x": 310, "y": 100, "wires": [ [ "98ae9496003e39a0" ] ] }, { "id": "3c3bb512eb7c5025", "type": "Memory", "z": "1e310cb8e70deb4a", "name": "", "scale": "Byte", "x": 420, "y": 160, "wires": [ [ "ee140c6a5597a63d" ] ] }, { "id": "5425e0f94877eac0", "type": "ui_text", "z": "1e310cb8e70deb4a", "group": "96ec2cd59e6ac58e", "order": 2, "width": 0, "height": 0, "name": "", "label": "Memory usage", "format": "{{msg.payload}}", "layout": "row-left", "className": "", "style": true, "font": "Arial,Arial,Helvetica,sans-serif", "fontSize": "28", "color": "#000000", "x": 760, "y": 160, "wires": [] }, { "id": "ee140c6a5597a63d", "type": "function", "z": "1e310cb8e70deb4a", "name": "function 2", "func": "const Mem = msg.payload.memusage;\n\nmsg.payload = Mem + \" %\";\nreturn msg;", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 580, "y": 160, "wires": [ [ "5425e0f94877eac0" ] ] }, { "id": "373f0c04d9ed0449", "type": "ui_text", "z": "1e310cb8e70deb4a", "group": "96ec2cd59e6ac58e", "order": 3, "width": 0, "height": 0, "name": "", "label": "Eth0", "format": "{{msg.payload}}", "layout": "row-left", "className": "", "style": true, "font": "Arial,Arial,Helvetica,sans-serif", "fontSize": "28", "color": "#000000", "x": 750, "y": 200, "wires": [] }, { "id": "9f88b42122960be1", "type": "function", "z": "1e310cb8e70deb4a", "name": "function 3", "func": "//var count = flow.get('count') || 0;\nvar Eth0; \nvar Eth1;\ntry {\n Eth0 = msg.payload.networkInterfaces.eth0[0].address;\n}\ncatch (err) {\n Eth0 = \"Not connected\";\n}\n\ntry {\n Eth1 = msg.payload.networkInterfaces.eth1[0].address;\n}\ncatch (err) {\n Eth1 = \"Not connected\";\n}\n\nmsg.payload = Eth0;\nvar msg2 = { payload: Eth1 };\n\nreturn [msg, msg2];", "outputs": 2, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 580, "y": 220, "wires": [ [ "373f0c04d9ed0449" ], [ "e0fe6552fbb1ca69" ] ] }, { "id": "e0fe6552fbb1ca69", "type": "ui_text", "z": "1e310cb8e70deb4a", "group": "96ec2cd59e6ac58e", "order": 4, "width": 0, "height": 0, "name": "", "label": "Eth1", "format": "{{msg.payload}}", "layout": "row-left", "className": "", "style": true, "font": "Arial,Arial,Helvetica,sans-serif", "fontSize": "28", "color": "#000000", "x": 750, "y": 240, "wires": [] }, { "id": "456d90d96e9f4d7a", "type": "function", "z": "1e310cb8e70deb4a", "name": "function 4", "func": "let totalSeconds = msg.payload.uptime;\nlet hours = Math.floor(totalSeconds / 3600);\ntotalSeconds %= 3600;\nlet minutes = Math.floor(totalSeconds / 60);\nlet seconds = (totalSeconds % 60).toFixed(0);\n\n\n// If you want strings with leading zeroes:\nminutes = String(minutes).padStart(2, \"0\");\nhours = String(hours).padStart(2, \"0\");\nseconds = String(seconds).padStart(2, \"0\");\nmsg.payload = (hours + \":\" + minutes + \":\" + seconds);\nreturn msg;", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 580, "y": 300, "wires": [ [ "3ad1870383da8647" ] ] }, { "id": "3ad1870383da8647", "type": "ui_text", "z": "1e310cb8e70deb4a", "group": "96ec2cd59e6ac58e", "order": 5, "width": 0, "height": 0, "name": "", "label": "Uptime: ", "format": "{{msg.payload}}", "layout": "row-left", "className": "", "style": true, "font": "Arial,Arial,Helvetica,sans-serif", "fontSize": "28", "color": "#000000", "x": 760, "y": 300, "wires": [] }, { "id": "b67fe84101fe1724", "type": "ui_button", "z": "1e310cb8e70deb4a", "name": "", "group": "96ec2cd59e6ac58e", "order": 6, "width": "6", "height": "1", "passthru": false, "label": "Reboot", "tooltip": "", "color": "", "bgcolor": "", "className": "", "icon": "", "payload": "reboot", "payloadType": "str", "topic": "topic", "topicType": "msg", "x": 360, "y": 380, "wires": [ [ "126c35e6af44a1a5", "88ab84446ad51b9c" ] ] }, { "id": "eea26349f7e87968", "type": "ui_button", "z": "1e310cb8e70deb4a", "name": "", "group": "96ec2cd59e6ac58e", "order": 7, "width": "6", "height": "1", "passthru": false, "label": "Shutdown", "tooltip": "", "color": "", "bgcolor": "", "className": "", "icon": "", "payload": "shutdown now", "payloadType": "str", "topic": "topic", "topicType": "msg", "x": 340, "y": 420, "wires": [ [ "23e540d68925d6af", "88ab84446ad51b9c" ] ] }, { "id": "1f39051aff30ea0d", "type": "exec", "z": "1e310cb8e70deb4a", "command": "", "addpay": "payload", "append": "", "useSpawn": "false", "timer": "", "winHide": false, "oldrc": false, "name": "", "x": 690, "y": 440, "wires": [ [ "d5cd2783de413bd0" ], [ "e59e93dbb0122cc6" ], [ "df41774310d79525" ] ] }, { "id": "d5cd2783de413bd0", "type": "debug", "z": "1e310cb8e70deb4a", "name": "debug 1", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "false", "statusVal": "", "statusType": "auto", "x": 840, "y": 460, "wires": [] }, { "id": "6dec13ff999f8d90", "type": "ui_toast", "z": "1e310cb8e70deb4a", "position": "top right", "displayTime": "3", "highlight": "", "sendall": true, "outputs": 0, "ok": "OK", "cancel": "", "raw": false, "className": "", "topic": "", "name": "", "x": 830, "y": 340, "wires": [] }, { "id": "e59e93dbb0122cc6", "type": "debug", "z": "1e310cb8e70deb4a", "name": "debug 2", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "false", "statusVal": "", "statusType": "auto", "x": 860, "y": 500, "wires": [] }, { "id": "df41774310d79525", "type": "debug", "z": "1e310cb8e70deb4a", "name": "debug 3", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "false", "statusVal": "", "statusType": "auto", "x": 840, "y": 540, "wires": [] }, { "id": "126c35e6af44a1a5", "type": "change", "z": "1e310cb8e70deb4a", "name": "", "rules": [ { "t": "set", "p": "payload", "pt": "msg", "to": "System is restarting", "tot": "str" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 560, "y": 340, "wires": [ [ "6dec13ff999f8d90" ] ] }, { "id": "5254f3e2290949a2", "type": "ui_toast", "z": "1e310cb8e70deb4a", "position": "top right", "displayTime": "3", "highlight": "", "sendall": true, "outputs": 0, "ok": "OK", "cancel": "", "raw": false, "className": "", "topic": "", "name": "", "x": 830, "y": 380, "wires": [] }, { "id": "23e540d68925d6af", "type": "change", "z": "1e310cb8e70deb4a", "name": "", "rules": [ { "t": "set", "p": "payload", "pt": "msg", "to": "System is shuting down", "tot": "str" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 560, "y": 380, "wires": [ [ "5254f3e2290949a2" ] ] }, { "id": "88ab84446ad51b9c", "type": "delay", "z": "1e310cb8e70deb4a", "name": "", "pauseType": "delay", "timeout": "1", "timeoutUnits": "seconds", "rate": "1", "nbRateUnits": "1", "rateUnits": "second", "randomFirst": "1", "randomLast": "5", "randomUnits": "seconds", "drop": false, "allowrate": false, "outputs": 1, "x": 540, "y": 440, "wires": [ [ "1f39051aff30ea0d" ] ] } ]