@frank-harmsen
Ob die Logik wirklich durchdacht ist, weiß ich nicht - aber es macht das was Du oben beschrieben hast.
4fa44048-fbc2-4289-9f07-fa89973a8bd6-image.png
Spoiler
[
{
"id": "abfb39e8.5bf0e8",
"type": "inject",
"z": "169f5b00.a13415",
"name": "BWM1 = true",
"props": [
{
"p": "payload"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "true",
"payloadType": "bool",
"x": 650,
"y": 1280,
"wires": [
[
"26863212.2a10de",
"415ed3df.e71bfc"
]
]
},
{
"id": "26863212.2a10de",
"type": "change",
"z": "169f5b00.a13415",
"name": "",
"rules": [
{
"t": "set",
"p": "bwm1",
"pt": "flow",
"to": "payload",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 860,
"y": 1300,
"wires": [
[]
]
},
{
"id": "91480312.9782d",
"type": "inject",
"z": "169f5b00.a13415",
"name": "BWM1 = false",
"props": [
{
"p": "payload"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "false",
"payloadType": "bool",
"x": 650,
"y": 1320,
"wires": [
[
"26863212.2a10de"
]
]
},
{
"id": "d0f7b0a7.4ca66",
"type": "inject",
"z": "169f5b00.a13415",
"name": "BWM2 = true",
"props": [
{
"p": "payload"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "true",
"payloadType": "bool",
"x": 650,
"y": 1440,
"wires": [
[
"846fad4e.5e4b3",
"30e465a4.93956a"
]
]
},
{
"id": "1d50e327.49c71d",
"type": "inject",
"z": "169f5b00.a13415",
"name": "BWM2 = false",
"props": [
{
"p": "payload"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "false",
"payloadType": "bool",
"x": 650,
"y": 1480,
"wires": [
[
"846fad4e.5e4b3"
]
]
},
{
"id": "846fad4e.5e4b3",
"type": "change",
"z": "169f5b00.a13415",
"name": "",
"rules": [
{
"t": "set",
"p": "bwm2",
"pt": "flow",
"to": "payload",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 860,
"y": 1460,
"wires": [
[]
]
},
{
"id": "30e465a4.93956a",
"type": "switch",
"z": "169f5b00.a13415",
"name": "bwm1 = true?",
"property": "bwm1",
"propertyType": "flow",
"rules": [
{
"t": "true"
}
],
"checkall": "true",
"repair": false,
"outputs": 1,
"x": 860,
"y": 1400,
"wires": [
[
"34c75b61.666904"
]
]
},
{
"id": "34c75b61.666904",
"type": "debug",
"z": "169f5b00.a13415",
"name": "schalte Lampe 1",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 1100,
"y": 1400,
"wires": []
},
{
"id": "415ed3df.e71bfc",
"type": "switch",
"z": "169f5b00.a13415",
"name": "bwm2 = true?",
"property": "bwm2",
"propertyType": "flow",
"rules": [
{
"t": "true"
}
],
"checkall": "true",
"repair": false,
"outputs": 1,
"x": 860,
"y": 1240,
"wires": [
[
"f82d9d1b.6bc16"
]
]
},
{
"id": "f82d9d1b.6bc16",
"type": "debug",
"z": "169f5b00.a13415",
"name": "schalte Lampe 2",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 1080,
"y": 1240,
"wires": []
}
]
Statt den 4 Inject Nodes nimms natürlich die 2 Trigger Nodes des BWM1 bzw BWM2 (iobroker In) Nodes. Aber zum Simulieren eignet es sich gut.
Du kannst das natürlich auch Hucke-Pack mit einer iobroker-get Node auslesen, ob der jeweils andere BWM bereits true ist.
Man könnte ggf. mit Schalten der Lampe die Flowvariable zurücksetzen und muss nicht warten bis der BWM das macht, dann würde er sogar schneller auf eine Wechselbewegung reagieren, wenn der ursprüngliche BWM sich nur aktualisiert.
Das wäre dann die Version, die quasi den BWM der als erstes triggert zurückzusetzen - ausser wird erneut getriggert. Das kann man falls auch noch gewünscht entprellen:
38ca1336-7f41-4711-bc51-8223eb6c10d9-image.png
Spoiler
[
{
"id": "abfb39e8.5bf0e8",
"type": "inject",
"z": "169f5b00.a13415",
"name": "BWM1 = true",
"props": [
{
"p": "payload"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "true",
"payloadType": "bool",
"x": 510,
"y": 1220,
"wires": [
[
"26863212.2a10de",
"415ed3df.e71bfc"
]
]
},
{
"id": "26863212.2a10de",
"type": "change",
"z": "169f5b00.a13415",
"name": "",
"rules": [
{
"t": "set",
"p": "bwm1",
"pt": "flow",
"to": "payload",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 720,
"y": 1240,
"wires": [
[]
]
},
{
"id": "91480312.9782d",
"type": "inject",
"z": "169f5b00.a13415",
"name": "BWM1 = false",
"props": [
{
"p": "payload"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "false",
"payloadType": "bool",
"x": 510,
"y": 1260,
"wires": [
[
"26863212.2a10de"
]
]
},
{
"id": "d0f7b0a7.4ca66",
"type": "inject",
"z": "169f5b00.a13415",
"name": "BWM2 = true",
"props": [
{
"p": "payload"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "true",
"payloadType": "bool",
"x": 510,
"y": 1380,
"wires": [
[
"846fad4e.5e4b3",
"30e465a4.93956a"
]
]
},
{
"id": "1d50e327.49c71d",
"type": "inject",
"z": "169f5b00.a13415",
"name": "BWM2 = false",
"props": [
{
"p": "payload"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "false",
"payloadType": "bool",
"x": 510,
"y": 1420,
"wires": [
[
"846fad4e.5e4b3"
]
]
},
{
"id": "846fad4e.5e4b3",
"type": "change",
"z": "169f5b00.a13415",
"name": "",
"rules": [
{
"t": "set",
"p": "bwm2",
"pt": "flow",
"to": "payload",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 720,
"y": 1400,
"wires": [
[]
]
},
{
"id": "30e465a4.93956a",
"type": "switch",
"z": "169f5b00.a13415",
"name": "bwm1 = true?",
"property": "bwm1",
"propertyType": "flow",
"rules": [
{
"t": "true"
}
],
"checkall": "true",
"repair": false,
"outputs": 1,
"x": 720,
"y": 1340,
"wires": [
[
"34c75b61.666904",
"35c51752.9b9468"
]
]
},
{
"id": "34c75b61.666904",
"type": "debug",
"z": "169f5b00.a13415",
"name": "schalte Lampe 1",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 940,
"y": 1340,
"wires": []
},
{
"id": "415ed3df.e71bfc",
"type": "switch",
"z": "169f5b00.a13415",
"name": "bwm2 = true?",
"property": "bwm2",
"propertyType": "flow",
"rules": [
{
"t": "true"
}
],
"checkall": "true",
"repair": false,
"outputs": 1,
"x": 720,
"y": 1180,
"wires": [
[
"f82d9d1b.6bc16",
"3a2a0f43.6fe38"
]
]
},
{
"id": "f82d9d1b.6bc16",
"type": "debug",
"z": "169f5b00.a13415",
"name": "schalte Lampe 2",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 940,
"y": 1180,
"wires": []
},
{
"id": "3a2a0f43.6fe38",
"type": "change",
"z": "169f5b00.a13415",
"name": "setze bwm2 auf false",
"rules": [
{
"t": "set",
"p": "bwm2",
"pt": "flow",
"to": "false",
"tot": "bool"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 960,
"y": 1240,
"wires": [
[]
]
},
{
"id": "35c51752.9b9468",
"type": "change",
"z": "169f5b00.a13415",
"name": "setze bwm1 auf false",
"rules": [
{
"t": "set",
"p": "bwm1",
"pt": "flow",
"to": "false",
"tot": "bool"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 960,
"y": 1400,
"wires": [
[]
]
}
]