From ca9f21d727ab510fe2782c7082e07a36eecbecd4 Mon Sep 17 00:00:00 2001 From: rxf Date: Wed, 31 Dec 2025 15:08:49 +0000 Subject: [PATCH] Heizung_Fenster_clo (V 2.0.0) neu gebaut. Ohne Reglersperre, alles in der Function-Node --- flows.json | 779 ++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 770 insertions(+), 9 deletions(-) diff --git a/flows.json b/flows.json index be60cf6..09a2ffa 100644 --- a/flows.json +++ b/flows.json @@ -43,7 +43,7 @@ "id": "9f826196c06ea578", "type": "tab", "label": "CL_Fenster_Heizung", - "disabled": false, + "disabled": true, "info": "", "env": [] }, @@ -151,6 +151,14 @@ "info": "", "env": [] }, + { + "id": "29da089dbee16ea0", + "type": "tab", + "label": "Heizung_Fenster_CL", + "disabled": false, + "info": "", + "env": [] + }, { "id": "168cd2080e21b71d", "type": "junction", @@ -515,6 +523,66 @@ ] ] }, + { + "id": "8c8ca301f85a731f", + "type": "junction", + "z": "29da089dbee16ea0", + "x": 1020, + "y": 420, + "wires": [ + [ + "f2a8612d3fe812d6" + ] + ] + }, + { + "id": "34cf9bb5b43b18f5", + "type": "junction", + "z": "29da089dbee16ea0", + "x": 500, + "y": 500, + "wires": [ + [ + "29546d1141a23d2f", + "3671c5b666861758" + ] + ] + }, + { + "id": "3eee0343aa9deb3d", + "type": "junction", + "z": "29da089dbee16ea0", + "x": 820, + "y": 340, + "wires": [ + [] + ] + }, + { + "id": "55b400ce4088a68f", + "type": "junction", + "z": "29da089dbee16ea0", + "x": 1080, + "y": 860, + "wires": [ + [ + "286439aae5fb8e8b" + ] + ] + }, + { + "id": "cc35bf77d41e95d1", + "type": "junction", + "z": "29da089dbee16ea0", + "x": 280, + "y": 1160, + "wires": [ + [ + "ec906e9d14fd07f1", + "ffc7701a22a6dcb3" + ] + ] + }, { "id": "c46833d59903b816", "type": "mqtt-broker", @@ -7940,7 +8008,7 @@ "wires": [ [ "09f36287e0cd1806", - "bbea70ddefbcae21" + "b6dd8b419d5a5f4b" ] ] }, @@ -8124,7 +8192,8 @@ "y": 740, "wires": [ [ - "0f53a1d42ad808ad" + "0f53a1d42ad808ad", + "c6630df47928ad37" ] ] }, @@ -8143,11 +8212,9 @@ "persist": false, "storeName": "memory", "x": 510, - "y": 960, + "y": 1000, "wires": [ - [ - "b6dd8b419d5a5f4b" - ] + [] ] }, { @@ -8155,7 +8222,7 @@ "type": "function", "z": "9f826196c06ea578", "name": "Abh. vom Fenster und Aussentemp die Sperre aktivieren", - "func": "msg.topic = 'control'\nif ((flow.get('aussen') < 5.0) && (flow.get('fenster') == 1)) {\n msg.payload = 'close'\n} else {\n msg.payload = 'open'\n}\nreturn msg;", + "func": "msg.topic = 'control'\nif ((flow.get('aussen') < 5.0) && (flow.get('fenster') == 0)) {\n msg.payload = 'close'\n} else {\n msg.payload = 'open'\n}\nreturn msg;", "outputs": 1, "noerr": 0, "initialize": "", @@ -8165,7 +8232,6 @@ "y": 780, "wires": [ [ - "bbea70ddefbcae21", "5945403023bb86b1" ] ] @@ -12839,5 +12905,700 @@ "switch1" ] ] + }, + { + "id": "99e967e3c2987ab5", + "type": "mqtt out", + "z": "29da089dbee16ea0", + "name": "Schalte Heizung", + "topic": "home66/shellyplus1-CL_Heizung/rpc", + "qos": "0", + "retain": "false", + "respTopic": "", + "contentType": "", + "userProps": "", + "correl": "", + "expiry": "", + "broker": "c46833d59903b816", + "x": 1160, + "y": 1160, + "wires": [] + }, + { + "id": "5331faac4043a7ab", + "type": "debug", + "z": "29da089dbee16ea0", + "name": "debug 179", + "active": true, + "tosidebar": true, + "console": false, + "tostatus": false, + "complete": "false", + "statusVal": "", + "statusType": "auto", + "x": 870, + "y": 1080, + "wires": [] + }, + { + "id": "f2a8612d3fe812d6", + "type": "mqtt out", + "z": "29da089dbee16ea0", + "name": "CL_Fenster AUF/ZU", + "topic": "hm/set/Fenster_CL_Schließer:1/LEVEL", + "qos": "0", + "retain": "false", + "respTopic": "", + "contentType": "", + "userProps": "", + "correl": "", + "expiry": "", + "broker": "c46833d59903b816", + "x": 1160, + "y": 420, + "wires": [] + }, + { + "id": "3671c5b666861758", + "type": "change", + "z": "29da089dbee16ea0", + "name": "Fenster AUF", + "rules": [ + { + "t": "set", + "p": "payload", + "pt": "msg", + "to": "1", + "tot": "num" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 850, + "y": 500, + "wires": [ + [ + "8c8ca301f85a731f", + "e383a56993016920" + ] + ] + }, + { + "id": "cd43b0be591a80e9", + "type": "change", + "z": "29da089dbee16ea0", + "name": "Fenster ZU", + "rules": [ + { + "t": "set", + "p": "payload", + "pt": "msg", + "to": "0", + "tot": "num" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 850, + "y": 340, + "wires": [ + [ + "8c8ca301f85a731f", + "9ad38aa8aa5bdb92" + ] + ] + }, + { + "id": "29546d1141a23d2f", + "type": "trigger", + "z": "29da089dbee16ea0", + "name": "", + "op1": "", + "op2": "0", + "op1type": "nul", + "op2type": "str", + "duration": "15", + "extend": false, + "overrideDelay": false, + "units": "min", + "reset": "", + "bytopic": "all", + "topic": "topic", + "outputs": 1, + "x": 650, + "y": 400, + "wires": [ + [ + "cd43b0be591a80e9" + ] + ] + }, + { + "id": "6ea9ae4f53bfacdb", + "type": "comment", + "z": "29da089dbee16ea0", + "name": "Einfacher 2-Punkt-Regler", + "info": "", + "x": 210, + "y": 620, + "wires": [] + }, + { + "id": "c1f0ec82c2407231", + "type": "mqtt in", + "z": "29da089dbee16ea0", + "name": "Ist-Temp einlesen", + "topic": "zigbee2mqtt/TH_3", + "qos": "2", + "datatype": "auto-detect", + "broker": "c46833d59903b816", + "nl": false, + "rap": true, + "rh": 0, + "inputs": 0, + "x": 180, + "y": 900, + "wires": [ + [ + "e69becc6e9333990" + ] + ] + }, + { + "id": "ec906e9d14fd07f1", + "type": "function", + "z": "29da089dbee16ea0", + "name": "2-Punkt-Regler (Hysteres = +/- °)", + "func": "if (flow.get(\"fenster\") == 'offen') {\n msg.payload = {\"heizung\":false, \"fenster\": flow.get(\"fenster\")}\n return msg\n}\nif (flow.get('aussen') > flow.get(\"atschwelle\")) {\n msg.pyaload = {\"hezung\":false, \"at\": flow.get(\"aussen\")}\n return msg\n}\n\nlet t = flow.get(\"ist\")\nlet hys = flow.get(\"hysterese\")\nlet soll = flow.get(\"soll\")\nif ( t >= (soll + hys)) {\n msg.payload = {\"heizung\": false}\n return msg;\n} else if (t <= (soll - hys)) {\n msg.payload = {\"heizung\": true}\n return msg;\n}\nmsg.payload = {\"wedernoch\": true, \"t\": t, \"hys\": hys, \"soll\": soll}\nreturn msg", + "outputs": 1, + "noerr": 0, + "initialize": "", + "finalize": "", + "libs": [], + "x": 570, + "y": 1160, + "wires": [ + [ + "bb991dfd3b1f2673", + "5331faac4043a7ab" + ] + ] + }, + { + "id": "f2538d0618fcacc9", + "type": "comment", + "z": "29da089dbee16ea0", + "name": "CL-Fentster/Heizung Steuerung", + "info": "## Beschreibung\n* Clo-Fenster per Taste auf/zu \n* Clo-Heizung mit einfachem 2-Punkt-Regler regeln\n* Wenn Fenter offen, den Regler abschalten (und auch die Heizung)\n## Version\nVersion | Datum | Author | Bemerkung\n-------|--------|-------|---\nV 2.0 | 2025-12-30 | rxf | neu aufgesetzut, ohne Reglerperre, alles in der Function node\nV 1.1 | 2024-01-26 | rxf | Reglerperre bei offenem Fenster\nV 1.0 | 2024-01-25 | rxf | erste lauffähige Version\n", + "x": 570, + "y": 40, + "wires": [] + }, + { + "id": "0c95a565db99267a", + "type": "config", + "z": "29da089dbee16ea0", + "name": "Soll = 17 / Hysteres = 0.5", + "properties": [ + { + "p": "soll", + "pt": "flow", + "to": "17", + "tot": "num" + }, + { + "p": "hysterese", + "pt": "flow", + "to": "0.5", + "tot": "num" + }, + { + "p": "aussen", + "pt": "flow", + "to": "5.0", + "tot": "num" + }, + { + "p": "fenster", + "pt": "flow", + "to": "zu", + "tot": "str" + }, + { + "p": "atschwelle", + "pt": "flow", + "to": "5", + "tot": "num" + } + ], + "active": true, + "x": 230, + "y": 680, + "wires": [] + }, + { + "id": "e69becc6e9333990", + "type": "delay", + "z": "29da089dbee16ea0", + "name": "", + "pauseType": "rate", + "timeout": "5", + "timeoutUnits": "seconds", + "rate": "1", + "nbRateUnits": "1", + "rateUnits": "second", + "randomFirst": "1", + "randomLast": "5", + "randomUnits": "seconds", + "drop": true, + "allowrate": false, + "outputs": 1, + "x": 390, + "y": 900, + "wires": [ + [ + "838b50cb8a81983f" + ] + ] + }, + { + "id": "310a18973e2d36f7", + "type": "inject", + "z": "29da089dbee16ea0", + "name": "AUF", + "props": [ + { + "p": "payload" + }, + { + "p": "topic", + "vt": "str" + } + ], + "repeat": "", + "crontab": "", + "once": false, + "onceDelay": 0.1, + "topic": "", + "payload": "{\"val\": true}", + "payloadType": "json", + "x": 170, + "y": 500, + "wires": [ + [ + "34cf9bb5b43b18f5" + ] + ] + }, + { + "id": "5ed855b7d89eea1c", + "type": "inject", + "z": "29da089dbee16ea0", + "name": "ZU", + "props": [ + { + "p": "payload" + }, + { + "p": "topic", + "vt": "str" + } + ], + "repeat": "", + "crontab": "", + "once": false, + "onceDelay": 0.1, + "topic": "", + "payload": "{\"val\": false}", + "payloadType": "json", + "x": 170, + "y": 280, + "wires": [ + [ + "cd43b0be591a80e9" + ] + ] + }, + { + "id": "bb991dfd3b1f2673", + "type": "function", + "z": "29da089dbee16ea0", + "name": "Kommand für Heizung", + "func": "if ((msg.payload.heizung == true) || (msg.payload.heizung == false)) {\n let cmnd = { \"id\": 0, \"src\": \"home66/shellyplus1-CL_Heizung/result\", \"method\": \"Switch.Set\", \"params\": { \"id\": 0, \"on\": true } }\n cmnd.params.on = msg.payload.heizung\n msg.payload = cmnd\n return msg;\n}\nreturn", + "outputs": 1, + "noerr": 0, + "initialize": "", + "finalize": "", + "libs": [], + "x": 900, + "y": 1160, + "wires": [ + [ + "a6e00a6ea6047b5a", + "99e967e3c2987ab5" + ] + ] + }, + { + "id": "e8fb696f95a1c7e0", + "type": "mqtt in", + "z": "29da089dbee16ea0", + "name": "Fenster-Taster", + "topic": "zigbee2mqtt/Taster_Fenster_Clo", + "qos": "0", + "datatype": "auto-detect", + "broker": "c46833d59903b816", + "nl": false, + "rap": true, + "rh": 0, + "inputs": 0, + "x": 170, + "y": 400, + "wires": [ + [ + "cefb46f165e5288c", + "610564d5e21f4ef1" + ] + ] + }, + { + "id": "cefb46f165e5288c", + "type": "debug", + "z": "29da089dbee16ea0", + "name": "debug 182", + "active": true, + "tosidebar": true, + "console": false, + "tostatus": false, + "complete": "false", + "statusVal": "", + "statusType": "auto", + "x": 450, + "y": 220, + "wires": [] + }, + { + "id": "610564d5e21f4ef1", + "type": "switch", + "z": "29da089dbee16ea0", + "name": "", + "property": "payload.action", + "propertyType": "msg", + "rules": [ + { + "t": "eq", + "v": "double", + "vt": "str" + }, + { + "t": "eq", + "v": "single", + "vt": "str" + }, + { + "t": "eq", + "v": "hold", + "vt": "str" + } + ], + "checkall": "true", + "repair": false, + "outputs": 3, + "x": 350, + "y": 400, + "wires": [ + [ + "cd43b0be591a80e9" + ], + [ + "34cf9bb5b43b18f5" + ], + [] + ] + }, + { + "id": "a93dd06f9ae50d54", + "type": "comment", + "z": "29da089dbee16ea0", + "name": "Fenster AUF mit Taster steuern", + "info": "", + "x": 150, + "y": 220, + "wires": [] + }, + { + "id": "ade431b006779696", + "type": "mqtt in", + "z": "29da089dbee16ea0", + "name": "AU-TH_9", + "topic": "zigbee2mqtt/TH_9", + "qos": "0", + "datatype": "auto-detect", + "broker": "c46833d59903b816", + "nl": false, + "rap": true, + "rh": 0, + "inputs": 0, + "x": 160, + "y": 820, + "wires": [ + [ + "ee6c44610935c898" + ] + ] + }, + { + "id": "ff6f72cf502fe2a1", + "type": "change", + "z": "29da089dbee16ea0", + "name": "", + "rules": [ + { + "t": "set", + "p": "aussen", + "pt": "flow", + "to": "payload.temperature", + "tot": "msg" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 540, + "y": 820, + "wires": [ + [ + "bc9a3d2f86b1148f", + "55b400ce4088a68f" + ] + ] + }, + { + "id": "e383a56993016920", + "type": "change", + "z": "29da089dbee16ea0", + "name": "", + "rules": [ + { + "t": "set", + "p": "fenster", + "pt": "flow", + "to": "offen", + "tot": "str" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 1100, + "y": 520, + "wires": [ + [ + "55b400ce4088a68f" + ] + ] + }, + { + "id": "bc9a3d2f86b1148f", + "type": "debug", + "z": "29da089dbee16ea0", + "name": "debug 185", + "active": true, + "tosidebar": true, + "console": false, + "tostatus": false, + "complete": "true", + "targetType": "full", + "statusVal": "", + "statusType": "auto", + "x": 770, + "y": 760, + "wires": [] + }, + { + "id": "838b50cb8a81983f", + "type": "change", + "z": "29da089dbee16ea0", + "name": "", + "rules": [ + { + "t": "set", + "p": "ist", + "pt": "flow", + "to": "payload.temperature", + "tot": "msg" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 570, + "y": 900, + "wires": [ + [ + "5a9d44eee4434d19", + "55b400ce4088a68f" + ] + ] + }, + { + "id": "5a9d44eee4434d19", + "type": "debug", + "z": "29da089dbee16ea0", + "name": "debug 186", + "active": true, + "tosidebar": true, + "console": false, + "tostatus": false, + "complete": "false", + "statusVal": "", + "statusType": "auto", + "x": 770, + "y": 960, + "wires": [] + }, + { + "id": "ee6c44610935c898", + "type": "delay", + "z": "29da089dbee16ea0", + "name": "", + "pauseType": "rate", + "timeout": "5", + "timeoutUnits": "seconds", + "rate": "1", + "nbRateUnits": "1", + "rateUnits": "second", + "randomFirst": "1", + "randomLast": "5", + "randomUnits": "seconds", + "drop": true, + "allowrate": false, + "outputs": 1, + "x": 350, + "y": 820, + "wires": [ + [ + "ff6f72cf502fe2a1" + ] + ] + }, + { + "id": "9ad38aa8aa5bdb92", + "type": "change", + "z": "29da089dbee16ea0", + "name": "", + "rules": [ + { + "t": "set", + "p": "fenster", + "pt": "flow", + "to": "zu", + "tot": "str" + } + ], + "action": "", + "property": "", + "from": "", + "to": "", + "reg": false, + "x": 1100, + "y": 340, + "wires": [ + [ + "55b400ce4088a68f" + ] + ] + }, + { + "id": "ffc7701a22a6dcb3", + "type": "function", + "z": "29da089dbee16ea0", + "name": "function 58", + "func": "msg.payload = {\"at\": flow.get(\"aussen\"), \"atschwelle\": flow.get(\"atschwelle\"), \"ist\": flow.get(\"ist\"), \"soll\": flow.get(\"soll\"), \"fenster\": flow.get(\"fenster\")}\nreturn msg;", + "outputs": 1, + "noerr": 0, + "initialize": "", + "finalize": "", + "libs": [], + "x": 470, + "y": 1240, + "wires": [ + [ + "4a357c9c14ed93fe" + ] + ] + }, + { + "id": "4a357c9c14ed93fe", + "type": "debug", + "z": "29da089dbee16ea0", + "name": "debug 187", + "active": true, + "tosidebar": true, + "console": false, + "tostatus": false, + "complete": "false", + "statusVal": "", + "statusType": "auto", + "x": 670, + "y": 1240, + "wires": [] + }, + { + "id": "a6e00a6ea6047b5a", + "type": "debug", + "z": "29da089dbee16ea0", + "name": "debug 188", + "active": true, + "tosidebar": true, + "console": false, + "tostatus": false, + "complete": "false", + "statusVal": "", + "statusType": "auto", + "x": 1150, + "y": 1080, + "wires": [] + }, + { + "id": "286439aae5fb8e8b", + "type": "link out", + "z": "29da089dbee16ea0", + "name": "link out 6", + "mode": "link", + "links": [ + "b2a0ab967056f2b6" + ], + "x": 1185, + "y": 860, + "wires": [] + }, + { + "id": "b2a0ab967056f2b6", + "type": "link in", + "z": "29da089dbee16ea0", + "name": "link in 6", + "links": [ + "286439aae5fb8e8b" + ], + "x": 215, + "y": 1160, + "wires": [ + [ + "cc35bf77d41e95d1" + ] + ] } ] \ No newline at end of file