NittyGritty icon

Alexander

NittyGritty | PRO | 05/18/22 09:30:19 AM UTC | 0 ⭐ | 1310 👁️ | Never ⏰ | []
JavaScript |

8.42 KB

|

None

|

0 👍

/

0 👎

[
    {
        "id": "929706ca892aef24",
        "type": "function",
        "z": "4058904c.658ad",
        "name": "",
        "func": "// {\"current\":0,\"energy\":0.13,\"linkquality\":76,\"power\":0,\"state\":\"OFF\",\"voltage\":227}\nvar words = msg.topic.split('/');\nvar KnotenName = (words[3]);\nvar CurHeating = msg.payload.current_heating_setpoint; \nvar deadZonetemp = msg.payload.deadzone_temperature; \nvar heat = msg.payload.heat; \nvar Qual = msg.payload.linkquality;\nvar localTemp = msg.payload.local_temperature;\nvar preset = msg.payload.preset;\nvar presetmode = msg.payload.preset_mode;\nvar status = msg.payload.running_state;\nvar sensor = msg.payload.sensor;\nvar system_mode = msg.payload.system_mode;\n\nnode.status({fill:\"blue\",shape:\"ring\",text:KnotenName + \" \" +\n                    \"act.Temp: \" + localTemp + \"°C, \" +\n                    \" heat.Temp: \" + CurHeating + \"°C, \" +\n                    \" Qual: \" + Qual + \"%\" +\n                    \" Status: \" + status \n            });\n\n\nvar newMsg  = {payload:CurHeating };\nvar newMsg1 = {payload:deadZonetemp};\nvar newMsg2 = {payload:heat};\nvar newMsg3 = {payload:localTemp};\n// var newMsg4 = {payload:State};\nvar newMsg4 = {payload:status};\nvar newMsg5 = {payload:Qual};\nvar newMsg6  = {payload:preset };\nvar newMsg7 = {payload:presetmode};\nvar newMsg8 = {payload:sensor};\nvar newMsg9 = {payload:system_mode};\n\n// var newMsg = {payload: (msg.payload.charAt(0).toUpperCase() + msg.payload.slice(1)) };\n\nvar newMsg10a = [{\n    Room: KnotenName,\n    CurrentHeating: CurHeating,\n    Heat: heat,\n    localTemp: localTemp\n}]\n\n//msg.selectedItem = msg.payload[msg.count].data3\n\nvar newMsg10 = {payload:newMsg10a};\n\nreturn [newMsg, newMsg1, newMsg2, newMsg3, newMsg4 , newMsg5, newMsg6, newMsg7, newMsg8, newMsg9, newMsg10];\n\n",
        "outputs": 10,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 680,
        "y": 920,
        "wires": [
            [
                "5b539ab9ee5bf9e9"
            ],
            [
                "4c34e3d9ac7040e5"
            ],
            [],
            [
                "8f3dec36c0c4d5f3",
                "031de4773d41cb84"
            ],
            [],
            [],
            [],
            [
                "311ed2f7bd219e26"
            ],
            [],
            []
        ]
    },
    {
        "id": "82d79d92cdfd1880",
        "type": "inject",
        "z": "4058904c.658ad",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "/home/zigbee/0x8cf681fffe5672ac",
        "payload": "{\"child_lock\":\"UNLOCK\",\"current_heating_setpoint\":18,\"deadzone_temperature\":1,\"heat\":\"OFF\",\"linkquality\":49,\"local_temperature\":29.5,\"local_temperature_calibration\":-1,\"max_temperature\":35,\"max_temperature_limit\":45,\"preset\":\"hold\",\"preset_mode\":\"hold\",\"program\":[{\"weekdays_p1\":\"6h:0m 20°C\"},{\"weekdays_p2\":\"11h:30m 21°C\"},{\"weekdays_p3\":\"13h:30m 22°C\"},{\"weekdays_p4\":\"17h:30m 23°C\"},{\"saturday_p1\":\"6h:0m 24°C\"},{\"saturday_p2\":\"12h:0m 23°C\"},{\"saturday_p3\":\"14h:30m 22°C\"},{\"saturday_p4\":\"17h:30m 21°C\"},{\"sunday_p1\":\"6h:0m 19°C\"},{\"sunday_p2\":\"12h:30m 20°C\"},{\"sunday_p3\":\"14h:30m 21°C\"},{\"sunday_p4\":\"18h:30m 20°C\"}],\"running_state\":\"idle\",\"sensor\":\"AL\",\"system_mode\":\"off\"}",
        "payloadType": "str",
        "x": 150,
        "y": 920,
        "wires": [
            [
                "486d1d65f11166cb",
                "6755404373193ed7"
            ]
        ]
    },
    {
        "id": "486d1d65f11166cb",
        "type": "json",
        "z": "4058904c.658ad",
        "name": "",
        "property": "payload",
        "action": "",
        "pretty": false,
        "x": 370,
        "y": 920,
        "wires": [
            [
                "929706ca892aef24"
            ]
        ]
    },
    {
        "id": "6755404373193ed7",
        "type": "debug",
        "z": "4058904c.658ad",
        "name": "",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 390,
        "y": 860,
        "wires": []
    },
    {
        "id": "5b539ab9ee5bf9e9",
        "type": "debug",
        "z": "4058904c.658ad",
        "name": "",
        "active": true,
        "tosidebar": false,
        "console": false,
        "tostatus": true,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "payload",
        "statusType": "auto",
        "x": 930,
        "y": 780,
        "wires": []
    },
    {
        "id": "4c34e3d9ac7040e5",
        "type": "ui_slider",
        "z": "4058904c.658ad",
        "name": "",
        "label": "slider",
        "tooltip": "",
        "group": "c87dfb7d08d736ef",
        "order": 6,
        "width": 0,
        "height": 0,
        "passthru": true,
        "outs": "all",
        "topic": "topic",
        "topicType": "msg",
        "min": 0,
        "max": 10,
        "step": 1,
        "className": "",
        "x": 910,
        "y": 840,
        "wires": [
            []
        ]
    },
    {
        "id": "8f3dec36c0c4d5f3",
        "type": "ui_gauge",
        "z": "4058904c.658ad",
        "name": "",
        "group": "c87dfb7d08d736ef",
        "order": 1,
        "width": 0,
        "height": 0,
        "gtype": "gage",
        "title": "gauge",
        "label": "units",
        "format": "{{value}}",
        "min": "10",
        "max": "30",
        "colors": [
            "#00b500",
            "#e6e600",
            "#ca3838"
        ],
        "seg1": "",
        "seg2": "",
        "className": "",
        "x": 910,
        "y": 900,
        "wires": []
    },
    {
        "id": "031de4773d41cb84",
        "type": "ui_chart",
        "z": "4058904c.658ad",
        "name": "",
        "group": "c87dfb7d08d736ef",
        "order": 2,
        "width": 0,
        "height": 0,
        "label": "chart",
        "chartType": "line",
        "legend": "false",
        "xformat": "HH:mm:ss",
        "interpolate": "linear",
        "nodata": "",
        "dot": false,
        "ymin": "10",
        "ymax": "30",
        "removeOlder": 1,
        "removeOlderPoints": "",
        "removeOlderUnit": "3600",
        "cutout": 0,
        "useOneColor": false,
        "useUTC": false,
        "colors": [
            "#1f77b4",
            "#aec7e8",
            "#ff7f0e",
            "#2ca02c",
            "#98df8a",
            "#d62728",
            "#ff9896",
            "#9467bd",
            "#c5b0d5"
        ],
        "outputs": 1,
        "useDifferentColor": false,
        "className": "",
        "x": 910,
        "y": 940,
        "wires": [
            []
        ]
    },
    {
        "id": "311ed2f7bd219e26",
        "type": "ui_led",
        "z": "4058904c.658ad",
        "order": 3,
        "group": "c87dfb7d08d736ef",
        "width": 0,
        "height": 0,
        "label": "",
        "labelPlacement": "left",
        "labelAlignment": "left",
        "colorForValue": [
            {
                "color": "#ff0000",
                "value": "hold",
                "valueType": "str"
            },
            {
                "color": "#008000",
                "value": "run",
                "valueType": "str"
            }
        ],
        "allowColorForValueInMessage": false,
        "shape": "circle",
        "showGlow": true,
        "name": "",
        "x": 910,
        "y": 980,
        "wires": []
    },
    {
        "id": "c87dfb7d08d736ef",
        "type": "ui_group",
        "name": "Ventil-1",
        "tab": "78c973fac39a6784",
        "order": 1,
        "disp": true,
        "width": "6",
        "collapse": false,
        "className": ""
    },
    {
        "id": "78c973fac39a6784",
        "type": "ui_tab",
        "name": "Alexander",
        "icon": "dashboard",
        "order": 15,
        "disabled": false,
        "hidden": false
    }
]

Comments