Überwachung Fenstersensore mit E-Mail

This commit is contained in:
rxf
2026-03-29 12:38:48 +02:00
parent 863bbff958
commit ab8d38e23b
2 changed files with 542 additions and 71 deletions

View File

@@ -183,6 +183,14 @@
"info": "",
"env": []
},
{
"id": "10e5bfb8a438f4f7",
"type": "tab",
"label": "Fenstersensoren_Check",
"disabled": false,
"info": "",
"env": []
},
{
"id": "168cd2080e21b71d",
"type": "junction",
@@ -598,6 +606,32 @@
]
]
},
{
"id": "b0bf1f580a7b0acc",
"type": "junction",
"z": "10e5bfb8a438f4f7",
"x": 1120,
"y": 340,
"wires": [
[
"e74f4ede39226899",
"3c21d59c92bafc51"
]
]
},
{
"id": "f90529121ea29c02",
"type": "junction",
"z": "10e5bfb8a438f4f7",
"x": 560,
"y": 360,
"wires": [
[
"256eb380f85a2dad",
"91da9d294fd8ed0e"
]
]
},
{
"id": "c46833d59903b816",
"type": "mqtt-broker",
@@ -738,17 +772,6 @@
}
}
},
{
"id": "51bf0475.ddfd2c",
"type": "ui_group",
"name": "",
"tab": "512b6562849dadee",
"order": 2,
"disp": true,
"width": "8",
"collapse": false,
"className": ""
},
{
"id": "c398618f77baaf6f",
"type": "ewelink-credentials"
@@ -992,46 +1015,6 @@
"width": 1,
"height": 1
},
{
"id": "f77e63041443e335",
"type": "ui_spacer",
"z": "c23febdb48bc9327",
"name": "spacer",
"group": "51bf0475.ddfd2c",
"order": 1,
"width": 1,
"height": 1
},
{
"id": "00567b32fc89bd1e",
"type": "ui_spacer",
"z": "c23febdb48bc9327",
"name": "spacer",
"group": "51bf0475.ddfd2c",
"order": 3,
"width": 1,
"height": 1
},
{
"id": "8c01f9a37aebd235",
"type": "ui_spacer",
"z": "c23febdb48bc9327",
"name": "spacer",
"group": "51bf0475.ddfd2c",
"order": 4,
"width": 1,
"height": 1
},
{
"id": "09ded2e5c01ce729",
"type": "ui_spacer",
"z": "c23febdb48bc9327",
"name": "spacer",
"group": "51bf0475.ddfd2c",
"order": 6,
"width": 1,
"height": 1
},
{
"id": "dbdce4bcc146f440",
"type": "config-log",
@@ -1137,20 +1120,6 @@
"disabled": "false",
"groupType": "default"
},
{
"id": "3c175ef314bf5b6c",
"type": "ui-group",
"name": "Date_time_2",
"page": "392ae2df779ad8ce",
"width": "12",
"height": "1",
"order": 1,
"showTitle": false,
"className": "",
"visible": "true",
"disabled": "false",
"groupType": "default"
},
{
"id": "392ae2df779ad8ce",
"type": "ui-page",
@@ -1243,6 +1212,71 @@
"disabled": "false",
"groupType": "default"
},
{
"id": "51bf0475.ddfd2c",
"type": "ui_group",
"name": "",
"tab": "512b6562849dadee",
"order": 2,
"disp": true,
"width": "8",
"collapse": false,
"className": ""
},
{
"id": "f77e63041443e335",
"type": "ui_spacer",
"z": "c23febdb48bc9327",
"name": "spacer",
"group": "51bf0475.ddfd2c",
"order": 1,
"width": 1,
"height": 1
},
{
"id": "00567b32fc89bd1e",
"type": "ui_spacer",
"z": "c23febdb48bc9327",
"name": "spacer",
"group": "51bf0475.ddfd2c",
"order": 3,
"width": 1,
"height": 1
},
{
"id": "8c01f9a37aebd235",
"type": "ui_spacer",
"z": "c23febdb48bc9327",
"name": "spacer",
"group": "51bf0475.ddfd2c",
"order": 4,
"width": 1,
"height": 1
},
{
"id": "09ded2e5c01ce729",
"type": "ui_spacer",
"z": "c23febdb48bc9327",
"name": "spacer",
"group": "51bf0475.ddfd2c",
"order": 6,
"width": 1,
"height": 1
},
{
"id": "3c175ef314bf5b6c",
"type": "ui-group",
"name": "Date_time_2",
"page": "392ae2df779ad8ce",
"width": "12",
"height": "1",
"order": 1,
"showTitle": false,
"className": "",
"visible": "true",
"disabled": "false",
"groupType": "default"
},
{
"id": "4d2812cbd43e95b7",
"type": "mqtt in",
@@ -1988,7 +2022,7 @@
"type": "debug",
"z": "86a9e7aa0c304b46",
"name": "debug 28",
"active": true,
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
@@ -2071,7 +2105,7 @@
"type": "debug",
"z": "86a9e7aa0c304b46",
"name": "debug 29",
"active": true,
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
@@ -3495,7 +3529,7 @@
"type": "debug",
"z": "86a9e7aa0c304b46",
"name": "debug 96",
"active": true,
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
@@ -3511,7 +3545,7 @@
"type": "debug",
"z": "86a9e7aa0c304b46",
"name": "debug 97",
"active": true,
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
@@ -3548,7 +3582,7 @@
"type": "debug",
"z": "86a9e7aa0c304b46",
"name": "debug 98",
"active": true,
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
@@ -14382,5 +14416,442 @@
"x": 1130,
"y": 240,
"wires": []
},
{
"id": "968f5cdf742d7d7a",
"type": "mqtt in",
"z": "10e5bfb8a438f4f7",
"name": "",
"topic": "hm/status/Fenster_WZ_rechts:1/STATE",
"qos": "0",
"datatype": "auto-detect",
"broker": "c46833d59903b816",
"nl": false,
"rap": true,
"rh": 0,
"inputs": 0,
"x": 270,
"y": 160,
"wires": [
[
"e5bba35af88f50fb",
"f90529121ea29c02"
]
]
},
{
"id": "87ab45f8bcd077c8",
"type": "mqtt in",
"z": "10e5bfb8a438f4f7",
"name": "",
"topic": "hm/status/Fenster_EZ:1/STATE",
"qos": "0",
"datatype": "auto-detect",
"broker": "c46833d59903b816",
"nl": false,
"rap": true,
"rh": 0,
"inputs": 0,
"x": 250,
"y": 280,
"wires": [
[
"f4cd0f5206b8cff6"
]
]
},
{
"id": "3364c8feab4c85f8",
"type": "mqtt in",
"z": "10e5bfb8a438f4f7",
"name": "",
"topic": "hm/status/Fenster_WZ_links:1/STATE",
"qos": "0",
"datatype": "auto-detect",
"broker": "c46833d59903b816",
"nl": false,
"rap": true,
"rh": 0,
"inputs": 0,
"x": 270,
"y": 220,
"wires": [
[
"783a10acc2f5d46c",
"f90529121ea29c02"
]
]
},
{
"id": "28129a46c14f09ca",
"type": "mqtt in",
"z": "10e5bfb8a438f4f7",
"name": "",
"topic": "hm/status/Fenster_FL_rechts:1/STATE",
"qos": "0",
"datatype": "auto-detect",
"broker": "c46833d59903b816",
"nl": false,
"rap": true,
"rh": 0,
"inputs": 0,
"x": 270,
"y": 340,
"wires": [
[
"28a2114217ba2c89",
"f90529121ea29c02"
]
]
},
{
"id": "90fc3a56b4466536",
"type": "mqtt in",
"z": "10e5bfb8a438f4f7",
"name": "",
"topic": "hm/status/Fenster_SZ_links:1/STATE",
"qos": "0",
"datatype": "auto-detect",
"broker": "c46833d59903b816",
"nl": false,
"rap": true,
"rh": 0,
"inputs": 0,
"x": 270,
"y": 400,
"wires": [
[
"040d8c7ec2d422e0",
"f90529121ea29c02"
]
]
},
{
"id": "508f38c3e17248e3",
"type": "mqtt in",
"z": "10e5bfb8a438f4f7",
"name": "",
"topic": "hm/status/Fenster_BA:1/STATE",
"qos": "0",
"datatype": "auto-detect",
"broker": "c46833d59903b816",
"nl": false,
"rap": true,
"rh": 0,
"inputs": 0,
"x": 250,
"y": 460,
"wires": [
[
"77fe7ed537acf39f",
"f90529121ea29c02"
]
]
},
{
"id": "200c7a3643bdd9e4",
"type": "mqtt in",
"z": "10e5bfb8a438f4f7",
"name": "",
"topic": "hm/status/Tuere_WZ_Terasse:1/STATE",
"qos": "0",
"datatype": "auto-detect",
"broker": "c46833d59903b816",
"nl": false,
"rap": true,
"rh": 0,
"inputs": 0,
"x": 270,
"y": 520,
"wires": [
[
"d97446606984673e",
"f90529121ea29c02"
]
]
},
{
"id": "e5bba35af88f50fb",
"type": "trigger",
"z": "10e5bfb8a438f4f7",
"name": "",
"op1": "",
"op2": "",
"op1type": "nul",
"op2type": "pay",
"duration": "90",
"extend": true,
"overrideDelay": false,
"units": "min",
"reset": "",
"bytopic": "all",
"topic": "topic",
"outputs": 1,
"x": 790,
"y": 160,
"wires": [
[
"b0bf1f580a7b0acc"
]
]
},
{
"id": "783a10acc2f5d46c",
"type": "trigger",
"z": "10e5bfb8a438f4f7",
"name": "",
"op1": "",
"op2": "",
"op1type": "nul",
"op2type": "pay",
"duration": "90",
"extend": true,
"overrideDelay": false,
"units": "min",
"reset": "",
"bytopic": "all",
"topic": "topic",
"outputs": 1,
"x": 790,
"y": 220,
"wires": [
[
"b0bf1f580a7b0acc"
]
]
},
{
"id": "f4cd0f5206b8cff6",
"type": "trigger",
"z": "10e5bfb8a438f4f7",
"name": "",
"op1": "",
"op2": "",
"op1type": "nul",
"op2type": "pay",
"duration": "90",
"extend": true,
"overrideDelay": false,
"units": "min",
"reset": "",
"bytopic": "all",
"topic": "topic",
"outputs": 1,
"x": 790,
"y": 280,
"wires": [
[
"b0bf1f580a7b0acc"
]
]
},
{
"id": "28a2114217ba2c89",
"type": "trigger",
"z": "10e5bfb8a438f4f7",
"name": "",
"op1": "",
"op2": "",
"op1type": "nul",
"op2type": "pay",
"duration": "20",
"extend": true,
"overrideDelay": false,
"units": "min",
"reset": "",
"bytopic": "all",
"topic": "topic",
"outputs": 1,
"x": 790,
"y": 340,
"wires": [
[
"b0bf1f580a7b0acc"
]
]
},
{
"id": "040d8c7ec2d422e0",
"type": "trigger",
"z": "10e5bfb8a438f4f7",
"name": "",
"op1": "",
"op2": "",
"op1type": "nul",
"op2type": "pay",
"duration": "90",
"extend": true,
"overrideDelay": false,
"units": "min",
"reset": "",
"bytopic": "all",
"topic": "topic",
"outputs": 1,
"x": 790,
"y": 400,
"wires": [
[
"b0bf1f580a7b0acc"
]
]
},
{
"id": "77fe7ed537acf39f",
"type": "trigger",
"z": "10e5bfb8a438f4f7",
"name": "",
"op1": "",
"op2": "",
"op1type": "nul",
"op2type": "pay",
"duration": "90",
"extend": true,
"overrideDelay": false,
"units": "min",
"reset": "",
"bytopic": "all",
"topic": "topic",
"outputs": 1,
"x": 790,
"y": 460,
"wires": [
[
"b0bf1f580a7b0acc"
]
]
},
{
"id": "d97446606984673e",
"type": "trigger",
"z": "10e5bfb8a438f4f7",
"name": "",
"op1": "",
"op2": "",
"op1type": "nul",
"op2type": "pay",
"duration": "90",
"extend": true,
"overrideDelay": false,
"units": "min",
"reset": "",
"bytopic": "all",
"topic": "topic",
"outputs": 1,
"x": 790,
"y": 520,
"wires": [
[
"b0bf1f580a7b0acc"
]
]
},
{
"id": "e74f4ede39226899",
"type": "debug",
"z": "10e5bfb8a438f4f7",
"name": "debug 199",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 1270,
"y": 180,
"wires": []
},
{
"id": "91da9d294fd8ed0e",
"type": "debug",
"z": "10e5bfb8a438f4f7",
"name": "debug 200",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 790,
"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",
"z": "10e5bfb8a438f4f7",
"server": "smtp.gmail.com",
"port": "465",
"authtype": "BASIC",
"saslformat": true,
"token": "oauth2Response.access_token",
"secure": true,
"tls": true,
"name": "rxf@gmx.de",
"dname": "SendMail",
"x": 1240,
"y": 440,
"wires": []
},
{
"id": "3c21d59c92bafc51",
"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;",
"outputs": 1,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 1240,
"y": 340,
"wires": [
[
"9c0b8962102aee05"
]
]
}
]

