So hier nochmal die Lösung mit der JOIN Node - um ein Objekt aus Position und Kommando zu erstellen:
a7cd02ec-5d77-4f39-acdc-fe5be336a23e-image.png
nun sind aus beiden Ästen die Werte in einem Nachrichtenobjekt und können verglichen werden. Ich nutze wie gesagt keine UND Nodes - aber im Prinzip sollte man damit auch die Eigenschaften kombinieren können. Ich nutze einfach mal eine herkömmliche switch Node. Ob es eine UND Verknüpfung ist oder ob es nicht sinnvoller ist auf Gleichheit zu prüfen, dass also Kommando und Position übereinstimmt.
56db0a6b-9af3-4a7d-a91b-23970dc760e7-image.png
Hier zum Test und Import:
Spoiler [ { "id": "95c4f5aa0e5be2f7", "type": "inject", "z": "517cd16e4d7e6ae4", "g": "a42120ea2999ca28", "name": "", "props": [ { "p": "payload" } ], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "payload": "true", "payloadType": "bool", "x": 110, "y": 6200, "wires": [ [ "1951798dc9461062" ] ] }, { "id": "3c52dbf6be6a8aec", "type": "inject", "z": "517cd16e4d7e6ae4", "g": "a42120ea2999ca28", "name": "", "props": [ { "p": "payload" } ], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "payload": "false", "payloadType": "bool", "x": 110, "y": 6240, "wires": [ [ "1951798dc9461062" ] ] }, { "id": "9d3e01934f058bbf", "type": "inject", "z": "517cd16e4d7e6ae4", "g": "19f3685c99fcdc4a", "name": "", "props": [ { "p": "payload" } ], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "payload": "true", "payloadType": "bool", "x": 110, "y": 6380, "wires": [ [ "715a58cae92106bf" ] ] }, { "id": "7e4246a16bb59778", "type": "inject", "z": "517cd16e4d7e6ae4", "g": "19f3685c99fcdc4a", "name": "", "props": [ { "p": "payload" } ], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "payload": "false", "payloadType": "bool", "x": 110, "y": 6420, "wires": [ [ "715a58cae92106bf" ] ] }, { "id": "1951798dc9461062", "type": "delay", "z": "517cd16e4d7e6ae4", "name": "", "pauseType": "delay", "timeout": "6", "timeoutUnits": "seconds", "rate": "1", "nbRateUnits": "1", "rateUnits": "second", "randomFirst": "1", "randomLast": "5", "randomUnits": "seconds", "drop": false, "allowrate": false, "outputs": 1, "x": 300, "y": 6220, "wires": [ [ "0664a6b7867b1019" ] ] }, { "id": "715a58cae92106bf", "type": "change", "z": "517cd16e4d7e6ae4", "name": "Tor offen", "rules": [], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 320, "y": 6400, "wires": [ [ "9eecd47ad11c87fe" ] ] }, { "id": "0664a6b7867b1019", "type": "change", "z": "517cd16e4d7e6ae4", "name": "", "rules": [ { "t": "set", "p": "topic", "pt": "msg", "to": "command", "tot": "str" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 500, "y": 6220, "wires": [ [ "6f2453256b50df08" ] ] }, { "id": "9eecd47ad11c87fe", "type": "change", "z": "517cd16e4d7e6ae4", "name": "", "rules": [ { "t": "set", "p": "topic", "pt": "msg", "to": "position", "tot": "str" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 500, "y": 6400, "wires": [ [ "6f2453256b50df08" ] ] }, { "id": "6f2453256b50df08", "type": "join", "z": "517cd16e4d7e6ae4", "name": "", "mode": "custom", "build": "object", "property": "payload", "propertyType": "msg", "key": "topic", "joiner": "\\n", "joinerType": "str", "accumulate": false, "timeout": "", "count": "2", "reduceRight": false, "reduceExp": "", "reduceInit": "", "reduceInitType": "", "reduceFixup": "", "x": 670, "y": 6300, "wires": [ [ "23b0738ffe91dbda", "a7dce32474e819c9" ] ] }, { "id": "23b0738ffe91dbda", "type": "debug", "z": "517cd16e4d7e6ae4", "name": "Objekt", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "payload", "targetType": "msg", "statusVal": "", "statusType": "auto", "x": 830, "y": 6240, "wires": [] }, { "id": "a7dce32474e819c9", "type": "switch", "z": "517cd16e4d7e6ae4", "name": "position UND command", "property": "payload.position = payload.command", "propertyType": "jsonata", "rules": [ { "t": "true" }, { "t": "false" } ], "checkall": "true", "repair": false, "outputs": 2, "x": 870, "y": 6300, "wires": [ [ "415bc3c99d8b1269" ], [ "90abb22c58c4f696", "8cc3f991b55c7b8c" ] ] }, { "id": "415bc3c99d8b1269", "type": "debug", "z": "517cd16e4d7e6ae4", "name": "Kommando und Position sind gleich, keine Aktion", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "payload", "targetType": "msg", "statusVal": "", "statusType": "auto", "x": 1210, "y": 6240, "wires": [] }, { "id": "90abb22c58c4f696", "type": "debug", "z": "517cd16e4d7e6ae4", "name": "Kommando und Position ungleich => Aktion", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "payload", "targetType": "msg", "statusVal": "", "statusType": "auto", "x": 1190, "y": 6380, "wires": [] }, { "id": "8cc3f991b55c7b8c", "type": "trigger", "z": "517cd16e4d7e6ae4", "name": "", "op1": "1", "op2": "0", "op1type": "val", "op2type": "val", "duration": "250", "extend": "false", "overrideDelay": "false", "units": "ms", "reset": "", "bytopic": "all", "topic": "topic", "outputs": 1, "x": 1120, "y": 6320, "wires": [ [] ] } ]