From 6f6bfeaa477a032ed06b9aa1520237d1367d1891 Mon Sep 17 00:00:00 2001 From: rxf Date: Sun, 29 Mar 2026 14:28:37 +0200 Subject: [PATCH] Fenstersensore: letzter Zustand wird gemerkt --- flows.json | 66 +++++++++++++++++++----------------------------------- 1 file changed, 23 insertions(+), 43 deletions(-) diff --git a/flows.json b/flows.json index b8096f3..c40fc83 100644 --- a/flows.json +++ b/flows.json @@ -627,8 +627,8 @@ "y": 360, "wires": [ [ - "256eb380f85a2dad", - "91da9d294fd8ed0e" + "91da9d294fd8ed0e", + "d662bd518d76ecfd" ] ] }, @@ -14579,7 +14579,7 @@ "op2": "", "op1type": "nul", "op2type": "pay", - "duration": "90", + "duration": "2", "extend": true, "overrideDelay": false, "units": "min", @@ -14654,7 +14654,7 @@ "op2": "", "op1type": "nul", "op2type": "pay", - "duration": "20", + "duration": "2", "extend": true, "overrideDelay": false, "units": "min", @@ -14779,44 +14779,6 @@ "y": 640, "wires": [] }, - { - "id": "256eb380f85a2dad", - "type": "function", - "z": "10e5bfb8a438f4f7", - "name": "function 74", - "func": "const part = msg.topic.substring(18)\nconst room = part.split(':')[0]\nmsg.payload.datetime = new Date()\nmsg.operation = 'insertOne'\nmsg.collection = 'fenstercheck'\nmsg.payload.room = room\nreturn msg;", - "outputs": 1, - "timeout": "", - "noerr": 0, - "initialize": "", - "finalize": "", - "libs": [], - "x": 790, - "y": 580, - "wires": [ - [ - "5f7a1bf80589c343" - ] - ] - }, - { - "id": "5f7a1bf80589c343", - "type": "mongodb4", - "z": "10e5bfb8a438f4f7", - "clientNode": "874361936f1ce815", - "mode": "collection", - "collection": "", - "operation": "", - "output": "toArray", - "maxTimeMS": "0", - "handleDocId": false, - "name": "", - "x": 990, - "y": 580, - "wires": [ - [] - ] - }, { "id": "9c0b8962102aee05", "type": "e-mail", @@ -14839,7 +14801,7 @@ "type": "function", "z": "10e5bfb8a438f4f7", "name": "function 1", - "func": "const part = msg.topic.substring(18)\nconst room = part.split(':')[0]\nmsg.payload = new Date()\nmsg.topic = `Fenstersensor ${room} antwortet nicht mehr`\nreturn msg;", + "func": "const part = msg.topic.substring(18)\nconst room = part.split(':')[0]\nconst text = `um: ${new Date()}
letzte Meldung: ${flow.get(room)}`\nmsg.payload = text\nmsg.topic = `Fenstersensor ${room} antwortet nicht mehr`\nreturn msg;", "outputs": 1, "timeout": 0, "noerr": 0, @@ -14853,5 +14815,23 @@ "9c0b8962102aee05" ] ] + }, + { + "id": "d662bd518d76ecfd", + "type": "function", + "z": "10e5bfb8a438f4f7", + "name": "function 3", + "func": "const part = msg.topic.substring(18)\nconst room = part.split(':')[0]\nconst dt = new Date()\nflow.set(room,dt)\nreturn msg;", + "outputs": 1, + "timeout": 0, + "noerr": 0, + "initialize": "", + "finalize": "", + "libs": [], + "x": 780, + "y": 700, + "wires": [ + [] + ] } ] \ No newline at end of file