View File

@@ -1,3 +1,3 @@
{
"$": "2e9019a5f31046180335082bce4b2557uydRIFoaOzGc24wPAXu6ua6pR05iKxTjc3GCMZBXs0PWPUMAMstJu5d1J8N/EnxOBgtmecwyk6ZEku+gO+7shJtfqSKatVK1JeAc57U/rgq2izOK7TOkVsXQH5Ek257qwPKfb3OQpA/wAR2CeUtralR6be+nl7PWd9KaSUFmv/+mbxTuO8480bRsRz9cT6xrUrA0ykuAD3HGshRbzHdiVX1Hhcd8n8rS5wzc7TlHC9nY4J8pY8JEQQUQONHjLZisyWrifS4rJGkKdLaIH6L5It4EyWID7rpKqHggv8FtweUDdLKBSh6MLI9Y0HotsuVN8jo1VZYPgaf2vOHhNn28yQaWm9eLEz1oD1STT43aI3UZ7HiCD2UVx4+1DQ=="
"$": "eb873837a940de24542e84b40cd2616anMhrvj8QTeHoVaALfln2RpXxOk5VrGHdk/bbX5M7zOOho0j7KXQpI0+WTyrCN6NhT9TyidZIpGXXP0+uUStdBosrgo8MeCN5bOMvc4DAGuZ5ovlzTC3sBfRHIdyfHA+0Ty38xl9Urvpyq3jAXunwceGLC5RezldAD46bC3kyzkNo1aPcDmKYyMBylCE44mPZ3gm6Oa0HRKgrieMFG6AHfDLeWUhpl0l4q1RzNLMiO2SCaE7QRE+g/AQg6moN0bohIkzXEE3yTtsgwa7aiMN/yHD9R0vnG7Qq4QuFqCCE52WE+yJPGplev1KJB4462m4FEljenJ13MeyCnHHYugL8UnaUGwV7DqaTci8KrszmtsDSs2P5rI7Or/Bcc3loGzTNXGHBqCaCr+FC9EvEW6rJj52URTcKJu8KR/ujtvgWJbtUBUpOl23I3Hu1ct6KOuv9MYUTAjNvPEEZRwom7PNmRiz6wbfgaKusscsD/yY="
}