[ { "id": "68ac9fb4.9c90c", "type": "mqtt in", "z": "4058904c.658ad", "name": "", "topic": "/home/zigbee/Ventil-01", "qos": "2", "datatype": "auto-detect", "broker": "595dfa51.2c1224", "nl": false, "rap": false, "inputs": 0, "x": 180, "y": 580, "wires": [ [ "b92b8a21.4b5178" ] ] }, { "id": "77a76d92.e9b8c4", "type": "link out", "z": "4058904c.658ad", "name": "Ventil-01-Influx-Out", "mode": "link", "links": [ "22f2e00e.74f9a" ], "x": 725, "y": 480, "wires": [] }, { "id": "2594b919.43c9c6", "type": "mqtt in", "z": "4058904c.658ad", "name": "", "topic": "/home/zigbee/Ventil-02", "qos": "2", "datatype": "auto-detect", "broker": "595dfa51.2c1224", "nl": false, "rap": false, "inputs": 0, "x": 180, "y": 220, "wires": [ [ "ee580ce.2e131f" ] ] }, { "id": "6d44446b.fe5f9c", "type": "link out", "z": "4058904c.658ad", "name": "Ventil-02-Influx-Out", "mode": "link", "links": [ "22f2e00e.74f9a" ], "x": 725, "y": 160, "wires": [] }, { "id": "941c1014.a70af", "type": "inject", "z": "4058904c.658ad", "name": "Update Ventil-01", "props": [ { "p": "payload", "v": "{\"system_mode\": \"on\"}", "vt": "str" }, { "p": "topic", "v": "", "vt": "str" } ], "repeat": "600", "crontab": "", "once": false, "onceDelay": "1", "topic": "", "payload": "{\"system_mode\": \"on\"}", "payloadType": "str", "x": 190, "y": 660, "wires": [ [ "d9210e8f.56b74" ] ] }, { "id": "d9210e8f.56b74", "type": "mqtt out", "z": "4058904c.658ad", "name": "", "topic": "/home/zigbee/Ventil-01/set", "qos": "", "retain": "", "broker": "595dfa51.2c1224", "x": 480, "y": 660, "wires": [] }, { "id": "bc24bc5c.24eaa", "type": "inject", "z": "4058904c.658ad", "name": "Update Ventil-02", "props": [ { "p": "payload" }, { "p": "topic", "vt": "str" } ], "repeat": "600", "crontab": "", "once": false, "onceDelay": "1", "topic": "", "payload": "{\"window_detection\":\"off\"}", "payloadType": "str", "x": 190, "y": 300, "wires": [ [ "ba865231.189c2" ] ] }, { "id": "ba865231.189c2", "type": "mqtt out", "z": "4058904c.658ad", "name": "", "topic": "/home/zigbee/Ventil-02/set", "qos": "", "retain": "", "respTopic": "", "contentType": "", "userProps": "", "correl": "", "expiry": "", "broker": "595dfa51.2c1224", "x": 480, "y": 300, "wires": [] }, { "id": "d4eaa56.3b35958", "type": "inject", "z": "4058904c.658ad", "name": "Set 21.0°C to Ventil-02", "props": [ { "p": "payload" }, { "p": "topic", "vt": "str" } ], "repeat": "", "crontab": "", "once": false, "onceDelay": "1", "topic": "", "payload": "{\"current_heating_setpoint\":\"21.0\"}", "payloadType": "str", "x": 180, "y": 360, "wires": [ [ "ba865231.189c2" ] ] }, { "id": "9cc32425.ae9868", "type": "inject", "z": "4058904c.658ad", "name": "Set 18.0°C to Ventil-01", "props": [ { "p": "payload" }, { "p": "topic", "vt": "str" } ], "repeat": "", "crontab": "", "once": false, "onceDelay": "1", "topic": "", "payload": "{\"current_heating_setpoint\":\"19.0\"}", "payloadType": "str", "x": 180, "y": 720, "wires": [ [ "d9210e8f.56b74" ] ] }, { "id": "b92b8a21.4b5178", "type": "function", "z": "4058904c.658ad", "name": "", "func": "var words = msg.topic.split('/');\nvar KnotenName = (words[3]);\n\n// var Position = JSON.parse(msg.payload.position);\n// var Local_Temperature = JSON.parse(msg.payload.local_temperature); \nvar Local_Temperature = msg.payload.local_temperature; \nvar Current_Heating_Setpoint = JSON.parse(msg.payload.current_heating_setpoint); \nvar Link_Quality = JSON.parse(msg.payload.linkquality); \n\nvar time = Date.now();\nvar LastSeen = { payload: time };\n\nvar Influx = [{\n Room: KnotenName,\n// Position: Position,\n LocalTemp: Local_Temperature,\n HeatSetPoint: Current_Heating_Setpoint,\n Link: Link_Quality\n}]\nvar Influx1 = { payload: Influx };\n\nnode.status({fill:\"blue\",shape:\"ring\",text:KnotenName + \" \" +\n// \"Position: \" + Position + \"%, \" +\n \"LocalTemp: \" + Local_Temperature + \"°C, \" +\n \"Heating_Setpoint: \" + Current_Heating_Setpoint + \"°C, \" +\n \"Link: \" + Link_Quality\n });\n\nreturn [Influx1, LastSeen];\n", "outputs": 2, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 620, "y": 580, "wires": [ [ "77a76d92.e9b8c4" ], [ "ac93bd7eddfafa55" ] ] }, { "id": "ee580ce.2e131f", "type": "function", "z": "4058904c.658ad", "name": "", "func": "var words = msg.topic.split('/');\nvar KnotenName = (words[3]);\n\nvar Position = JSON.parse(msg.payload.position);\nvar Local_Temperature = JSON.parse(msg.payload.local_temperature); \nvar Current_Heating_Setpoint = JSON.parse(msg.payload.current_heating_setpoint); \nvar Link_Quality = JSON.parse(msg.payload.linkquality); \n\nvar time = Date.now();\nvar LastSeen = {payload:time};\n\nvar Influx = [{\n Room: KnotenName,\n Position: Position,\n LocalTemp: Local_Temperature,\n HeatSetPoint: Current_Heating_Setpoint,\n Link: Link_Quality\n}]\nvar Influx1 = { payload: Influx };\n\nnode.status({fill:\"blue\",shape:\"ring\",text:KnotenName +\n \" Position: \" + Position +\n \"%, LocalTemp: \" + Local_Temperature +\n \"°C, Heating_Setpoint: \" + Current_Heating_Setpoint +\n \"°C, Link: \" + Link_Quality\n });\n \nreturn [Influx1, LastSeen];\n", "outputs": 2, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 620, "y": 220, "wires": [ [ "6d44446b.fe5f9c" ], [ "df6f8ec729e1b5fb" ] ] }, { "id": "f6d895a7.a9b168", "type": "comment", "z": "4058904c.658ad", "name": "Ventil-02 (Wohnzimmer)", "info": "", "x": 180, "y": 140, "wires": [] }, { "id": "764caed9.d0dfa", "type": "comment", "z": "4058904c.658ad", "name": "Ventil-01 (Schlafzimmer)", "info": "", "x": 150, "y": 520, "wires": [] }, { "id": "df6f8ec729e1b5fb", "type": "moment", "z": "4058904c.658ad", "name": "", "topic": "", "input": "payload", "inputType": "msg", "inTz": "ETC/GMT", "adjAmount": "0", "adjType": "hours", "adjDir": "subtract", "format": "dd DD. MMMM YYYY HH:mm:ss ", "locale": "de_DE", "output": "", "outputType": "msg", "outTz": "Europe/Berlin", "x": 900, "y": 160, "wires": [ [ "3f31aebc6ebd7be7" ] ] }, { "id": "3f31aebc6ebd7be7", "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": 200, "wires": [] }, { "id": "9f76c41e95646a3b", "type": "inject", "z": "4058904c.658ad", "name": "Set 18.0°C to Ventil-02", "props": [ { "p": "payload" }, { "p": "topic", "vt": "str" } ], "repeat": "", "crontab": "", "once": false, "onceDelay": "1", "topic": "", "payload": "{\"current_heating_setpoint\":\"18\"}", "payloadType": "str", "x": 180, "y": 420, "wires": [ [ "ba865231.189c2" ] ] }, { "id": "ac93bd7eddfafa55", "type": "moment", "z": "4058904c.658ad", "name": "", "topic": "", "input": "payload", "inputType": "msg", "inTz": "ETC/GMT", "adjAmount": "0", "adjType": "hours", "adjDir": "subtract", "format": "dd DD. MMMM YYYY HH:mm:ss ", "locale": "de_DE", "output": "", "outputType": "msg", "outTz": "Europe/Berlin", "x": 900, "y": 520, "wires": [ [ "eef85a7bd8ad72ca" ] ] }, { "id": "eef85a7bd8ad72ca", "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": 560, "wires": [] }, { "id": "595dfa51.2c1224", "type": "mqtt-broker", "name": "Kossdorf", "broker": "192.168.123.16", "port": "1883", "clientid": "", "autoConnect": true, "usetls": false, "protocolVersion": "4", "keepalive": "60", "cleansession": true, "birthTopic": "", "birthQos": "0", "birthPayload": "", "birthMsg": {}, "closeTopic": "", "closePayload": "", "closeMsg": {}, "willTopic": "", "willQos": "0", "willPayload": "", "willMsg": {}, "userProps": "", "sessionExpiry": "" } ]