Update flow files

This commit is contained in:
2026-05-28 21:13:58 +02:00
parent 11677dd4f5
commit 75e15c7bd1
+190 -190
View File
@@ -78,6 +78,11 @@
"type": "tab",
"label": "Home Presence"
},
{
"id": "a320f821a7cb3f55",
"type": "tab",
"label": "Maintenance"
},
{
"id": "e52c44dc.71cb5",
"type": "subflow",
@@ -22200,21 +22205,11 @@
[]
]
},
{
"type": "tab",
"label": "Maintenance",
"id": "a320f821a7cb3f55"
},
{
"id": "ecee1bee9953f98a",
"type": "ha-get-entities",
"z": "a320f821a7cb3f55",
"name": "Low Bat Sensors",
"wires": [
[
"5f8552a4635072aa"
]
],
"server": "657c7463.48e1e4",
"version": 1,
"rules": [
@@ -22236,19 +22231,19 @@
"outputLocationType": "msg",
"outputLocation": "payload",
"outputResultsCount": 1,
"x": 540,
"y": 160
"x": 530,
"y": 100,
"wires": [
[
"5f8552a4635072aa"
]
]
},
{
"id": "1b30535ba22c4655",
"type": "inject",
"z": "a320f821a7cb3f55",
"name": "",
"wires": [
[
"293113adda48f9d0"
]
],
"props": [
{
"p": "payload"
@@ -22265,15 +22260,19 @@
"topic": "",
"payload": "",
"payloadType": "date",
"x": 120,
"y": 160
"x": 160,
"y": 260,
"wires": [
[
"293113adda48f9d0"
]
]
},
{
"id": "b9891a936c8fb9d0",
"type": "debug",
"z": "a320f821a7cb3f55",
"name": "debug 3",
"wires": [],
"active": true,
"tosidebar": true,
"console": false,
@@ -22281,19 +22280,15 @@
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 360,
"y": 520
"x": 460,
"y": 500,
"wires": []
},
{
"id": "556cc66d606c190e",
"type": "ha-get-entities",
"z": "a320f821a7cb3f55",
"name": "Battery Sensors - Low",
"wires": [
[
"5f8552a4635072aa"
]
],
"server": "657c7463.48e1e4",
"version": 1,
"rules": [
@@ -22321,19 +22316,19 @@
"outputLocationType": "msg",
"outputLocation": "payload",
"outputResultsCount": 1,
"x": 560,
"y": 240
"x": 540,
"y": 220,
"wires": [
[
"5f8552a4635072aa"
]
]
},
{
"id": "1e34ff50a693e724",
"type": "ha-get-entities",
"z": "a320f821a7cb3f55",
"name": "Battery Sensors",
"wires": [
[
"b9891a936c8fb9d0"
]
],
"server": "657c7463.48e1e4",
"version": 1,
"rules": [
@@ -22350,16 +22345,18 @@
"outputLocation": "payload",
"outputResultsCount": 1,
"x": 140,
"y": 520
"y": 500,
"wires": [
[
"b9891a936c8fb9d0"
]
]
},
{
"id": "89a7c77a676b858b",
"type": "ha-get-entities",
"z": "a320f821a7cb3f55",
"name": "Battery Sensors - Unavailable",
"wires": [
[]
],
"server": "657c7463.48e1e4",
"version": 1,
"rules": [
@@ -22387,76 +22384,76 @@
"outputLocationType": "msg",
"outputLocation": "payload",
"outputResultsCount": 1,
"x": 600,
"y": 340
"x": 570,
"y": 340,
"wires": [
[]
]
},
{
"id": "91f002d04003ce84",
"type": "comment",
"z": "a320f821a7cb3f55",
"name": "Filter for all *battery* entities",
"wires": [],
"info": "",
"x": 200,
"y": 460
"x": 180,
"y": 460,
"wires": []
},
{
"id": "ac0b28356c7eb45a",
"type": "comment",
"z": "a320f821a7cb3f55",
"name": "HomeMatic Devices",
"wires": [],
"info": "",
"x": 540,
"y": 100
"x": 530,
"y": 60,
"wires": []
},
{
"id": "a8192e1fcbdc41aa",
"type": "comment",
"z": "a320f821a7cb3f55",
"name": "Hue devices",
"wires": [],
"info": "",
"x": 560,
"y": 200
"x": 510,
"y": 180,
"wires": []
},
{
"id": "6beef06f4f0b788d",
"type": "comment",
"z": "a320f821a7cb3f55",
"name": "Any unavailable device",
"wires": [],
"info": "",
"x": 600,
"y": 300
"x": 540,
"y": 300,
"wires": []
},
{
"id": "5f8552a4635072aa",
"type": "split",
"z": "a320f821a7cb3f55",
"name": "",
"wires": [
[
"9dcd82782246d4e9"
]
],
"splt": "\\n",
"spltType": "str",
"arraySplt": 1,
"arraySpltType": "len",
"stream": false,
"addname": "",
"x": 840,
"y": 200
"x": 830,
"y": 160,
"wires": [
[
"9dcd82782246d4e9"
]
]
},
{
"id": "cc33a58286775199",
"type": "api-call-service",
"z": "a320f821a7cb3f55",
"name": "Notify via HA",
"wires": [
[]
],
"server": "657c7463.48e1e4",
"version": 7,
"debugenabled": false,
@@ -22478,39 +22475,35 @@
"output_location": "",
"output_location_type": "none",
"x": 1260,
"y": 200
"y": 200,
"wires": [
[]
]
},
{
"id": "9dcd82782246d4e9",
"type": "template",
"z": "a320f821a7cb3f55",
"name": "",
"wires": [
[
"cc33a58286775199"
]
],
"field": "payload",
"fieldType": "msg",
"format": "handlebars",
"syntax": "mustache",
"template": "Battery level low for {{payload.attributes.friendly_name}} ({{payload.state}}%)",
"output": "str",
"x": 1060,
"y": 200
"x": 1000,
"y": 160,
"wires": [
[
"cc33a58286775199"
]
]
},
{
"id": "293113adda48f9d0",
"type": "schedex",
"z": "a320f821a7cb3f55",
"name": "Saturday at 11:00",
"wires": [
[
"ecee1bee9953f98a",
"556cc66d606c190e",
"89a7c77a676b858b"
]
],
"passthroughunhandled": true,
"suspended": false,
"lat": "",
@@ -22532,41 +22525,42 @@
"fri": true,
"sat": true,
"sun": false,
"x": 320,
"y": 160
"x": 170,
"y": 180,
"wires": [
[
"ecee1bee9953f98a",
"556cc66d606c190e",
"89a7c77a676b858b"
]
]
},
{
"id": "edaf40fcc105703a",
"type": "comment",
"z": "a320f821a7cb3f55",
"name": "Battery state alerts for all devices",
"wires": [],
"info": "",
"x": 220,
"y": 40
"x": 210,
"y": 140,
"wires": []
},
{
"id": "e4eda627074a2cf3",
"type": "comment",
"z": "a320f821a7cb3f55",
"name": "Unavailable devices alert",
"wires": [],
"info": "Any devices that becomes unavailable in Home Assistant will be reported. This might indicate zigbee connecticity issues.",
"x": 180,
"y": 600
"x": 170,
"y": 560,
"wires": []
},
{
"id": "a2a4917908eed983",
"type": "trigger-state",
"z": "a320f821a7cb3f55",
"name": "",
"wires": [
[
"deb32f94b6f9aad7"
],
[]
],
"d": true,
"name": "",
"server": "657c7463.48e1e4",
"version": 5,
"inputs": 0,
@@ -22595,15 +22589,20 @@
"outputInitially": false,
"stateType": "str",
"enableInput": false,
"x": 120,
"y": 660
"x": 140,
"y": 600,
"wires": [
[
"deb32f94b6f9aad7"
],
[]
]
},
{
"id": "deb32f94b6f9aad7",
"type": "debug",
"z": "a320f821a7cb3f55",
"name": "State changed debug",
"wires": [],
"active": false,
"tosidebar": true,
"console": false,
@@ -22612,39 +22611,35 @@
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 360,
"y": 660
"x": 500,
"y": 600,
"wires": []
},
{
"id": "comment-heos-individual",
"type": "comment",
"z": "a320f821a7cb3f55",
"name": "HEOS individual speaker reset via TCP",
"wires": [],
"info": "",
"x": 220,
"y": 760
"x": 210,
"y": 720,
"wires": []
},
{
"id": "comment-heos-all",
"type": "comment",
"z": "a320f821a7cb3f55",
"name": "HEOS reset all speakers sequentially",
"wires": [],
"info": "",
"x": 220,
"y": 1140
"x": 210,
"y": 960,
"wires": []
},
{
"id": "heos-trigger-bedroom",
"type": "server-state-changed",
"z": "a320f821a7cb3f55",
"name": "Reset Speaker Bedroom",
"wires": [
[
"heos-change-target"
]
],
"server": "657c7463.48e1e4",
"version": 6,
"outputs": 1,
@@ -22674,7 +22669,7 @@
{
"property": "payload",
"propertyType": "msg",
"value": "",
"value": "string",
"valueType": "entityState"
},
{
@@ -22702,19 +22697,19 @@
"valueType": "str"
}
],
"x": 160,
"y": 820
"x": 170,
"y": 760,
"wires": [
[
"heos-change-target"
]
]
},
{
"id": "heos-trigger-kitchen",
"type": "server-state-changed",
"z": "a320f821a7cb3f55",
"name": "Reset Speaker Kitchen",
"wires": [
[
"heos-change-target"
]
],
"server": "657c7463.48e1e4",
"version": 6,
"outputs": 1,
@@ -22773,18 +22768,18 @@
}
],
"x": 160,
"y": 900
"y": 800,
"wires": [
[
"heos-change-target"
]
]
},
{
"id": "heos-trigger-bathroom",
"type": "server-state-changed",
"z": "a320f821a7cb3f55",
"name": "Reset Speaker Bathroom",
"wires": [
[
"heos-change-target"
]
],
"server": "657c7463.48e1e4",
"version": 6,
"outputs": 1,
@@ -22842,19 +22837,19 @@
"valueType": "str"
}
],
"x": 160,
"y": 980
"x": 170,
"y": 840,
"wires": [
[
"heos-change-target"
]
]
},
{
"id": "heos-trigger-hometheater",
"type": "server-state-changed",
"z": "a320f821a7cb3f55",
"name": "Reset Speaker Home Theater",
"wires": [
[
"heos-change-target"
]
],
"server": "657c7463.48e1e4",
"version": 6,
"outputs": 1,
@@ -22913,19 +22908,18 @@
}
],
"x": 180,
"y": 1060
"y": 880,
"wires": [
[
"heos-change-target"
]
]
},
{
"id": "heos-change-target",
"type": "change",
"z": "a320f821a7cb3f55",
"name": "Set speaker target",
"wires": [
[
"heos-tcp",
"heos-debug"
]
],
"rules": [
{
"t": "set",
@@ -22945,7 +22939,7 @@
"t": "set",
"p": "payload",
"pt": "msg",
"to": "heos://system/reboot\r\n",
"to": "heos://system/reboot",
"tot": "str"
},
{
@@ -22961,17 +22955,20 @@
"from": "",
"to": "",
"reg": false,
"x": 460,
"y": 940
"x": 470,
"y": 820,
"wires": [
[
"heos-tcp",
"heos-debug"
]
]
},
{
"id": "heos-tcp",
"type": "tcp request",
"z": "a320f821a7cb3f55",
"name": "Telnet HEOS",
"wires": [
[]
],
"server": "",
"port": "",
"out": "immed",
@@ -22980,15 +22977,17 @@
"newline": "",
"trim": false,
"tls": "",
"x": 700,
"y": 900
"x": 730,
"y": 780,
"wires": [
[]
]
},
{
"id": "heos-debug",
"type": "debug",
"z": "a320f821a7cb3f55",
"name": "HEOS command (debug)",
"wires": [],
"active": true,
"tosidebar": true,
"console": false,
@@ -22997,19 +22996,15 @@
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 700,
"y": 980
"x": 770,
"y": 840,
"wires": []
},
{
"id": "heos-trigger-all",
"type": "server-state-changed",
"z": "a320f821a7cb3f55",
"name": "Reset All Speakers",
"wires": [
[
"heos-emit-all"
]
],
"server": "657c7463.48e1e4",
"version": 6,
"outputs": 1,
@@ -23055,38 +23050,38 @@
"valueType": "triggerId"
}
],
"x": 160,
"y": 1200
"x": 150,
"y": 1000,
"wires": [
[
"heos-emit-all"
]
]
},
{
"id": "heos-emit-all",
"type": "function",
"z": "a320f821a7cb3f55",
"name": "Emit 4 button presses",
"wires": [
[
"heos-delay-all"
]
],
"func": "const buttons = [\n \"input_button.reset_speaker_bedroom\",\n \"input_button.reset_speaker_kitchen\",\n \"input_button.reset_speaker_bathroom\",\n \"input_button.reset_speaker_home_theater\"\n];\nreturn [buttons.map(b => ({ ...msg, payload: b }))];",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 420,
"y": 1200
"x": 410,
"y": 1000,
"wires": [
[
"heos-delay-all"
]
]
},
{
"id": "heos-delay-all",
"type": "delay",
"z": "a320f821a7cb3f55",
"name": "5s between resets",
"wires": [
[
"heos-service-press"
]
],
"pauseType": "rate",
"timeout": "5",
"timeoutUnits": "seconds",
@@ -23099,17 +23094,19 @@
"drop": false,
"allowrate": false,
"outputs": 1,
"x": 660,
"y": 1200
"x": 650,
"y": 1000,
"wires": [
[
"heos-service-press"
]
]
},
{
"id": "heos-service-press",
"type": "api-call-service",
"z": "a320f821a7cb3f55",
"name": "Press speaker reset button",
"wires": [
[]
],
"server": "657c7463.48e1e4",
"version": 7,
"debugenabled": false,
@@ -23128,34 +23125,32 @@
"blockInputOverrides": false,
"domain": "input_button",
"service": "press",
"x": 920,
"y": 1200
"x": 910,
"y": 1000,
"wires": [
[]
]
},
{
"id": "p2catch_mnt",
"type": "catch",
"z": "a320f821a7cb3f55",
"name": "Catch all errors",
"scope": null,
"uncaught": false,
"x": 140,
"y": 1080,
"wires": [
[
"p2fmt_mnt"
]
],
"scope": null,
"uncaught": false,
"x": 140,
"y": 1360
]
},
{
"id": "p2fmt_mnt",
"type": "function",
"z": "a320f821a7cb3f55",
"name": "Format error",
"wires": [
[
"p2ntfy_mnt"
]
],
"func": "const err = (msg.error && msg.error.message) ? msg.error.message : String(msg.payload || 'Unknown error');\nconst src = (msg.error && msg.error.source) ? (msg.error.source.name || msg.error.source.id || '') : '';\nmsg.payload = JSON.stringify({\n title: 'Node-RED Error: Maintenance',\n message: err + (src ? '\\n\\nNode: ' + src : '')\n});\nreturn msg;",
"outputs": 1,
"timeout": "",
@@ -23163,17 +23158,19 @@
"initialize": "",
"finalize": "",
"libs": [],
"x": 340,
"y": 1360
"x": 370,
"y": 1080,
"wires": [
[
"p2ntfy_mnt"
]
]
},
{
"id": "p2ntfy_mnt",
"type": "api-call-service",
"z": "a320f821a7cb3f55",
"name": "Notify error",
"wires": [
[]
],
"server": "657c7463.48e1e4",
"version": 7,
"debugenabled": false,
@@ -23194,7 +23191,10 @@
"service": "gotify_ha",
"output_location": "",
"output_location_type": "none",
"x": 520,
"y": 1360
"x": 650,
"y": 1080,
"wires": [
[]
]
}
]