Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Laufzeit von Pumpe

    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

    Laufzeit von Pumpe

    This topic has been deleted. Only users with topic management privileges can see it.
    • P
      PVelo last edited by

      Hallo Zusammen,

      ich bitte um Hilfe.

      Ich steuer über iobroker meine PoolPumpe (ja nach Lux & Temperatur).

      Jetzt möchte ich aber wissen wie Lange meine Pumpe bereits nach der letzten Reinigung Lauft.

      Uptime mit Counter habe ich realisiert, das Problem was ich habe:

      Wenn ich die Steuerung neu Starte oder nodeRed Deploye ist der wert auf 0 und fängt von vorne an zu zählen.

      ist es möglich einen MQTT Datenpunkt remanent zu machen?

      1 Reply Last reply Reply Quote 0
      • R
        rewenode last edited by

        Du musst deinen Wert als flow oder global Variable speichern.

        https://nodered.org/docs/writing-functions#storing-data

        Beispiel function node:

        // initialise the counter to 0 if it doesn't exist already
        var count = context.get('count')||0;
        count += 1;
        // store the value back
        context.set('count',count);
        // make it part of the outgoing msg object
        msg.payload = count;
        return msg;
        
        

        Die flow Variable überlebt den deplay, nicht aber den Neustart. Wenn du das auch brauchst, musst du den persistenten context einschalten:

        https://nodered.org/docs/user-guide/context

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

        Support us

        ioBroker
        Community Adapters
        Donate

        523
        Online

        31.9k
        Users

        80.2k
        Topics

        1.3m
        Posts

        2
        2
        733
        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