Skip to content
  • Home
  • Aktuell
  • Tags
  • 0 Ungelesen 0
  • Kategorien
  • Unreplied
  • Beliebt
  • GitHub
  • Docu
  • Hilfe
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Standard: (Kein Skin)
  • Kein Skin
Einklappen
ioBroker Logo

Community Forum

donate donate
  1. ioBroker Community Home
  2. Deutsch
  3. Skripten / Logik
  4. Blockly
  5. Betriebsdauer-Zähler (erledigt)

NEWS

  • Jahresrückblick 2025 – unser neuer Blogbeitrag ist online! ✨
    BluefoxB
    Bluefox
    17
    1
    3.8k

  • Neuer Blogbeitrag: Monatsrückblick - Dezember 2025 🎄
    BluefoxB
    Bluefox
    13
    1
    1.2k

  • Weihnachtsangebot 2025! 🎄
    BluefoxB
    Bluefox
    25
    1
    2.5k

Betriebsdauer-Zähler (erledigt)

Geplant Angeheftet Gesperrt Verschoben Blockly
7 Beiträge 2 Kommentatoren 754 Aufrufe 1 Watching
  • Älteste zuerst
  • Neuste zuerst
  • Meiste Stimmen
Antworten
  • In einem neuen Thema antworten
Anmelden zum Antworten
Dieses Thema wurde gelöscht. Nur Nutzer mit entsprechenden Rechten können es sehen.
  • I Offline
    I Offline
    ionar
    schrieb am zuletzt editiert von ionar
    #1

    Hallo,
    ich würde gerne die Betriebsdauer eines Gerätes nach dem Einschalten in Minuten zählen und dann nach dem Ausschalten zurücksetzen.
    Ich bekomme es leider selber nicht hin..

    Bildschirmfoto 2020-06-19 um 16.31.52.png

    Vielen Dank!

    paul53P 1 Antwort Letzte Antwort
    0
    • I ionar

      Hallo,
      ich würde gerne die Betriebsdauer eines Gerätes nach dem Einschalten in Minuten zählen und dann nach dem Ausschalten zurücksetzen.
      Ich bekomme es leider selber nicht hin..

      Bildschirmfoto 2020-06-19 um 16.31.52.png

      Vielen Dank!

      paul53P Offline
      paul53P Offline
      paul53
      schrieb am zuletzt editiert von
      #2

      @ionar
      Mit Trigger (Zeitplan) innerhalb eines Triggers wird das nichts. Mit "wiederhole bis" wird eine Endlosschleife erzeugt. Vorschlag:

      Blockly_temp.JPG

      <xml xmlns="https://developers.google.com/blockly/xml">
       <variables>
         <variable id=")u|MCf/ls7zvBa;qNZWC">Zeit</variable>
         <variable type="interval" id="Intervall">Intervall</variable>
       </variables>
       <block type="on_ext" id="oaj;E-YSV!_*m8TQwu31" x="113" y="38">
         <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
         <field name="CONDITION">ne</field>
         <field name="ACK_CONDITION"></field>
         <value name="OID0">
           <shadow type="field_oid" id="wSk}$GtBZ_M8pqpv|y(u">
             <field name="oid">default</field>
           </shadow>
         </value>
         <statement name="STATEMENT">
           <block type="controls_if" id="Ln]L-E%(r62eBDNQ4Xbq">
             <mutation else="1"></mutation>
             <value name="IF0">
               <block type="on_source" id="^;c8,2Eu3b?PO3zF*4~c">
                 <field name="ATTR">state.val</field>
               </block>
             </value>
             <statement name="DO0">
               <block type="variables_set" id="eY-@(O%KX8wW:P@]Z$^W">
                 <field name="VAR" id=")u|MCf/ls7zvBa;qNZWC">Zeit</field>
                 <value name="VALUE">
                   <block type="math_number" id="Y_k+HM{+dHI.gJ5t[zQs">
                     <field name="NUM">0</field>
                   </block>
                 </value>
                 <next>
                   <block type="update" id="s3/ybBOu8el5v#7W)R$6">
                     <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                     <field name="OID">Object ID</field>
                     <field name="WITH_DELAY">FALSE</field>
                     <value name="VALUE">
                       <block type="variables_get" id="tKbh~QvfuRKGAg^kWKbk">
                         <field name="VAR" id=")u|MCf/ls7zvBa;qNZWC">Zeit</field>
                       </block>
                     </value>
                     <next>
                       <block type="timeouts_setinterval" id="=fcydg8Y{0I-H*B%7cB?">
                         <field name="NAME">Intervall</field>
                         <field name="INTERVAL">1</field>
                         <field name="UNIT">min</field>
                         <statement name="STATEMENT">
                           <block type="math_change" id="r}XU3p^Wk~}L$EeT)$TP">
                             <field name="VAR" id=")u|MCf/ls7zvBa;qNZWC">Zeit</field>
                             <value name="DELTA">
                               <shadow type="math_number" id="|fbWDuBrT5C}m`I4rpzN">
                                 <field name="NUM">1</field>
                               </shadow>
                             </value>
                             <next>
                               <block type="update" id="Qq7Km9/C^K4L|2B+fBi|">
                                 <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                 <field name="OID">Object ID</field>
                                 <field name="WITH_DELAY">FALSE</field>
                                 <value name="VALUE">
                                   <block type="variables_get" id="6VDO|,:J5t8^S0Q6?)Cq">
                                     <field name="VAR" id=")u|MCf/ls7zvBa;qNZWC">Zeit</field>
                                   </block>
                                 </value>
                               </block>
                             </next>
                           </block>
                         </statement>
                       </block>
                     </next>
                   </block>
                 </next>
               </block>
             </statement>
             <statement name="ELSE">
               <block type="timeouts_clearinterval" id="Vb3c=Pc=g#(T-IB7YD[U">
                 <field name="NAME">Intervall</field>
               </block>
             </statement>
           </block>
         </statement>
       </block>
      </xml>
      

      Bitte verzichtet auf Chat-Nachrichten, denn die Handhabung ist grauenhaft !
      Produktiv: RPi 2 mit S.USV, HM-MOD-RPI und SLC-USB-Stick mit root fs

      1 Antwort Letzte Antwort
      1
      • I Offline
        I Offline
        ionar
        schrieb am zuletzt editiert von ionar
        #3

        Vielen Dank @paul53
        Der Wert wird verändert, aber immer "+8", also 8, 16, 24, 32, etc. (Auch wenn das Gerät aus ist, wieder von 0 startend mit "+8"-Schritten).
        Kannst du dir das erklären?

        Bildschirmfoto 2020-06-19 um 19.08.09.png


        <xml xmlns="https://developers.google.com/blockly/xml">
        <variables>
        <variable id="x9ubP]8jfhr-+qtGQ{si">Zeit</variable>
        <variable type="interval" id="Intervall">Intervall</variable>
        </variables>
        <block type="on_ext" id="oaj;E-YSV!_m8TQwu31" x="-412" y="38">
        <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
        <field name="CONDITION">true</field>
        <field name="ACK_CONDITION"></field>
        <value name="OID0">
        <shadow type="field_oid" id="wSk}$GtBZ_M8pqpv|y(u">
        <field name="oid">deconz.0.Lights.10.on</field>
        </shadow>
        </value>
        <statement name="STATEMENT">
        <block type="controls_if" id="Ln]L-E%(r62eBDNQ4Xbq">
        <mutation else="1"></mutation>
        <value name="IF0">
        <block type="on_source" id="^;c8,2Eu3b?PO3zF
        4~c">
        <field name="ATTR">state.val</field>
        </block>
        </value>
        <statement name="DO0">
        <block type="variables_set" id="eY-@(O%KX8wW:P@]Z$^W">
        <field name="VAR" id="x9ubP]8jfhr-+qtGQ{si">Zeit</field>
        <value name="VALUE">
        <block type="math_number" id="Y_k+HM{+dHI.gJ5t[zQs">
        <field name="NUM">0</field>
        </block>
        </value>
        <next>
        <block type="update" id="s3/ybBOu8el5v#7W)R$6">
        <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
        <field name="OID">0_userdata.0.USB-Kabel_Betriebsdauer</field>
        <field name="WITH_DELAY">FALSE</field>
        <value name="VALUE">
        <block type="variables_get" id="tKbh~QvfuRKGAg^kWKbk">
        <field name="VAR" id="x9ubP]8jfhr-+qtGQ{si">Zeit</field>
        </block>
        </value>
        <next>
        <block type="timeouts_setinterval" id="=fcydg8Y{0I-HB%7cB?">
        <field name="NAME">Intervall</field>
        <field name="INTERVAL">1</field>
        <field name="UNIT">min</field>
        <statement name="STATEMENT">
        <block type="math_change" id="r}XU3p^Wk~}L$EeT)$TP">
        <field name="VAR" id="x9ubP]8jfhr-+qtGQ{si">Zeit</field>
        <value name="DELTA">
        <shadow type="math_number" id="|fbWDuBrT5C}mI4rpzN"> <field name="NUM">1</field> </shadow> </value> <next> <block type="update" id="Qq7Km9/C^K4L|2B+fBi|"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.USB-Kabel_Betriebsdauer</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="variables_get" id="6VDO|,:J5t8^S0Q6?)Cq"> <field name="VAR" id="x9ubP]8jfhr-+qtGQ{si">Zeit</field> </block> </value> </block> </next> </block> </statement> </block> </next> </block> </next> </block> </statement> <statement name="ELSE"> <block type="timeouts_clearinterval" id="Vb3c=Pc=g#(T-IB7YD[U"> <field name="NAME">Intervall</field> </block> </statement> </block> </statement> <next> <block type="on_ext" id="6lE^|Q(7A1#IQfdvd}3u"> <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation> <field name="CONDITION">false</field> <field name="ACK_CONDITION"></field> <value name="OID0"> <shadow type="field_oid" id="}?0}pp@St~k4}ac|?mE?"> <field name="oid">deconz.0.Lights.10.on</field> </shadow> </value> <statement name="STATEMENT"> <block type="variables_set" id="xoF/Y([A0X~IQxjhU?G">
        <field name="VAR" id="x9ubP]8jfhr-+qtGQ{si">Zeit</field>
        <value name="VALUE">
        <block type="math_number" id="1oI-9t]]H8V9.vY9=/Jf">
        <field name="NUM">0</field>
        </block>
        </value>
        <next>
        <block type="update" id="QLY}kgw6~/eodN6]nD:
        ">
        <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
        <field name="OID">0_userdata.0.USB-Kabel_Betriebsdauer</field>
        <field name="WITH_DELAY">FALSE</field>
        <value name="VALUE">
        <block type="variables_get" id="0k}F;s|DUpXA4(GZu@VW">
        <field name="VAR" id="x9ubP]8jfhr-+qtGQ{si">Zeit</field>
        </block>
        </value>
        </block>
        </next>
        </block>
        </statement>
        </block>
        </next>
        </block>
        </xml>

        paul53P 1 Antwort Letzte Antwort
        0
        • I ionar

          Vielen Dank @paul53
          Der Wert wird verändert, aber immer "+8", also 8, 16, 24, 32, etc. (Auch wenn das Gerät aus ist, wieder von 0 startend mit "+8"-Schritten).
          Kannst du dir das erklären?

          Bildschirmfoto 2020-06-19 um 19.08.09.png


          <xml xmlns="https://developers.google.com/blockly/xml">
          <variables>
          <variable id="x9ubP]8jfhr-+qtGQ{si">Zeit</variable>
          <variable type="interval" id="Intervall">Intervall</variable>
          </variables>
          <block type="on_ext" id="oaj;E-YSV!_m8TQwu31" x="-412" y="38">
          <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
          <field name="CONDITION">true</field>
          <field name="ACK_CONDITION"></field>
          <value name="OID0">
          <shadow type="field_oid" id="wSk}$GtBZ_M8pqpv|y(u">
          <field name="oid">deconz.0.Lights.10.on</field>
          </shadow>
          </value>
          <statement name="STATEMENT">
          <block type="controls_if" id="Ln]L-E%(r62eBDNQ4Xbq">
          <mutation else="1"></mutation>
          <value name="IF0">
          <block type="on_source" id="^;c8,2Eu3b?PO3zF
          4~c">
          <field name="ATTR">state.val</field>
          </block>
          </value>
          <statement name="DO0">
          <block type="variables_set" id="eY-@(O%KX8wW:P@]Z$^W">
          <field name="VAR" id="x9ubP]8jfhr-+qtGQ{si">Zeit</field>
          <value name="VALUE">
          <block type="math_number" id="Y_k+HM{+dHI.gJ5t[zQs">
          <field name="NUM">0</field>
          </block>
          </value>
          <next>
          <block type="update" id="s3/ybBOu8el5v#7W)R$6">
          <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
          <field name="OID">0_userdata.0.USB-Kabel_Betriebsdauer</field>
          <field name="WITH_DELAY">FALSE</field>
          <value name="VALUE">
          <block type="variables_get" id="tKbh~QvfuRKGAg^kWKbk">
          <field name="VAR" id="x9ubP]8jfhr-+qtGQ{si">Zeit</field>
          </block>
          </value>
          <next>
          <block type="timeouts_setinterval" id="=fcydg8Y{0I-HB%7cB?">
          <field name="NAME">Intervall</field>
          <field name="INTERVAL">1</field>
          <field name="UNIT">min</field>
          <statement name="STATEMENT">
          <block type="math_change" id="r}XU3p^Wk~}L$EeT)$TP">
          <field name="VAR" id="x9ubP]8jfhr-+qtGQ{si">Zeit</field>
          <value name="DELTA">
          <shadow type="math_number" id="|fbWDuBrT5C}mI4rpzN"> <field name="NUM">1</field> </shadow> </value> <next> <block type="update" id="Qq7Km9/C^K4L|2B+fBi|"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.USB-Kabel_Betriebsdauer</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="variables_get" id="6VDO|,:J5t8^S0Q6?)Cq"> <field name="VAR" id="x9ubP]8jfhr-+qtGQ{si">Zeit</field> </block> </value> </block> </next> </block> </statement> </block> </next> </block> </next> </block> </statement> <statement name="ELSE"> <block type="timeouts_clearinterval" id="Vb3c=Pc=g#(T-IB7YD[U"> <field name="NAME">Intervall</field> </block> </statement> </block> </statement> <next> <block type="on_ext" id="6lE^|Q(7A1#IQfdvd}3u"> <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation> <field name="CONDITION">false</field> <field name="ACK_CONDITION"></field> <value name="OID0"> <shadow type="field_oid" id="}?0}pp@St~k4}ac|?mE?"> <field name="oid">deconz.0.Lights.10.on</field> </shadow> </value> <statement name="STATEMENT"> <block type="variables_set" id="xoF/Y([A0X~IQxjhU?G">
          <field name="VAR" id="x9ubP]8jfhr-+qtGQ{si">Zeit</field>
          <value name="VALUE">
          <block type="math_number" id="1oI-9t]]H8V9.vY9=/Jf">
          <field name="NUM">0</field>
          </block>
          </value>
          <next>
          <block type="update" id="QLY}kgw6~/eodN6]nD:
          ">
          <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
          <field name="OID">0_userdata.0.USB-Kabel_Betriebsdauer</field>
          <field name="WITH_DELAY">FALSE</field>
          <value name="VALUE">
          <block type="variables_get" id="0k}F;s|DUpXA4(GZu@VW">
          <field name="VAR" id="x9ubP]8jfhr-+qtGQ{si">Zeit</field>
          </block>
          </value>
          </block>
          </next>
          </block>
          </statement>
          </block>
          </next>
          </block>
          </xml>

          paul53P Offline
          paul53P Offline
          paul53
          schrieb am zuletzt editiert von paul53
          #4

          @ionar sagte:

          Kannst du dir das erklären?

          Ja. Du triggerst auf "ist wahr". Somit wird der sonst-Zweig nie erreicht, das Intervall also nicht gestoppt. Wenn um 8 Stellen hochgezählt wird, laufen mittlerweile 8 Intervalle parallel. Man verwendet in einem Skript keine 2 Trigger auf den gleichen Datenpunkt (Ressourcen-Verbrauch).

          Bitte verzichtet auf Chat-Nachrichten, denn die Handhabung ist grauenhaft !
          Produktiv: RPi 2 mit S.USV, HM-MOD-RPI und SLC-USB-Stick mit root fs

          1 Antwort Letzte Antwort
          1
          • I Offline
            I Offline
            ionar
            schrieb am zuletzt editiert von
            #5

            Vielen Dank nochmals @paul53, jetzt funktioniert es.

            Bildschirmfoto 2020-06-19 um 19.34.48.png


            <xml xmlns="https://developers.google.com/blockly/xml">
            <variables>
            <variable id="x9ubP]8jfhr-+qtGQ{si">Zeit</variable>
            <variable type="interval" id="Intervall">Intervall</variable>
            </variables>
            <block type="on_ext" id="oaj;E-YSV!_m8TQwu31" x="-412" y="38">
            <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
            <field name="CONDITION">ne</field>
            <field name="ACK_CONDITION"></field>
            <value name="OID0">
            <shadow type="field_oid" id="wSk}$GtBZ_M8pqpv|y(u">
            <field name="oid">deconz.0.Lights.10.on</field>
            </shadow>
            </value>
            <statement name="STATEMENT">
            <block type="controls_if" id="Ln]L-E%(r62eBDNQ4Xbq">
            <mutation else="1"></mutation>
            <value name="IF0">
            <block type="logic_compare" id="t}$-;-D0S,jc+oAFGwbt">
            <field name="OP">EQ</field>
            <value name="A">
            <block type="get_value" id="0DH]}NP@^|LaXKlc2ZEi">
            <field name="ATTR">val</field>
            <field name="OID">deconz.0.Lights.10.on</field>
            </block>
            </value>
            <value name="B">
            <block type="logic_boolean" id="M(tWoO@5{a6owX,6J)">
            <field name="BOOL">TRUE</field>
            </block>
            </value>
            </block>
            </value>
            <statement name="DO0">
            <block type="variables_set" id="eY-@(O%KX8wW:P@]Z$^W">
            <field name="VAR" id="x9ubP]8jfhr-+qtGQ{si">Zeit</field>
            <value name="VALUE">
            <block type="math_number" id="Y_k+HM{+dHI.gJ5t[zQs">
            <field name="NUM">0</field>
            </block>
            </value>
            <next>
            <block type="update" id="s3/ybBOu8el5v#7W)R$6">
            <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
            <field name="OID">0_userdata.0.USB-Kabel_Betriebsdauer</field>
            <field name="WITH_DELAY">FALSE</field>
            <value name="VALUE">
            <block type="variables_get" id="tKbh~QvfuRKGAg^kWKbk">
            <field name="VAR" id="x9ubP]8jfhr-+qtGQ{si">Zeit</field>
            </block>
            </value>
            <next>
            <block type="timeouts_setinterval" id="=fcydg8Y{0I-H
            B%7cB?">
            <field name="NAME">Intervall</field>
            <field name="INTERVAL">1</field>
            <field name="UNIT">min</field>
            <statement name="STATEMENT">
            <block type="math_change" id="r}XU3p^Wk~}L$EeT)$TP">
            <field name="VAR" id="x9ubP]8jfhr-+qtGQ{si">Zeit</field>
            <value name="DELTA">
            <shadow type="math_number" id="|fbWDuBrT5C}mI4rpzN"> <field name="NUM">1</field> </shadow> </value> <next> <block type="update" id="Qq7Km9/C^K4L|2B+fBi|"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.USB-Kabel_Betriebsdauer</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="variables_get" id="6VDO|,:J5t8^S0Q6?)Cq"> <field name="VAR" id="x9ubP]8jfhr-+qtGQ{si">Zeit</field> </block> </value> </block> </next> </block> </statement> </block> </next> </block> </next> </block> </statement> <statement name="ELSE"> <block type="timeouts_clearinterval" id="Vb3c=Pc=g#(T-IB7YD[U"> <field name="NAME">Intervall</field> <next> <block type="variables_set" id="xoF/Y([A0X~IQxjhU?G">
            <field name="VAR" id="x9ubP]8jfhr-+qtGQ{si">Zeit</field>
            <value name="VALUE">
            <block type="math_number" id="1oI-9t]]H8V9.vY9=/Jf">
            <field name="NUM">0</field>
            </block>
            </value>
            <next>
            <block type="update" id="QLY}kgw6~/eodN6]nD:*">
            <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
            <field name="OID">0_userdata.0.USB-Kabel_Betriebsdauer</field>
            <field name="WITH_DELAY">FALSE</field>
            <value name="VALUE">
            <block type="variables_get" id="0k}F;s|DUpXA4(GZu@VW">
            <field name="VAR" id="x9ubP]8jfhr-+qtGQ{si">Zeit</field>
            </block>
            </value>
            </block>
            </next>
            </block>
            </next>
            </block>
            </statement>
            </block>
            </statement>
            </block>
            </xml>

            paul53P 1 Antwort Letzte Antwort
            0
            • I ionar

              Vielen Dank nochmals @paul53, jetzt funktioniert es.

              Bildschirmfoto 2020-06-19 um 19.34.48.png


              <xml xmlns="https://developers.google.com/blockly/xml">
              <variables>
              <variable id="x9ubP]8jfhr-+qtGQ{si">Zeit</variable>
              <variable type="interval" id="Intervall">Intervall</variable>
              </variables>
              <block type="on_ext" id="oaj;E-YSV!_m8TQwu31" x="-412" y="38">
              <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
              <field name="CONDITION">ne</field>
              <field name="ACK_CONDITION"></field>
              <value name="OID0">
              <shadow type="field_oid" id="wSk}$GtBZ_M8pqpv|y(u">
              <field name="oid">deconz.0.Lights.10.on</field>
              </shadow>
              </value>
              <statement name="STATEMENT">
              <block type="controls_if" id="Ln]L-E%(r62eBDNQ4Xbq">
              <mutation else="1"></mutation>
              <value name="IF0">
              <block type="logic_compare" id="t}$-;-D0S,jc+oAFGwbt">
              <field name="OP">EQ</field>
              <value name="A">
              <block type="get_value" id="0DH]}NP@^|LaXKlc2ZEi">
              <field name="ATTR">val</field>
              <field name="OID">deconz.0.Lights.10.on</field>
              </block>
              </value>
              <value name="B">
              <block type="logic_boolean" id="M(tWoO@5{a6owX,6J)">
              <field name="BOOL">TRUE</field>
              </block>
              </value>
              </block>
              </value>
              <statement name="DO0">
              <block type="variables_set" id="eY-@(O%KX8wW:P@]Z$^W">
              <field name="VAR" id="x9ubP]8jfhr-+qtGQ{si">Zeit</field>
              <value name="VALUE">
              <block type="math_number" id="Y_k+HM{+dHI.gJ5t[zQs">
              <field name="NUM">0</field>
              </block>
              </value>
              <next>
              <block type="update" id="s3/ybBOu8el5v#7W)R$6">
              <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
              <field name="OID">0_userdata.0.USB-Kabel_Betriebsdauer</field>
              <field name="WITH_DELAY">FALSE</field>
              <value name="VALUE">
              <block type="variables_get" id="tKbh~QvfuRKGAg^kWKbk">
              <field name="VAR" id="x9ubP]8jfhr-+qtGQ{si">Zeit</field>
              </block>
              </value>
              <next>
              <block type="timeouts_setinterval" id="=fcydg8Y{0I-H
              B%7cB?">
              <field name="NAME">Intervall</field>
              <field name="INTERVAL">1</field>
              <field name="UNIT">min</field>
              <statement name="STATEMENT">
              <block type="math_change" id="r}XU3p^Wk~}L$EeT)$TP">
              <field name="VAR" id="x9ubP]8jfhr-+qtGQ{si">Zeit</field>
              <value name="DELTA">
              <shadow type="math_number" id="|fbWDuBrT5C}mI4rpzN"> <field name="NUM">1</field> </shadow> </value> <next> <block type="update" id="Qq7Km9/C^K4L|2B+fBi|"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.USB-Kabel_Betriebsdauer</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="variables_get" id="6VDO|,:J5t8^S0Q6?)Cq"> <field name="VAR" id="x9ubP]8jfhr-+qtGQ{si">Zeit</field> </block> </value> </block> </next> </block> </statement> </block> </next> </block> </next> </block> </statement> <statement name="ELSE"> <block type="timeouts_clearinterval" id="Vb3c=Pc=g#(T-IB7YD[U"> <field name="NAME">Intervall</field> <next> <block type="variables_set" id="xoF/Y([A0X~IQxjhU?G">
              <field name="VAR" id="x9ubP]8jfhr-+qtGQ{si">Zeit</field>
              <value name="VALUE">
              <block type="math_number" id="1oI-9t]]H8V9.vY9=/Jf">
              <field name="NUM">0</field>
              </block>
              </value>
              <next>
              <block type="update" id="QLY}kgw6~/eodN6]nD:*">
              <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
              <field name="OID">0_userdata.0.USB-Kabel_Betriebsdauer</field>
              <field name="WITH_DELAY">FALSE</field>
              <value name="VALUE">
              <block type="variables_get" id="0k}F;s|DUpXA4(GZu@VW">
              <field name="VAR" id="x9ubP]8jfhr-+qtGQ{si">Zeit</field>
              </block>
              </value>
              </block>
              </next>
              </block>
              </next>
              </block>
              </statement>
              </block>
              </statement>
              </block>
              </xml>

              paul53P Offline
              paul53P Offline
              paul53
              schrieb am zuletzt editiert von paul53
              #6

              @ionar sagte:

              jetzt funktioniert es.

              Dann markiere bitte das Thema in der Überschrift des ersten Beitrags als gelöst.

              Weshalb setzt Du den Datenpunkt "Betriebsdauer" schon beim Ausschalten auf 0 zurück. Dann ist die Information sofort weg. Es genügt das Rücksetzen beim nächsten Einschalten, so wie in meinem Vorschlag. Zweimal Rücksetzen ist ohnehin überflüssig.

              Bitte verzichtet auf Chat-Nachrichten, denn die Handhabung ist grauenhaft !
              Produktiv: RPi 2 mit S.USV, HM-MOD-RPI und SLC-USB-Stick mit root fs

              I 1 Antwort Letzte Antwort
              1
              • paul53P paul53

                @ionar sagte:

                jetzt funktioniert es.

                Dann markiere bitte das Thema in der Überschrift des ersten Beitrags als gelöst.

                Weshalb setzt Du den Datenpunkt "Betriebsdauer" schon beim Ausschalten auf 0 zurück. Dann ist die Information sofort weg. Es genügt das Rücksetzen beim nächsten Einschalten, so wie in meinem Vorschlag. Zweimal Rücksetzen ist ohnehin überflüssig.

                I Offline
                I Offline
                ionar
                schrieb am zuletzt editiert von ionar
                #7

                @paul53 sagte in Betriebsdauer-Zähler:

                Weshalb setzt Du den Datenpunkt "Betriebsdauer" schon beim Ausschalten auf 0 zurück.

                Das Ladegerät ist an einer Couch-Steckdose, das wiederum an einem Osram Smartplug hängt. Ich habe ein anderes Skript, dass die Steckdose ausschaltet, sobald das Ladegerät 90min an ist. (Das könnte dann mehrfach getriggert werden, wenn der Wert über 90 bleibt?)

                Bei Bedarf schalten wir das Ladegerät an und vergessen meistens, es wieder auszuschalten, wenn wir das Handy abziehen. Die Betriebsdauer ist in diesem Fall keine wichtige Information sozusagen.

                Edit: Und das Skript in anderer Form möchte ich jetzt auch nutzen, um die Kaffeemaschine automatisch abzuschalten, wenn ich länger als 30min abwesend bin, quasi als Abwesenheitszähler.

                1 Antwort Letzte Antwort
                0
                Antworten
                • In einem neuen Thema antworten
                Anmelden zum Antworten
                • Älteste zuerst
                • Neuste zuerst
                • Meiste Stimmen


                Support us

                ioBroker
                Community Adapters
                Donate

                573

                Online

                32.7k

                Benutzer

                82.4k

                Themen

                1.3m

                Beiträge
                Community
                Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen | Einwilligungseinstellungen
                ioBroker Community 2014-2025
                logo
                • Anmelden

                • Du hast noch kein Konto? Registrieren

                • Anmelden oder registrieren, um zu suchen
                • Erster Beitrag
                  Letzter Beitrag
                0
                • Home
                • Aktuell
                • Tags
                • Ungelesen 0
                • Kategorien
                • Unreplied
                • Beliebt
                • GitHub
                • Docu
                • Hilfe