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 Bewegungsmelder (Aqara) sollen einen Lampe schalten

    NEWS

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

    • ioBroker goes Matter ... Matter Adapter in Stable

    • Monatsrückblick - April 2025

    2 Bewegungsmelder (Aqara) sollen einen Lampe schalten

    This topic has been deleted. Only users with topic management privileges can see it.
    • Aphofis
      Aphofis @mickym last edited by

      @mickym
      Wenn ich auf Plattenstapel umschalte ist der leer!
      Screenshot 2024-08-20 193426.png

      Screenshot 2024-08-20 193334.png

      [
          {
              "id": "1d761786cd03b6eb",
              "type": "tab",
              "label": "Flow 4",
              "disabled": false,
              "info": "",
              "env": []
          },
          {
              "id": "825a34e2e6145b1c",
              "type": "ioBroker in",
              "z": "1d761786cd03b6eb",
              "name": "",
              "attrname": "payload",
              "topic": "Lichtschalter Bad",
              "payloadType": "object",
              "onlyack": "",
              "func": "all",
              "gap": "",
              "fireOnStart": "false",
              "outFormat": "MQTT",
              "x": 130,
              "y": 120,
              "wires": [
                  [
                      "6e55b108db47eaed",
                      "2b793d273b25a2f7"
                  ]
              ]
          },
          {
              "id": "2b793d273b25a2f7",
              "type": "ioBroker out",
              "z": "1d761786cd03b6eb",
              "name": "Bad Decke",
              "topic": "tuya.0.bf78f027e5e33c3d76xrfe.1",
              "ack": "false",
              "autoCreate": "false",
              "stateName": "",
              "role": "",
              "payloadType": "",
              "readonly": "",
              "stateUnit": "",
              "stateMin": "",
              "stateMax": "",
              "x": 1020,
              "y": 120,
              "wires": []
          },
          {
              "id": "d4d742934b195768",
              "type": "inject",
              "z": "1d761786cd03b6eb",
              "name": "Aus",
              "props": [
                  {
                      "p": "payload"
                  },
                  {
                      "p": "topic",
                      "vt": "str"
                  }
              ],
              "repeat": "",
              "crontab": "",
              "once": false,
              "onceDelay": 0.1,
              "topic": "",
              "payload": "false",
              "payloadType": "bool",
              "x": 170,
              "y": 170,
              "wires": [
                  [
                      "6e55b108db47eaed"
                  ]
              ]
          },
          {
              "id": "34a6d988e012a62b",
              "type": "inject",
              "z": "1d761786cd03b6eb",
              "name": "An",
              "props": [
                  {
                      "p": "payload"
                  },
                  {
                      "p": "topic",
                      "vt": "str"
                  }
              ],
              "repeat": "",
              "crontab": "",
              "once": false,
              "onceDelay": 0.1,
              "topic": "",
              "payload": "true",
              "payloadType": "bool",
              "x": 170,
              "y": 210,
              "wires": [
                  [
                      "6e55b108db47eaed"
                  ]
              ]
          },
          {
              "id": "50172abc4513c6cf",
              "type": "debug",
              "z": "1d761786cd03b6eb",
              "name": "Bad Decke",
              "active": true,
              "tosidebar": true,
              "console": false,
              "tostatus": false,
              "complete": "payload",
              "targetType": "msg",
              "statusVal": "",
              "statusType": "auto",
              "x": 1020,
              "y": 170,
              "wires": []
          },
          {
              "id": "6e55b108db47eaed",
              "type": "change",
              "z": "1d761786cd03b6eb",
              "name": "bad schalten",
              "rules": [
                  {
                      "t": "set",
                      "p": "payload",
                      "pt": "msg",
                      "to": "true",
                      "tot": "bool"
                  }
              ],
              "action": "",
              "property": "",
              "from": "",
              "to": "",
              "reg": false,
              "x": 360,
              "y": 160,
              "wires": [
                  [
                      "4faf1ed0bf7c1af3"
                  ]
              ]
          },
          {
              "id": "4faf1ed0bf7c1af3",
              "type": "trigger",
              "z": "1d761786cd03b6eb",
              "name": "",
              "op1": "1",
              "op2": "false",
              "op1type": "str",
              "op2type": "bool",
              "duration": "15",
              "extend": true,
              "overrideDelay": false,
              "units": "min",
              "reset": "",
              "bytopic": "all",
              "topic": "topic",
              "outputs": 1,
              "x": 550,
              "y": 160,
              "wires": [
                  [
                      "f65257011e0b574c"
                  ]
              ]
          },
          {
              "id": "f65257011e0b574c",
              "type": "change",
              "z": "1d761786cd03b6eb",
              "name": "Schalten",
              "rules": [
                  {
                      "t": "set",
                      "p": "schalten.bad",
                      "pt": "msg",
                      "to": "false",
                      "tot": "bool"
                  }
              ],
              "action": "",
              "property": "",
              "from": "",
              "to": "",
              "reg": false,
              "x": 740,
              "y": 160,
              "wires": [
                  [
                      "50172abc4513c6cf",
                      "2b793d273b25a2f7"
                  ]
              ]
          }
      ]
      

      Aphofis 1 Reply Last reply Reply Quote 0
      • Aphofis
        Aphofis @Aphofis last edited by

        so besser !?
        Screenshot 2024-08-20 194052.png

        [
            {
                "id": "1d761786cd03b6eb",
                "type": "tab",
                "label": "Flow 4",
                "disabled": false,
                "info": "",
                "env": []
            },
            {
                "id": "825a34e2e6145b1c",
                "type": "ioBroker in",
                "z": "1d761786cd03b6eb",
                "name": "",
                "attrname": "payload",
                "topic": "Lichtschalter Bad",
                "payloadType": "object",
                "onlyack": "",
                "func": "all",
                "gap": "",
                "fireOnStart": "false",
                "outFormat": "MQTT",
                "x": 130,
                "y": 120,
                "wires": [
                    [
                        "6e55b108db47eaed",
                        "2b793d273b25a2f7"
                    ]
                ]
            },
            {
                "id": "2b793d273b25a2f7",
                "type": "ioBroker out",
                "z": "1d761786cd03b6eb",
                "name": "Bad Decke",
                "topic": "tuya.0.bf78f027e5e33c3d76xrfe.1",
                "ack": "false",
                "autoCreate": "false",
                "stateName": "",
                "role": "",
                "payloadType": "",
                "readonly": "",
                "stateUnit": "",
                "stateMin": "",
                "stateMax": "",
                "x": 1020,
                "y": 120,
                "wires": []
            },
            {
                "id": "d4d742934b195768",
                "type": "inject",
                "z": "1d761786cd03b6eb",
                "name": "Aus",
                "props": [
                    {
                        "p": "payload"
                    },
                    {
                        "p": "topic",
                        "vt": "str"
                    }
                ],
                "repeat": "",
                "crontab": "",
                "once": false,
                "onceDelay": 0.1,
                "topic": "",
                "payload": "false",
                "payloadType": "bool",
                "x": 170,
                "y": 170,
                "wires": [
                    [
                        "6e55b108db47eaed"
                    ]
                ]
            },
            {
                "id": "34a6d988e012a62b",
                "type": "inject",
                "z": "1d761786cd03b6eb",
                "name": "An",
                "props": [
                    {
                        "p": "payload"
                    },
                    {
                        "p": "topic",
                        "vt": "str"
                    }
                ],
                "repeat": "",
                "crontab": "",
                "once": false,
                "onceDelay": 0.1,
                "topic": "",
                "payload": "true",
                "payloadType": "bool",
                "x": 170,
                "y": 210,
                "wires": [
                    [
                        "6e55b108db47eaed"
                    ]
                ]
            },
            {
                "id": "50172abc4513c6cf",
                "type": "debug",
                "z": "1d761786cd03b6eb",
                "name": "Bad Decke",
                "active": true,
                "tosidebar": true,
                "console": false,
                "tostatus": false,
                "complete": "payload",
                "targetType": "msg",
                "statusVal": "",
                "statusType": "auto",
                "x": 1020,
                "y": 170,
                "wires": []
            },
            {
                "id": "6e55b108db47eaed",
                "type": "change",
                "z": "1d761786cd03b6eb",
                "name": "bad schalten",
                "rules": [
                    {
                        "t": "set",
                        "p": "Bad_Motion",
                        "pt": "flow",
                        "to": "false",
                        "tot": "bool"
                    }
                ],
                "action": "",
                "property": "",
                "from": "",
                "to": "",
                "reg": false,
                "x": 360,
                "y": 160,
                "wires": [
                    [
                        "4faf1ed0bf7c1af3"
                    ]
                ]
            },
            {
                "id": "4faf1ed0bf7c1af3",
                "type": "trigger",
                "z": "1d761786cd03b6eb",
                "name": "",
                "op1": "1",
                "op2": "false",
                "op1type": "str",
                "op2type": "bool",
                "duration": "15",
                "extend": true,
                "overrideDelay": false,
                "units": "min",
                "reset": "",
                "bytopic": "all",
                "topic": "topic",
                "outputs": 1,
                "x": 550,
                "y": 160,
                "wires": [
                    [
                        "f65257011e0b574c"
                    ]
                ]
            },
            {
                "id": "f65257011e0b574c",
                "type": "change",
                "z": "1d761786cd03b6eb",
                "name": "Schalten",
                "rules": [
                    {
                        "t": "set",
                        "p": "Bad_Motion",
                        "pt": "flow",
                        "to": "true",
                        "tot": "bool"
                    }
                ],
                "action": "",
                "property": "",
                "from": "",
                "to": "",
                "reg": false,
                "x": 740,
                "y": 160,
                "wires": [
                    [
                        "50172abc4513c6cf",
                        "2b793d273b25a2f7"
                    ]
                ]
            }
        ]
        

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

          @aphofis Na ja das parallel ist prinzipiell richtig und 2 Change Nodes und in der Mitte die Trigger node auch - aber das wars dann auch mit richtig. Warum hast Du nun die flow Variable bad_motion genannt und nicht wie ich empfohlen habe, ein Objekt gemacht, damit du es mal für mehrere Schalter verwenden kannst, warum hälst Du nicht exakt was ich schreibe?

          Am Besten erstellst Du ein Objekt im Flow Kontext, so dass es Du später auch für andere Schalter nutzen kannst. Also zum Beispiel Schalter.Bad. Am Besten nimmst Du direkt eine ChangeNode und setzt diese Eigenschaft auf true.

          Du hast die Flowvariable anders genannt und nicht auf true, sondern auf false gesetzt, warum?

          Anschließend nimmst Du den Trigger, der erst mal nichts schickt und erst nach 15 Minuten ein false schickt.

          Deine Trigger Node schickt zu Beginn einen String "1". Warum?

          Anschließend setzt Du mit einer weiteren ChangeNode die Eigenschaft Schalter.Bad wieder auf false und die payload wird ja dann an das Licht weitergeleitet.

          Tja und Du machst halt ein true. Keine Ahnung, wenn Du es immer besser weißt, dann spare ich mir meinen Text. 😉

          Wenn Du den Flow korrigiert hast, dann beschreibe mir bitte mit Worten im Text, was passiert wenn Du den Schalter betätigst, das Licht einschaltest und dann nach 5 Minuten das Licht beim Rausgehen ausschaltest.

          Und dann beschreibe noch kurz was passiert, wenn Du den Lichtschalter einschaltest und dann nichts tust.

          mickym Aphofis 2 Replies Last reply Reply Quote 0
          • mickym
            mickym Most Active @mickym last edited by

            @mickym Oder war etwa Deine Idee - das Deine Flowvariable was mit dem Bewegungsmelder zu tun haben soll und Du ihm gleich über den Flowkontext von der Ferne winken wolltest, dass er gefälligst false und somit nichts tun soll?

            Aphofis 1 Reply Last reply Reply Quote 0
            • Aphofis
              Aphofis @mickym last edited by Aphofis

              @mickym
              ich wusste nicht das du ein objekt als Datenpunkt meinst
              Ganz einfach, weil ich von den einzenen nodes keine Ahnung habe ich habe das 1 jetzt geändert in true und bei dem Rest bin ich bei.

              mickym 1 Reply Last reply Reply Quote 0
              • Aphofis
                Aphofis @mickym last edited by

                @mickym hihi ich habe das so verstanden, das wenn man aus dem Kontextmenü flow auswählt das dann der Flow angesprochen wird.

                Aphofis 1 Reply Last reply Reply Quote 0
                • Aphofis
                  Aphofis @Aphofis last edited by Aphofis

                  beim Schalten des Schalter geht Licht an und geht nach x min aus. Wenn ich den Lichtschalter ausschalte schaltet das Licht aus aber was jetzt die Steuerung macht keine Ahnung. Ich weiß nicht was das bewirkt wenn man auf flow umstellt.

                  Screenshot 2024-08-20 200446.png

                  [
                      {
                          "id": "1d761786cd03b6eb",
                          "type": "tab",
                          "label": "Flow 4",
                          "disabled": false,
                          "info": "",
                          "env": []
                      },
                      {
                          "id": "35403a23852c1068",
                          "type": "junction",
                          "z": "1d761786cd03b6eb",
                          "x": 320,
                          "y": 190,
                          "wires": [
                              [
                                  "39c33f0b9f2fddef"
                              ]
                          ]
                      },
                      {
                          "id": "39c33f0b9f2fddef",
                          "type": "junction",
                          "z": "1d761786cd03b6eb",
                          "x": 830,
                          "y": 190,
                          "wires": [
                              [
                                  "2b793d273b25a2f7",
                                  "8e8b0850594a2a69"
                              ]
                          ]
                      },
                      {
                          "id": "825a34e2e6145b1c",
                          "type": "ioBroker in",
                          "z": "1d761786cd03b6eb",
                          "name": "",
                          "attrname": "payload",
                          "topic": "Lichtschalter Bad",
                          "payloadType": "object",
                          "onlyack": "",
                          "func": "all",
                          "gap": "",
                          "fireOnStart": "false",
                          "outFormat": "MQTT",
                          "x": 130,
                          "y": 160,
                          "wires": [
                              [
                                  "6e55b108db47eaed",
                                  "35403a23852c1068"
                              ]
                          ]
                      },
                      {
                          "id": "2b793d273b25a2f7",
                          "type": "ioBroker out",
                          "z": "1d761786cd03b6eb",
                          "name": "Bad Decke",
                          "topic": "tuya.0.bf78f027e5e33c3d76xrfe.1",
                          "ack": "false",
                          "autoCreate": "false",
                          "stateName": "",
                          "role": "",
                          "payloadType": "",
                          "readonly": "",
                          "stateUnit": "",
                          "stateMin": "",
                          "stateMax": "",
                          "x": 1050,
                          "y": 190,
                          "wires": []
                      },
                      {
                          "id": "d4d742934b195768",
                          "type": "inject",
                          "z": "1d761786cd03b6eb",
                          "name": "Aus",
                          "props": [
                              {
                                  "p": "payload"
                              }
                          ],
                          "repeat": "",
                          "crontab": "",
                          "once": false,
                          "onceDelay": 0.1,
                          "topic": "",
                          "payload": "false",
                          "payloadType": "bool",
                          "x": 160,
                          "y": 210,
                          "wires": [
                              [
                                  "35403a23852c1068"
                              ]
                          ]
                      },
                      {
                          "id": "34a6d988e012a62b",
                          "type": "inject",
                          "z": "1d761786cd03b6eb",
                          "name": "An",
                          "props": [
                              {
                                  "p": "payload"
                              },
                              {
                                  "p": "topic",
                                  "vt": "str"
                              }
                          ],
                          "repeat": "",
                          "crontab": "",
                          "once": false,
                          "onceDelay": 0.1,
                          "topic": "",
                          "payload": "true",
                          "payloadType": "bool",
                          "x": 160,
                          "y": 250,
                          "wires": [
                              [
                                  "6e55b108db47eaed"
                              ]
                          ]
                      },
                      {
                          "id": "50172abc4513c6cf",
                          "type": "debug",
                          "z": "1d761786cd03b6eb",
                          "name": "Bad Decke",
                          "active": true,
                          "tosidebar": true,
                          "console": false,
                          "tostatus": false,
                          "complete": "payload",
                          "targetType": "msg",
                          "statusVal": "",
                          "statusType": "auto",
                          "x": 1050,
                          "y": 240,
                          "wires": []
                      },
                      {
                          "id": "6e55b108db47eaed",
                          "type": "change",
                          "z": "1d761786cd03b6eb",
                          "name": "",
                          "rules": [
                              {
                                  "t": "set",
                                  "p": "Schalten.Bad",
                                  "pt": "flow",
                                  "to": "true",
                                  "tot": "bool"
                              }
                          ],
                          "action": "",
                          "property": "",
                          "from": "",
                          "to": "",
                          "reg": false,
                          "x": 410,
                          "y": 250,
                          "wires": [
                              [
                                  "4faf1ed0bf7c1af3"
                              ]
                          ]
                      },
                      {
                          "id": "4faf1ed0bf7c1af3",
                          "type": "trigger",
                          "z": "1d761786cd03b6eb",
                          "name": "",
                          "op1": "true",
                          "op2": "false",
                          "op1type": "str",
                          "op2type": "bool",
                          "duration": "2",
                          "extend": true,
                          "overrideDelay": false,
                          "units": "min",
                          "reset": "",
                          "bytopic": "all",
                          "topic": "topic",
                          "outputs": 1,
                          "x": 620,
                          "y": 250,
                          "wires": [
                              [
                                  "f65257011e0b574c"
                              ]
                          ]
                      },
                      {
                          "id": "f65257011e0b574c",
                          "type": "change",
                          "z": "1d761786cd03b6eb",
                          "name": "",
                          "rules": [
                              {
                                  "t": "set",
                                  "p": "Schalten.Bad",
                                  "pt": "flow",
                                  "to": "true",
                                  "tot": "bool"
                              }
                          ],
                          "action": "",
                          "property": "",
                          "from": "",
                          "to": "",
                          "reg": false,
                          "x": 820,
                          "y": 250,
                          "wires": [
                              [
                                  "50172abc4513c6cf",
                                  "2b793d273b25a2f7"
                              ]
                          ]
                      },
                      {
                          "id": "8e8b0850594a2a69",
                          "type": "debug",
                          "z": "1d761786cd03b6eb",
                          "name": "debug 1",
                          "active": true,
                          "tosidebar": true,
                          "console": false,
                          "tostatus": false,
                          "complete": "false",
                          "statusVal": "",
                          "statusType": "auto",
                          "x": 1040,
                          "y": 150,
                          "wires": []
                      }
                  ]
                  


                  Objekt Schalten.Bad habe ich erstellt bzw Ordner ist Schalten Objekt ist Bad

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

                    @aphofis Meinte ich auch nicht.

                    Ein Objekt erstellt man in dem man dem Objekt einen Namen und eine Eigenschaft gibt.

                    Das heißt, das Objekt heißt Schalter und die Eigenschaft Bad.

                    Ganz einfach, weil ich von den einzenen nodes keine Ahnung habe ich habe das 1 jetzt geändert in true und bei dem Rest bin ich bei.

                    Na aber Du willst doch eine Ahnung haben und Du solltest beim Trigger nicht die 1 auf true ändern, sondern der Trigger soll erst mal gar nichts senden.

                    ee4e0da9-7af2-432b-be5c-5d3b93800078-image.png

                    Ich mach Dir den Flow fertig und dann kannst Du Fragen stellen und - Deine Kabel sind durcheinander.

                    Wie Du siehst hast Du damit im Kontext ein Objekt Schalter erstellt und eine Eigenschaft Bad, die den Wert true hat:

                    0ed8f024-3ab3-40d5-aede-ccb4e5538ac4-image.png

                    Nimm jetzt besser meinen Flow:
                    7a47958f-58d6-4431-97a4-27b6e5487152-image.png

                    [
                       {
                           "id": "825a34e2e6145b1c",
                           "type": "ioBroker in",
                           "z": "1d761786cd03b6eb",
                           "name": "",
                           "attrname": "payload",
                           "topic": "Lichtschalter Bad",
                           "payloadType": "object",
                           "onlyack": "",
                           "func": "all",
                           "gap": "",
                           "fireOnStart": "false",
                           "outFormat": "MQTT",
                           "x": 130,
                           "y": 120,
                           "wires": [
                               [
                                   "8ba39a421f5c3317"
                               ]
                           ]
                       },
                       {
                           "id": "2b793d273b25a2f7",
                           "type": "ioBroker out",
                           "z": "1d761786cd03b6eb",
                           "name": "Bad Decke",
                           "topic": "tuya.0.bf78f027e5e33c3d76xrfe.1",
                           "ack": "false",
                           "autoCreate": "false",
                           "stateName": "",
                           "role": "",
                           "payloadType": "",
                           "readonly": "",
                           "stateUnit": "",
                           "stateMin": "",
                           "stateMax": "",
                           "x": 1120,
                           "y": 120,
                           "wires": []
                       },
                       {
                           "id": "50172abc4513c6cf",
                           "type": "debug",
                           "z": "1d761786cd03b6eb",
                           "name": "Bad Decke",
                           "active": true,
                           "tosidebar": true,
                           "console": false,
                           "tostatus": false,
                           "complete": "payload",
                           "targetType": "msg",
                           "statusVal": "",
                           "statusType": "auto",
                           "x": 1120,
                           "y": 170,
                           "wires": []
                       },
                       {
                           "id": "6e55b108db47eaed",
                           "type": "change",
                           "z": "1d761786cd03b6eb",
                           "name": "",
                           "rules": [
                               {
                                   "t": "set",
                                   "p": "Schalter.Bad",
                                   "pt": "flow",
                                   "to": "true",
                                   "tot": "bool"
                               }
                           ],
                           "action": "",
                           "property": "",
                           "from": "",
                           "to": "",
                           "reg": false,
                           "x": 430,
                           "y": 160,
                           "wires": [
                               [
                                   "4faf1ed0bf7c1af3"
                               ]
                           ]
                       },
                       {
                           "id": "4faf1ed0bf7c1af3",
                           "type": "trigger",
                           "z": "1d761786cd03b6eb",
                           "name": "",
                           "op1": "",
                           "op2": "false",
                           "op1type": "nul",
                           "op2type": "bool",
                           "duration": "15",
                           "extend": true,
                           "overrideDelay": false,
                           "units": "min",
                           "reset": "",
                           "bytopic": "all",
                           "topic": "topic",
                           "outputs": 1,
                           "x": 660,
                           "y": 160,
                           "wires": [
                               [
                                   "f65257011e0b574c"
                               ]
                           ]
                       },
                       {
                           "id": "f65257011e0b574c",
                           "type": "change",
                           "z": "1d761786cd03b6eb",
                           "name": "",
                           "rules": [
                               {
                                   "t": "set",
                                   "p": "Schalter.Bad",
                                   "pt": "flow",
                                   "to": "false",
                                   "tot": "bool"
                               }
                           ],
                           "action": "",
                           "property": "",
                           "from": "",
                           "to": "",
                           "reg": false,
                           "x": 890,
                           "y": 160,
                           "wires": [
                               [
                                   "50172abc4513c6cf",
                                   "2b793d273b25a2f7"
                               ]
                           ]
                       },
                       {
                           "id": "d4d742934b195768",
                           "type": "inject",
                           "z": "1d761786cd03b6eb",
                           "name": "Aus",
                           "props": [
                               {
                                   "p": "payload"
                               },
                               {
                                   "p": "topic",
                                   "vt": "str"
                               }
                           ],
                           "repeat": "",
                           "crontab": "",
                           "once": false,
                           "onceDelay": 0.1,
                           "topic": "",
                           "payload": "false",
                           "payloadType": "bool",
                           "x": 150,
                           "y": 40,
                           "wires": [
                               [
                                   "8ba39a421f5c3317"
                               ]
                           ]
                       },
                       {
                           "id": "34a6d988e012a62b",
                           "type": "inject",
                           "z": "1d761786cd03b6eb",
                           "name": "An",
                           "props": [
                               {
                                   "p": "payload"
                               },
                               {
                                   "p": "topic",
                                   "vt": "str"
                               }
                           ],
                           "repeat": "",
                           "crontab": "",
                           "once": false,
                           "onceDelay": 0.1,
                           "topic": "",
                           "payload": "true",
                           "payloadType": "bool",
                           "x": 150,
                           "y": 80,
                           "wires": [
                               [
                                   "8ba39a421f5c3317"
                               ]
                           ]
                       },
                       {
                           "id": "8ba39a421f5c3317",
                           "type": "junction",
                           "z": "1d761786cd03b6eb",
                           "x": 260,
                           "y": 120,
                           "wires": [
                               [
                                   "6e55b108db47eaed",
                                   "2b793d273b25a2f7"
                               ]
                           ]
                       }
                    ]
                    

                    Das wäre ja noch schlimmer, damit hättesr Du im Trigger
                    ein Wort "true" als payload versendet.

                    Aphofis 1 Reply Last reply Reply Quote 0
                    • Aphofis
                      Aphofis @mickym last edited by Aphofis

                      Oh gott ne das ne schlechte Schleife
                      woher hat denn jetzt Kontextdaten Bad_Motion hergeholt und steht auf true !?
                      Screenshot 2024-08-20 201941.png
                      Ist schalter.bad ein virtueller schalter !?

                      mickym 2 Replies Last reply Reply Quote 0
                      • mickym
                        mickym Most Active @Aphofis last edited by

                        @aphofis Das stammt doch von Deinem Flow. Von meinem habe ich Dir doch einen Screenshot von dem Flowkontext gepostet.

                        Aphofis 1 Reply Last reply Reply Quote 0
                        • Aphofis
                          Aphofis @mickym last edited by

                          @mickym alles klar den muss man löschen!
                          So ist es dann wohl wie gewollt
                          Screenshot 2024-08-20 202552.png

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

                            @aphofis sagte in 2 Bewegungsmelder (Aqara) sollen einen Lampe schalten:

                            Ist schalter.bad ein virtueller schalter !?

                            Nein das ist ein Variable, die für den ganzen FLOW Gültigkeit hat.

                            11f752ea-9d82-4a5c-b052-2235dcf608c2-image.png

                            Wie Du siehst gibt es auch einen NODE Kontext - der hat Gültigkeit innerhalb einer function Node.

                            Und es gibt einen GLOBAL Kontext, dessen Variablen haben über alle Flows Gültigkeit

                            Aphofis 1 Reply Last reply Reply Quote 0
                            • Aphofis
                              Aphofis @mickym last edited by

                              @mickym ok

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

                                @aphofis sagte in 2 Bewegungsmelder (Aqara) sollen einen Lampe schalten:

                                @mickym alles klar den muss man löschen!
                                So ist es dann wohl wie gewollt
                                Screenshot 2024-08-20 202552.png

                                Nein wenn Du meinen Flow nimmst - NUR EINE Variable. Ich hatte doch in beiden Change Nodes Schalter.

                                Vor der trigger Node ist der Schalter true und signalisiert, dass der Schalter betätigt oder aktiv ist. Sobald der trigger abgelaufen ist, wird die Eigenschaft Schalter.Bad auf false gesetzt und signalisiert, dass der Schalter nun nicht mehr als aktiv gilt.
                                Soweit verstanden?

                                Dann beschreibe mir bitte was passiert wie ich unten beschrieben habe.

                                Aphofis 1 Reply Last reply Reply Quote 0
                                • Aphofis
                                  Aphofis @mickym last edited by

                                  @mickym ja habe deinen Flow genommen.
                                  Habe die falschen objekte gelöscht ist nur noch Schalter.Bad

                                  mickym Aphofis 2 Replies Last reply Reply Quote 0
                                  • mickym
                                    mickym Most Active @Aphofis last edited by mickym

                                    @aphofis Gut - Können wir dann auf meinen Wunsch zurückkommen?

                                    Wenn Du den Flow korrigiert hast, dann beschreibe mir bitte mit Worten im Text, was passiert wenn Du den Schalter betätigst, das Licht einschaltest und dann nach 5 Minuten das Licht beim Rausgehen ausschaltest.

                                    Und dann beschreibe noch kurz was passiert, wenn Du den Lichtschalter einschaltest und dann nichts tust.

                                    1 Reply Last reply Reply Quote 0
                                    • Aphofis
                                      Aphofis @Aphofis last edited by Aphofis

                                      @aphofis
                                      Wenn man den Lichtschalter betätigt, dann wird Schalter ~ Bad also dieser flow wird für 15 min. auf true gesetzt. Demnach halt der Lichtschalter. Nach diesen 15 min. wird schalter bad wieder auf false gesetzt und der Lichtschalter auf false
                                      dh. die flow wird für 15 min aktiv auf true gehalten danach ausgeschaltet

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

                                        @aphofis Na ja ist halt nicht exakt und das ist immer das Problem.

                                        5cc350d1-1b24-4516-9ac5-2a6ea18f7639-image.png

                                        Wenn der Datenpunkt Lichtschalter Bad, also durch den Schalter getriggert wird, dann wird die Nachricht sofort an den Datenpunkt Bad Decke weitergeleitet, also den Datenpunkt des Licht auf den Wert des Schalters gesetzt.

                                        Gleichzeitig setzt das Nachrichtenobjekt die Flowvariable Schalter.Bad auf true und triggert die trigger Node. Diese setzt, aber nur falls zwischenzeitlich nicht erneut ein Nachrichtenobjekt ankommt, das durch Betätigen des Lichtschalters erzeugt wird, nach 15 Minuten die Flowvariable Schalter.Bad auf false und gleichzeitig schaltet es mit der payload, die die trigger Node ja auf false gesetzt hat, das Licht auf false.

                                        wird schalter bad wieder auf false gesetzt und der Lichtschalter auf false

                                        Der Lichtschalter wird gar nicht gesetzt - das darf man auch nicht, da dieser nur durch deine Hardware gesetzt wird (auch wenn Du diese im Moment nur simulierst) und immer den Zustand des Schalters widerspiegelt.

                                        Merkst Du wie wichtig hier Genauigkeit ist?

                                        So nun musst Du noch im Bewegungsmelder Flow - der sich HOFFENTLICH im gleichen Flow befindet??? - anhand der Variablen die Signale des Bewegungsmelders durchlassen oder blockieren.

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

                                          Wie weit bist Du? Bist Du noch da?

                                          Aphofis 1 Reply Last reply Reply Quote 0
                                          • Aphofis
                                            Aphofis @mickym last edited by

                                            @mickym Sorry eingeschlafen.
                                            War ein anstrengender Tag.

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

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate

                                            1.0k
                                            Online

                                            31.7k
                                            Users

                                            79.7k
                                            Topics

                                            1.3m
                                            Posts

                                            3
                                            216
                                            15020
                                            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