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. Flip Flop Logik an Hand nummerischen Wert

    NEWS

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

    • ioBroker goes Matter ... Matter Adapter in Stable

    • Monatsrückblick - April 2025

    Flip Flop Logik an Hand nummerischen Wert

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

      @_r_a_l_f_ sagte in Flip Flop Logik an Hand nummerischen Wert:

      Sobald ich ein deploy in Node-Red vornehme und ich die Einstellungen wie im Anhang

      1. Kann man das deploy so einstellen, dass nur die veränderten Nodes neu initialisiert werden (dann passiert das nicht bei jedem Deploy).

      41d8a3d8-ddf4-41e8-a73c-aab7ea6ab83c-image.png

      1. Kann man im filter einstellen, dass der Anfangswert ignoriert wird. Das dient genau dazu, dass nach Neustart vom Node-Red der Filter initialisiert wird, aber keinen Wert weiter schickt.

      69930917-7cff-46b7-b6e6-541af1c8098e-image.png

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

        @mickym Ah perfekt, vielen Dank für den Tipp. An der falschen Stelle gesucht 😉

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

          @_r_a_l_f_ Bin zwar nicht so sicher, ob ich Deinen Flow - sonst so prickelnd finde, aber ich hoffe es hilft erst mal. 😉

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

            @mickym Gerne korrigieren, wenn du eine bessere Lösung hast 😉

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

              @_r_a_l_f_ sagte in Flip Flop Logik an Hand nummerischen Wert:

              @mickym Gerne korrigieren, wenn du eine bessere Lösung hast 😉

              So ich arbeitete lieber mit der trigger Node- da du dort auch direkt die reset Bedingung definieren kannst. Ich komm da auch ohne Hilfsvariable aus - aber vielleicht habe ich auch einen Denkfehler.

              Jedenfalls kommt es mit "cleaner" vor. 😉

              Der untere Vorschlag ist meiner - der obere war Dein Originalflow:

              c1b0ae92-99c0-4af9-8cb9-c2083f9109ce-image.png

              Hier mal zum Testen:

              [
                 {
                     "id": "5397d71d27f01e79",
                     "type": "rbe",
                     "z": "a1771eb8a0b9a8ee",
                     "name": "FlipFlop-Fenster",
                     "func": "rbei",
                     "gap": "",
                     "start": "",
                     "inout": "out",
                     "septopics": false,
                     "property": "payload",
                     "topi": "topic",
                     "x": 820,
                     "y": 540,
                     "wires": [
                         [
                             "f24c227c18282784"
                         ]
                     ]
                 },
                 {
                     "id": "f392c17e0cf6b3c8",
                     "type": "trigger",
                     "z": "a1771eb8a0b9a8ee",
                     "name": "",
                     "op1": "",
                     "op2": "true",
                     "op1type": "nul",
                     "op2type": "bool",
                     "duration": "10",
                     "extend": false,
                     "overrideDelay": false,
                     "units": "min",
                     "reset": "false",
                     "bytopic": "all",
                     "topic": "topic",
                     "outputs": 1,
                     "x": 580,
                     "y": 500,
                     "wires": [
                         [
                             "5397d71d27f01e79"
                         ]
                     ]
                 },
                 {
                     "id": "fc497b78359364ef",
                     "type": "switch",
                     "z": "a1771eb8a0b9a8ee",
                     "name": "Fenster-Check-WZ",
                     "property": "payload",
                     "propertyType": "msg",
                     "rules": [
                         {
                             "t": "true"
                         },
                         {
                             "t": "false"
                         }
                     ],
                     "checkall": "false",
                     "repair": false,
                     "outputs": 2,
                     "x": 350,
                     "y": 540,
                     "wires": [
                         [
                             "f392c17e0cf6b3c8"
                         ],
                         [
                             "5397d71d27f01e79",
                             "f392c17e0cf6b3c8"
                         ]
                     ]
                 },
                 {
                     "id": "8e1eab3e3772ae86",
                     "type": "template",
                     "z": "a1771eb8a0b9a8ee",
                     "name": "E-mail Inhalt Fenster offen",
                     "field": "payload",
                     "fieldType": "msg",
                     "format": "handlebars",
                     "syntax": "mustache",
                     "template": "<style>\n    .Font_Topic {\n    font-size: 20px;\n    color: orange;\n    font-weight: bold;\n    }\n    .Font_Msg {\n    font-size: 14px;\n    }    \n    .Font_ToDo {\n    font-size: 16px;\n    color: blue;\n    font-weight: bold;\n    }    \n</style>\n<p class=\"Font_Topic\">Warnung</p>\n<p class=\"Font_Msg\">Das Fenster im WZ ist > 10 min. offen!</p>\n<p class=\"Font_ToDo\">Bitte Fenster wieder schließen!</p> ",
                     "output": "str",
                     "x": 1380,
                     "y": 520,
                     "wires": [
                         [
                             "086482f344c77d4e"
                         ]
                     ]
                 },
                 {
                     "id": "701718454c213b8b",
                     "type": "template",
                     "z": "a1771eb8a0b9a8ee",
                     "name": "E-mail Inhalt Fenster zu",
                     "field": "payload",
                     "fieldType": "msg",
                     "format": "handlebars",
                     "syntax": "mustache",
                     "template": "<style>\n    .Font_Topic {\n    font-size: 20px;\n    color: blue;\n    font-weight: bold;\n    }\n    .Font_Msg {\n    font-size: 14px;\n    }    \n    .Font_ToDo {\n    font-size: 16px;\n    color: blue;\n    font-weight: bold;\n    }    \n</style>\n<p class=\"Font_Topic\">Info</p>\n<p class=\"Font_Msg\">Das Fenster im WZ ist wieder zu.</p>",
                     "output": "str",
                     "x": 1370,
                     "y": 560,
                     "wires": [
                         [
                             "086482f344c77d4e"
                         ]
                     ]
                 },
                 {
                     "id": "f24c227c18282784",
                     "type": "switch",
                     "z": "a1771eb8a0b9a8ee",
                     "name": "Auswahl-Msg-FlipFlop",
                     "property": "payload",
                     "propertyType": "msg",
                     "rules": [
                         {
                             "t": "true"
                         },
                         {
                             "t": "false"
                         }
                     ],
                     "checkall": "false",
                     "repair": false,
                     "outputs": 2,
                     "x": 1060,
                     "y": 540,
                     "wires": [
                         [
                             "8e1eab3e3772ae86"
                         ],
                         [
                             "701718454c213b8b"
                         ]
                     ]
                 },
                 {
                     "id": "086482f344c77d4e",
                     "type": "change",
                     "z": "a1771eb8a0b9a8ee",
                     "name": "Fenster-Offen-Msg-bearbeiten",
                     "rules": [
                         {
                             "t": "set",
                             "p": "topic",
                             "pt": "msg",
                             "to": "Fenster WZ",
                             "tot": "str"
                         }
                     ],
                     "action": "",
                     "property": "",
                     "from": "",
                     "to": "",
                     "reg": false,
                     "x": 1670,
                     "y": 540,
                     "wires": [
                         [
                             "9c6e0f6942c14645"
                         ]
                     ]
                 },
                 {
                     "id": "9c6e0f6942c14645",
                     "type": "debug",
                     "z": "a1771eb8a0b9a8ee",
                     "name": "Ab-Hier-E-mail Versand",
                     "active": true,
                     "tosidebar": true,
                     "console": false,
                     "tostatus": false,
                     "complete": "payload",
                     "targetType": "msg",
                     "statusVal": "",
                     "statusType": "auto",
                     "x": 1960,
                     "y": 540,
                     "wires": []
                 }
              ]
              

              Noch eine Bemerkung: Wenn man in der Filter Node - den Anfangswertignoriert kann man auch oder sollte die Filter-Node gleich initialisieren - also in der iobroker_in Node den Datenpunkt gleich auslesen:

              69c6f590-56b9-4b6d-ad34-8fe051840694-image.png

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

                @mickym Sorry für die späte Rückmeldung. War seit dem nicht mehr on aber trotzdem vielen Dank für den Lösungsvorschlag 😉 Beim ersten Test sind mir jetzt keine Auffälligkeiten zu anderne Lösung aufgefallen und es ist definitiv schlanker. Werde ich jetzt überall mal abändern und testen.

                1 Reply Last reply Reply Quote 0
                • _
                  _R_A_L_F_ last edited by

                  @mickym Da die neue Situation recht ähnlicher dieser (Flip Flop Logik) ist und ich den Fehler nicht wirklich erkennen kann bräuchte ich mal deinen Input zu dem ganzen:

                  Es geht um eine Level Regelung, welche sich aus dem Switch Node Input ergibt.
                  Dann sollen verzögert Stufen aktiviert werden.
                  Stufe 0 ist quasi die Ausgangslage, wenn der nummerische Wert kleiner Stufe 1 ist (Basislevel).
                  Wenn verz. Stufe 1 aktiviert wird, soll Stufe 0 deaktiviert werden und Stufe 1 aktiviert.
                  Wenn verz. Stufe 2 aktiviert wird, dann soll Stufe 2 aktiviert, jedoch Stufe 1 auch weiterhin aktiv sein.
                  Wenn jedoch Stufe 1 wieder aktiviert wird (auf Grund vom fallenden Level) dann soll Stufe 2 deaktiviert werden.
                  Deaktiviert = payload = false

                  Problem ist bei diesem Flow, dass zwar Stufe 2 aktiviert (payload = true) wird, jedoch nicht mehr deaktiviert obwohl ich über den Change Node den payload = false sende.
                  Gleiches gilt für die Deaktivierung von Stufe 1.
                  Ich weiß nicht, wo bei der Konfig der Wurm bzw. ich nen Denkfehler drin hab. Eigentlich dachte ich, sollte es so funktionieren?

                  [
                      {
                          "id": "86b699fc65f0566c",
                          "type": "tab",
                          "label": "Flow 1",
                          "disabled": false,
                          "info": "",
                          "env": []
                      },
                      {
                          "id": "83c967f55180cc71",
                          "type": "switch",
                          "z": "86b699fc65f0566c",
                          "name": "Level",
                          "property": "payload",
                          "propertyType": "msg",
                          "rules": [
                              {
                                  "t": "lte",
                                  "v": "9",
                                  "vt": "num"
                              },
                              {
                                  "t": "btwn",
                                  "v": "10",
                                  "vt": "num",
                                  "v2": "20",
                                  "v2t": "num"
                              },
                              {
                                  "t": "btwn",
                                  "v": "21",
                                  "vt": "num",
                                  "v2": "50",
                                  "v2t": "num"
                              }
                          ],
                          "checkall": "true",
                          "repair": false,
                          "outputs": 3,
                          "x": 450,
                          "y": 400,
                          "wires": [
                              [
                                  "45e1374c190cb520"
                              ],
                              [
                                  "13927d8d45ca75cb"
                              ],
                              [
                                  "295ea16dd1d33c31"
                              ]
                          ]
                      },
                      {
                          "id": "379d70bfb24cf060",
                          "type": "inject",
                          "z": "86b699fc65f0566c",
                          "name": "",
                          "props": [
                              {
                                  "p": "payload"
                              },
                              {
                                  "p": "topic",
                                  "vt": "str"
                              }
                          ],
                          "repeat": "",
                          "crontab": "",
                          "once": false,
                          "onceDelay": 0.1,
                          "topic": "",
                          "payload": "9",
                          "payloadType": "num",
                          "x": 250,
                          "y": 340,
                          "wires": [
                              [
                                  "83c967f55180cc71"
                              ]
                          ]
                      },
                      {
                          "id": "4d6d4ba517060abb",
                          "type": "inject",
                          "z": "86b699fc65f0566c",
                          "name": "",
                          "props": [
                              {
                                  "p": "payload"
                              },
                              {
                                  "p": "topic",
                                  "vt": "str"
                              }
                          ],
                          "repeat": "",
                          "crontab": "",
                          "once": false,
                          "onceDelay": 0.1,
                          "topic": "",
                          "payload": "22",
                          "payloadType": "num",
                          "x": 250,
                          "y": 440,
                          "wires": [
                              [
                                  "83c967f55180cc71"
                              ]
                          ]
                      },
                      {
                          "id": "ae3b15d743245f73",
                          "type": "inject",
                          "z": "86b699fc65f0566c",
                          "name": "",
                          "props": [
                              {
                                  "p": "payload"
                              },
                              {
                                  "p": "topic",
                                  "vt": "str"
                              }
                          ],
                          "repeat": "",
                          "crontab": "",
                          "once": false,
                          "onceDelay": 0.1,
                          "topic": "",
                          "payload": "10",
                          "payloadType": "num",
                          "x": 250,
                          "y": 380,
                          "wires": [
                              [
                                  "83c967f55180cc71"
                              ]
                          ]
                      },
                      {
                          "id": "13927d8d45ca75cb",
                          "type": "trigger",
                          "z": "86b699fc65f0566c",
                          "name": "verz-Stufe-1",
                          "op1": "",
                          "op2": "true",
                          "op1type": "nul",
                          "op2type": "bool",
                          "duration": "2",
                          "extend": false,
                          "overrideDelay": false,
                          "units": "s",
                          "reset": "",
                          "bytopic": "all",
                          "topic": "topic",
                          "outputs": 1,
                          "x": 1070,
                          "y": 480,
                          "wires": [
                              [
                                  "457047e020452c79",
                                  "03596b8e2240fce5",
                                  "f312cd2583a1dce9"
                              ]
                          ]
                      },
                      {
                          "id": "6696c4033e0fcaab",
                          "type": "comment",
                          "z": "86b699fc65f0566c",
                          "name": "Level Regelung Test",
                          "info": "",
                          "x": 490,
                          "y": 340,
                          "wires": []
                      },
                      {
                          "id": "45fc70d55ae8d276",
                          "type": "debug",
                          "z": "86b699fc65f0566c",
                          "name": "Stufe 1 verz",
                          "active": true,
                          "tosidebar": true,
                          "console": false,
                          "tostatus": false,
                          "complete": "payload",
                          "targetType": "msg",
                          "statusVal": "",
                          "statusType": "auto",
                          "x": 1590,
                          "y": 480,
                          "wires": []
                      },
                      {
                          "id": "295ea16dd1d33c31",
                          "type": "trigger",
                          "z": "86b699fc65f0566c",
                          "name": "verz-Stufe-2",
                          "op1": "",
                          "op2": "true",
                          "op1type": "nul",
                          "op2type": "bool",
                          "duration": "2",
                          "extend": false,
                          "overrideDelay": false,
                          "units": "s",
                          "reset": "",
                          "bytopic": "all",
                          "topic": "topic",
                          "outputs": 1,
                          "x": 1090,
                          "y": 720,
                          "wires": [
                              [
                                  "d060922c7999cb68"
                              ]
                          ]
                      },
                      {
                          "id": "22decc37459730eb",
                          "type": "debug",
                          "z": "86b699fc65f0566c",
                          "name": "Stufe 2 verz",
                          "active": true,
                          "tosidebar": true,
                          "console": false,
                          "tostatus": false,
                          "complete": "payload",
                          "targetType": "msg",
                          "statusVal": "",
                          "statusType": "auto",
                          "x": 1590,
                          "y": 720,
                          "wires": []
                      },
                      {
                          "id": "824dcc36a821c6e2",
                          "type": "debug",
                          "z": "86b699fc65f0566c",
                          "name": "Stufe 0 verz",
                          "active": true,
                          "tosidebar": true,
                          "console": false,
                          "tostatus": false,
                          "complete": "payload",
                          "targetType": "msg",
                          "statusVal": "",
                          "statusType": "auto",
                          "x": 1590,
                          "y": 260,
                          "wires": []
                      },
                      {
                          "id": "03596b8e2240fce5",
                          "type": "change",
                          "z": "86b699fc65f0566c",
                          "name": "Reset-Stufe-2",
                          "rules": [
                              {
                                  "t": "set",
                                  "p": "payload",
                                  "pt": "msg",
                                  "to": "false",
                                  "tot": "bool"
                              },
                              {
                                  "t": "set",
                                  "p": "reset",
                                  "pt": "msg",
                                  "to": "true",
                                  "tot": "bool"
                              },
                              {
                                  "t": "set",
                                  "p": "topic",
                                  "pt": "msg",
                                  "to": "Reset-Stufe-2",
                                  "tot": "str"
                              }
                          ],
                          "action": "",
                          "property": "",
                          "from": "",
                          "to": "",
                          "reg": false,
                          "x": 1080,
                          "y": 540,
                          "wires": [
                              [
                                  "295ea16dd1d33c31",
                                  "d060922c7999cb68"
                              ]
                          ]
                      },
                      {
                          "id": "b9463c3c604f8325",
                          "type": "change",
                          "z": "86b699fc65f0566c",
                          "name": "Reset-Stufe-1",
                          "rules": [
                              {
                                  "t": "set",
                                  "p": "reset",
                                  "pt": "msg",
                                  "to": "true",
                                  "tot": "bool"
                              },
                              {
                                  "t": "set",
                                  "p": "payload",
                                  "pt": "msg",
                                  "to": "false",
                                  "tot": "bool"
                              },
                              {
                                  "t": "set",
                                  "p": "topic",
                                  "pt": "msg",
                                  "to": "Reset-Stufe-1",
                                  "tot": "str"
                              }
                          ],
                          "action": "",
                          "property": "",
                          "from": "",
                          "to": "",
                          "reg": false,
                          "x": 1080,
                          "y": 320,
                          "wires": [
                              [
                                  "13927d8d45ca75cb",
                                  "457047e020452c79"
                              ]
                          ]
                      },
                      {
                          "id": "45e1374c190cb520",
                          "type": "trigger",
                          "z": "86b699fc65f0566c",
                          "name": "verz-Stufe-0",
                          "op1": "",
                          "op2": "true",
                          "op1type": "nul",
                          "op2type": "bool",
                          "duration": "2",
                          "extend": false,
                          "overrideDelay": false,
                          "units": "s",
                          "reset": "",
                          "bytopic": "all",
                          "topic": "topic",
                          "outputs": 1,
                          "x": 1070,
                          "y": 260,
                          "wires": [
                              [
                                  "477cea2901f824e9",
                                  "b9463c3c604f8325"
                              ]
                          ]
                      },
                      {
                          "id": "d060922c7999cb68",
                          "type": "rbe",
                          "z": "86b699fc65f0566c",
                          "name": "Aktiv-Stufe-2",
                          "func": "rbei",
                          "gap": "",
                          "start": "",
                          "inout": "out",
                          "septopics": false,
                          "property": "payload",
                          "topi": "topic",
                          "x": 1370,
                          "y": 720,
                          "wires": [
                              [
                                  "22decc37459730eb"
                              ]
                          ]
                      },
                      {
                          "id": "457047e020452c79",
                          "type": "rbe",
                          "z": "86b699fc65f0566c",
                          "name": "Aktiv-Stufe-1",
                          "func": "rbei",
                          "gap": "",
                          "start": "",
                          "inout": "out",
                          "septopics": false,
                          "property": "payload",
                          "topi": "topic",
                          "x": 1370,
                          "y": 480,
                          "wires": [
                              [
                                  "45fc70d55ae8d276"
                              ]
                          ]
                      },
                      {
                          "id": "477cea2901f824e9",
                          "type": "rbe",
                          "z": "86b699fc65f0566c",
                          "name": "Aktiv-Stufe-0",
                          "func": "rbe",
                          "gap": "",
                          "start": "",
                          "inout": "out",
                          "septopics": false,
                          "property": "payload",
                          "topi": "topic",
                          "x": 1370,
                          "y": 260,
                          "wires": [
                              [
                                  "824dcc36a821c6e2"
                              ]
                          ]
                      },
                      {
                          "id": "f312cd2583a1dce9",
                          "type": "change",
                          "z": "86b699fc65f0566c",
                          "name": "Reset-Stufe-0",
                          "rules": [
                              {
                                  "t": "set",
                                  "p": "payload",
                                  "pt": "msg",
                                  "to": "false",
                                  "tot": "bool"
                              },
                              {
                                  "t": "set",
                                  "p": "topic",
                                  "pt": "msg",
                                  "to": "Reset-Stufe-1",
                                  "tot": "str"
                              }
                          ],
                          "action": "",
                          "property": "",
                          "from": "",
                          "to": "",
                          "reg": false,
                          "x": 1380,
                          "y": 320,
                          "wires": [
                              [
                                  "477cea2901f824e9"
                              ]
                          ]
                      }
                  ]
                  
                  mickym 1 Reply Last reply Reply Quote 0
                  • mickym
                    mickym Most Active @_R_A_L_F_ last edited by mickym

                    @_r_a_l_f_ Das Problem ist erkannt, da Du mit msg.reset=true nicht nur die Trigger-Node zurücksetzt, sondern auch die Filter-Node. Da diese aber darauf konfiguriert ist, dass der erste Wert ignoriert wird, wird die Nachricht, die von der Change-Node Reset-2 immer blockiert. Die einfachst Frage ist brauchst Du das zurücksetzen der Trigger Nodes denn?

                    Schau mal ob Du ohne Reset auskommst:

                    [
                        {
                            "id": "86b699fc65f0566c",
                            "type": "tab",
                            "label": "Flow 1",
                            "disabled": false,
                            "info": "",
                            "env": []
                        },
                        {
                            "id": "83c967f55180cc71",
                            "type": "switch",
                            "z": "86b699fc65f0566c",
                            "name": "Level",
                            "property": "payload",
                            "propertyType": "msg",
                            "rules": [
                                {
                                    "t": "lte",
                                    "v": "9",
                                    "vt": "num"
                                },
                                {
                                    "t": "btwn",
                                    "v": "10",
                                    "vt": "num",
                                    "v2": "20",
                                    "v2t": "num"
                                },
                                {
                                    "t": "btwn",
                                    "v": "21",
                                    "vt": "num",
                                    "v2": "50",
                                    "v2t": "num"
                                }
                            ],
                            "checkall": "true",
                            "repair": false,
                            "outputs": 3,
                            "x": 450,
                            "y": 400,
                            "wires": [
                                [
                                    "45e1374c190cb520"
                                ],
                                [
                                    "13927d8d45ca75cb"
                                ],
                                [
                                    "295ea16dd1d33c31"
                                ]
                            ]
                        },
                        {
                            "id": "379d70bfb24cf060",
                            "type": "inject",
                            "z": "86b699fc65f0566c",
                            "name": "",
                            "props": [
                                {
                                    "p": "payload"
                                },
                                {
                                    "p": "topic",
                                    "vt": "str"
                                }
                            ],
                            "repeat": "",
                            "crontab": "",
                            "once": false,
                            "onceDelay": 0.1,
                            "topic": "",
                            "payload": "9",
                            "payloadType": "num",
                            "x": 250,
                            "y": 340,
                            "wires": [
                                [
                                    "83c967f55180cc71"
                                ]
                            ]
                        },
                        {
                            "id": "4d6d4ba517060abb",
                            "type": "inject",
                            "z": "86b699fc65f0566c",
                            "name": "",
                            "props": [
                                {
                                    "p": "payload"
                                },
                                {
                                    "p": "topic",
                                    "vt": "str"
                                }
                            ],
                            "repeat": "",
                            "crontab": "",
                            "once": false,
                            "onceDelay": 0.1,
                            "topic": "",
                            "payload": "22",
                            "payloadType": "num",
                            "x": 250,
                            "y": 440,
                            "wires": [
                                [
                                    "83c967f55180cc71"
                                ]
                            ]
                        },
                        {
                            "id": "ae3b15d743245f73",
                            "type": "inject",
                            "z": "86b699fc65f0566c",
                            "name": "",
                            "props": [
                                {
                                    "p": "payload"
                                },
                                {
                                    "p": "topic",
                                    "vt": "str"
                                }
                            ],
                            "repeat": "",
                            "crontab": "",
                            "once": false,
                            "onceDelay": 0.1,
                            "topic": "",
                            "payload": "10",
                            "payloadType": "num",
                            "x": 250,
                            "y": 380,
                            "wires": [
                                [
                                    "83c967f55180cc71"
                                ]
                            ]
                        },
                        {
                            "id": "13927d8d45ca75cb",
                            "type": "trigger",
                            "z": "86b699fc65f0566c",
                            "name": "verz-Stufe-1",
                            "op1": "",
                            "op2": "true",
                            "op1type": "nul",
                            "op2type": "bool",
                            "duration": "2",
                            "extend": false,
                            "overrideDelay": false,
                            "units": "s",
                            "reset": "",
                            "bytopic": "all",
                            "topic": "topic",
                            "outputs": 1,
                            "x": 1070,
                            "y": 480,
                            "wires": [
                                [
                                    "457047e020452c79",
                                    "03596b8e2240fce5",
                                    "f312cd2583a1dce9"
                                ]
                            ]
                        },
                        {
                            "id": "6696c4033e0fcaab",
                            "type": "comment",
                            "z": "86b699fc65f0566c",
                            "name": "Level Regelung Test",
                            "info": "",
                            "x": 490,
                            "y": 340,
                            "wires": []
                        },
                        {
                            "id": "45fc70d55ae8d276",
                            "type": "debug",
                            "z": "86b699fc65f0566c",
                            "name": "Stufe 1 verz",
                            "active": true,
                            "tosidebar": true,
                            "console": false,
                            "tostatus": false,
                            "complete": "payload",
                            "targetType": "msg",
                            "statusVal": "",
                            "statusType": "auto",
                            "x": 1590,
                            "y": 480,
                            "wires": []
                        },
                        {
                            "id": "295ea16dd1d33c31",
                            "type": "trigger",
                            "z": "86b699fc65f0566c",
                            "name": "verz-Stufe-2",
                            "op1": "",
                            "op2": "true",
                            "op1type": "nul",
                            "op2type": "bool",
                            "duration": "2",
                            "extend": false,
                            "overrideDelay": false,
                            "units": "s",
                            "reset": "",
                            "bytopic": "all",
                            "topic": "topic",
                            "outputs": 1,
                            "x": 1090,
                            "y": 720,
                            "wires": [
                                [
                                    "d060922c7999cb68"
                                ]
                            ]
                        },
                        {
                            "id": "22decc37459730eb",
                            "type": "debug",
                            "z": "86b699fc65f0566c",
                            "name": "Stufe 2 verz",
                            "active": true,
                            "tosidebar": true,
                            "console": false,
                            "tostatus": false,
                            "complete": "payload",
                            "targetType": "msg",
                            "statusVal": "",
                            "statusType": "auto",
                            "x": 1590,
                            "y": 720,
                            "wires": []
                        },
                        {
                            "id": "824dcc36a821c6e2",
                            "type": "debug",
                            "z": "86b699fc65f0566c",
                            "name": "Stufe 0 verz",
                            "active": true,
                            "tosidebar": true,
                            "console": false,
                            "tostatus": false,
                            "complete": "payload",
                            "targetType": "msg",
                            "statusVal": "",
                            "statusType": "auto",
                            "x": 1590,
                            "y": 260,
                            "wires": []
                        },
                        {
                            "id": "03596b8e2240fce5",
                            "type": "change",
                            "z": "86b699fc65f0566c",
                            "name": "Reset-Stufe-2",
                            "rules": [
                                {
                                    "t": "set",
                                    "p": "payload",
                                    "pt": "msg",
                                    "to": "false",
                                    "tot": "bool"
                                },
                                {
                                    "t": "set",
                                    "p": "topic",
                                    "pt": "msg",
                                    "to": "Reset-Stufe-2",
                                    "tot": "str"
                                }
                            ],
                            "action": "",
                            "property": "",
                            "from": "",
                            "to": "",
                            "reg": false,
                            "x": 1080,
                            "y": 540,
                            "wires": [
                                [
                                    "d060922c7999cb68"
                                ]
                            ]
                        },
                        {
                            "id": "b9463c3c604f8325",
                            "type": "change",
                            "z": "86b699fc65f0566c",
                            "name": "Reset-Stufe-1",
                            "rules": [
                                {
                                    "t": "set",
                                    "p": "payload",
                                    "pt": "msg",
                                    "to": "false",
                                    "tot": "bool"
                                },
                                {
                                    "t": "set",
                                    "p": "topic",
                                    "pt": "msg",
                                    "to": "Reset-Stufe-1",
                                    "tot": "str"
                                }
                            ],
                            "action": "",
                            "property": "",
                            "from": "",
                            "to": "",
                            "reg": false,
                            "x": 1020,
                            "y": 340,
                            "wires": [
                                [
                                    "457047e020452c79"
                                ]
                            ]
                        },
                        {
                            "id": "45e1374c190cb520",
                            "type": "trigger",
                            "z": "86b699fc65f0566c",
                            "name": "verz-Stufe-0",
                            "op1": "",
                            "op2": "true",
                            "op1type": "nul",
                            "op2type": "bool",
                            "duration": "2",
                            "extend": false,
                            "overrideDelay": false,
                            "units": "s",
                            "reset": "",
                            "bytopic": "all",
                            "topic": "topic",
                            "outputs": 1,
                            "x": 1070,
                            "y": 260,
                            "wires": [
                                [
                                    "477cea2901f824e9",
                                    "b9463c3c604f8325"
                                ]
                            ]
                        },
                        {
                            "id": "d060922c7999cb68",
                            "type": "rbe",
                            "z": "86b699fc65f0566c",
                            "name": "Aktiv-Stufe-2",
                            "func": "rbei",
                            "gap": "",
                            "start": "",
                            "inout": "out",
                            "septopics": false,
                            "property": "payload",
                            "topi": "topic",
                            "x": 1370,
                            "y": 720,
                            "wires": [
                                [
                                    "22decc37459730eb"
                                ]
                            ]
                        },
                        {
                            "id": "457047e020452c79",
                            "type": "rbe",
                            "z": "86b699fc65f0566c",
                            "name": "Aktiv-Stufe-1",
                            "func": "rbei",
                            "gap": "",
                            "start": "",
                            "inout": "out",
                            "septopics": false,
                            "property": "payload",
                            "topi": "topic",
                            "x": 1370,
                            "y": 480,
                            "wires": [
                                [
                                    "45fc70d55ae8d276"
                                ]
                            ]
                        },
                        {
                            "id": "477cea2901f824e9",
                            "type": "rbe",
                            "z": "86b699fc65f0566c",
                            "name": "Aktiv-Stufe-0",
                            "func": "rbe",
                            "gap": "",
                            "start": "",
                            "inout": "out",
                            "septopics": false,
                            "property": "payload",
                            "topi": "topic",
                            "x": 1370,
                            "y": 260,
                            "wires": [
                                [
                                    "824dcc36a821c6e2"
                                ]
                            ]
                        },
                        {
                            "id": "f312cd2583a1dce9",
                            "type": "change",
                            "z": "86b699fc65f0566c",
                            "name": "Reset-Stufe-0",
                            "rules": [
                                {
                                    "t": "set",
                                    "p": "payload",
                                    "pt": "msg",
                                    "to": "false",
                                    "tot": "bool"
                                },
                                {
                                    "t": "set",
                                    "p": "topic",
                                    "pt": "msg",
                                    "to": "Reset-Stufe-1",
                                    "tot": "str"
                                }
                            ],
                            "action": "",
                            "property": "",
                            "from": "",
                            "to": "",
                            "reg": false,
                            "x": 1380,
                            "y": 320,
                            "wires": [
                                [
                                    "477cea2901f824e9"
                                ]
                            ]
                        }
                    ]
                    

                    Falls aus irgendeinem mir momentan nicht ersichtlichen Grund Du nicht ohne Reset auskommst, dann musst Du den Reset vor den Trigger Nodes machen und nicht dahinter. Ich hab die Verbindung im Moment gekappt.

                    Falls Du an den Grenzen - ggf- Schwankungen haben solltest solltest Du halt ganz vorne noch eine Filter Node dazumachen.

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

                      @mickym Danke für den Tipp mit dem Reset und den geänderten Flow.
                      Das Problem ist (zumindest zeigt sich das Verhalten auch im neuen Flow von dir) dass wenn z.B. der Switch den Timer von z.B. verz-Stufe-2 aufzieht und dann innnerhalb der Zeit aber wieder auf Stufe 1 zurückfällt, wird der Timer nicht abgelöscht und es kommt trotzdem das msg.payload = true durch. Dafür wäre ja eigentlich der trigger node drin, dass erst wenn der Schwellwert > Zeit X ansteht, auch durchgeschaltet wird und umgekehrt, wenn der Wert < Zeit X ist auch wieder deaktiviert wird um unnötiges hin- und herschalten zu vermeiden.

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

                        @_r_a_l_f_ Nun dann würde ich ggf. die Nachrichtenrate am Eingang begrenzen, dass die trigger Nodes fertig sind. damit sowas nicht passiert -

                        oder Du musst das resetten vor den trigger Nodes machen. Das habe ich hier gemacht. Das entspricht Deinem ursprünglichen Flow - nur dass Du nun nur die trigger NOdes resettest.

                        d8071edd-2001-4811-a115-8e844bf36bcc-image.png

                        [
                           {
                               "id": "83c967f55180cc71",
                               "type": "switch",
                               "z": "86b699fc65f0566c",
                               "name": "Level",
                               "property": "payload",
                               "propertyType": "msg",
                               "rules": [
                                   {
                                       "t": "lte",
                                       "v": "9",
                                       "vt": "num"
                                   },
                                   {
                                       "t": "btwn",
                                       "v": "10",
                                       "vt": "num",
                                       "v2": "20",
                                       "v2t": "num"
                                   },
                                   {
                                       "t": "btwn",
                                       "v": "21",
                                       "vt": "num",
                                       "v2": "50",
                                       "v2t": "num"
                                   }
                               ],
                               "checkall": "true",
                               "repair": false,
                               "outputs": 3,
                               "x": 450,
                               "y": 400,
                               "wires": [
                                   [
                                       "45e1374c190cb520"
                                   ],
                                   [
                                       "13927d8d45ca75cb"
                                   ],
                                   [
                                       "295ea16dd1d33c31"
                                   ]
                               ]
                           },
                           {
                               "id": "379d70bfb24cf060",
                               "type": "inject",
                               "z": "86b699fc65f0566c",
                               "name": "",
                               "props": [
                                   {
                                       "p": "payload"
                                   },
                                   {
                                       "p": "topic",
                                       "vt": "str"
                                   }
                               ],
                               "repeat": "",
                               "crontab": "",
                               "once": false,
                               "onceDelay": 0.1,
                               "topic": "",
                               "payload": "9",
                               "payloadType": "num",
                               "x": 250,
                               "y": 340,
                               "wires": [
                                   [
                                       "83c967f55180cc71"
                                   ]
                               ]
                           },
                           {
                               "id": "4d6d4ba517060abb",
                               "type": "inject",
                               "z": "86b699fc65f0566c",
                               "name": "",
                               "props": [
                                   {
                                       "p": "payload"
                                   },
                                   {
                                       "p": "topic",
                                       "vt": "str"
                                   }
                               ],
                               "repeat": "",
                               "crontab": "",
                               "once": false,
                               "onceDelay": 0.1,
                               "topic": "",
                               "payload": "22",
                               "payloadType": "num",
                               "x": 250,
                               "y": 440,
                               "wires": [
                                   [
                                       "83c967f55180cc71"
                                   ]
                               ]
                           },
                           {
                               "id": "ae3b15d743245f73",
                               "type": "inject",
                               "z": "86b699fc65f0566c",
                               "name": "",
                               "props": [
                                   {
                                       "p": "payload"
                                   },
                                   {
                                       "p": "topic",
                                       "vt": "str"
                                   }
                               ],
                               "repeat": "",
                               "crontab": "",
                               "once": false,
                               "onceDelay": 0.1,
                               "topic": "",
                               "payload": "10",
                               "payloadType": "num",
                               "x": 250,
                               "y": 380,
                               "wires": [
                                   [
                                       "83c967f55180cc71"
                                   ]
                               ]
                           },
                           {
                               "id": "13927d8d45ca75cb",
                               "type": "trigger",
                               "z": "86b699fc65f0566c",
                               "name": "verz-Stufe-1",
                               "op1": "",
                               "op2": "true",
                               "op1type": "nul",
                               "op2type": "bool",
                               "duration": "2",
                               "extend": false,
                               "overrideDelay": false,
                               "units": "s",
                               "reset": "",
                               "bytopic": "all",
                               "topic": "topic",
                               "outputs": 1,
                               "x": 1070,
                               "y": 480,
                               "wires": [
                                   [
                                       "457047e020452c79",
                                       "03596b8e2240fce5",
                                       "f312cd2583a1dce9",
                                       "64b14373820c3256"
                                   ]
                               ]
                           },
                           {
                               "id": "6696c4033e0fcaab",
                               "type": "comment",
                               "z": "86b699fc65f0566c",
                               "name": "Level Regelung Test",
                               "info": "",
                               "x": 490,
                               "y": 340,
                               "wires": []
                           },
                           {
                               "id": "45fc70d55ae8d276",
                               "type": "debug",
                               "z": "86b699fc65f0566c",
                               "name": "Stufe 1 verz",
                               "active": true,
                               "tosidebar": true,
                               "console": false,
                               "tostatus": false,
                               "complete": "payload",
                               "targetType": "msg",
                               "statusVal": "",
                               "statusType": "auto",
                               "x": 1590,
                               "y": 480,
                               "wires": []
                           },
                           {
                               "id": "295ea16dd1d33c31",
                               "type": "trigger",
                               "z": "86b699fc65f0566c",
                               "name": "verz-Stufe-2",
                               "op1": "",
                               "op2": "true",
                               "op1type": "nul",
                               "op2type": "bool",
                               "duration": "2",
                               "extend": false,
                               "overrideDelay": false,
                               "units": "s",
                               "reset": "",
                               "bytopic": "all",
                               "topic": "topic",
                               "outputs": 1,
                               "x": 1090,
                               "y": 720,
                               "wires": [
                                   [
                                       "d060922c7999cb68"
                                   ]
                               ]
                           },
                           {
                               "id": "22decc37459730eb",
                               "type": "debug",
                               "z": "86b699fc65f0566c",
                               "name": "Stufe 2 verz",
                               "active": true,
                               "tosidebar": true,
                               "console": false,
                               "tostatus": false,
                               "complete": "payload",
                               "targetType": "msg",
                               "statusVal": "",
                               "statusType": "auto",
                               "x": 1590,
                               "y": 720,
                               "wires": []
                           },
                           {
                               "id": "824dcc36a821c6e2",
                               "type": "debug",
                               "z": "86b699fc65f0566c",
                               "name": "Stufe 0 verz",
                               "active": true,
                               "tosidebar": true,
                               "console": false,
                               "tostatus": false,
                               "complete": "payload",
                               "targetType": "msg",
                               "statusVal": "",
                               "statusType": "auto",
                               "x": 1590,
                               "y": 260,
                               "wires": []
                           },
                           {
                               "id": "03596b8e2240fce5",
                               "type": "change",
                               "z": "86b699fc65f0566c",
                               "name": "Reset-Stufe-2",
                               "rules": [
                                   {
                                       "t": "set",
                                       "p": "payload",
                                       "pt": "msg",
                                       "to": "false",
                                       "tot": "bool"
                                   },
                                   {
                                       "t": "set",
                                       "p": "topic",
                                       "pt": "msg",
                                       "to": "Reset-Stufe-2",
                                       "tot": "str"
                                   }
                               ],
                               "action": "",
                               "property": "",
                               "from": "",
                               "to": "",
                               "reg": false,
                               "x": 1200,
                               "y": 620,
                               "wires": [
                                   [
                                       "d060922c7999cb68"
                                   ]
                               ]
                           },
                           {
                               "id": "b9463c3c604f8325",
                               "type": "change",
                               "z": "86b699fc65f0566c",
                               "name": "Reset-Stufe-1",
                               "rules": [
                                   {
                                       "t": "set",
                                       "p": "payload",
                                       "pt": "msg",
                                       "to": "false",
                                       "tot": "bool"
                                   },
                                   {
                                       "t": "set",
                                       "p": "topic",
                                       "pt": "msg",
                                       "to": "Reset-Stufe-1",
                                       "tot": "str"
                                   }
                               ],
                               "action": "",
                               "property": "",
                               "from": "",
                               "to": "",
                               "reg": false,
                               "x": 1140,
                               "y": 340,
                               "wires": [
                                   [
                                       "457047e020452c79"
                                   ]
                               ]
                           },
                           {
                               "id": "45e1374c190cb520",
                               "type": "trigger",
                               "z": "86b699fc65f0566c",
                               "name": "verz-Stufe-0",
                               "op1": "",
                               "op2": "true",
                               "op1type": "nul",
                               "op2type": "bool",
                               "duration": "2",
                               "extend": false,
                               "overrideDelay": false,
                               "units": "s",
                               "reset": "",
                               "bytopic": "all",
                               "topic": "topic",
                               "outputs": 1,
                               "x": 1070,
                               "y": 260,
                               "wires": [
                                   [
                                       "477cea2901f824e9",
                                       "b9463c3c604f8325",
                                       "fcefca4999249e4d"
                                   ]
                               ]
                           },
                           {
                               "id": "d060922c7999cb68",
                               "type": "rbe",
                               "z": "86b699fc65f0566c",
                               "name": "Aktiv-Stufe-2",
                               "func": "rbei",
                               "gap": "",
                               "start": "",
                               "inout": "out",
                               "septopics": false,
                               "property": "payload",
                               "topi": "topic",
                               "x": 1430,
                               "y": 720,
                               "wires": [
                                   [
                                       "22decc37459730eb"
                                   ]
                               ]
                           },
                           {
                               "id": "457047e020452c79",
                               "type": "rbe",
                               "z": "86b699fc65f0566c",
                               "name": "Aktiv-Stufe-1",
                               "func": "rbei",
                               "gap": "",
                               "start": "",
                               "inout": "out",
                               "septopics": false,
                               "property": "payload",
                               "topi": "topic",
                               "x": 1370,
                               "y": 480,
                               "wires": [
                                   [
                                       "45fc70d55ae8d276"
                                   ]
                               ]
                           },
                           {
                               "id": "477cea2901f824e9",
                               "type": "rbe",
                               "z": "86b699fc65f0566c",
                               "name": "Aktiv-Stufe-0",
                               "func": "rbe",
                               "gap": "",
                               "start": "",
                               "inout": "out",
                               "septopics": false,
                               "property": "payload",
                               "topi": "topic",
                               "x": 1370,
                               "y": 260,
                               "wires": [
                                   [
                                       "824dcc36a821c6e2"
                                   ]
                               ]
                           },
                           {
                               "id": "f312cd2583a1dce9",
                               "type": "change",
                               "z": "86b699fc65f0566c",
                               "name": "Reset-Stufe-0",
                               "rules": [
                                   {
                                       "t": "set",
                                       "p": "payload",
                                       "pt": "msg",
                                       "to": "false",
                                       "tot": "bool"
                                   },
                                   {
                                       "t": "set",
                                       "p": "topic",
                                       "pt": "msg",
                                       "to": "Reset-Stufe-1",
                                       "tot": "str"
                                   }
                               ],
                               "action": "",
                               "property": "",
                               "from": "",
                               "to": "",
                               "reg": false,
                               "x": 1380,
                               "y": 320,
                               "wires": [
                                   [
                                       "477cea2901f824e9"
                                   ]
                               ]
                           },
                           {
                               "id": "fcefca4999249e4d",
                               "type": "change",
                               "z": "86b699fc65f0566c",
                               "name": "",
                               "rules": [
                                   {
                                       "t": "set",
                                       "p": "reset",
                                       "pt": "msg",
                                       "to": "true",
                                       "tot": "bool"
                                   }
                               ],
                               "action": "",
                               "property": "",
                               "from": "",
                               "to": "",
                               "reg": false,
                               "x": 920,
                               "y": 380,
                               "wires": [
                                   [
                                       "13927d8d45ca75cb"
                                   ]
                               ]
                           },
                           {
                               "id": "64b14373820c3256",
                               "type": "change",
                               "z": "86b699fc65f0566c",
                               "name": "",
                               "rules": [
                                   {
                                       "t": "set",
                                       "p": "reset",
                                       "pt": "msg",
                                       "to": "true",
                                       "tot": "bool"
                                   }
                               ],
                               "action": "",
                               "property": "",
                               "from": "",
                               "to": "",
                               "reg": false,
                               "x": 920,
                               "y": 580,
                               "wires": [
                                   [
                                       "295ea16dd1d33c31"
                                   ]
                               ]
                           }
                        ]
                        

                        EDIT: Flow entspricht Deinem - nur dass du nun das msg.reset nur an die trigger Nodes sendest.

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

                          @mickym Vielen Dank für die Tipps ;). So klappts jetzt wie gewünscht 🙂

                          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

                          4
                          28
                          851
                          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