[ { "id": "br9dfef2b2", "type": "mqtt-broker", "name": "mosquitto", "broker": "mosquitto", "port": "1883", "clientid": "", "autoConnect": true, "usetls": false, "protocolVersion": "4", "keepalive": "60", "cleansession": true, "birthTopic": "", "birthQos": "0", "birthPayload": "", "closeTopic": "", "closeQos": "0", "closePayload": "", "willTopic": "", "willQos": "0", "willPayload": "" }, { "id": "uibba9906e7", "type": "ui-base", "name": "Dashboard", "path": "/dashboard", "includeClientData": true, "acceptsClientConfig": [ "ui-notification", "ui-control" ], "showPathInSidebar": false, "navigationStyle": "default", "titleBarStyle": "default" }, { "id": "uitcdb20b5e", "type": "ui-theme", "name": "Default Theme", "colors": { "surface": "#ffffff", "primary": "#0094CE", "bgPage": "#eeeeee", "groupBg": "#ffffff", "groupOutline": "#cccccc" }, "sizes": { "pagePadding": "12px", "groupGap": "12px", "groupBorderRadius": "4px", "widgetGap": "12px" } }, { "id": "uipb062fd21", "type": "ui-page", "name": "Home", "ui": "uibba9906e7", "icon": "home", "path": "/home", "theme": "uitcdb20b5e", "layout": "flex", "order": 0, "className": "", "visible": true, "disabled": false }, { "id": "uig1ba3cd58", "type": "ui-group", "name": "Plugs", "page": "uipb062fd21", "width": "6", "height": "1", "order": 1, "showTitle": true, "className": "", "visible": true, "disabled": false }, { "id": "zigbee-state-squiggle", "z": "f11689cf1", "type": "mqtt in", "wires": [ [ "text-squiggle" ] ], "name": "", "x": 170, "y": 80, "broker": "br9dfef2b2", "topic": "zigbee2mqtt/Squiggle", "qos": "0", "datatype": "auto" }, { "id": "zigbee-state-sideboard", "z": "f11689cf1", "type": "mqtt in", "wires": [ [ "text-sideboard" ] ], "name": "", "x": 170, "y": 80, "broker": "br9dfef2b2", "topic": "zigbee2mqtt/Sideboard Lamp", "qos": "0", "datatype": "auto" }, { "id": "zigbee-state-bamboo", "z": "f11689cf1", "type": "mqtt in", "wires": [ [ "text-bamboo" ] ], "name": "", "x": 170, "y": 80, "broker": "br9dfef2b2", "topic": "zigbee2mqtt/Bamboo Lights", "qos": "0", "datatype": "auto" }, { "id": "button-in", "z": "f11689cf1", "type": "mqtt in", "wires": [ [ "btn-filter" ] ], "name": "", "x": 170, "y": 220, "broker": "br9dfef2b2", "topic": "zigbee2mqtt/Door Button", "qos": "0", "datatype": "auto" }, { "id": "btn-filter", "z": "f11689cf1", "type": "function", "wires": [ [ "plug-out-squiggle", "plug-out-sideboard", "plug-out-bamboo" ] ], "name": "Single press only", "x": 450, "y": 220, "func": "try {\n const p = JSON.parse(msg.payload);\n if (p.action === 'single') {\n msg.payload = { state: 'TOGGLE' };\n return msg;\n }\n} catch (e) {}\nreturn null;\n", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "libs": [] }, { "id": "plug-out-squiggle", "z": "f11689cf1", "type": "mqtt out", "wires": [], "name": "", "x": 770, "y": 220, "broker": "br9dfef2b2", "topic": "zigbee2mqtt/Squiggle/set", "qos": "2", "retain": false }, { "id": "plug-out-sideboard", "z": "f11689cf1", "type": "mqtt out", "wires": [], "name": "", "x": 770, "y": 360, "broker": "br9dfef2b2", "topic": "zigbee2mqtt/Sideboard Lamp/set", "qos": "2", "retain": false }, { "id": "plug-out-bamboo", "z": "f11689cf1", "type": "mqtt out", "wires": [], "name": "", "x": 770, "y": 360, "broker": "br9dfef2b2", "topic": "zigbee2mqtt/Bamboo Lights/set", "qos": "2", "retain": false }, { "id": "text-squiggle", "z": "f11689cf1", "type": "ui-text", "wires": [], "name": "Squiggle", "x": 770, "y": 360, "group": "uig1ba3cd58", "width": "6", "height": "2", "order": 1, "label": "Squiggle", "format": "{{msg.payload.state}}", "layout": "row-spread", "className": "" }, { "id": "text-sideboard", "z": "f11689cf1", "type": "ui-text", "wires": [], "name": "Sideboard Lamp", "x": 770, "y": 500, "group": "uig1ba3cd58", "width": "6", "height": "2", "order": 1, "label": "Sideboard Lamp", "format": "{{msg.payload.state}}", "layout": "row-spread", "className": "" }, { "id": "text-bamboo", "z": "f11689cf1", "type": "ui-text", "wires": [], "name": "Bamboo Lights", "x": 770, "y": 500, "group": "uig1ba3cd58", "width": "6", "height": "2", "order": 1, "label": "Bamboo Lights", "format": "{{msg.payload.state}}", "layout": "row-spread", "className": "" }, { "id": "permit-btn", "z": "f11689cf1", "type": "ui-button", "wires": [ [ "mqtt-out" ] ], "name": "Permit Join (60s)", "x": 170, "y": 500, "group": "uig1ba3cd58", "payload": "{\"value\": true, \"time\": 60}", "payloadType": "json", "topic": "zigbee2mqtt/bridge/request/permit_join", "width": "3", "height": "1", "order": 1, "className": "" }, { "id": "mqtt-out", "z": "f11689cf1", "type": "mqtt out", "wires": [], "name": "", "x": 770, "y": 640, "broker": "br9dfef2b2", "topic": "", "qos": "2", "retain": false } ]