Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Node-Red
    5. 2 Kontaktzustände gleichzeitig abfragen

    NEWS

    • ioBroker@Smart Living Forum Solingen, 14.06. - Agenda added

    • ioBroker goes Matter ... Matter Adapter in Stable

    • Monatsrückblick - April 2025

    2 Kontaktzustände gleichzeitig abfragen

    This topic has been deleted. Only users with topic management privileges can see it.
    • H
      hpgo last edited by hpgo

      Hallo,
      ich habe wieder mal ein Problem das ich nicht zufriedenstellend gelöst bekomme.
      Ich habe 2 Sensoren (Reed Kontakte) die jeweils auf true/false stehen können. (Haustür mit Magnetrigelkontakt.

      Also überwacht soll werden:
      flase/false = grün (geschlossen/versperrt)
      false/true= blau (geschlossen/unversperrt)
      true/true=rot (Tür offen)

      Ich hab das mit 2 „Und“ Logiken und einer „Oder“ Logik gelöst – funktioniert manchmal, dann wider nicht.

      Gibt es Verbesserungsideen von euch, würde mich freuen.

      [{"id":"8e615e82aa5ca254","type":"tab","label":"Haustür","disabled":false,"info":"","env":[]},{"id":"ad7939c8d22deaea","type":"change","z":"8e615e82aa5ca254","name":"","rules":[{"t":"set","p":"reedhaustür","pt":"global","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":370,"y":260,"wires":[["68dcff3e62ef05ec"]]},{"id":"3cd5c40777d49795","type":"change","z":"8e615e82aa5ca254","name":"","rules":[{"t":"set","p":"reedhaustürriegel","pt":"global","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":380,"y":340,"wires":[["58f8660753130e04"]]},{"id":"68dcff3e62ef05ec","type":"switch","z":"8e615e82aa5ca254","name":"true/false","property":"payload","propertyType":"msg","rules":[{"t":"true"},{"t":"false"}],"checkall":"true","repair":false,"outputs":2,"x":600,"y":260,"wires":[["4250163706cf6bf1","a5ef65919e1aed47","1d2886b634a17e5f"],["1d2886b634a17e5f","a5ef65919e1aed47","4250163706cf6bf1"]]},{"id":"58f8660753130e04","type":"switch","z":"8e615e82aa5ca254","name":"true/false","property":"payload","propertyType":"msg","rules":[{"t":"true"},{"t":"false"}],"checkall":"true","repair":false,"outputs":2,"x":600,"y":340,"wires":[["4250163706cf6bf1","a5ef65919e1aed47","1d2886b634a17e5f"],["1d2886b634a17e5f","a5ef65919e1aed47"]]},{"id":"b3b0ead5139656c3","type":"change","z":"8e615e82aa5ca254","name":"Riegeloffen/Türzu","rules":[{"t":"set","p":"payload","pt":"msg","to":"1","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":1090,"y":300,"wires":[["90c542ed7594a35b"]]},{"id":"18842d1812434ed6","type":"change","z":"8e615e82aa5ca254","name":"Riegelzu/Türzu","rules":[{"t":"set","p":"payload","pt":"msg","to":"0","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":1080,"y":200,"wires":[["85d7420709df1104"]]},{"id":"948686596bf18ec7","type":"change","z":"8e615e82aa5ca254","name":"Riegeloffen/Türoffen","rules":[{"t":"set","p":"payload","pt":"msg","to":"2","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":1100,"y":400,"wires":[["a665152a589572e1"]]},{"id":"fa18458659f7a66b","type":"comment","z":"8e615e82aa5ca254","name":"Tür geschlossen und versperrt = grün","info":"","x":1150,"y":160,"wires":[]},{"id":"8b6be7862c9b4c12","type":"comment","z":"8e615e82aa5ca254","name":"Tür offen und nicht versperrt = rot","info":"","x":1130,"y":360,"wires":[]},{"id":"eec477e4a3ee2d82","type":"comment","z":"8e615e82aa5ca254","name":"Tür geschlossen und nicht versperrt = blau","info":"","x":1160,"y":260,"wires":[]},{"id":"1d2886b634a17e5f","type":"BooleanLogicUltimate","z":"8e615e82aa5ca254","name":"and","filtertrue":"both","persist":true,"sInitializeWith":"WaitForPayload","triggertopic":"trigger","outputtriggeredby":"all","inputCount":2,"topic":"result","restrictinputevaluation":true,"delayEvaluation":0,"x":870,"y":400,"wires":[["948686596bf18ec7"],[],[]]},{"id":"4250163706cf6bf1","type":"BooleanLogicUltimate","z":"8e615e82aa5ca254","name":"and","filtertrue":"both","persist":true,"sInitializeWith":"WaitForPayload","triggertopic":"trigger","outputtriggeredby":"all","inputCount":2,"topic":"result","restrictinputevaluation":true,"delayEvaluation":0,"x":870,"y":200,"wires":[["18842d1812434ed6"],[],[]]},{"id":"a5ef65919e1aed47","type":"BooleanLogicUltimate","z":"8e615e82aa5ca254","name":"or","filtertrue":"both","persist":true,"sInitializeWith":"WaitForPayload","triggertopic":"trigger","outputtriggeredby":"all","inputCount":2,"topic":"result","restrictinputevaluation":true,"delayEvaluation":0,"x":870,"y":300,"wires":[[],["b3b0ead5139656c3"],[]]},{"id":"85d7420709df1104","type":"debug","z":"8e615e82aa5ca254","name":"debug 39","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":1360,"y":200,"wires":[]},{"id":"90c542ed7594a35b","type":"debug","z":"8e615e82aa5ca254","name":"debug 40","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":1360,"y":300,"wires":[]},{"id":"a665152a589572e1","type":"debug","z":"8e615e82aa5ca254","name":"debug 41","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":1360,"y":400,"wires":[]},{"id":"b96718064cbfe30a","type":"inject","z":"8e615e82aa5ca254","name":"","props":[{"p":"payload"},{"p":"topic","v":"1","vt":"num"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"true","payloadType":"bool","x":150,"y":240,"wires":[["ad7939c8d22deaea"]]},{"id":"f5e9a3ca9c74d5ee","type":"inject","z":"8e615e82aa5ca254","name":"","props":[{"p":"payload"},{"p":"topic","v":"1","vt":"num"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"true","payloadType":"bool","x":150,"y":320,"wires":[["3cd5c40777d49795"]]},{"id":"d0aa196442346584","type":"inject","z":"8e615e82aa5ca254","name":"","props":[{"p":"payload"},{"p":"topic","v":"2","vt":"num"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"false","payloadType":"bool","x":150,"y":280,"wires":[["ad7939c8d22deaea"]]},{"id":"28d7553d6467bd9f","type":"inject","z":"8e615e82aa5ca254","name":"","props":[{"p":"payload"},{"p":"topic","v":"2","vt":"num"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"false","payloadType":"bool","x":150,"y":360,"wires":[["3cd5c40777d49795"]]}]
      

      Lg

      bahnuhr 1 Reply Last reply Reply Quote 0
      • mickym
        mickym Most Active last edited by mickym

        Ich würde keine Verknüpfungen machen - insbesondere dann noch mit diesen Logik-Nodes.

        Hier mal eine einfache Version mit Standardmitteln

        3f10cecb-9e7d-4cdf-92eb-5e83f3e48424-image.png

        [
           {
               "id": "c2e6ec09e43e9963",
               "type": "inject",
               "z": "8e615e82aa5ca254",
               "name": "",
               "props": [
                   {
                       "p": "payload"
                   },
                   {
                       "p": "topic",
                       "vt": "str"
                   }
               ],
               "repeat": "",
               "crontab": "",
               "once": false,
               "onceDelay": 0.1,
               "topic": "reedhaustür",
               "payload": "true",
               "payloadType": "bool",
               "x": 160,
               "y": 220,
               "wires": [
                   [
                       "a125e6b73596db9d"
                   ]
               ]
           },
           {
               "id": "56c606c4911edf67",
               "type": "inject",
               "z": "8e615e82aa5ca254",
               "name": "",
               "props": [
                   {
                       "p": "payload"
                   },
                   {
                       "p": "topic",
                       "vt": "str"
                   }
               ],
               "repeat": "",
               "crontab": "",
               "once": false,
               "onceDelay": 0.1,
               "topic": "reedhaustürriegel",
               "payload": "true",
               "payloadType": "bool",
               "x": 140,
               "y": 320,
               "wires": [
                   [
                       "a125e6b73596db9d"
                   ]
               ]
           },
           {
               "id": "1125ed5c6b7a3a36",
               "type": "inject",
               "z": "8e615e82aa5ca254",
               "name": "",
               "props": [
                   {
                       "p": "payload"
                   },
                   {
                       "p": "topic",
                       "vt": "str"
                   }
               ],
               "repeat": "",
               "crontab": "",
               "once": false,
               "onceDelay": 0.1,
               "topic": "reedhaustür",
               "payload": "false",
               "payloadType": "bool",
               "x": 160,
               "y": 260,
               "wires": [
                   [
                       "a125e6b73596db9d"
                   ]
               ]
           },
           {
               "id": "3cf934311a4c9004",
               "type": "inject",
               "z": "8e615e82aa5ca254",
               "name": "",
               "props": [
                   {
                       "p": "payload"
                   },
                   {
                       "p": "topic",
                       "vt": "str"
                   }
               ],
               "repeat": "",
               "crontab": "",
               "once": false,
               "onceDelay": 0.1,
               "topic": "reedhaustürriegel",
               "payload": "false",
               "payloadType": "bool",
               "x": 140,
               "y": 360,
               "wires": [
                   [
                       "a125e6b73596db9d"
                   ]
               ]
           },
           {
               "id": "a125e6b73596db9d",
               "type": "join",
               "z": "8e615e82aa5ca254",
               "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": 390,
               "y": 280,
               "wires": [
                   [
                       "1bfd67d784b4d1aa",
                       "6882d7837f45f43d"
                   ]
               ]
           },
           {
               "id": "1bfd67d784b4d1aa",
               "type": "debug",
               "z": "8e615e82aa5ca254",
               "name": "Haustür Statusobjekt",
               "active": true,
               "tosidebar": true,
               "console": false,
               "tostatus": false,
               "complete": "payload",
               "targetType": "msg",
               "statusVal": "",
               "statusType": "auto",
               "x": 680,
               "y": 100,
               "wires": []
           },
           {
               "id": "492b5abd04e6b495",
               "type": "change",
               "z": "8e615e82aa5ca254",
               "name": "Riegeloffen/Türzu",
               "rules": [
                   {
                       "t": "set",
                       "p": "payload",
                       "pt": "msg",
                       "to": "1",
                       "tot": "num"
                   }
               ],
               "action": "",
               "property": "",
               "from": "",
               "to": "",
               "reg": false,
               "x": 930,
               "y": 280,
               "wires": [
                   [
                       "f57d1411b6bc2201"
                   ]
               ]
           },
           {
               "id": "8498e01c37c203fa",
               "type": "change",
               "z": "8e615e82aa5ca254",
               "name": "Riegelzu/Türzu",
               "rules": [
                   {
                       "t": "set",
                       "p": "payload",
                       "pt": "msg",
                       "to": "0",
                       "tot": "num"
                   }
               ],
               "action": "",
               "property": "",
               "from": "",
               "to": "",
               "reg": false,
               "x": 920,
               "y": 180,
               "wires": [
                   [
                       "28c26f06120965e3"
                   ]
               ]
           },
           {
               "id": "d9be4a146d42a968",
               "type": "change",
               "z": "8e615e82aa5ca254",
               "name": "Riegeloffen/Türoffen",
               "rules": [
                   {
                       "t": "set",
                       "p": "payload",
                       "pt": "msg",
                       "to": "2",
                       "tot": "num"
                   }
               ],
               "action": "",
               "property": "",
               "from": "",
               "to": "",
               "reg": false,
               "x": 920,
               "y": 380,
               "wires": [
                   [
                       "95064fd43a97c05e"
                   ]
               ]
           },
           {
               "id": "ff63d576864351f5",
               "type": "comment",
               "z": "8e615e82aa5ca254",
               "name": "Tür geschlossen und versperrt = grün",
               "info": "",
               "x": 930,
               "y": 140,
               "wires": []
           },
           {
               "id": "e862a84c4eaae633",
               "type": "comment",
               "z": "8e615e82aa5ca254",
               "name": "Tür offen und nicht versperrt = rot",
               "info": "",
               "x": 910,
               "y": 340,
               "wires": []
           },
           {
               "id": "e7be8078a052091b",
               "type": "comment",
               "z": "8e615e82aa5ca254",
               "name": "Tür geschlossen und nicht versperrt = blau",
               "info": "",
               "x": 940,
               "y": 240,
               "wires": []
           },
           {
               "id": "28c26f06120965e3",
               "type": "debug",
               "z": "8e615e82aa5ca254",
               "name": "Riegelzu/Türzu",
               "active": true,
               "tosidebar": true,
               "console": false,
               "tostatus": true,
               "complete": "payload",
               "targetType": "msg",
               "statusVal": "payload",
               "statusType": "auto",
               "x": 1160,
               "y": 180,
               "wires": []
           },
           {
               "id": "f57d1411b6bc2201",
               "type": "debug",
               "z": "8e615e82aa5ca254",
               "name": "Riegeloffen/Türzu",
               "active": true,
               "tosidebar": true,
               "console": false,
               "tostatus": true,
               "complete": "payload",
               "targetType": "msg",
               "statusVal": "payload",
               "statusType": "auto",
               "x": 1170,
               "y": 280,
               "wires": []
           },
           {
               "id": "95064fd43a97c05e",
               "type": "debug",
               "z": "8e615e82aa5ca254",
               "name": "Riegeloffen/Türoffen",
               "active": true,
               "tosidebar": true,
               "console": false,
               "tostatus": true,
               "complete": "payload",
               "targetType": "msg",
               "statusVal": "payload",
               "statusType": "auto",
               "x": 1180,
               "y": 380,
               "wires": []
           },
           {
               "id": "6882d7837f45f43d",
               "type": "switch",
               "z": "8e615e82aa5ca254",
               "name": "",
               "property": "payload",
               "propertyType": "msg",
               "rules": [
                   {
                       "t": "jsonata_exp",
                       "v": "payload = {\"reedhaustür\":true,\"reedhaustürriegel\":true}",
                       "vt": "jsonata"
                   },
                   {
                       "t": "jsonata_exp",
                       "v": "payload = {\"reedhaustür\":true,\"reedhaustürriegel\":false}",
                       "vt": "jsonata"
                   },
                   {
                       "t": "jsonata_exp",
                       "v": "payload = {\"reedhaustür\":false,\"reedhaustürriegel\":false}",
                       "vt": "jsonata"
                   }
               ],
               "checkall": "true",
               "repair": false,
               "outputs": 3,
               "x": 570,
               "y": 280,
               "wires": [
                   [
                       "8498e01c37c203fa"
                   ],
                   [
                       "492b5abd04e6b495"
                   ],
                   [
                       "d9be4a146d42a968"
                   ]
               ]
           }
        ]
        

        Falls Dir simple Vergleiche nicht taugen, wie in dem Flow:
        47f0525c-c528-4f9e-92a1-fbbb3485f015-image.png

        kannst Du auch ohne Logiknodes - sowas mit boolescher Logik implementieren.

        c663db2f-c53c-44d6-b00c-31d0d70c08e4-image.png

        H ? 2 Replies Last reply Reply Quote 1
        • bahnuhr
          bahnuhr Forum Testing Most Active @hpgo last edited by bahnuhr

          @hpgo
          per Script

          var IDsensor1 = "DP von Sensor 1";
          var IDsensor2 = "DP von Sensor 2";
          var Ergebnis = "neuer DP für das Ergebnis";     // dieser manuell anlegen mit string
          
          var idTest = [IDsensor1, IDsensor2];
          on({id: idTest}, function(){
              var sensor1 = getState(IDsensor1).val;
              var sensor2 = getState(IDsensor2).val;
              if (sensor1 == false && sensor2 == false) {
                      setState(Ergebnis, "versperrt");
              } else if (sensor1 == false && sensor2) {
                      setState(Ergebnis, "unversperrt");
              } else if (sensor1 && sensor2) {
                      setState(Ergebnis, "offen");
              }
          });
          
          1 Reply Last reply Reply Quote 1
          • H
            hpgo @mickym last edited by

            Vielen lieben Dank, habe den ersten Vorschlag von @mickym übernommen.

            Danke dafür!

            1 Reply Last reply Reply Quote 0
            • ?
              A Former User @mickym last edited by

              @mickym sagte in 2 Kontaktzustände gleichzeitig abfragen:

              Ich würde keine Verknüpfungen machen - insbesondere dann noch mit diesen Logik-Nodes.

              Hier mal eine einfache Version mit Standardmitteln

              3f10cecb-9e7d-4cdf-92eb-5e83f3e48424-image.png

              [
                 {
                     "id": "c2e6ec09e43e9963",
                     "type": "inject",
                     "z": "8e615e82aa5ca254",
                     "name": "",
                     "props": [
                         {
                             "p": "payload"
                         },
                         {
                             "p": "topic",
                             "vt": "str"
                         }
                     ],
                     "repeat": "",
                     "crontab": "",
                     "once": false,
                     "onceDelay": 0.1,
                     "topic": "reedhaustür",
                     "payload": "true",
                     "payloadType": "bool",
                     "x": 160,
                     "y": 220,
                     "wires": [
                         [
                             "a125e6b73596db9d"
                         ]
                     ]
                 },
                 {
                     "id": "56c606c4911edf67",
                     "type": "inject",
                     "z": "8e615e82aa5ca254",
                     "name": "",
                     "props": [
                         {
                             "p": "payload"
                         },
                         {
                             "p": "topic",
                             "vt": "str"
                         }
                     ],
                     "repeat": "",
                     "crontab": "",
                     "once": false,
                     "onceDelay": 0.1,
                     "topic": "reedhaustürriegel",
                     "payload": "true",
                     "payloadType": "bool",
                     "x": 140,
                     "y": 320,
                     "wires": [
                         [
                             "a125e6b73596db9d"
                         ]
                     ]
                 },
                 {
                     "id": "1125ed5c6b7a3a36",
                     "type": "inject",
                     "z": "8e615e82aa5ca254",
                     "name": "",
                     "props": [
                         {
                             "p": "payload"
                         },
                         {
                             "p": "topic",
                             "vt": "str"
                         }
                     ],
                     "repeat": "",
                     "crontab": "",
                     "once": false,
                     "onceDelay": 0.1,
                     "topic": "reedhaustür",
                     "payload": "false",
                     "payloadType": "bool",
                     "x": 160,
                     "y": 260,
                     "wires": [
                         [
                             "a125e6b73596db9d"
                         ]
                     ]
                 },
                 {
                     "id": "3cf934311a4c9004",
                     "type": "inject",
                     "z": "8e615e82aa5ca254",
                     "name": "",
                     "props": [
                         {
                             "p": "payload"
                         },
                         {
                             "p": "topic",
                             "vt": "str"
                         }
                     ],
                     "repeat": "",
                     "crontab": "",
                     "once": false,
                     "onceDelay": 0.1,
                     "topic": "reedhaustürriegel",
                     "payload": "false",
                     "payloadType": "bool",
                     "x": 140,
                     "y": 360,
                     "wires": [
                         [
                             "a125e6b73596db9d"
                         ]
                     ]
                 },
                 {
                     "id": "a125e6b73596db9d",
                     "type": "join",
                     "z": "8e615e82aa5ca254",
                     "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": 390,
                     "y": 280,
                     "wires": [
                         [
                             "1bfd67d784b4d1aa",
                             "6882d7837f45f43d"
                         ]
                     ]
                 },
                 {
                     "id": "1bfd67d784b4d1aa",
                     "type": "debug",
                     "z": "8e615e82aa5ca254",
                     "name": "Haustür Statusobjekt",
                     "active": true,
                     "tosidebar": true,
                     "console": false,
                     "tostatus": false,
                     "complete": "payload",
                     "targetType": "msg",
                     "statusVal": "",
                     "statusType": "auto",
                     "x": 680,
                     "y": 100,
                     "wires": []
                 },
                 {
                     "id": "492b5abd04e6b495",
                     "type": "change",
                     "z": "8e615e82aa5ca254",
                     "name": "Riegeloffen/Türzu",
                     "rules": [
                         {
                             "t": "set",
                             "p": "payload",
                             "pt": "msg",
                             "to": "1",
                             "tot": "num"
                         }
                     ],
                     "action": "",
                     "property": "",
                     "from": "",
                     "to": "",
                     "reg": false,
                     "x": 930,
                     "y": 280,
                     "wires": [
                         [
                             "f57d1411b6bc2201"
                         ]
                     ]
                 },
                 {
                     "id": "8498e01c37c203fa",
                     "type": "change",
                     "z": "8e615e82aa5ca254",
                     "name": "Riegelzu/Türzu",
                     "rules": [
                         {
                             "t": "set",
                             "p": "payload",
                             "pt": "msg",
                             "to": "0",
                             "tot": "num"
                         }
                     ],
                     "action": "",
                     "property": "",
                     "from": "",
                     "to": "",
                     "reg": false,
                     "x": 920,
                     "y": 180,
                     "wires": [
                         [
                             "28c26f06120965e3"
                         ]
                     ]
                 },
                 {
                     "id": "d9be4a146d42a968",
                     "type": "change",
                     "z": "8e615e82aa5ca254",
                     "name": "Riegeloffen/Türoffen",
                     "rules": [
                         {
                             "t": "set",
                             "p": "payload",
                             "pt": "msg",
                             "to": "2",
                             "tot": "num"
                         }
                     ],
                     "action": "",
                     "property": "",
                     "from": "",
                     "to": "",
                     "reg": false,
                     "x": 920,
                     "y": 380,
                     "wires": [
                         [
                             "95064fd43a97c05e"
                         ]
                     ]
                 },
                 {
                     "id": "ff63d576864351f5",
                     "type": "comment",
                     "z": "8e615e82aa5ca254",
                     "name": "Tür geschlossen und versperrt = grün",
                     "info": "",
                     "x": 930,
                     "y": 140,
                     "wires": []
                 },
                 {
                     "id": "e862a84c4eaae633",
                     "type": "comment",
                     "z": "8e615e82aa5ca254",
                     "name": "Tür offen und nicht versperrt = rot",
                     "info": "",
                     "x": 910,
                     "y": 340,
                     "wires": []
                 },
                 {
                     "id": "e7be8078a052091b",
                     "type": "comment",
                     "z": "8e615e82aa5ca254",
                     "name": "Tür geschlossen und nicht versperrt = blau",
                     "info": "",
                     "x": 940,
                     "y": 240,
                     "wires": []
                 },
                 {
                     "id": "28c26f06120965e3",
                     "type": "debug",
                     "z": "8e615e82aa5ca254",
                     "name": "Riegelzu/Türzu",
                     "active": true,
                     "tosidebar": true,
                     "console": false,
                     "tostatus": true,
                     "complete": "payload",
                     "targetType": "msg",
                     "statusVal": "payload",
                     "statusType": "auto",
                     "x": 1160,
                     "y": 180,
                     "wires": []
                 },
                 {
                     "id": "f57d1411b6bc2201",
                     "type": "debug",
                     "z": "8e615e82aa5ca254",
                     "name": "Riegeloffen/Türzu",
                     "active": true,
                     "tosidebar": true,
                     "console": false,
                     "tostatus": true,
                     "complete": "payload",
                     "targetType": "msg",
                     "statusVal": "payload",
                     "statusType": "auto",
                     "x": 1170,
                     "y": 280,
                     "wires": []
                 },
                 {
                     "id": "95064fd43a97c05e",
                     "type": "debug",
                     "z": "8e615e82aa5ca254",
                     "name": "Riegeloffen/Türoffen",
                     "active": true,
                     "tosidebar": true,
                     "console": false,
                     "tostatus": true,
                     "complete": "payload",
                     "targetType": "msg",
                     "statusVal": "payload",
                     "statusType": "auto",
                     "x": 1180,
                     "y": 380,
                     "wires": []
                 },
                 {
                     "id": "6882d7837f45f43d",
                     "type": "switch",
                     "z": "8e615e82aa5ca254",
                     "name": "",
                     "property": "payload",
                     "propertyType": "msg",
                     "rules": [
                         {
                             "t": "jsonata_exp",
                             "v": "payload = {\"reedhaustür\":true,\"reedhaustürriegel\":true}",
                             "vt": "jsonata"
                         },
                         {
                             "t": "jsonata_exp",
                             "v": "payload = {\"reedhaustür\":true,\"reedhaustürriegel\":false}",
                             "vt": "jsonata"
                         },
                         {
                             "t": "jsonata_exp",
                             "v": "payload = {\"reedhaustür\":false,\"reedhaustürriegel\":false}",
                             "vt": "jsonata"
                         }
                     ],
                     "checkall": "true",
                     "repair": false,
                     "outputs": 3,
                     "x": 570,
                     "y": 280,
                     "wires": [
                         [
                             "8498e01c37c203fa"
                         ],
                         [
                             "492b5abd04e6b495"
                         ],
                         [
                             "d9be4a146d42a968"
                         ]
                     ]
                 }
              ]
              

              Falls Dir simple Vergleiche nicht taugen, wie in dem Flow:
              47f0525c-c528-4f9e-92a1-fbbb3485f015-image.png

              kannst Du auch ohne Logiknodes - sowas mit boolescher Logik implementieren.

              c663db2f-c53c-44d6-b00c-31d0d70c08e4-image.png

              ich habe das versucht nachzubauen, wenn ich in dem Join als Beispiel noch 2 weitere Kontakte( zb Fenster) hinzufüge, funktioniert es nicht mehr. In der switch node kann ich die verschieden Fenster und Türen scheinbar nicht separat auswerten.

              mickym 1 Reply Last reply Reply Quote 0
              • mickym
                mickym Most Active @Guest last edited by mickym

                @typ1er doch das sollte gehen. Poste mal dein Objekt, das man es in eine inject-Node importieren gehen kann und deine Switch-node wenn man übrigens nur überprüfen möchte, ob irgendein Kontakt offen ist, reduziert man das Objekt wieder zu einem Zustand.

                Wenn Du generell - so mache ich das auch alle Zustände als booleans hast und die alle in einem Objekt sammelst, kannst Du die ebenfalls einfach auswerten.

                87c4f792-0d8b-4064-9706-079bb6f542a2-image.png

                Diese 4 Nodes werten alle Booleans eines Objektes mit AND oder OR - als Change oder Switch Nodes aus.

                Hier zum Import:

                [
                   {
                       "id": "60816370026e2141",
                       "type": "switch",
                       "z": "f270af8063daa8ba",
                       "name": "AND?",
                       "property": "$reduce(payload.*,function($i, $j){$i and $j})",
                       "propertyType": "jsonata",
                       "rules": [
                           {
                               "t": "true"
                           },
                           {
                               "t": "false"
                           }
                       ],
                       "checkall": "true",
                       "repair": false,
                       "outputs": 2,
                       "x": 370,
                       "y": 380,
                       "wires": [
                           [],
                           []
                       ],
                       "info": "# All properties of an object must be true.\n\nAll properties of an object must be true.\n\n`{\n    \"Office\": true,\n    \"Bedroom\": true,\n    \"Living Room Balcony\": true,\n    \"Living Room Right Window\": true,\n    \"Living Room Left Window\": true\n}`\n\nis true,\n\n`{\n    \"Office\": true,\n    \"Bedroom\": false,\n    \"Living Room Balcony\": true,\n    \"Living Room Right Window\": true,\n    \"Living Room Left Window\": true\n}`\n\nis false.\n\n# Alle Eigenschaften eines Objektes müssen wahr sein\n\nAlle Eigenschaften eines Objektes müssen wahr sein.\n\n`{\n    \"Büro Balkon\": true,\n    \"Schlafzimmer Balkon\": true,\n    \"Wohnzimmer Balkon\": true,\n    \"Wohnzimmer rechtes Fenster\": true,\n    \"Wohnzimmer linkes Fenster\": true\n}`\n\nergibt true,\n\n`{\n    \"Büro Balkon\": true,\n    \"Schlafzimmer Balkon\": true,\n    \"Wohnzimmer Balkon\": true,\n    \"Wohnzimmer rechtes Fenster\": false,\n    \"Wohnzimmer linkes Fenster\": true\n}`\n\nergibt false."
                   },
                   {
                       "id": "71026038ebb3ee0d",
                       "type": "change",
                       "z": "f270af8063daa8ba",
                       "name": "AND ?",
                       "rules": [
                           {
                               "t": "set",
                               "p": "payload",
                               "pt": "msg",
                               "to": "$reduce(payload.*,function($i, $j){$i and $j})",
                               "tot": "jsonata"
                           }
                       ],
                       "action": "",
                       "property": "",
                       "from": "",
                       "to": "",
                       "reg": false,
                       "x": 370,
                       "y": 420,
                       "wires": [
                           []
                       ],
                       "info": "# All Property of an object must be true.\n\nAll properties of an object must be true.\n\n`{\n    \"Office\": true,\n    \"Bedroom\": true,\n    \"Living Room Balcony\": true,\n    \"Living Room Right Window\": true,\n    \"Living Room Left Window\": true\n}`\n\nis true,\n\n`{\n    \"Office\": true,\n    \"Bedroom\": false,\n    \"Living Room Balcony\": true,\n    \"Living Room Right Window\": true,\n    \"Living Room Left Window\": true\n}`\n\nis false.\n\n# Alle Eigenschaften eines Objektes müssen wahr sein\n\nAlle Eigenschaften eines Objektes müssen wahr sein.\n\n`{\n    \"Büro Balkon\": true,\n    \"Schlafzimmer Balkon\": true,\n    \"Wohnzimmer Balkon\": true,\n    \"Wohnzimmer rechtes Fenster\": true,\n    \"Wohnzimmer linkes Fenster\": true\n}`\n\nergibt true,\n\n`{\n    \"Büro Balkon\": true,\n    \"Schlafzimmer Balkon\": true,\n    \"Wohnzimmer Balkon\": true,\n    \"Wohnzimmer rechtes Fenster\": false,\n    \"Wohnzimmer linkes Fenster\": true\n}`\n\nergibt false."
                   },
                   {
                       "id": "82b0cad57098c8eb",
                       "type": "switch",
                       "z": "f270af8063daa8ba",
                       "name": "OR?",
                       "property": "$reduce(payload.*,function($i, $j){$i or $j})",
                       "propertyType": "jsonata",
                       "rules": [
                           {
                               "t": "true"
                           },
                           {
                               "t": "false"
                           }
                       ],
                       "checkall": "true",
                       "repair": false,
                       "outputs": 2,
                       "x": 530,
                       "y": 380,
                       "wires": [
                           [],
                           []
                       ],
                       "info": "# Only one or more properties of an object need to be true.\n\n Only one or more properties of an object need to be true.\n\n`{\n    \"Office\": false,\n    \"Bedroom\": false,\n    \"Living Room Balcony\": false,\n    \"Liviueng Room Right Window\": false,\n    \"Living Room Left Window\": false\n}`\n\nis false,\n\n`{\n    \"Office\": false,\n    \"Bedroom\": true,\n    \"Living Room Balcony\": false,\n    \"Living Room Right Window\": false,\n    \"Living Room Left Window\": false\n}`\n\nis true.\n\n# Mindestens eine Eigenschaft des Objektes muss wahr sein.\n\nMindestens eine Eigenschaft des Objektes muss wahr sein.\n\n`{\n    \"Büro Balkon\": false,\n    \"Schlafzimmer Balkon\": false,\n    \"Wohnzimmer Balkon\": false,\n    \"Wohnzimmer rechtes Fenster\": false,\n    \"Wohnzimmer linkes Fenster\": false\n}`\n\nergibt false,\n\n`{\n    \"Büro Balkon\": false,\n    \"Schlafzimmer Balkon\": true,\n    \"Wohnzimmer Balkon\": false,\n    \"Wohnzimmer rechtes Fenster\": false,\n    \"Wohnzimmer linkes Fenster\": false\n}`\n\nergibt true (wahr)."
                   },
                   {
                       "id": "663edf9a2bddfec1",
                       "type": "change",
                       "z": "f270af8063daa8ba",
                       "name": "OR ?",
                       "rules": [
                           {
                               "t": "set",
                               "p": "payload",
                               "pt": "msg",
                               "to": "$reduce(payload.*,function($i, $j){$i or $j})",
                               "tot": "jsonata"
                           }
                       ],
                       "action": "",
                       "property": "",
                       "from": "",
                       "to": "",
                       "reg": false,
                       "x": 530,
                       "y": 420,
                       "wires": [
                           []
                       ],
                       "info": "# Only one or more properties of an object need to be true.\n\n Only one or more properties of an object need to be true.\n\n`{\n    \"Office\": false,\n    \"Bedroom\": false,\n    \"Living Room Balcony\": false,\n    \"Liviueng Room Right Window\": false,\n    \"Living Room Left Window\": false\n}`\n\nis false,\n\n`{\n    \"Office\": false,\n    \"Bedroom\": true,\n    \"Living Room Balcony\": false,\n    \"Living Room Right Window\": false,\n    \"Living Room Left Window\": false\n}`\n\nis true.\n\n# Mindestens eine Eigenschaft des Objektes muss wahr sein.\n\nMindestens eine Eigenschaft des Objektes muss wahr sein.\n\n`{\n    \"Büro Balkon\": false,\n    \"Schlafzimmer Balkon\": false,\n    \"Wohnzimmer Balkon\": false,\n    \"Wohnzimmer rechtes Fenster\": false,\n    \"Wohnzimmer linkes Fenster\": false\n}`\n\nergibt false,\n\n`{\n    \"Büro Balkon\": false,\n    \"Schlafzimmer Balkon\": true,\n    \"Wohnzimmer Balkon\": false,\n    \"Wohnzimmer rechtes Fenster\": false,\n    \"Wohnzimmer linkes Fenster\": false\n}`\n\nergibt true (wahr)."
                   },
                   {
                       "id": "fc873ce0cd52bf75",
                       "type": "change",
                       "z": "f270af8063daa8ba",
                       "name": "NOT",
                       "rules": [
                           {
                               "t": "set",
                               "p": "payload",
                               "pt": "msg",
                               "to": "$not(payload)\t",
                               "tot": "jsonata"
                           }
                       ],
                       "action": "",
                       "property": "",
                       "from": "",
                       "to": "",
                       "reg": false,
                       "x": 690,
                       "y": 400,
                       "wires": [
                           []
                       ]
                   }
                ]
                

                1 Reply Last reply Reply Quote 0
                • ?
                  A Former User last edited by

                  die 2 Kontakte für ein Fenster klappen so recht gut, wenn ich jetzt in der join node die 2 Fenster und als Beispiel die Rollladenposition zusammenfüge, geht die Split Node nicht mehr, wo ist da der Fehler?

                  Bildschirmfoto 2023-08-18 um 13.26.02.png

                  [
                     {
                         "id": "0e6696ffc08cbc06",
                         "type": "comment",
                         "z": "063e8e832d4bac35",
                         "name": "Sensor Oben (links)",
                         "info": "",
                         "x": 270,
                         "y": 120,
                         "wires": []
                     },
                     {
                         "id": "d7ad700377413412",
                         "type": "comment",
                         "z": "063e8e832d4bac35",
                         "name": "Sensor Unten (links)",
                         "info": "",
                         "x": 260,
                         "y": 220,
                         "wires": []
                     },
                     {
                         "id": "3110eb1427fd4ca7",
                         "type": "comment",
                         "z": "063e8e832d4bac35",
                         "name": "Sensor Oben (rechts)",
                         "info": "",
                         "x": 260,
                         "y": 320,
                         "wires": []
                     },
                     {
                         "id": "07fac73d96cc64f9",
                         "type": "comment",
                         "z": "063e8e832d4bac35",
                         "name": "Sensor Unten (rechts)",
                         "info": "",
                         "x": 260,
                         "y": 420,
                         "wires": []
                     },
                     {
                         "id": "cf53ff6c9887d576",
                         "type": "ioBroker in",
                         "z": "063e8e832d4bac35",
                         "name": "",
                         "topic": "zigbee.0.00158d0001fd5296.opened",
                         "payloadType": "value",
                         "onlyack": "update",
                         "func": "rbe",
                         "gap": "",
                         "fireOnStart": "true",
                         "outFormat": "ioBroker",
                         "x": 210,
                         "y": 80,
                         "wires": [
                             [
                                 "9ecf0357e409e4fe"
                             ]
                         ]
                     },
                     {
                         "id": "9b76565cec5ff675",
                         "type": "ioBroker in",
                         "z": "063e8e832d4bac35",
                         "name": "",
                         "topic": "zigbee.0.00158d0001de8e2d.opened",
                         "payloadType": "value",
                         "onlyack": "update",
                         "func": "rbe",
                         "gap": "",
                         "fireOnStart": "true",
                         "outFormat": "ioBroker",
                         "x": 210,
                         "y": 180,
                         "wires": [
                             [
                                 "50312d05e00b12df"
                             ]
                         ]
                     },
                     {
                         "id": "b5650d3eea88a349",
                         "type": "ioBroker in",
                         "z": "063e8e832d4bac35",
                         "name": "",
                         "topic": "zigbee.0.00158d00022bd6b1.opened",
                         "payloadType": "value",
                         "onlyack": "update",
                         "func": "rbe",
                         "gap": "",
                         "fireOnStart": "true",
                         "outFormat": "ioBroker",
                         "x": 210,
                         "y": 280,
                         "wires": [
                             [
                                 "1d30367204c6967c"
                             ]
                         ]
                     },
                     {
                         "id": "b4f859a0b3efd30f",
                         "type": "ioBroker in",
                         "z": "063e8e832d4bac35",
                         "name": "",
                         "topic": "zigbee.0.00158d00022bd653.opened",
                         "payloadType": "value",
                         "onlyack": "update",
                         "func": "rbe",
                         "gap": "",
                         "fireOnStart": "true",
                         "outFormat": "ioBroker",
                         "x": 210,
                         "y": 380,
                         "wires": [
                             [
                                 "b880b89a4cbd44cb"
                             ]
                         ]
                     },
                     {
                         "id": "1d30367204c6967c",
                         "type": "change",
                         "z": "063e8e832d4bac35",
                         "name": "",
                         "rules": [
                             {
                                 "t": "set",
                                 "p": "topic",
                                 "pt": "msg",
                                 "to": "Fenster2oben",
                                 "tot": "str"
                             }
                         ],
                         "action": "",
                         "property": "",
                         "from": "",
                         "to": "",
                         "reg": false,
                         "x": 490,
                         "y": 280,
                         "wires": [
                             [
                                 "88f8f0d3407a16ea"
                             ]
                         ]
                     },
                     {
                         "id": "b880b89a4cbd44cb",
                         "type": "change",
                         "z": "063e8e832d4bac35",
                         "name": "",
                         "rules": [
                             {
                                 "t": "set",
                                 "p": "topic",
                                 "pt": "msg",
                                 "to": "Fenster2unten",
                                 "tot": "str"
                             }
                         ],
                         "action": "",
                         "property": "",
                         "from": "",
                         "to": "",
                         "reg": false,
                         "x": 490,
                         "y": 380,
                         "wires": [
                             [
                                 "88f8f0d3407a16ea"
                             ]
                         ]
                     },
                     {
                         "id": "50312d05e00b12df",
                         "type": "change",
                         "z": "063e8e832d4bac35",
                         "name": "",
                         "rules": [
                             {
                                 "t": "set",
                                 "p": "topic",
                                 "pt": "msg",
                                 "to": "Fenster1unten",
                                 "tot": "str"
                             }
                         ],
                         "action": "",
                         "property": "",
                         "from": "",
                         "to": "",
                         "reg": false,
                         "x": 490,
                         "y": 180,
                         "wires": [
                             [
                                 "ef1772d95f6d4f02"
                             ]
                         ]
                     },
                     {
                         "id": "9ecf0357e409e4fe",
                         "type": "change",
                         "z": "063e8e832d4bac35",
                         "name": "",
                         "rules": [
                             {
                                 "t": "set",
                                 "p": "topic",
                                 "pt": "msg",
                                 "to": "Fenster1oben",
                                 "tot": "str"
                             }
                         ],
                         "action": "",
                         "property": "",
                         "from": "",
                         "to": "",
                         "reg": false,
                         "x": 490,
                         "y": 80,
                         "wires": [
                             [
                                 "ef1772d95f6d4f02"
                             ]
                         ]
                     },
                     {
                         "id": "88f8f0d3407a16ea",
                         "type": "join",
                         "z": "063e8e832d4bac35",
                         "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": 830,
                         "y": 320,
                         "wires": [
                             [
                                 "6b72403eebc7a162",
                                 "9c42920aa2d032db"
                             ]
                         ]
                     },
                     {
                         "id": "6b72403eebc7a162",
                         "type": "debug",
                         "z": "063e8e832d4bac35",
                         "name": "msg",
                         "active": false,
                         "tosidebar": true,
                         "console": false,
                         "tostatus": true,
                         "complete": "true",
                         "targetType": "full",
                         "statusVal": "payload",
                         "statusType": "auto",
                         "x": 930,
                         "y": 220,
                         "wires": []
                     },
                     {
                         "id": "c808fbfd9d8b50a9",
                         "type": "ioBroker in",
                         "z": "063e8e832d4bac35",
                         "name": "",
                         "topic": "zwave2.0.Node_004.Multilevel_Switch.currentValue",
                         "payloadType": "value",
                         "onlyack": "",
                         "func": "rbe",
                         "gap": "",
                         "fireOnStart": "true",
                         "outFormat": "ioBroker",
                         "x": 220,
                         "y": 540,
                         "wires": [
                             [
                                 "1d423f5fc521a92c"
                             ]
                         ]
                     },
                     {
                         "id": "1d423f5fc521a92c",
                         "type": "change",
                         "z": "063e8e832d4bac35",
                         "name": "",
                         "rules": [
                             {
                                 "t": "set",
                                 "p": "topic",
                                 "pt": "msg",
                                 "to": "currentValue",
                                 "tot": "str"
                             }
                         ],
                         "action": "",
                         "property": "",
                         "from": "",
                         "to": "",
                         "reg": false,
                         "x": 550,
                         "y": 540,
                         "wires": [
                             []
                         ]
                     },
                     {
                         "id": "9c42920aa2d032db",
                         "type": "switch",
                         "z": "063e8e832d4bac35",
                         "name": "",
                         "property": "payload",
                         "propertyType": "msg",
                         "rules": [
                             {
                                 "t": "jsonata_exp",
                                 "v": "payload = {\"Fenster2oben\": true,\"Fenster2unten\": false} ",
                                 "vt": "jsonata"
                             },
                             {
                                 "t": "jsonata_exp",
                                 "v": "payload = {\"Fenster2oben\": false,\"Fenster2unten\": false} ",
                                 "vt": "jsonata"
                             },
                             {
                                 "t": "jsonata_exp",
                                 "v": "payload = {\"Fenster2oben\": true,\"Fenster2unten\": true} ",
                                 "vt": "jsonata"
                             },
                             {
                                 "t": "jsonata_exp",
                                 "v": "payload = {\"Fenster2oben\": false,\"Fenster2unten\": true} ",
                                 "vt": "jsonata"
                             }
                         ],
                         "checkall": "false",
                         "repair": false,
                         "outputs": 4,
                         "x": 990,
                         "y": 320,
                         "wires": [
                             [
                                 "9b040f37641b3023"
                             ],
                             [
                                 "298920d373a42660"
                             ],
                             [
                                 "487ea6c4bad33074"
                             ],
                             [
                                 "40bf1833ce4dafce"
                             ]
                         ]
                     },
                     {
                         "id": "9b040f37641b3023",
                         "type": "change",
                         "z": "063e8e832d4bac35",
                         "name": "setze payload = zu",
                         "rules": [
                             {
                                 "t": "set",
                                 "p": "payload",
                                 "pt": "msg",
                                 "to": "zu",
                                 "tot": "str"
                             }
                         ],
                         "action": "",
                         "property": "",
                         "from": "",
                         "to": "",
                         "reg": false,
                         "x": 1230,
                         "y": 260,
                         "wires": [
                             [
                                 "db55548158e7cf46"
                             ]
                         ]
                     },
                     {
                         "id": "298920d373a42660",
                         "type": "change",
                         "z": "063e8e832d4bac35",
                         "name": "setze payload = entriegelt",
                         "rules": [
                             {
                                 "t": "set",
                                 "p": "payload",
                                 "pt": "msg",
                                 "to": "entriegelt",
                                 "tot": "str"
                             }
                         ],
                         "action": "",
                         "property": "",
                         "from": "",
                         "to": "",
                         "reg": false,
                         "x": 1260,
                         "y": 300,
                         "wires": [
                             [
                                 "db55548158e7cf46"
                             ]
                         ]
                     },
                     {
                         "id": "db55548158e7cf46",
                         "type": "debug",
                         "z": "063e8e832d4bac35",
                         "name": "",
                         "active": false,
                         "tosidebar": true,
                         "console": false,
                         "tostatus": true,
                         "complete": "true",
                         "targetType": "full",
                         "statusVal": "payload",
                         "statusType": "auto",
                         "x": 1510,
                         "y": 300,
                         "wires": []
                     },
                     {
                         "id": "487ea6c4bad33074",
                         "type": "change",
                         "z": "063e8e832d4bac35",
                         "name": "setze payload = offen",
                         "rules": [
                             {
                                 "t": "set",
                                 "p": "payload",
                                 "pt": "msg",
                                 "to": "offen",
                                 "tot": "str"
                             }
                         ],
                         "action": "",
                         "property": "",
                         "from": "",
                         "to": "",
                         "reg": false,
                         "x": 1240,
                         "y": 340,
                         "wires": [
                             [
                                 "db55548158e7cf46"
                             ]
                         ]
                     },
                     {
                         "id": "40bf1833ce4dafce",
                         "type": "change",
                         "z": "063e8e832d4bac35",
                         "name": "setze payload = gekippt",
                         "rules": [
                             {
                                 "t": "set",
                                 "p": "payload",
                                 "pt": "msg",
                                 "to": "gekippt",
                                 "tot": "str"
                             }
                         ],
                         "action": "",
                         "property": "",
                         "from": "",
                         "to": "",
                         "reg": false,
                         "x": 1250,
                         "y": 380,
                         "wires": [
                             [
                                 "db55548158e7cf46"
                             ]
                         ]
                     },
                     {
                         "id": "ef1772d95f6d4f02",
                         "type": "join",
                         "z": "063e8e832d4bac35",
                         "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": 810,
                         "y": 100,
                         "wires": [
                             [
                                 "bb8bd7b93c4ebcf9",
                                 "e67e935145f681e3"
                             ]
                         ]
                     },
                     {
                         "id": "bb8bd7b93c4ebcf9",
                         "type": "debug",
                         "z": "063e8e832d4bac35",
                         "name": "msg",
                         "active": false,
                         "tosidebar": true,
                         "console": false,
                         "tostatus": true,
                         "complete": "true",
                         "targetType": "full",
                         "statusVal": "payload",
                         "statusType": "auto",
                         "x": 890,
                         "y": 20,
                         "wires": []
                     },
                     {
                         "id": "d0708354332fe1bb",
                         "type": "change",
                         "z": "063e8e832d4bac35",
                         "name": "setze payload = zu",
                         "rules": [
                             {
                                 "t": "set",
                                 "p": "payload",
                                 "pt": "msg",
                                 "to": "zu",
                                 "tot": "str"
                             }
                         ],
                         "action": "",
                         "property": "",
                         "from": "",
                         "to": "",
                         "reg": false,
                         "x": 1230,
                         "y": 40,
                         "wires": [
                             [
                                 "34a60587b129cd25"
                             ]
                         ]
                     },
                     {
                         "id": "3506db50c7bf2b99",
                         "type": "change",
                         "z": "063e8e832d4bac35",
                         "name": "setze payload = entriegelt",
                         "rules": [
                             {
                                 "t": "set",
                                 "p": "payload",
                                 "pt": "msg",
                                 "to": "entriegelt",
                                 "tot": "str"
                             }
                         ],
                         "action": "",
                         "property": "",
                         "from": "",
                         "to": "",
                         "reg": false,
                         "x": 1260,
                         "y": 80,
                         "wires": [
                             [
                                 "34a60587b129cd25"
                             ]
                         ]
                     },
                     {
                         "id": "34a60587b129cd25",
                         "type": "debug",
                         "z": "063e8e832d4bac35",
                         "name": "",
                         "active": false,
                         "tosidebar": true,
                         "console": false,
                         "tostatus": true,
                         "complete": "true",
                         "targetType": "full",
                         "statusVal": "payload",
                         "statusType": "auto",
                         "x": 1510,
                         "y": 80,
                         "wires": []
                     },
                     {
                         "id": "9e045a37a0fcb511",
                         "type": "change",
                         "z": "063e8e832d4bac35",
                         "name": "setze payload = offen",
                         "rules": [
                             {
                                 "t": "set",
                                 "p": "payload",
                                 "pt": "msg",
                                 "to": "offen",
                                 "tot": "str"
                             }
                         ],
                         "action": "",
                         "property": "",
                         "from": "",
                         "to": "",
                         "reg": false,
                         "x": 1240,
                         "y": 120,
                         "wires": [
                             [
                                 "34a60587b129cd25"
                             ]
                         ]
                     },
                     {
                         "id": "6d6e9be994b3b2c7",
                         "type": "change",
                         "z": "063e8e832d4bac35",
                         "name": "setze payload = gekippt",
                         "rules": [
                             {
                                 "t": "set",
                                 "p": "payload",
                                 "pt": "msg",
                                 "to": "gekippt",
                                 "tot": "str"
                             }
                         ],
                         "action": "",
                         "property": "",
                         "from": "",
                         "to": "",
                         "reg": false,
                         "x": 1250,
                         "y": 160,
                         "wires": [
                             [
                                 "34a60587b129cd25"
                             ]
                         ]
                     },
                     {
                         "id": "e67e935145f681e3",
                         "type": "switch",
                         "z": "063e8e832d4bac35",
                         "name": "",
                         "property": "payload",
                         "propertyType": "msg",
                         "rules": [
                             {
                                 "t": "jsonata_exp",
                                 "v": "payload = {\"Fenster1oben\": true,\"Fenster1unten\": false} ",
                                 "vt": "jsonata"
                             },
                             {
                                 "t": "jsonata_exp",
                                 "v": "payload = {\"Fenster1oben\": false,\"Fenster1unten\": false} ",
                                 "vt": "jsonata"
                             },
                             {
                                 "t": "jsonata_exp",
                                 "v": "payload = {\"Fenster1oben\": true,\"Fenster1unten\": true} ",
                                 "vt": "jsonata"
                             },
                             {
                                 "t": "jsonata_exp",
                                 "v": "payload = {\"Fenster1oben\": false,\"Fenster1unten\": true} ",
                                 "vt": "jsonata"
                             }
                         ],
                         "checkall": "false",
                         "repair": false,
                         "outputs": 4,
                         "x": 990,
                         "y": 100,
                         "wires": [
                             [
                                 "d0708354332fe1bb"
                             ],
                             [
                                 "3506db50c7bf2b99"
                             ],
                             [
                                 "9e045a37a0fcb511"
                             ],
                             [
                                 "6d6e9be994b3b2c7"
                             ]
                         ]
                     }
                  ]
                  

                  mickym 1 Reply Last reply Reply Quote 0
                  • mickym
                    mickym Most Active @Guest last edited by mickym

                    @typ1er Die Frage ist halt ob das so Sinn macht - freilich geht es, aber das macht keinen Sinn. Die Fälle werden ja immer mehr mit der Fakultät- Sprich 2 Fensterparameter *2 + Rolladen macht doch keinen Sinn. Die Split Node so wie sie hier im Einsatz ist muss überprüft doch das GESAMTE Objekt. Sprich wenn du alles in ein Objekt überführst dann sieht das Objekt doch so aus:

                    {"Fenster1oben": true,"Fenster1unten": false,"Fenster2oben": true,"Fenster2unten": false,"currentValue" : 39} 
                    

                    das kannst Du doch nicht mit

                    payload = {"Fenster1oben": true,"Fenster1unten": false,"Fenster2oben": true,"Fenster2unten": false,"currentValue" : 39}
                    

                    abfragen.

                    Da müsstest Du 100 * 8 = 800 Ausgänge basteln.

                    Was willst Du denn erreichen, dann können wir ggf. gemeinsam einen Flow entwickeln. Du kannst das kaskadieren, aber die Frage ist weiterhin was willst Du als Ergebnis?

                    Wobei auch Deine jetzigen Zuordnungen keinen Sinn ergeben:

                    3ca0bc33-8e87-49ab-96b8-00f60f875240-image.png

                    payload = {"Fenster2oben": true,"Fenster2unten": false} (wenn openend true ist) - dann wäre oben offen und unten zu => gekippt
                    payload = {"Fenster2oben": false,"Fenster2unten": false} - beides zu => zu
                    payload = {"Fenster2oben": true,"Fenster2unten": true} -=> offen
                    payload = {"Fenster2oben": false,"Fenster2unten": true} => sollte es eigentlich nicht geben

                    Um einen sauberen Status zu erhalten - würde ich folgendes machen - allerdings weiß ich nicht ob der Rollladen für beide Fenster gilt.

                    1 Reply Last reply Reply Quote 0
                    • ?
                      A Former User last edited by

                      ich wollte die Rolladensteuerung später in einen Subflow unterbringen, das ist bis auf 1 Fenster bei allen gleich. Also alle Parameter zusammenführen und im Subflow wieder trennen mit der switch Node.

                      Auswerten wollte ich den Fensterstatus, Wetter, Ausrichtung, Helligkeit und Temperatur. Um nachts das Fenster beim öffnen der Fenster in bestimmte Positionen anzufahren als auch Tagsüber das Fenster zu beschatten. Ich habe das vor ein paar Jahren mal zusammengeklickt irgendwie, in hunderten Nodes, und ist leider unübersichtlich.

                      mickym 1 Reply Last reply Reply Quote 0
                      • mickym
                        mickym Most Active @Guest last edited by

                        @typ1er Ist der Rollladen für ein Fenster oder für beide?

                        1 Reply Last reply Reply Quote 0
                        • ?
                          A Former User last edited by

                          ein Fenster mit 2 Flügeln und 1 Rollladen

                          1 Reply Last reply Reply Quote 0
                          • mickym
                            mickym Most Active last edited by mickym

                            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

                            [
                               {
                                   "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.

                            1 Reply Last reply Reply Quote 0
                            • First post
                              Last post

                            Support us

                            ioBroker
                            Community Adapters
                            Donate

                            571
                            Online

                            31.7k
                            Users

                            79.7k
                            Topics

                            1.3m
                            Posts

                            4
                            12
                            515
                            Loading More Posts
                            • Oldest to Newest
                            • Newest to Oldest
                            • Most Votes
                            Reply
                            • Reply as topic
                            Log in to reply
                            Community
                            Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen
                            The ioBroker Community 2014-2023
                            logo