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 Englisch macht nix der Sprache bin ich mächtig.
      Jetzt nur noch alle anderen Steuerungen vom Blockly ins Node-red bekommen.
      Gut das es das 1000 Liter Meerwasser Becken nicht mehr gibt das mit über 170 Blockly Steuerungen gesteuert wurde. Da gestaltet sich das 110 Liter Süßwasser Becken einfacher.
      Da würde ich dann aber neue Threads aufmachen.

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

        Link verknüpfungen sind ja auch mal sehr geil.

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

          @aphofis Nimm Dir kleine Flows vor und achte nur darauf, dass Du nicht beides AKTIV hast, sonst kommst Du in Konflikt.

          Ich wundere mich etwas. Ich erinnere mich, dass schon vor ein paar Jahren mit NodeRed anfangen wolltest und ich Dir was gebastelt habe, aber dann hast Du doch alles in Blockly gemacht.

          Ich erinnere mich dunkel an diesen Thread:
          https://forum.iobroker.net/topic/36997/alexa-ein-befehl-true-oder-false
          oder daran:
          https://forum.iobroker.net/topic/35918/kleine-verständniss-hilfe

          Hier hatte ich Dir sogar einige Empfehlungen zum Lernen gegeben: https://forum.iobroker.net/post/470328

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

            @mickym Habe jetzt schalter An/Aus ~~ licht an/aus

            Screenshot 2024-08-20 173744.png

            [
                {
                    "id": "1d761786cd03b6eb",
                    "type": "tab",
                    "label": "Flow 4",
                    "disabled": false,
                    "info": "",
                    "env": []
                },
                {
                    "id": "60c60fdc914d5454",
                    "type": "junction",
                    "z": "1d761786cd03b6eb",
                    "x": 290,
                    "y": 120,
                    "wires": [
                        [
                            "2b793d273b25a2f7",
                            "50172abc4513c6cf"
                        ]
                    ]
                },
                {
                    "id": "825a34e2e6145b1c",
                    "type": "ioBroker in",
                    "z": "1d761786cd03b6eb",
                    "name": "",
                    "attrname": "payload",
                    "topic": "Lichtschalter Bad",
                    "payloadType": "value",
                    "onlyack": "",
                    "func": "all",
                    "gap": "",
                    "fireOnStart": "false",
                    "outFormat": "MQTT",
                    "x": 130,
                    "y": 120,
                    "wires": [
                        [
                            "60c60fdc914d5454"
                        ]
                    ]
                },
                {
                    "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": 440,
                    "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": 160,
                    "y": 80,
                    "wires": [
                        [
                            "60c60fdc914d5454"
                        ]
                    ]
                },
                {
                    "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": 40,
                    "wires": [
                        [
                            "60c60fdc914d5454"
                        ]
                    ]
                },
                {
                    "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": 440,
                    "y": 80,
                    "wires": []
                }
            ]
            

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

              @aphofis Sehr gut. Da Du ja auf alle Schalterstellungen sofort reagieren willst, würde ich dann parallel an dem Knoten eine flow Variable setzen, dass der Schalter betätigt wurde. 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. Anschließend nimmst Du den Trigger, der erst mal nichts schickt und erst nach 15 Minuten ein false schickt. Achte darauf, dass ich diese Verzögerung verlängert, wenn eine neue Nachricht kommt, denn Du willst ja erst das Licht ausschalten, wenn 15 Minuten lang kein Schalter mehr betätigt wurde. 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. Damit sollte Dein Flow für den Schalter fertig sein.

              Ein flow Variable setzt Du indem Du in der ChangeNode eben nicht eine Nachrichteneigenschaft, sondern eine Flow eigenschaft setzt:

              073fc22c-e549-4f54-b05e-7a0247586913-image.png

              den aktuellen Inhalt der Flowvariablen kannst Du über den Plattenstapel sehen:

              26c52f7a-d52a-4649-bc07-8724fcdbc71c-image.png

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

                @mickym
                also meinst du so !?
                Screenshot 2024-08-20 192653.png

                ![2b3971da-7ecd-4e63-86d2-d233b62728b4-grafik.png](/assets/uploads/files/1724174848479-2b3971da-7ecd-4e63-86d2-d233b62728b4-grafik.png) code_text
                

                mickym 2 Replies 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
                  also meinst du so !?
                  Screenshot 2024-08-20 192653.png

                  ![2b3971da-7ecd-4e63-86d2-d233b62728b4-grafik.png](/assets/uploads/files/1724174848479-2b3971da-7ecd-4e63-86d2-d233b62728b4-grafik.png) code_text
                  

                  Nein ich habe doch gesagt parallel. Du möchtest doch, dass das direkte Schalen weiter direkt an die Lampe durchgereicht wird.

                  Um ich sagte Dir auch, dass Du keine payload ändern sollst, sondern eine Flowvariable.

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

                    @aphofis und

                    3567bd71-7bef-4653-9aeb-92b333d7c4de-image.png

                    damit kann ich nichts anfangen. Aber lies Dir das in Ruhe durch und beachte alle Hinweise.

                    Aphofis 1 Reply Last reply Reply Quote 0
                    • 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
                                            • First post
                                              Last post

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate

                                            690
                                            Online

                                            31.7k
                                            Users

                                            79.8k
                                            Topics

                                            1.3m
                                            Posts

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