Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. hawell

    NEWS

    • Neuer Blog: Fotos und Eindrücke aus Solingen

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

    • ioBroker goes Matter ... Matter Adapter in Stable

    H
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 10
    • Best 0
    • Groups 1

    hawell

    @hawell

    Starter

    0
    Reputation
    7
    Profile views
    10
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    hawell Follow
    Starter

    Latest posts made by hawell

    • RE: Schrittwerk mit einer Bedingung begrenzen

      @mickym sagte in Schrittwerk mit einer Bedingung begrenzen:

      Na ich glaube Du behälst Deinen ursprünglichen Flow.

      gar nicht so einfach .. 😉

      ich finde deinen ansatz mit der vereinfachten Form gut, evtl bau ich mir da was draus.
      aber heut nicht mehr -> morgen wieder ..

      ich danke dir vielmals für die Unterstützung !!!

      posted in Node-Red
      H
      hawell
    • RE: Schrittwerk mit einer Bedingung begrenzen

      @mickym
      ich schau mir das morgen mal genauer an.
      aber der letzte flox ist buggy, der gibt teilweise nur 1 aus egal was man drückt (mit oder ohne warten; mit oder ohne 0 drücken)

      posted in Node-Red
      H
      hawell
    • RE: Schrittwerk mit einer Bedingung begrenzen

      @mickym sagte in Schrittwerk mit einer Bedingung begrenzen:

      @hawell sagte in Schrittwerk mit einer Bedingung begrenzen:

      @mickym
      das skalieren mit größeren Schritten hatte ich schon getestet das geht super.

      zwei Sachen verstehe ich aber nicht.
      wieso sendet der letzte Trigger nur bei Zahlen außer "0" alle 5 sek ? und bei 0 Macht er nichts ??

      Na das hatte ich aus Deinem alten Flow so verstanden, da alles rückgesetzt wurde - das dann nichts mehr gesendet werden soll.

      das ist auch richtig, aber wieso macht die Node das - ich ich finde die entsprechende Einstellung nicht. oder liegt es am dem Befehl "0" dieser Stoppt den Trigger?

      und leider gibt der Trigger den Wert aus, welcher "auf den Weg bebracht wurde", auch wenn sich schon die Richtung geändert wurde.
      also wenn +1 wiederholt wird, und dann auch 0 umspringt, wird trotzdem noch einmal hochgeschaltet und dann erst gestoppt.

      Nun ja - da musst aber mal logisch überlegen - dass ja EXTRA eine Zeit abgewartet wird, bis eine Änderung registriert wird.

      man müsste den laufenden Tigger bei Wertänderung unterbrechen.

      In dem Fall werde ich Dir mal mit einer function Node helfen, die Du dann wieder nur vom Energiemanager getriggert wird und nur bei +1 oder -1

      und zwei unterschiedliche zeitliche Trigger paralell laufen lassen (einen fürs hochschalten und einen fürs runter Schalten.

      Nein das ergibt Chaos.

      geht das nicht so ? 0 hat immer Priorität und setzt die Laufenden Trigger zurück?

      Screenshot 2023-10-07 233611.png

      posted in Node-Red
      H
      hawell
    • RE: Schrittwerk mit einer Bedingung begrenzen

      @mickym
      das skalieren mit größeren Schritten hatte ich schon getestet das geht super.

      zwei Sachen verstehe ich aber nicht.
      wieso sendet der letzte Trigger nur bei Zahlen außer "0" alle 5 sek ? und bei 0 Macht er nichts ??

      und leider gibt der Trigger den Wert aus, welcher "auf den Weg bebracht wurde", auch wenn sich schon die Richtung geändert wurde.
      also wenn +1 wiederholt wird, und dann auch 0 umspringt, wird trotzdem noch einmal hochgeschaltet und dann erst gestoppt.

      man müsste den laufenden Tigger bei Wertänderung unterbrechen.

      und zwei unterschiedliche zeitliche Trigger paralell laufen lassen (einen fürs hochschalten und einen fürs runter Schalten.

      posted in Node-Red
      H
      hawell
    • RE: Schrittwerk mit einer Bedingung begrenzen

      @mickym sagte in Schrittwerk mit einer Bedingung begrenzen:

      erschreckenderweise tut es was es soll ...
      bis auf, dass es immer die gleichen Zeiten nimmt, ich konnte schneller runterschalten, als hoch.

      posted in Node-Red
      H
      hawell
    • RE: Schrittwerk mit einer Bedingung begrenzen

      @mickym sagte in Schrittwerk mit einer Bedingung begrenzen:

      @hawell Ok - ich meine es funktioniert bei Dir ja. Insofern ist es doch OK. Ich mach mal eine Alternative ohne 100% sicher zu sein, ob das dann tut.

      ich bin mit dem Konstruckt auch nicht glücklich, da ich atkuell auch an einem "Doppelsprung" arbeite - wenn genug leistung ansteht, dann kann um "2" gesprugen werden.
      Übersichtlicher wird es damit aber nicht

      posted in Node-Red
      H
      hawell
    • RE: Schrittwerk mit einer Bedingung begrenzen

      @mickym

      ja, wenn die die Bedingung zum hochzählen 5 sec gegeben ist, dann einen Schritt hochzählen (am Schrittwerk hängen Heizstäbe, welche dann den Eingangswert (Stromüberschuss) reduzieren).
      wenn Bedingung nicht erfüllt, dann nichts machen.
      die Britte Bedingung ist runterzählen und somit Leistung abschalten.

      posted in Node-Red
      H
      hawell
    • RE: Schrittwerk mit einer Bedingung begrenzen

      @mickym

      korrekt, poduktiv sind es aber 60Sek. anstatt 5

      es soll der flippen zwischen 2 Zuständen verhindern,

      die Eingangswerte kommen von einen Energiezähler, und diese Werte können bekanntlich durch eine PV-Anlage auf dem Dach etwas schwanken.

      posted in Node-Red
      H
      hawell
    • RE: Schrittwerk mit einer Bedingung begrenzen

      @mickym
      es ist frustrierend zu sehen, dass man immer vieeeeel zu kompliziert denkt 😉

      ich habe nun mal deinen Code in meinen Flow eingebettet.

      anbei das Ergebniss. sicher auch zu komliziert ?

      Screenshot 2023-10-07 233611.png

      [
          {
              "id": "a4df471f006c7c29",
              "type": "switch",
              "z": "555a0da86fcbd59e",
              "name": "",
              "property": "payload",
              "propertyType": "msg",
              "rules": [
                  {
                      "t": "eq",
                      "v": "0",
                      "vt": "num"
                  },
                  {
                      "t": "eq",
                      "v": "1",
                      "vt": "num"
                  },
                  {
                      "t": "eq",
                      "v": "2",
                      "vt": "num"
                  },
                  {
                      "t": "eq",
                      "v": "3",
                      "vt": "num"
                  },
                  {
                      "t": "eq",
                      "v": "4",
                      "vt": "num"
                  },
                  {
                      "t": "eq",
                      "v": "5",
                      "vt": "num"
                  },
                  {
                      "t": "eq",
                      "v": "6",
                      "vt": "num"
                  },
                  {
                      "t": "eq",
                      "v": "7",
                      "vt": "num"
                  },
                  {
                      "t": "eq",
                      "v": "8",
                      "vt": "num"
                  },
                  {
                      "t": "eq",
                      "v": "9",
                      "vt": "num"
                  },
                  {
                      "t": "eq",
                      "v": "10",
                      "vt": "num"
                  },
                  {
                      "t": "eq",
                      "v": "11",
                      "vt": "num"
                  },
                  {
                      "t": "eq",
                      "v": "12",
                      "vt": "num"
                  },
                  {
                      "t": "eq",
                      "v": "13",
                      "vt": "num"
                  }
              ],
              "checkall": "true",
              "repair": false,
              "outputs": 14,
              "x": 2130,
              "y": 400,
              "wires": [
                  [
                      "398312eeeb8ccd46",
                      "3ff1604bf5bca832",
                      "5fc2d946dd666aca",
                      "28762e0360464d57"
                  ],
                  [
                      "b93d2ce896558684",
                      "3ff1604bf5bca832",
                      "5fc2d946dd666aca",
                      "28762e0360464d57"
                  ],
                  [
                      "398312eeeb8ccd46",
                      "a48f000b08ef6896",
                      "5fc2d946dd666aca",
                      "28762e0360464d57"
                  ],
                  [
                      "b93d2ce896558684",
                      "a48f000b08ef6896",
                      "5fc2d946dd666aca",
                      "28762e0360464d57"
                  ],
                  [
                      "398312eeeb8ccd46",
                      "3ff1604bf5bca832",
                      "5a78c3af30a68905",
                      "28762e0360464d57"
                  ],
                  [
                      "b93d2ce896558684",
                      "3ff1604bf5bca832",
                      "5a78c3af30a68905",
                      "28762e0360464d57"
                  ],
                  [
                      "398312eeeb8ccd46",
                      "a48f000b08ef6896",
                      "5a78c3af30a68905",
                      "28762e0360464d57"
                  ],
                  [
                      "b93d2ce896558684",
                      "a48f000b08ef6896",
                      "5a78c3af30a68905",
                      "28762e0360464d57"
                  ],
                  [
                      "398312eeeb8ccd46",
                      "a48f000b08ef6896",
                      "5fc2d946dd666aca",
                      "210fe10072b7d40a"
                  ],
                  [
                      "b93d2ce896558684",
                      "a48f000b08ef6896",
                      "5fc2d946dd666aca",
                      "210fe10072b7d40a"
                  ],
                  [
                      "398312eeeb8ccd46",
                      "3ff1604bf5bca832",
                      "5a78c3af30a68905",
                      "210fe10072b7d40a"
                  ],
                  [
                      "b93d2ce896558684",
                      "3ff1604bf5bca832",
                      "5a78c3af30a68905",
                      "210fe10072b7d40a"
                  ],
                  [
                      "398312eeeb8ccd46",
                      "a48f000b08ef6896",
                      "5a78c3af30a68905",
                      "210fe10072b7d40a"
                  ],
                  [
                      "b93d2ce896558684",
                      "a48f000b08ef6896",
                      "5a78c3af30a68905",
                      "210fe10072b7d40a"
                  ]
              ]
          },
          {
              "id": "310bc8c1fa0df514",
              "type": "change",
              "z": "555a0da86fcbd59e",
              "name": "",
              "rules": [
                  {
                      "t": "set",
                      "p": "reset",
                      "pt": "msg",
                      "to": "payload",
                      "tot": "msg"
                  }
              ],
              "action": "",
              "property": "",
              "from": "",
              "to": "",
              "reg": false,
              "x": 640,
              "y": 460,
              "wires": [
                  [
                      "de5c12b8131d105f",
                      "1614f195f326e63e"
                  ]
              ]
          },
          {
              "id": "4fbf3fe3e30e859d",
              "type": "trigger",
              "z": "555a0da86fcbd59e",
              "name": "",
              "op1": "1",
              "op2": "0",
              "op1type": "str",
              "op2type": "str",
              "duration": "0",
              "extend": false,
              "overrideDelay": false,
              "units": "ms",
              "reset": "",
              "bytopic": "all",
              "topic": "topic",
              "outputs": 1,
              "x": 640,
              "y": 260,
              "wires": [
                  [
                      "310bc8c1fa0df514",
                      "a4be58efb147f789"
                  ]
              ]
          },
          {
              "id": "4aecd62772296f97",
              "type": "change",
              "z": "555a0da86fcbd59e",
              "name": "",
              "rules": [
                  {
                      "t": "set",
                      "p": "reset",
                      "pt": "msg",
                      "to": "payload",
                      "tot": "msg"
                  }
              ],
              "action": "",
              "property": "",
              "from": "",
              "to": "",
              "reg": false,
              "x": 640,
              "y": 340,
              "wires": [
                  [
                      "4fbf3fe3e30e859d",
                      "a4be58efb147f789"
                  ]
              ]
          },
          {
              "id": "de5c12b8131d105f",
              "type": "trigger",
              "z": "555a0da86fcbd59e",
              "name": "",
              "op1": "",
              "op2": "1",
              "op1type": "nul",
              "op2type": "str",
              "duration": "5",
              "extend": false,
              "overrideDelay": false,
              "units": "s",
              "reset": "",
              "bytopic": "all",
              "topic": "topic",
              "outputs": 1,
              "x": 860,
              "y": 540,
              "wires": [
                  [
                      "310bc8c1fa0df514",
                      "07f087d511c8b3e2"
                  ]
              ]
          },
          {
              "id": "a4be58efb147f789",
              "type": "trigger",
              "z": "555a0da86fcbd59e",
              "name": "",
              "op1": "",
              "op2": "1",
              "op1type": "nul",
              "op2type": "str",
              "duration": "5",
              "extend": false,
              "overrideDelay": false,
              "units": "s",
              "reset": "",
              "bytopic": "all",
              "topic": "topic",
              "outputs": 1,
              "x": 860,
              "y": 260,
              "wires": [
                  [
                      "4aecd62772296f97",
                      "034c5314770775c6"
                  ]
              ]
          },
          {
              "id": "1614f195f326e63e",
              "type": "trigger",
              "z": "555a0da86fcbd59e",
              "name": "",
              "op1": "1",
              "op2": "1",
              "op1type": "str",
              "op2type": "str",
              "duration": "0",
              "extend": false,
              "overrideDelay": false,
              "units": "s",
              "reset": "",
              "bytopic": "all",
              "topic": "topic",
              "outputs": 1,
              "x": 640,
              "y": 540,
              "wires": [
                  [
                      "de5c12b8131d105f",
                      "4aecd62772296f97"
                  ]
              ]
          },
          {
              "id": "4bbe3cb139220b42",
              "type": "switch",
              "z": "555a0da86fcbd59e",
              "name": "",
              "property": "payload",
              "propertyType": "msg",
              "rules": [
                  {
                      "t": "gte",
                      "v": "2",
                      "vt": "num"
                  },
                  {
                      "t": "btwn",
                      "v": "-699",
                      "vt": "num",
                      "v2": "1",
                      "v2t": "num"
                  },
                  {
                      "t": "lt",
                      "v": "-700",
                      "vt": "num"
                  }
              ],
              "checkall": "true",
              "repair": false,
              "outputs": 3,
              "x": 330,
              "y": 400,
              "wires": [
                  [
                      "4fbf3fe3e30e859d"
                  ],
                  [
                      "4aecd62772296f97",
                      "310bc8c1fa0df514"
                  ],
                  [
                      "1614f195f326e63e"
                  ]
              ]
          },
          {
              "id": "034c5314770775c6",
              "type": "change",
              "z": "555a0da86fcbd59e",
              "name": "-1",
              "rules": [
                  {
                      "t": "delete",
                      "p": "payload",
                      "pt": "msg"
                  },
                  {
                      "t": "set",
                      "p": "payload",
                      "pt": "msg",
                      "to": "-1",
                      "tot": "num"
                  },
                  {
                      "t": "set",
                      "p": "topic",
                      "pt": "msg",
                      "to": "action",
                      "tot": "str"
                  }
              ],
              "action": "",
              "property": "",
              "from": "",
              "to": "",
              "reg": false,
              "x": 1050,
              "y": 260,
              "wires": [
                  [
                      "e16d9f5e94d3229f"
                  ]
              ]
          },
          {
              "id": "2a3e252e4ffab885",
              "type": "inject",
              "z": "555a0da86fcbd59e",
              "name": "0",
              "props": [
                  {
                      "p": "payload"
                  }
              ],
              "repeat": "",
              "crontab": "",
              "once": false,
              "onceDelay": 0.1,
              "topic": "",
              "payload": "1",
              "payloadType": "num",
              "x": 1050,
              "y": 720,
              "wires": [
                  [
                      "63bd6c3bb3e651dc"
                  ]
              ]
          },
          {
              "id": "75c57efdef71160f",
              "type": "ha-button",
              "z": "555a0da86fcbd59e",
              "name": "Heizstäbe ausschalten",
              "version": 0,
              "debugenabled": false,
              "outputs": 1,
              "entityConfig": "f3f4583ca540c2a8",
              "outputProperties": [
                  {
                      "property": "payload",
                      "propertyType": "msg",
                      "value": "1",
                      "valueType": "num"
                  }
              ],
              "x": 1000,
              "y": 660,
              "wires": [
                  [
                      "63bd6c3bb3e651dc"
                  ]
              ]
          },
          {
              "id": "4471327821c29be8",
              "type": "range",
              "z": "555a0da86fcbd59e",
              "minin": "0",
              "maxin": "7",
              "minout": "0",
              "maxout": "7",
              "action": "clamp",
              "round": false,
              "property": "payload",
              "name": "",
              "x": 1610,
              "y": 380,
              "wires": [
                  [
                      "aaf51c77abf2d92b"
                  ]
              ]
          },
          {
              "id": "c9e90412a78aa937",
              "type": "range",
              "z": "555a0da86fcbd59e",
              "minin": "0",
              "maxin": "13",
              "minout": "0",
              "maxout": "13",
              "action": "clamp",
              "round": false,
              "property": "payload",
              "name": "",
              "x": 1610,
              "y": 420,
              "wires": [
                  [
                      "aaf51c77abf2d92b"
                  ]
              ]
          },
          {
              "id": "0ba84e543119bf12",
              "type": "inject",
              "z": "555a0da86fcbd59e",
              "name": "",
              "props": [
                  {
                      "p": "payload"
                  },
                  {
                      "p": "topic",
                      "vt": "str"
                  }
              ],
              "repeat": "",
              "crontab": "",
              "once": false,
              "onceDelay": 0.1,
              "topic": "action",
              "payload": "-1",
              "payloadType": "num",
              "x": 1040,
              "y": 340,
              "wires": [
                  [
                      "e16d9f5e94d3229f"
                  ]
              ]
          },
          {
              "id": "80c924d4eb2de24c",
              "type": "inject",
              "z": "555a0da86fcbd59e",
              "name": "",
              "props": [
                  {
                      "p": "payload"
                  },
                  {
                      "p": "topic",
                      "vt": "str"
                  }
              ],
              "repeat": "",
              "crontab": "",
              "once": false,
              "onceDelay": 0.1,
              "topic": "action",
              "payload": "1",
              "payloadType": "num",
              "x": 1050,
              "y": 460,
              "wires": [
                  [
                      "e16d9f5e94d3229f"
                  ]
              ]
          },
          {
              "id": "27d4c6a16dae68c3",
              "type": "debug",
              "z": "555a0da86fcbd59e",
              "name": "Ausgabe",
              "active": false,
              "tosidebar": true,
              "console": false,
              "tostatus": true,
              "complete": "payload",
              "targetType": "msg",
              "statusVal": "payload",
              "statusType": "auto",
              "x": 1960,
              "y": 240,
              "wires": []
          },
          {
              "id": "e16d9f5e94d3229f",
              "type": "change",
              "z": "555a0da86fcbd59e",
              "name": "modify counter",
              "rules": [
                  {
                      "t": "set",
                      "p": "counter",
                      "pt": "msg",
                      "to": "counter",
                      "tot": "flow"
                  },
                  {
                      "t": "set",
                      "p": "payload",
                      "pt": "msg",
                      "to": "payload + (counter ? counter : 0)",
                      "tot": "jsonata"
                  },
                  {
                      "t": "delete",
                      "p": "counter",
                      "pt": "msg"
                  }
              ],
              "action": "",
              "property": "",
              "from": "",
              "to": "",
              "reg": false,
              "x": 1300,
              "y": 400,
              "wires": [
                  [
                      "f1bea7b4b7a79206"
                  ]
              ]
          },
          {
              "id": "f1bea7b4b7a79206",
              "type": "switch",
              "z": "555a0da86fcbd59e",
              "name": "",
              "property": "Begrenzung",
              "propertyType": "flow",
              "rules": [
                  {
                      "t": "true"
                  },
                  {
                      "t": "false"
                  }
              ],
              "checkall": "true",
              "repair": false,
              "outputs": 2,
              "x": 1470,
              "y": 400,
              "wires": [
                  [
                      "4471327821c29be8"
                  ],
                  [
                      "c9e90412a78aa937"
                  ]
              ]
          },
          {
              "id": "aaf51c77abf2d92b",
              "type": "rbe",
              "z": "555a0da86fcbd59e",
              "name": "",
              "func": "rbe",
              "gap": "",
              "start": "",
              "inout": "out",
              "septopics": true,
              "property": "payload",
              "topi": "topic",
              "x": 1750,
              "y": 400,
              "wires": [
                  [
                      "3556052e013cfd33",
                      "27d4c6a16dae68c3"
                  ]
              ]
          },
          {
              "id": "3556052e013cfd33",
              "type": "change",
              "z": "555a0da86fcbd59e",
              "name": "",
              "rules": [
                  {
                      "t": "set",
                      "p": "counter",
                      "pt": "flow",
                      "to": "payload",
                      "tot": "msg"
                  }
              ],
              "action": "",
              "property": "",
              "from": "",
              "to": "",
              "reg": false,
              "x": 1930,
              "y": 400,
              "wires": [
                  [
                      "a4df471f006c7c29"
                  ]
              ]
          },
          {
              "id": "07f087d511c8b3e2",
              "type": "change",
              "z": "555a0da86fcbd59e",
              "name": "+1",
              "rules": [
                  {
                      "t": "delete",
                      "p": "payload",
                      "pt": "msg"
                  },
                  {
                      "t": "set",
                      "p": "payload",
                      "pt": "msg",
                      "to": "1",
                      "tot": "num"
                  },
                  {
                      "t": "set",
                      "p": "topic",
                      "pt": "msg",
                      "to": "action",
                      "tot": "str"
                  }
              ],
              "action": "",
              "property": "",
              "from": "",
              "to": "",
              "reg": false,
              "x": 1050,
              "y": 540,
              "wires": [
                  [
                      "e16d9f5e94d3229f"
                  ]
              ]
          },
          {
              "id": "63bd6c3bb3e651dc",
              "type": "change",
              "z": "555a0da86fcbd59e",
              "name": "set 0 counter",
              "rules": [
                  {
                      "t": "set",
                      "p": "counter",
                      "pt": "msg",
                      "to": "counter",
                      "tot": "flow"
                  },
                  {
                      "t": "set",
                      "p": "payload",
                      "pt": "msg",
                      "to": "0",
                      "tot": "num"
                  },
                  {
                      "t": "set",
                      "p": "topic",
                      "pt": "msg",
                      "to": "action",
                      "tot": "str"
                  },
                  {
                      "t": "delete",
                      "p": "counter",
                      "pt": "msg"
                  }
              ],
              "action": "",
              "property": "",
              "from": "",
              "to": "",
              "reg": false,
              "x": 1310,
              "y": 660,
              "wires": [
                  [
                      "f1bea7b4b7a79206"
                  ]
              ]
          },
          {
              "id": "458ecde97817f777",
              "type": "inject",
              "z": "555a0da86fcbd59e",
              "name": "100",
              "props": [
                  {
                      "p": "payload"
                  }
              ],
              "repeat": "",
              "crontab": "",
              "once": false,
              "onceDelay": 0.1,
              "topic": "",
              "payload": "100",
              "payloadType": "num",
              "x": 110,
              "y": 360,
              "wires": [
                  [
                      "4bbe3cb139220b42"
                  ]
              ]
          },
          {
              "id": "9a176b2bfce3c5bc",
              "type": "inject",
              "z": "555a0da86fcbd59e",
              "name": "-500",
              "props": [
                  {
                      "p": "payload"
                  }
              ],
              "repeat": "",
              "crontab": "",
              "once": false,
              "onceDelay": 0.1,
              "topic": "",
              "payload": "-500",
              "payloadType": "num",
              "x": 110,
              "y": 420,
              "wires": [
                  [
                      "4bbe3cb139220b42"
                  ]
              ]
          },
          {
              "id": "dbb92ef2ecce8bdb",
              "type": "inject",
              "z": "555a0da86fcbd59e",
              "name": "-2000",
              "props": [
                  {
                      "p": "payload"
                  }
              ],
              "repeat": "",
              "crontab": "",
              "once": false,
              "onceDelay": 0.1,
              "topic": "",
              "payload": "-2000",
              "payloadType": "num",
              "x": 110,
              "y": 480,
              "wires": [
                  [
                      "4bbe3cb139220b42"
                  ]
              ]
          },
          {
              "id": "95d26de77e9ff6c8",
              "type": "comment",
              "z": "555a0da86fcbd59e",
              "name": "Werte kommen sekündlich über vom Energiemanager",
              "info": "",
              "x": 200,
              "y": 220,
              "wires": []
          },
          {
              "id": "3652f840e6df66c4",
              "type": "comment",
              "z": "555a0da86fcbd59e",
              "name": "FlipFlop um schnelles hin/her Flippen zu vermeiden",
              "info": "",
              "x": 790,
              "y": 220,
              "wires": []
          },
          {
              "id": "28056265e702d35a",
              "type": "group",
              "z": "555a0da86fcbd59e",
              "style": {
                  "stroke": "#999999",
                  "stroke-opacity": "1",
                  "fill": "none",
                  "fill-opacity": "1",
                  "label": true,
                  "label-position": "nw",
                  "color": "#a4a4a4"
              },
              "nodes": [
                  "47e4b4c1a5719f97",
                  "2cbf219ba70e288d",
                  "dbca6aa2a28f48cc",
                  "f41294d7e6bd742a",
                  "23d944158c2afb9d",
                  "2c066e034e22725f",
                  "93c130968fd0aff6",
                  "56baed6c9d62d302",
                  "73503abeceb4a948",
                  "2434e456aab4e422",
                  "698c0b8feeb927ab",
                  "dca67830bec17864",
                  "e9c9475635add4b0",
                  "5cb56a40dbb6fe16",
                  "6d5b8d54b80f3aec",
                  "ea9e0233a1fc4285",
                  "b6225626acfb1315"
              ],
              "x": 74,
              "y": 819,
              "w": 1712,
              "h": 402
          },
          {
              "id": "47e4b4c1a5719f97",
              "type": "switch",
              "z": "555a0da86fcbd59e",
              "g": "28056265e702d35a",
              "name": " WR-Leistung kleiner 3500W",
              "property": "payload",
              "propertyType": "msg",
              "rules": [
                  {
                      "t": "lt",
                      "v": "3500",
                      "vt": "num"
                  },
                  {
                      "t": "gte",
                      "v": "3500",
                      "vt": "num"
                  }
              ],
              "checkall": "true",
              "repair": false,
              "outputs": 2,
              "x": 460,
              "y": 1040,
              "wires": [
                  [
                      "56baed6c9d62d302"
                  ],
                  [
                      "dca67830bec17864"
                  ]
              ]
          },
          {
              "id": "2cbf219ba70e288d",
              "type": "inject",
              "z": "555a0da86fcbd59e",
              "g": "28056265e702d35a",
              "name": "",
              "props": [
                  {
                      "p": "payload"
                  },
                  {
                      "p": "topic",
                      "vt": "str"
                  }
              ],
              "repeat": "",
              "crontab": "",
              "once": false,
              "onceDelay": 0.1,
              "topic": "Begrenzung",
              "payload": "true",
              "payloadType": "bool",
              "x": 1180,
              "y": 1020,
              "wires": [
                  [
                      "f41294d7e6bd742a"
                  ]
              ]
          },
          {
              "id": "dbca6aa2a28f48cc",
              "type": "inject",
              "z": "555a0da86fcbd59e",
              "g": "28056265e702d35a",
              "name": "",
              "props": [
                  {
                      "p": "payload"
                  },
                  {
                      "p": "topic",
                      "vt": "str"
                  }
              ],
              "repeat": "",
              "crontab": "",
              "once": true,
              "onceDelay": 0.1,
              "topic": "Begrenzung",
              "payload": "false",
              "payloadType": "bool",
              "x": 1170,
              "y": 1100,
              "wires": [
                  [
                      "f41294d7e6bd742a"
                  ]
              ]
          },
          {
              "id": "f41294d7e6bd742a",
              "type": "change",
              "z": "555a0da86fcbd59e",
              "g": "28056265e702d35a",
              "name": "",
              "rules": [
                  {
                      "t": "set",
                      "p": "Begrenzung",
                      "pt": "flow",
                      "to": "payload",
                      "tot": "msg"
                  }
              ],
              "action": "",
              "property": "",
              "from": "",
              "to": "",
              "reg": false,
              "x": 1440,
              "y": 1060,
              "wires": [
                  [
                      "ea9e0233a1fc4285"
                  ]
              ]
          },
          {
              "id": "23d944158c2afb9d",
              "type": "change",
              "z": "555a0da86fcbd59e",
              "g": "28056265e702d35a",
              "name": "false",
              "rules": [
                  {
                      "t": "set",
                      "p": "payload",
                      "pt": "msg",
                      "to": "false",
                      "tot": "bool"
                  }
              ],
              "action": "",
              "property": "",
              "from": "",
              "to": "",
              "reg": false,
              "x": 1210,
              "y": 1180,
              "wires": [
                  [
                      "f41294d7e6bd742a"
                  ]
              ]
          },
          {
              "id": "2c066e034e22725f",
              "type": "change",
              "z": "555a0da86fcbd59e",
              "g": "28056265e702d35a",
              "name": "true",
              "rules": [
                  {
                      "t": "set",
                      "p": "payload",
                      "pt": "msg",
                      "to": "true",
                      "tot": "bool"
                  }
              ],
              "action": "",
              "property": "",
              "from": "",
              "to": "",
              "reg": false,
              "x": 1210,
              "y": 920,
              "wires": [
                  [
                      "f41294d7e6bd742a"
                  ]
              ]
          },
          {
              "id": "93c130968fd0aff6",
              "type": "change",
              "z": "555a0da86fcbd59e",
              "g": "28056265e702d35a",
              "name": "",
              "rules": [
                  {
                      "t": "set",
                      "p": "reset",
                      "pt": "msg",
                      "to": "payload",
                      "tot": "msg"
                  }
              ],
              "action": "",
              "property": "",
              "from": "",
              "to": "",
              "reg": false,
              "x": 780,
              "y": 1100,
              "wires": [
                  [
                      "2434e456aab4e422",
                      "dca67830bec17864"
                  ]
              ]
          },
          {
              "id": "56baed6c9d62d302",
              "type": "trigger",
              "z": "555a0da86fcbd59e",
              "g": "28056265e702d35a",
              "name": "",
              "op1": "1",
              "op2": "0",
              "op1type": "str",
              "op2type": "str",
              "duration": "0",
              "extend": false,
              "overrideDelay": false,
              "units": "ms",
              "reset": "",
              "bytopic": "all",
              "topic": "topic",
              "outputs": 1,
              "x": 780,
              "y": 920,
              "wires": [
                  [
                      "698c0b8feeb927ab",
                      "93c130968fd0aff6"
                  ]
              ]
          },
          {
              "id": "73503abeceb4a948",
              "type": "change",
              "z": "555a0da86fcbd59e",
              "g": "28056265e702d35a",
              "name": "",
              "rules": [
                  {
                      "t": "set",
                      "p": "reset",
                      "pt": "msg",
                      "to": "payload",
                      "tot": "msg"
                  }
              ],
              "action": "",
              "property": "",
              "from": "",
              "to": "",
              "reg": false,
              "x": 780,
              "y": 1000,
              "wires": [
                  [
                      "56baed6c9d62d302",
                      "698c0b8feeb927ab"
                  ]
              ]
          },
          {
              "id": "2434e456aab4e422",
              "type": "trigger",
              "z": "555a0da86fcbd59e",
              "g": "28056265e702d35a",
              "name": "",
              "op1": "",
              "op2": "1",
              "op1type": "nul",
              "op2type": "str",
              "duration": "5",
              "extend": false,
              "overrideDelay": false,
              "units": "s",
              "reset": "",
              "bytopic": "all",
              "topic": "topic",
              "outputs": 1,
              "x": 1020,
              "y": 1180,
              "wires": [
                  [
                      "93c130968fd0aff6",
                      "23d944158c2afb9d"
                  ]
              ]
          },
          {
              "id": "698c0b8feeb927ab",
              "type": "trigger",
              "z": "555a0da86fcbd59e",
              "g": "28056265e702d35a",
              "name": "",
              "op1": "",
              "op2": "1",
              "op1type": "nul",
              "op2type": "str",
              "duration": "5",
              "extend": false,
              "overrideDelay": false,
              "units": "s",
              "reset": "",
              "bytopic": "all",
              "topic": "topic",
              "outputs": 1,
              "x": 1020,
              "y": 920,
              "wires": [
                  [
                      "73503abeceb4a948",
                      "2c066e034e22725f"
                  ]
              ]
          },
          {
              "id": "dca67830bec17864",
              "type": "trigger",
              "z": "555a0da86fcbd59e",
              "g": "28056265e702d35a",
              "name": "",
              "op1": "1",
              "op2": "1",
              "op1type": "str",
              "op2type": "str",
              "duration": "0",
              "extend": false,
              "overrideDelay": false,
              "units": "s",
              "reset": "",
              "bytopic": "all",
              "topic": "topic",
              "outputs": 1,
              "x": 780,
              "y": 1180,
              "wires": [
                  [
                      "2434e456aab4e422",
                      "73503abeceb4a948"
                  ]
              ]
          },
          {
              "id": "e9c9475635add4b0",
              "type": "link in",
              "z": "555a0da86fcbd59e",
              "g": "28056265e702d35a",
              "name": "link in 6",
              "links": [
                  "e4d0d17794144fa6"
              ],
              "x": 205,
              "y": 1100,
              "wires": [
                  [
                      "47e4b4c1a5719f97"
                  ]
              ]
          },
          {
              "id": "5cb56a40dbb6fe16",
              "type": "inject",
              "z": "555a0da86fcbd59e",
              "g": "28056265e702d35a",
              "name": "4000",
              "props": [
                  {
                      "p": "payload"
                  }
              ],
              "repeat": "",
              "crontab": "",
              "once": false,
              "onceDelay": 0.1,
              "topic": "",
              "payload": "4000",
              "payloadType": "num",
              "x": 170,
              "y": 980,
              "wires": [
                  [
                      "47e4b4c1a5719f97"
                  ]
              ]
          },
          {
              "id": "6d5b8d54b80f3aec",
              "type": "inject",
              "z": "555a0da86fcbd59e",
              "g": "28056265e702d35a",
              "name": "2000",
              "props": [
                  {
                      "p": "payload"
                  }
              ],
              "repeat": "",
              "crontab": "",
              "once": false,
              "onceDelay": 0.1,
              "topic": "",
              "payload": "2000",
              "payloadType": "num",
              "x": 170,
              "y": 1040,
              "wires": [
                  [
                      "47e4b4c1a5719f97"
                  ]
              ]
          },
          {
              "id": "ea9e0233a1fc4285",
              "type": "debug",
              "z": "555a0da86fcbd59e",
              "g": "28056265e702d35a",
              "name": "Ausgabe",
              "active": false,
              "tosidebar": true,
              "console": false,
              "tostatus": true,
              "complete": "payload",
              "targetType": "msg",
              "statusVal": "payload",
              "statusType": "auto",
              "x": 1680,
              "y": 1060,
              "wires": []
          },
          {
              "id": "b6225626acfb1315",
              "type": "comment",
              "z": "555a0da86fcbd59e",
              "g": "28056265e702d35a",
              "name": "WR hatte für eine Dauer von 5 sec mehr als 3500W Leistung ",
              "info": "",
              "x": 480,
              "y": 860,
              "wires": []
          },
          {
              "id": "f3f4583ca540c2a8",
              "type": "ha-entity-config",
              "server": "6da5c76fec0d359c",
              "deviceConfig": "",
              "name": "Heizstäbe ausschalten",
              "version": "6",
              "entityType": "button",
              "haConfig": [
                  {
                      "property": "name",
                      "value": "Heizstäbe ausschalten"
                  },
                  {
                      "property": "icon",
                      "value": ""
                  },
                  {
                      "property": "entity_category",
                      "value": ""
                  },
                  {
                      "property": "entity_picture",
                      "value": ""
                  },
                  {
                      "property": "device_class",
                      "value": ""
                  }
              ],
              "resend": false,
              "debugEnabled": false
          },
          {
              "id": "6da5c76fec0d359c",
              "type": "server",
              "name": "Home Assistant",
              "version": 5,
              "addon": true,
              "rejectUnauthorizedCerts": true,
              "ha_boolean": "y|yes|true|on|home|open",
              "connectionDelay": true,
              "cacheJson": true,
              "heartbeat": false,
              "heartbeatInterval": "30",
              "areaSelector": "friendlyName",
              "deviceSelector": "friendlyName",
              "entitySelector": "friendlyName",
              "statusSeparator": ": ",
              "statusYear": "hidden",
              "statusMonth": "short",
              "statusDay": "numeric",
              "statusHourCycle": "default",
              "statusTimeFormat": "h:m",
              "enableGlobalContextStore": false
          }
      ]
      

      ich bin in der Funktion Node hängen geblieben wegen dem if/else - dass es aber auch anders geht - hatte ich noch nicht gewusst.

      danke schon mal - fürs helfen

      Gruß Rico

      posted in Node-Red
      H
      hawell
    • Schrittwerk mit einer Bedingung begrenzen

      Hallo zusammen,
      ich benötige Hilfe bei einem Flow.

      In node-red habe ich ein Schrittwerk, welches 14 Ausgänge der Reihe nach (hoch oder runter) schaltet. Dies kann ich über die +1 oder -1 nodes auch gut machen.

      Nun stehe ich aber vor der Aufgabe, dass ich unter einer weiteren Bedingung die Schritte begrenzen will (z.B. auf 0-7), und wenn zuweit gezährt ist, der höchste Wert ( 7 ) genommen wird.

      Screenshot 2023-10-07 233611.png

      if (flow.get('counter') === undefined) {
      flow.set('counter', 0);
      }
      
      if (flow.get('counter') >13) {
          flow.set('counter', 0);
      }
      
      if (flow.get('counter') <= 12) {
          if (msg.action === '+1') {
              flow.set('counter', flow.get('counter') + 1);
          }
      }
      
      if (flow.get('counter') >= 1) {
          if (msg.action === '-1') {
                  flow.set('counter', flow.get('counter') - 1);
          }
      }
      
      msg.payload = flow.get('counter');
      return msg;
      

      ich bin neu in node-red - steht es mir nach, wenn ich es komliziert angehe 😉

      danke vorab.
      Rico

      posted in Node-Red
      H
      hawell
    Community
    Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen
    The ioBroker Community 2014-2023
    logo