UNPKG

node-red-contrib-dashbored

Version:
241 lines 7.47 kB
[ { "id": "586f507a4e46076a", "type": "dashbored-widget-node", "z": "30e05a0536730f1a", "name": "", "widget": "36ed94917875ebb9", "onlyOutputOnInput": false, "sendSetToOutput": false, "getOutputOthers": false, "x": 540, "y": 380, "wires": [ [ "0fbdb2a764d83cc4" ], [] ] }, { "id": "215c9fd0fc8dd303", "type": "function", "z": "30e05a0536730f1a", "name": "See options", "func": "return {\n topic: \"options\",\n payload: {}\n}", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 370, "y": 380, "wires": [ [ "586f507a4e46076a" ] ] }, { "id": "a8519e170510b720", "type": "inject", "z": "30e05a0536730f1a", "name": "", "props": [ { "p": "payload" }, { "p": "topic", "vt": "str" } ], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "payload": "", "payloadType": "date", "x": 200, "y": 380, "wires": [ [ "215c9fd0fc8dd303" ] ] }, { "id": "0fbdb2a764d83cc4", "type": "debug", "z": "30e05a0536730f1a", "name": "debug 1", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "true", "targetType": "full", "statusVal": "", "statusType": "auto", "x": 720, "y": 380, "wires": [] }, { "id": "b6b1715c5e532f1d", "type": "comment", "z": "30e05a0536730f1a", "name": "Add custom widgets", "info": "", "x": 210, "y": 340, "wires": [] }, { "id": "9b420cd181d430cc", "type": "function", "z": "30e05a0536730f1a", "name": "Set options", "func": "return {\n topic: \"options\",\n payload: {\n //Any options to alter here for example\n title: \"Dynamic Stack!\",\n widgetsHTML: [\n \"<widget id='button1' type='toggleButton' text='Button 1' %ask-text% %ask% %always-password% %locked-access%></widget>\",\n \"<widget id='button2' type='toggleButton' text='Button 2' %ask-text% %ask% %always-password% %locked-access%></widget>\"\n ]\n }\n}", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 370, "y": 420, "wires": [ [ "586f507a4e46076a" ] ] }, { "id": "332194e32f1bdb23", "type": "inject", "z": "30e05a0536730f1a", "name": "", "props": [ { "p": "payload" }, { "p": "topic", "vt": "str" } ], "repeat": "", "crontab": "", "once": true, "onceDelay": 0.1, "topic": "", "payload": "", "payloadType": "date", "x": 210, "y": 420, "wires": [ [ "9b420cd181d430cc" ] ] }, { "id": "acb7ff668a414e78", "type": "function", "z": "30e05a0536730f1a", "name": "Set widget value", "func": "return {\n topic: \"set\",\n id: \"button1\",\n payload: {\n state: \"on\"\n }\n}", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 390, "y": 460, "wires": [ [ "586f507a4e46076a" ] ] }, { "id": "67af7a330e39ed3c", "type": "inject", "z": "30e05a0536730f1a", "name": "", "props": [ { "p": "payload" }, { "p": "topic", "vt": "str" } ], "repeat": "", "crontab": "", "once": true, "onceDelay": 0.1, "topic": "", "payload": "", "payloadType": "date", "x": 210, "y": 460, "wires": [ [ "acb7ff668a414e78" ] ] }, { "id": "36ed94917875ebb9", "type": "dashbored-widget", "name": "Widget", "server": "b4c867ea06f5361b", "widgetType": "horizontalStack", "widthMultiplier": "1", "heightMultiplier": "1", "title": "", "restoreState": true, "setsState": true, "toggleButton-text": "Toggle Button", "toggleButton-onValue": "on", "toggleButton-offValue": "off", "toggleButton-CSS": ".on {\nbackground-color: #32CD32;\ncolor: white;\n}\n.off {\nbackground-color: #f2f2f2;\ncolor: black;\n}\n#button {\nwidth: calc(100% - 10px);\nheight: calc(100% - 10px);\nmargin: 5px;\n}\n#widget {}\n#title {}\n#content {}", "buttonSelector-options": [ { "label": "Option 0", "value": "option_0", "onColor": "#32CD32", "offColor": "#ff3333" }, { "label": "Option 1", "value": "option_1", "onColor": "#32CD32", "offColor": "#ff3333" } ], "buttonSelector-CSS": ".button {\nwidth: calc(100% - 10px);\nmargin: 5px;\n}\n.on {}\n.off {}", "horizontalStack-widgets": "6f915162f384b722", "verticalStack-widgets": "", "volume-mutedValue": "on", "volume-unmutedValue": "off", "volume-increment": 1, "volume-CSS": "#volumeLevelContainer {\ntransform: rotate(180deg);\noverflow: hidden;\nbackground-color: white;\nwidth: 20%;\nheight: 90%;\nmargin-top: 5%;\nmargin-left: 10%;\nmargin-right: 5%;\nfloat: right;\nborder-radius: 10em;\n}\n#volumeLevelTop {\nbackground-color: #01e301;\nwidth: 100%;\nheight: 100%;\n}\n#buttonContainer {\nfloat: right;\nheight: 100%;\nwidth: 60%;\n}\n.button {\ndisplay: block;\nwidth: 100%;\nheight: calc((100%/3) - (2.5px * 3));\npadding: 0;\nmargin-top: 5px;\ntransition: background-color 0.1s;\n}\n.mutedColor {\nbackground-color: red !important;\n}\n.clickColor {\nbackground-color: white !important;\n}", "actionButton-text": "Action Button", "actionButton-color": "#434343", "actionButton-flashColor": "#f2f2f2", "actionButton-CSS": "#button {\nwidth: calc(100% - 10px);\nheight: calc(100% - 10px);\nmargin: 5px;\ntransition: background-color 0.1s ease;\n}" }, { "id": "b4c867ea06f5361b", "type": "dashbored-server", "name": "", "weatherLat": "-37.8136", "weatherLong": "144.9631", "weatherUnit": "metric", "apiKey": "" } ]