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. wenn keine neue Nachricht Werte auf xx setzen

    NEWS

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

    • ioBroker goes Matter ... Matter Adapter in Stable

    • Monatsrückblick - April 2025

    wenn keine neue Nachricht Werte auf xx setzen

    This topic has been deleted. Only users with topic management privileges can see it.
    • L
      L.T. 0 last edited by

      Hallo zusammen,

      von meinem Growatt Wechselrichter erhalte ich via mqtt die aktuellen Systemdaten.
      Allerdings nur solange der Wechselrichter auch produziert. Sobald die Sonne weg ist beendet der Wechselrichter die Kommunikation.
      Aus diesem Grund erhalte ich am Ende des jeweiligen Tages noch eine Einspeiseleistung. Die Kommunikation bricht ab und die alten Werte bleiben in meinen Variablen erhalten.

      Wie kann ich nun eine Art Timeout bauen, um bei Abbruch der Verbindung die Varialben auf beliebige Werte zu setzen.

      Kommt also z.B. für eine Minute kein neues Telegramm, wird Einspeiseleistung und aktueller Strom der PV Module auf 0 gesetzt.

      Im Anhang der aktuelle Flow in dem der JSON Inhalt in einzel Variablen zerlegt wird.
      Vielleicht hat jemand eine Idee.

      Gruß L.T.

      flows.json

      mickym 1 Reply Last reply Reply Quote 0
      • mickym
        mickym Most Active @L.T. 0 last edited by mickym

        @l-t-0 Einfach eine Trigger Node nehmen.

        Ich hab Deinen Flow angepasst:

        bf042954-6578-4c1b-b5c4-c29228fa564d-image.png

        hier zum Import:

        [
           {
               "id": "78056d007cd7976c",
               "type": "ioBroker in",
               "z": "66cf0443229e4df3",
               "name": "Inverter_1_JSON",
               "topic": "mqtt.0.energy.solar_1",
               "payloadType": "value",
               "onlyack": "",
               "func": "all",
               "gap": "",
               "fireOnStart": "false",
               "outFormat": "MQTT",
               "x": 160,
               "y": 240,
               "wires": [
                   [
                       "c3b8297b.63a338",
                       "5fcc551c2f695f7b",
                       "5cc98080172d7459"
                   ]
               ]
           },
           {
               "id": "c3b8297b.63a338",
               "type": "json",
               "z": "66cf0443229e4df3",
               "name": "",
               "property": "payload",
               "action": "obj",
               "pretty": false,
               "x": 410,
               "y": 440,
               "wires": [
                   [
                       "757cda2e7268d653"
                   ]
               ]
           },
           {
               "id": "cfabc75c.493b78",
               "type": "change",
               "z": "66cf0443229e4df3",
               "name": "",
               "rules": [
                   {
                       "t": "set",
                       "p": "payload",
                       "pt": "msg",
                       "to": "payload.OutputPower",
                       "tot": "msg"
                   }
               ],
               "action": "",
               "property": "",
               "from": "",
               "to": "",
               "reg": false,
               "x": 710,
               "y": 300,
               "wires": [
                   [
                       "38342e7b658fa202"
                   ]
               ]
           },
           {
               "id": "aa81d17cb727bd76",
               "type": "ioBroker out",
               "z": "66cf0443229e4df3",
               "name": "Akt_Leistung",
               "topic": "0_userdata.0.PV_Inverter_1.Akt_Leistung",
               "ack": "true",
               "autoCreate": "false",
               "stateName": "",
               "role": "",
               "payloadType": "",
               "readonly": "",
               "stateUnit": "",
               "stateMin": "",
               "stateMax": "",
               "x": 1170,
               "y": 300,
               "wires": []
           },
           {
               "id": "491776b48826bb59",
               "type": "change",
               "z": "66cf0443229e4df3",
               "name": "",
               "rules": [
                   {
                       "t": "set",
                       "p": "payload",
                       "pt": "msg",
                       "to": "payload.InverterTemperature",
                       "tot": "msg"
                   }
               ],
               "action": "",
               "property": "",
               "from": "",
               "to": "",
               "reg": false,
               "x": 710,
               "y": 360,
               "wires": [
                   [
                       "5f569fc5a3ea3392"
                   ]
               ]
           },
           {
               "id": "5f569fc5a3ea3392",
               "type": "ioBroker out",
               "z": "66cf0443229e4df3",
               "name": "Umrichtertemperatur",
               "topic": "0_userdata.0.PV_Inverter_1.Umrichtertemperatur",
               "ack": "true",
               "autoCreate": "false",
               "stateName": "",
               "role": "",
               "payloadType": "",
               "readonly": "",
               "stateUnit": "",
               "stateMin": "",
               "stateMax": "",
               "x": 1000,
               "y": 360,
               "wires": []
           },
           {
               "id": "5fcc551c2f695f7b",
               "type": "debug",
               "z": "66cf0443229e4df3",
               "name": "debug 1",
               "active": true,
               "tosidebar": true,
               "console": false,
               "tostatus": false,
               "complete": "false",
               "statusVal": "",
               "statusType": "auto",
               "x": 420,
               "y": 240,
               "wires": []
           },
           {
               "id": "38342e7b658fa202",
               "type": "function",
               "z": "66cf0443229e4df3",
               "name": "W nach kW",
               "func": "msg.payload = msg.payload / 1000;\nreturn msg;",
               "outputs": 1,
               "noerr": 0,
               "initialize": "",
               "finalize": "",
               "libs": [],
               "x": 970,
               "y": 300,
               "wires": [
                   [
                       "aa81d17cb727bd76"
                   ]
               ]
           },
           {
               "id": "2298c4cded730919",
               "type": "change",
               "z": "66cf0443229e4df3",
               "name": "",
               "rules": [
                   {
                       "t": "set",
                       "p": "payload",
                       "pt": "msg",
                       "to": "payload.TotalGenerateEnergy",
                       "tot": "msg"
                   }
               ],
               "action": "",
               "property": "",
               "from": "",
               "to": "",
               "reg": false,
               "x": 710,
               "y": 420,
               "wires": [
                   [
                       "7632cac225f7fed2"
                   ]
               ]
           },
           {
               "id": "7632cac225f7fed2",
               "type": "ioBroker out",
               "z": "66cf0443229e4df3",
               "name": "Gesamteinspeisung",
               "topic": "0_userdata.0.PV_Inverter_1.Gesamteinspeisung",
               "ack": "true",
               "autoCreate": "false",
               "stateName": "",
               "role": "",
               "payloadType": "",
               "readonly": "",
               "stateUnit": "",
               "stateMin": "",
               "stateMax": "",
               "x": 1000,
               "y": 420,
               "wires": []
           },
           {
               "id": "b1d0d183825994c7",
               "type": "change",
               "z": "66cf0443229e4df3",
               "name": "",
               "rules": [
                   {
                       "t": "set",
                       "p": "payload",
                       "pt": "msg",
                       "to": "payload.PV1Voltage",
                       "tot": "msg"
                   }
               ],
               "action": "",
               "property": "",
               "from": "",
               "to": "",
               "reg": false,
               "x": 710,
               "y": 480,
               "wires": [
                   [
                       "a4b1511b3a4f25f1"
                   ]
               ]
           },
           {
               "id": "a4b1511b3a4f25f1",
               "type": "ioBroker out",
               "z": "66cf0443229e4df3",
               "name": "PV_Spannung",
               "topic": "0_userdata.0.PV_Inverter_1.PV_Spannung",
               "ack": "true",
               "autoCreate": "false",
               "stateName": "",
               "role": "",
               "payloadType": "",
               "readonly": "",
               "stateUnit": "",
               "stateMin": "",
               "stateMax": "",
               "x": 980,
               "y": 480,
               "wires": []
           },
           {
               "id": "f28c61430311a1fc",
               "type": "change",
               "z": "66cf0443229e4df3",
               "name": "",
               "rules": [
                   {
                       "t": "set",
                       "p": "payload",
                       "pt": "msg",
                       "to": "payload.PV1InputCurrent",
                       "tot": "msg"
                   }
               ],
               "action": "",
               "property": "",
               "from": "",
               "to": "",
               "reg": false,
               "x": 710,
               "y": 540,
               "wires": [
                   [
                       "85c1136e3f9bc15d"
                   ]
               ]
           },
           {
               "id": "85c1136e3f9bc15d",
               "type": "ioBroker out",
               "z": "66cf0443229e4df3",
               "name": "PV_Strom",
               "topic": "0_userdata.0.PV_Inverter_1.PV_Strom",
               "ack": "true",
               "autoCreate": "false",
               "stateName": "",
               "role": "",
               "payloadType": "",
               "readonly": "",
               "stateUnit": "",
               "stateMin": "",
               "stateMax": "",
               "x": 970,
               "y": 540,
               "wires": []
           },
           {
               "id": "5cc98080172d7459",
               "type": "trigger",
               "z": "66cf0443229e4df3",
               "name": "timeout",
               "op1": "",
               "op2": "{\"OutputPower\":0,\"InverterTemperature\":0,\"TotalGenerateEnergy\":0,\"PV1Voltage\":0,\"PV1InputCurrent\":0}",
               "op1type": "nul",
               "op2type": "json",
               "duration": "1",
               "extend": true,
               "overrideDelay": false,
               "units": "min",
               "reset": "",
               "bytopic": "all",
               "topic": "topic",
               "outputs": 1,
               "x": 400,
               "y": 360,
               "wires": [
                   [
                       "757cda2e7268d653"
                   ]
               ]
           },
           {
               "id": "757cda2e7268d653",
               "type": "junction",
               "z": "66cf0443229e4df3",
               "x": 500,
               "y": 400,
               "wires": [
                   [
                       "f28c61430311a1fc",
                       "b1d0d183825994c7",
                       "2298c4cded730919",
                       "491776b48826bb59",
                       "cfabc75c.493b78"
                   ]
               ]
           }
        ]
        

        EDIT 17:45: In der Trigger Node war noch ein Fehler. 😉

        cdcb9232-6b13-4ab8-b9ac-8e1e8157ebb4-image.png

        muss natürlich angehakt sein. 😉

        L 1 Reply Last reply Reply Quote 0
        • L
          L.T. 0 @mickym last edited by

          @mickym

          Tiptop!!
          Klappt in der Simulation wie gewünscht!
          Unter echten Bedingungen kann ich leider gerade nicht testen, da ist zuviel Neuschnee auf den Modulen. Also konstant 0 Leistung 😞

          Gruß L.T.

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

          Support us

          ioBroker
          Community Adapters
          Donate

          640
          Online

          31.7k
          Users

          79.7k
          Topics

          1.3m
          Posts

          2
          3
          92
          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