uc3_webapp

Web app for use case 3: real control lamp

[
    {
        "id": "e51dfbdd.5631a8",
        "type": "mqtt in",
        "z": "b255b79c.634ea8",
        "name": "mqttin",
        "topic": "I3523215361",
        "qos": "0",
        "broker": "f1f7b732.115e58",
        "x": 94,
        "y": 404,
        "wires": [
            [
                "3acdd554.59c7fa",
                "a3a0b5c8.d1bf78"
            ]
        ]
    },
    {
        "id": "8d17eb33.25fc38",
        "type": "mqtt out",
        "z": "b255b79c.634ea8",
        "name": "mqttout",
        "topic": "O3523215361",
        "qos": "0",
        "retain": "false",
        "broker": "f1f7b732.115e58",
        "x": 867,
        "y": 318,
        "wires": []
    },
    {
        "id": "3acdd554.59c7fa",
        "type": "debug",
        "z": "b255b79c.634ea8",
        "name": "mqttin trace",
        "active": true,
        "console": "false",
        "complete": "payload",
        "x": 279,
        "y": 321,
        "wires": []
    },
    {
        "id": "a3a0b5c8.d1bf78",
        "type": "switch",
        "z": "b255b79c.634ea8",
        "name": "message",
        "property": "payload",
        "propertyType": "msg",
        "rules": [
            {
                "t": "eq",
                "v": "Dark",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "Light",
                "vt": "str"
            }
        ],
        "checkall": "false",
        "outputs": 2,
        "x": 267,
        "y": 406,
        "wires": [
            [
                "3c689436.ea646c"
            ],
            [
                "a42a1cf7.8e03d"
            ]
        ]
    },
    {
        "id": "444c75fc.54c4ac",
        "type": "ui_switch",
        "z": "b255b79c.634ea8",
        "name": "",
        "label": "off/on",
        "group": "d8e00c2d.d71ea",
        "order": 1,
        "width": 0,
        "height": 0,
        "passthru": true,
        "decouple": "false",
        "topic": "",
        "style": "",
        "onvalue": "on",
        "onvalueType": "str",
        "onicon": "",
        "oncolor": "green",
        "offvalue": "off",
        "offvalueType": "str",
        "officon": "",
        "offcolor": "",
        "x": 659,
        "y": 318,
        "wires": [
            [
                "8d17eb33.25fc38"
            ]
        ]
    },
    {
        "id": "796e7500.7e3d1c",
        "type": "ui_gauge",
        "z": "b255b79c.634ea8",
        "name": "state",
        "group": "d8e00c2d.d71ea",
        "order": 2,
        "width": "3",
        "height": "3",
        "gtype": "donut",
        "title": "lamp state",
        "label": "",
        "format": "{{value}}",
        "min": 0,
        "max": "1",
        "colors": [
            "#ff0000",
            "#ffffff",
            "#80ff80"
        ],
        "seg1": "",
        "seg2": "",
        "x": 662,
        "y": 385,
        "wires": []
    },
    {
        "id": "9413c744.1bb478",
        "type": "ui_chart",
        "z": "b255b79c.634ea8",
        "name": "histogram",
        "group": "d8e00c2d.d71ea",
        "order": 3,
        "width": "0",
        "height": "0",
        "label": "off/on history",
        "chartType": "line",
        "legend": "false",
        "xformat": "HH:mm:ss",
        "interpolate": "step",
        "nodata": "push switch",
        "ymin": "0",
        "ymax": "1",
        "removeOlder": "60",
        "removeOlderPoints": "",
        "removeOlderUnit": "60",
        "cutout": "",
        "colors": [
            "#1f77b4",
            "#aec7e8",
            "#ff7f0e",
            "#2ca02c",
            "#98df8a",
            "#d62728",
            "#ff9896",
            "#9467bd",
            "#c5b0d5"
        ],
        "x": 676,
        "y": 445,
        "wires": [
            [],
            []
        ]
    },
    {
        "id": "a42a1cf7.8e03d",
        "type": "function",
        "z": "b255b79c.634ea8",
        "name": "light",
        "func": "msg.payload=1;\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "x": 462,
        "y": 446,
        "wires": [
            [
                "796e7500.7e3d1c",
                "9413c744.1bb478"
            ]
        ]
    },
    {
        "id": "3c689436.ea646c",
        "type": "function",
        "z": "b255b79c.634ea8",
        "name": "dark",
        "func": "msg.payload=0;\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "x": 460,
        "y": 383,
        "wires": [
            [
                "796e7500.7e3d1c",
                "9413c744.1bb478"
            ]
        ]
    },
    {
        "id": "f1f7b732.115e58",
        "type": "mqtt-broker",
        "z": "",
        "broker": "m20.cloudmqtt.com",
        "port": "14596",
        "clientid": "Smick_webapp",
        "usetls": false,
        "compatmode": true,
        "keepalive": "300",
        "cleansession": true,
        "willTopic": "",
        "willQos": "0",
        "willPayload": "",
        "birthTopic": "",
        "birthQos": "0",
        "birthPayload": ""
    },
    {
        "id": "d8e00c2d.d71ea",
        "type": "ui_group",
        "z": "",
        "name": "Lamp",
        "tab": "70bf4695.9bbf38",
        "order": 1,
        "disp": true,
        "width": "6"
    },
    {
        "id": "70bf4695.9bbf38",
        "type": "ui_tab",
        "z": "",
        "name": "UC3 Lamp",
        "icon": "dashboard",
        "order": 10
    }
]
mircoborot

Flow Info

created 3 months, 1 week ago

Node Types

Core
  • debug (x1)
  • function (x2)
  • mqtt in (x1)
  • mqtt out (x1)
  • mqtt-broker (x1)
  • switch (x1)
Other
  • ui_chart (x1)
  • ui_gauge (x1)
  • ui_group (x1)
  • ui_switch (x1)
  • ui_tab (x1)

Tags

Copy this flow JSON to your clipboard and then import into Node-RED using the Import From > Clipboard (Ctrl-I) menu option