Fenstersensore: letzter Zustand wird gemerkt

This commit is contained in:
rxf
2026-03-29 14:28:37 +02:00
parent ab8d38e23b
commit 6f6bfeaa47

View File

@@ -627,8 +627,8 @@
"y": 360, "y": 360,
"wires": [ "wires": [
[ [
"256eb380f85a2dad", "91da9d294fd8ed0e",
"91da9d294fd8ed0e" "d662bd518d76ecfd"
] ]
] ]
}, },
@@ -14579,7 +14579,7 @@
"op2": "", "op2": "",
"op1type": "nul", "op1type": "nul",
"op2type": "pay", "op2type": "pay",
"duration": "90", "duration": "2",
"extend": true, "extend": true,
"overrideDelay": false, "overrideDelay": false,
"units": "min", "units": "min",
@@ -14654,7 +14654,7 @@
"op2": "", "op2": "",
"op1type": "nul", "op1type": "nul",
"op2type": "pay", "op2type": "pay",
"duration": "20", "duration": "2",
"extend": true, "extend": true,
"overrideDelay": false, "overrideDelay": false,
"units": "min", "units": "min",
@@ -14779,44 +14779,6 @@
"y": 640, "y": 640,
"wires": [] "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", "id": "9c0b8962102aee05",
"type": "e-mail", "type": "e-mail",
@@ -14839,7 +14801,7 @@
"type": "function", "type": "function",
"z": "10e5bfb8a438f4f7", "z": "10e5bfb8a438f4f7",
"name": "function 1", "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()}<br />letzte Meldung: ${flow.get(room)}`\nmsg.payload = text\nmsg.topic = `Fenstersensor ${room} antwortet nicht mehr`\nreturn msg;",
"outputs": 1, "outputs": 1,
"timeout": 0, "timeout": 0,
"noerr": 0, "noerr": 0,
@@ -14853,5 +14815,23 @@
"9c0b8962102aee05" "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": [
[]
]
} }
] ]