So ich hab dir mal einen Flow gebastelt - was du mit den Rollläden machen willst weiss ich noch nicht, der Dir alle gekippten oder offenen Fenster ausschmeisst.
4a3f086a-0683-4d3b-8593-7b031c73c4c0-image.png
Spoiler
[
{
"id": "812ed04f69c00b48",
"type": "comment",
"z": "7e6af0015415146d",
"name": "Sensor Oben (links)",
"info": "",
"x": 2190,
"y": 3340,
"wires": []
},
{
"id": "589c4f9f3aef4e5b",
"type": "comment",
"z": "7e6af0015415146d",
"name": "Sensor Unten (links)",
"info": "",
"x": 2190,
"y": 3480,
"wires": []
},
{
"id": "6878f876350c292c",
"type": "comment",
"z": "7e6af0015415146d",
"name": "Sensor Oben (rechts)",
"info": "",
"x": 2180,
"y": 3600,
"wires": []
},
{
"id": "bbb2fea4e9fcb01e",
"type": "comment",
"z": "7e6af0015415146d",
"name": "Sensor Unten (rechts)",
"info": "",
"x": 2180,
"y": 3740,
"wires": []
},
{
"id": "e86911a52463f3f2",
"type": "ioBroker in",
"z": "7e6af0015415146d",
"d": true,
"name": "",
"topic": "zigbee.0.00158d0001fd5296.opened",
"payloadType": "value",
"onlyack": "update",
"func": "rbe",
"gap": "",
"fireOnStart": "true",
"outFormat": "ioBroker",
"x": 2120,
"y": 3260,
"wires": [
[]
]
},
{
"id": "3c0167f3c360a51b",
"type": "ioBroker in",
"z": "7e6af0015415146d",
"d": true,
"name": "",
"topic": "zigbee.0.00158d0001de8e2d.opened",
"payloadType": "value",
"onlyack": "update",
"func": "rbe",
"gap": "",
"fireOnStart": "true",
"outFormat": "ioBroker",
"x": 2130,
"y": 3400,
"wires": [
[]
]
},
{
"id": "afcd568569421914",
"type": "ioBroker in",
"z": "7e6af0015415146d",
"d": true,
"name": "",
"topic": "zigbee.0.00158d00022bd6b1.opened",
"payloadType": "value",
"onlyack": "update",
"func": "rbe",
"gap": "",
"fireOnStart": "true",
"outFormat": "ioBroker",
"x": 2130,
"y": 3520,
"wires": [
[]
]
},
{
"id": "6cee51daabfd7617",
"type": "ioBroker in",
"z": "7e6af0015415146d",
"d": true,
"name": "",
"topic": "zigbee.0.00158d00022bd653.opened",
"payloadType": "value",
"onlyack": "update",
"func": "rbe",
"gap": "",
"fireOnStart": "true",
"outFormat": "ioBroker",
"x": 2140,
"y": 3660,
"wires": [
[]
]
},
{
"id": "3228c09e88db173d",
"type": "ioBroker in",
"z": "7e6af0015415146d",
"d": true,
"name": "",
"topic": "zwave2.0.Node_004.Multilevel_Switch.currentValue",
"payloadType": "value",
"onlyack": "",
"func": "rbe",
"gap": "",
"fireOnStart": "true",
"outFormat": "ioBroker",
"x": 2090,
"y": 3820,
"wires": [
[
"e243b1dffd4fdf21"
]
]
},
{
"id": "e243b1dffd4fdf21",
"type": "change",
"z": "7e6af0015415146d",
"name": "",
"rules": [
{
"t": "set",
"p": "topic",
"pt": "msg",
"to": "currentValue",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 2420,
"y": 3860,
"wires": [
[
"b5c59b5789c87a88",
"a33ee981fb7d70b9"
]
]
},
{
"id": "235355255db1e681",
"type": "inject",
"z": "7e6af0015415146d",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "Oben (links)",
"payload": "true",
"payloadType": "bool",
"x": 2200,
"y": 3300,
"wires": [
[
"d95337dbf023fddd"
]
]
},
{
"id": "7fa747e333cd28ab",
"type": "inject",
"z": "7e6af0015415146d",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "Unten (links)",
"payload": "false",
"payloadType": "bool",
"x": 2210,
"y": 3440,
"wires": [
[
"c7e9225660fb24d9"
]
]
},
{
"id": "22a4d618a51e1933",
"type": "inject",
"z": "7e6af0015415146d",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "Oben (rechts)",
"payload": "true",
"payloadType": "bool",
"x": 2190,
"y": 3560,
"wires": [
[
"96725fc47558807c"
]
]
},
{
"id": "04298c2e449b8995",
"type": "inject",
"z": "7e6af0015415146d",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "Unten (rechts)",
"payload": "true",
"payloadType": "bool",
"x": 2190,
"y": 3700,
"wires": [
[
"cb9727a6b7952e51"
]
]
},
{
"id": "4c432269faf13246",
"type": "inject",
"z": "7e6af0015415146d",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "rolladen_level",
"payload": "99",
"payloadType": "num",
"x": 2200,
"y": 3860,
"wires": [
[
"e243b1dffd4fdf21"
]
]
},
{
"id": "c7e9225660fb24d9",
"type": "change",
"z": "7e6af0015415146d",
"name": "",
"rules": [
{
"t": "set",
"p": "topic",
"pt": "msg",
"to": "unten",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 2420,
"y": 3440,
"wires": [
[
"a33ee981fb7d70b9"
]
]
},
{
"id": "d95337dbf023fddd",
"type": "change",
"z": "7e6af0015415146d",
"name": "",
"rules": [
{
"t": "set",
"p": "topic",
"pt": "msg",
"to": "oben",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 2410,
"y": 3300,
"wires": [
[
"a33ee981fb7d70b9"
]
]
},
{
"id": "a33ee981fb7d70b9",
"type": "join",
"z": "7e6af0015415146d",
"name": "",
"mode": "custom",
"build": "object",
"property": "payload",
"propertyType": "msg",
"key": "topic",
"joiner": "\\n",
"joinerType": "str",
"accumulate": true,
"timeout": "",
"count": "2",
"reduceRight": false,
"reduceExp": "",
"reduceInit": "",
"reduceInitType": "",
"reduceFixup": "",
"x": 2610,
"y": 3360,
"wires": [
[
"4dccfb9fc35d9e35"
]
]
},
{
"id": "cb9727a6b7952e51",
"type": "change",
"z": "7e6af0015415146d",
"name": "",
"rules": [
{
"t": "set",
"p": "topic",
"pt": "msg",
"to": "unten",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 2440,
"y": 3700,
"wires": [
[
"b5c59b5789c87a88"
]
]
},
{
"id": "96725fc47558807c",
"type": "change",
"z": "7e6af0015415146d",
"name": "",
"rules": [
{
"t": "set",
"p": "topic",
"pt": "msg",
"to": "oben",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 2430,
"y": 3560,
"wires": [
[
"b5c59b5789c87a88"
]
]
},
{
"id": "b5c59b5789c87a88",
"type": "join",
"z": "7e6af0015415146d",
"name": "",
"mode": "custom",
"build": "object",
"property": "payload",
"propertyType": "msg",
"key": "topic",
"joiner": "\\n",
"joinerType": "str",
"accumulate": true,
"timeout": "",
"count": "2",
"reduceRight": false,
"reduceExp": "",
"reduceInit": "",
"reduceInitType": "",
"reduceFixup": "",
"x": 2630,
"y": 3620,
"wires": [
[
"d89ad04521bff933"
]
]
},
{
"id": "4dccfb9fc35d9e35",
"type": "change",
"z": "7e6af0015415146d",
"name": "",
"rules": [
{
"t": "set",
"p": "topic",
"pt": "msg",
"to": "Fenster1",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 2800,
"y": 3360,
"wires": [
[
"383f43197a118cdc",
"d3743b846ce90f67"
]
]
},
{
"id": "d89ad04521bff933",
"type": "change",
"z": "7e6af0015415146d",
"name": "",
"rules": [
{
"t": "set",
"p": "topic",
"pt": "msg",
"to": "Fenster2",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 2800,
"y": 3620,
"wires": [
[
"383f43197a118cdc"
]
]
},
{
"id": "dd0d28a9a37903b7",
"type": "debug",
"z": "7e6af0015415146d",
"name": "AllInOne",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 3320,
"y": 3540,
"wires": []
},
{
"id": "d3743b846ce90f67",
"type": "debug",
"z": "7e6af0015415146d",
"name": "msg",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": true,
"complete": "payload",
"targetType": "msg",
"statusVal": "payload",
"statusType": "auto",
"x": 3030,
"y": 3300,
"wires": []
},
{
"id": "6ab6c4f9ba3e354b",
"type": "join",
"z": "7e6af0015415146d",
"name": "",
"mode": "custom",
"build": "object",
"property": "payload",
"propertyType": "msg",
"key": "topic",
"joiner": "\\n",
"joinerType": "str",
"accumulate": true,
"timeout": "",
"count": "1",
"reduceRight": false,
"reduceExp": "",
"reduceInit": "",
"reduceInitType": "",
"reduceFixup": "",
"x": 3110,
"y": 3620,
"wires": [
[
"dd0d28a9a37903b7",
"50162239ecd6eab5"
]
]
},
{
"id": "50162239ecd6eab5",
"type": "change",
"z": "7e6af0015415146d",
"name": "Flat Array",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "$each(payload, function($v, $k) {{\"name\":$k,\"unten\":$v.unten,\"oben\":$v.oben,\"currentValue\":$v.currentValue}} )",
"tot": "jsonata"
},
{
"t": "delete",
"p": "topic",
"pt": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 3280,
"y": 3620,
"wires": [
[
"6367bb8956302678",
"d58bdd810c41b8ab"
]
]
},
{
"id": "6367bb8956302678",
"type": "debug",
"z": "7e6af0015415146d",
"name": "Array",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 3430,
"y": 3680,
"wires": []
},
{
"id": "d58bdd810c41b8ab",
"type": "change",
"z": "7e6af0015415146d",
"name": "Analyze",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "$.payload~>|$|{\"gekippt\" : oben and $not(unten), \"offen\" : oben or unten},[\"oben\",\"unten\"]|",
"tot": "jsonata"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 3440,
"y": 3620,
"wires": [
[
"7b4943647e3a242f",
"c2a206e96f77d7ca",
"d293b242aa3d3d75"
]
]
},
{
"id": "7b4943647e3a242f",
"type": "debug",
"z": "7e6af0015415146d",
"name": "Status",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 3570,
"y": 3540,
"wires": []
},
{
"id": "c2a206e96f77d7ca",
"type": "change",
"z": "7e6af0015415146d",
"name": "gekippt ?",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "payload[gekippt].name",
"tot": "jsonata"
},
{
"t": "set",
"p": "topic",
"pt": "msg",
"to": "gekippt",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 3660,
"y": 3580,
"wires": [
[
"9e65d9dd8276a7af"
]
]
},
{
"id": "d293b242aa3d3d75",
"type": "change",
"z": "7e6af0015415146d",
"name": "offen ?",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "payload[offen].name",
"tot": "jsonata"
},
{
"t": "set",
"p": "topic",
"pt": "msg",
"to": "offen",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 3650,
"y": 3620,
"wires": [
[
"9e65d9dd8276a7af"
]
]
},
{
"id": "6b6e9a603a4269af",
"type": "inject",
"z": "7e6af0015415146d",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "Oben (rechts)",
"payload": "false",
"payloadType": "bool",
"x": 2190,
"y": 3980,
"wires": [
[
"fbc77afb88bf03c0"
]
]
},
{
"id": "efe5b3d1b4fe6b35",
"type": "inject",
"z": "7e6af0015415146d",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "Unten (rechts)",
"payload": "false",
"payloadType": "bool",
"x": 2190,
"y": 4120,
"wires": [
[
"21a25a373ce4e2e8"
]
]
},
{
"id": "fbc77afb88bf03c0",
"type": "change",
"z": "7e6af0015415146d",
"name": "",
"rules": [
{
"t": "set",
"p": "topic",
"pt": "msg",
"to": "oben",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 2390,
"y": 3980,
"wires": [
[
"17a150bf9f890d79"
]
]
},
{
"id": "21a25a373ce4e2e8",
"type": "change",
"z": "7e6af0015415146d",
"name": "",
"rules": [
{
"t": "set",
"p": "topic",
"pt": "msg",
"to": "unten",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 2400,
"y": 4120,
"wires": [
[
"17a150bf9f890d79"
]
]
},
{
"id": "17a150bf9f890d79",
"type": "join",
"z": "7e6af0015415146d",
"name": "",
"mode": "custom",
"build": "object",
"property": "payload",
"propertyType": "msg",
"key": "topic",
"joiner": "\\n",
"joinerType": "str",
"accumulate": true,
"timeout": "",
"count": "2",
"reduceRight": false,
"reduceExp": "",
"reduceInit": "",
"reduceInitType": "",
"reduceFixup": "",
"x": 2590,
"y": 4040,
"wires": [
[
"0a49f77d7d7c4254"
]
]
},
{
"id": "0a49f77d7d7c4254",
"type": "change",
"z": "7e6af0015415146d",
"name": "",
"rules": [
{
"t": "set",
"p": "topic",
"pt": "msg",
"to": "Fenster3",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 2760,
"y": 4040,
"wires": [
[
"383f43197a118cdc"
]
]
},
{
"id": "69e27948be4a3958",
"type": "debug",
"z": "7e6af0015415146d",
"name": "Ergebnis",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 3960,
"y": 3600,
"wires": []
},
{
"id": "9e65d9dd8276a7af",
"type": "switch",
"z": "7e6af0015415146d",
"name": "",
"property": "payload",
"propertyType": "msg",
"rules": [
{
"t": "nnull"
}
],
"checkall": "true",
"repair": false,
"outputs": 1,
"x": 3810,
"y": 3600,
"wires": [
[
"69e27948be4a3958"
]
]
},
{
"id": "383f43197a118cdc",
"type": "junction",
"z": "7e6af0015415146d",
"x": 3000,
"y": 3620,
"wires": [
[
"6ab6c4f9ba3e354b"
]
]
}
]
Die Change Nodes kannst natürlich zusammenfassen - dient mehr der Illustration.
Alternativ kannst natürlich auch alles im Flow Kontext sammeln und auswerten.