Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Blockly
    5. Rückwärts laufender Timer

    NEWS

    • Wir empfehlen: Node.js 22.x

    • Neuer Blog: Fotos und Eindrücke aus Solingen

    • ioBroker goes Matter ... Matter Adapter in Stable

    Rückwärts laufender Timer

    This topic has been deleted. Only users with topic management privileges can see it.
    • dslraser
      dslraser Forum Testing Most Active @David G. last edited by dslraser

      @david-g
      ja, diese rechnerei mit Zeiten.....(gar nicht so einfach)

      Sowas in der Art wahrscheinlich, oder ?

      Bildschirmfoto 2021-04-09 um 00.41.10.png

      1 Reply Last reply Reply Quote 0
      • David G.
        David G. last edited by

        @dslraser
        @OliverIO

        Genau, so in der Art. Die aktuelle Zeit könnte direkt aus Blockly kommen.

        Evtl kann im Adapter ja die benötigte Zeit immer mit $Time setzen.
        Mit ein paar Variablen und was rechnen bekommt man ja dann die Minuten raus. Denke ich.

        Stunden ausrechnen
        Ms/1000/60/60 Das Ergebnisse auf volle Zahl abrunden.

        Minuten ausrechnen
        Ms-(erste Ergebnis 6060*1000)*1000

        Kommt das hin?

        dslraser liv-in-sky 2 Replies Last reply Reply Quote 0
        • dslraser
          dslraser Forum Testing Most Active @David G. last edited by dslraser

          @david-g
          ich habe es ja "fast"
          nur immer eine Stunde Rest zu viel...

          Bildschirmfoto 2021-04-09 um 09.04.46.png

          Bildschirmfoto 2021-04-09 um 09.05.29.png

          Edit: zum "rumprobieren" habe ich als Trigger erstmal nur den Schalter, noch nicht wenn sich die Abholzeit ändert ....

          Bildschirmfoto 2021-04-09 um 09.13.28.png

          David G. 1 Reply Last reply Reply Quote 0
          • liv-in-sky
            liv-in-sky @David G. last edited by liv-in-sky

            @david-g habe gestern erst eine eieruhr gebaut - etwas verändert sieht das so aus

            die zeit wird immer neu berechnet - somit sind keine abweichungen

            Image 2.png

            <xml xmlns="https://developers.google.com/blockly/xml">
             <variables>
               <variable id="fT;=_wfW%h4{R73!Jknb">x</variable>
               <variable type="interval" id="Intervall">Intervall</variable>
               <variable id="ia)r=(wtIr{HMgJ-42A5">sek</variable>
             </variables>
             <block type="on" id="s6k9KQ-%|C2b7@$KA8hd" x="163" y="213">
               <field name="OID">0_userdata.0.EierUhr.EieruhrIOT</field>
               <field name="CONDITION">any</field>
               <field name="ACK_CONDITION"></field>
               <statement name="STATEMENT">
                 <block type="timeouts_clearinterval" id="?RE9aWBnf}*|Z{?$d)=s">
                   <field name="NAME">Intervall</field>
                   <next>
                     <block type="timeouts_setinterval" id="A_EFR}7y6lgSi/t;p~Tv">
                       <field name="NAME">Intervall</field>
                       <field name="INTERVAL">5</field>
                       <field name="UNIT">sec</field>
                       <statement name="STATEMENT">
                         <block type="controls_if" id="cJiT{iEI[Sy@=FKbIjQB">
                           <mutation else="1"></mutation>
                           <value name="IF0">
                             <block type="get_value" id="Qk;Uq,s2y*1*r}e08aA7">
                               <field name="ATTR">val</field>
                               <field name="OID">0_userdata.0.EierUhr.EieruhrIOT</field>
                             </block>
                           </value>
                           <statement name="DO0">
                             <block type="variables_set" id="ZYK#aO1x,r#q[%T!5eYs">
                               <field name="VAR" id="ia)r=(wtIr{HMgJ-42A5">sek</field>
                               <value name="VALUE">
                                 <block type="math_arithmetic" id="s*g:=]P.izNOw.uXJ,B@">
                                   <field name="OP">DIVIDE</field>
                                   <value name="A">
                                     <shadow type="math_number">
                                       <field name="NUM">1</field>
                                     </shadow>
                                     <block type="math_arithmetic" id="FQ=JcQwkt*!KK;:BPcGe">
                                       <field name="OP">MINUS</field>
                                       <value name="A">
                                         <shadow type="math_number">
                                           <field name="NUM">1</field>
                                         </shadow>
                                         <block type="convert_tonumber" id="KTi^Fbx3(q}I`=L3;}Io">
                                           <value name="VALUE">
                                             <block type="convert_from_date" id="!/nJ,lr^mgYRH6zu%Lv5">
                                               <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
                                               <field name="OPTION">object</field>
                                               <value name="VALUE">
                                                 <block type="text" id="`Uo.f|{(d4B.SRlf0eF1">
                                                   <field name="TEXT">10:20</field>
                                                 </block>
                                               </value>
                                             </block>
                                           </value>
                                         </block>
                                       </value>
                                       <value name="B">
                                         <shadow type="math_number">
                                           <field name="NUM">1</field>
                                         </shadow>
                                         <block type="time_get" id="w{?w3KM2VKS-xwJxB;7_">
                                           <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
                                           <field name="OPTION">object</field>
                                         </block>
                                       </value>
                                     </block>
                                   </value>
                                   <value name="B">
                                     <shadow type="math_number">
                                       <field name="NUM">1000</field>
                                     </shadow>
                                     <block type="math_number" id="h`9wotlzCV46[L{zUbA%">
                                       <field name="NUM">1000</field>
                                     </block>
                                   </value>
                                 </block>
                               </value>
                             </block>
                           </statement>
                           <statement name="ELSE">
                             <block type="variables_set" id="D,ni$D:9s!`{VWQFGou%">
                               <field name="VAR" id="ia)r=(wtIr{HMgJ-42A5">sek</field>
                               <value name="VALUE">
                                 <block type="math_arithmetic" id="-VpG*cB)#lNp+6MPHPn`">
                                   <field name="OP">DIVIDE</field>
                                   <value name="A">
                                     <shadow type="math_number">
                                       <field name="NUM">1</field>
                                     </shadow>
                                     <block type="math_arithmetic" id="8ZiMe9;InLK^}T[4?!9u">
                                       <field name="OP">MINUS</field>
                                       <value name="A">
                                         <shadow type="math_number">
                                           <field name="NUM">1</field>
                                         </shadow>
                                         <block type="convert_tonumber" id="asEY=D.*=L_sQkY3WO=|">
                                           <value name="VALUE">
                                             <block type="convert_from_date" id="GmL%v^UNy~@.DC@1-cFM">
                                               <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
                                               <field name="OPTION">object</field>
                                               <value name="VALUE">
                                                 <block type="text" id="`JfsiNZOra13w0MA|PMJ">
                                                   <field name="TEXT">12:00</field>
                                                 </block>
                                               </value>
                                             </block>
                                           </value>
                                         </block>
                                       </value>
                                       <value name="B">
                                         <shadow type="math_number">
                                           <field name="NUM">1</field>
                                         </shadow>
                                         <block type="time_get" id="gpq}%!(z7#Ey^uq$ToK%">
                                           <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
                                           <field name="OPTION">object</field>
                                         </block>
                                       </value>
                                     </block>
                                   </value>
                                   <value name="B">
                                     <shadow type="math_number">
                                       <field name="NUM">1000</field>
                                     </shadow>
                                     <block type="math_number" id="/e=A-T,2@AP_K!RJU$-U">
                                       <field name="NUM">1000</field>
                                     </block>
                                   </value>
                                 </block>
                               </value>
                             </block>
                           </statement>
                           <next>
                             <block type="controls_if" id="-7_%{,*r_?*,gyq;:6pJ">
                               <mutation else="1"></mutation>
                               <value name="IF0">
                                 <block type="logic_compare" id="yriYm}!JheF7J;1n;!Bi">
                                   <field name="OP">LTE</field>
                                   <value name="A">
                                     <block type="variables_get" id="Nj+1rfpp~eE}u6qr0|9g">
                                       <field name="VAR" id="ia)r=(wtIr{HMgJ-42A5">sek</field>
                                     </block>
                                   </value>
                                   <value name="B">
                                     <block type="math_number" id="ev7?[8g$86e#Ke7M;P!P">
                                       <field name="NUM">0</field>
                                     </block>
                                   </value>
                                 </block>
                               </value>
                               <statement name="DO0">
                                 <block type="control" id="tA7FD(n1H4dUg-bkFk}.">
                                   <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                   <field name="OID">0_userdata.0.EierUhr.SekVis</field>
                                   <field name="WITH_DELAY">FALSE</field>
                                   <value name="VALUE">
                                     <block type="math_number" id=";EG:[,]NURD6UPl`2k/;">
                                       <field name="NUM">0</field>
                                     </block>
                                   </value>
                                   <next>
                                     <block type="control" id="bm/N3-CSr#$6+in7Z*]-">
                                       <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                       <field name="OID">0_userdata.0.EierUhr.MinVis</field>
                                       <field name="WITH_DELAY">FALSE</field>
                                       <value name="VALUE">
                                         <block type="math_number" id="lnWSQY_}lxt%K0;dL?e}">
                                           <field name="NUM">0</field>
                                         </block>
                                       </value>
                                       <next>
                                         <block type="control" id="RK]O1Zep?jBljd8kmYgi">
                                           <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                           <field name="OID">0_userdata.0.EierUhr.hourVIS</field>
                                           <field name="WITH_DELAY">FALSE</field>
                                           <value name="VALUE">
                                             <block type="math_number" id="Ao.~t73*2dh*@%51t_I}">
                                               <field name="NUM">0</field>
                                             </block>
                                           </value>
                                           <next>
                                             <block type="control" id="yT$wd73`dhXE=U-Qd$#9">
                                               <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                               <field name="OID">0_userdata.0.EierUhr.gesamt</field>
                                               <field name="WITH_DELAY">FALSE</field>
                                               <value name="VALUE">
                                                 <block type="text" id="@t6%)$iQIPB=#IHlC;H;">
                                                   <field name="TEXT">0h 0m 0s</field>
                                                 </block>
                                               </value>
                                               <next>
                                                 <block type="timeouts_clearinterval" id="T4B4.K*)(kq/PbP0`;$i">
                                                   <field name="NAME">Intervall</field>
                                                 </block>
                                               </next>
                                             </block>
                                           </next>
                                         </block>
                                       </next>
                                     </block>
                                   </next>
                                 </block>
                               </statement>
                               <statement name="ELSE">
                                 <block type="control" id="4;iv_FvR.,3eG6;j6@aW">
                                   <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                   <field name="OID">0_userdata.0.EierUhr.Sek</field>
                                   <field name="WITH_DELAY">FALSE</field>
                                   <value name="VALUE">
                                     <block type="variables_get" id="~01`hV0LGqPM[_XJSiUq">
                                       <field name="VAR" id="ia)r=(wtIr{HMgJ-42A5">sek</field>
                                     </block>
                                   </value>
                                   <next>
                                     <block type="control" id="{,aSo)[)MJ`:vRr$j{73">
                                       <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                       <field name="OID">0_userdata.0.EierUhr.MinVis</field>
                                       <field name="WITH_DELAY">FALSE</field>
                                       <value name="VALUE">
                                         <block type="procedures_callcustomreturn" id="=qcO_-{jAq0fyRnVRHlu">
                                           <mutation name="mins">
                                             <arg name="x"></arg>
                                           </mutation>
                                           <value name="ARG0">
                                             <block type="variables_get" id="c6r:5])+f(EV6YLykl1{">
                                               <field name="VAR" id="ia)r=(wtIr{HMgJ-42A5">sek</field>
                                             </block>
                                           </value>
                                         </block>
                                       </value>
                                       <next>
                                         <block type="control" id="dRJq3i{~(PDV-|uA,O;(">
                                           <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                           <field name="OID">0_userdata.0.EierUhr.SekVis</field>
                                           <field name="WITH_DELAY">FALSE</field>
                                           <value name="VALUE">
                                             <block type="procedures_callcustomreturn" id="1b6f5?Rm#~K4,_Vg+y{#">
                                               <mutation name="seks">
                                                 <arg name="x"></arg>
                                               </mutation>
                                               <value name="ARG0">
                                                 <block type="variables_get" id="nw*`]dbjp@ZM=Zmp:4z9">
                                                   <field name="VAR" id="ia)r=(wtIr{HMgJ-42A5">sek</field>
                                                 </block>
                                               </value>
                                             </block>
                                           </value>
                                           <next>
                                             <block type="control" id="uM0J@X9EQ$p_Qj(~!Vqa">
                                               <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                               <field name="OID">0_userdata.0.EierUhr.hourVIS</field>
                                               <field name="WITH_DELAY">FALSE</field>
                                               <value name="VALUE">
                                                 <block type="procedures_callcustomreturn" id=".dmQ{oCvrjbwQ2*EZH?D">
                                                   <mutation name="hours">
                                                     <arg name="x"></arg>
                                                   </mutation>
                                                   <value name="ARG0">
                                                     <block type="variables_get" id="T$N8A%rC!4nQ$cN~F,-n">
                                                       <field name="VAR" id="ia)r=(wtIr{HMgJ-42A5">sek</field>
                                                     </block>
                                                   </value>
                                                 </block>
                                               </value>
                                               <next>
                                                 <block type="control" id="rqppH#0)R=^BVW]Gf0!@">
                                                   <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                   <field name="OID">0_userdata.0.EierUhr.gesamt</field>
                                                   <field name="WITH_DELAY">FALSE</field>
                                                   <value name="VALUE">
                                                     <block type="text_join" id="v(5WI=A=?a--TTXj}Ns{">
                                                       <mutation items="6"></mutation>
                                                       <value name="ADD0">
                                                         <block type="procedures_callcustomreturn" id="{n.5~FisoDZ*64Odj%1y">
                                                           <mutation name="hours">
                                                             <arg name="x"></arg>
                                                           </mutation>
                                                           <value name="ARG0">
                                                             <block type="variables_get" id="o0-:GXEu:^Y:Dmt,4r2E">
                                                               <field name="VAR" id="ia)r=(wtIr{HMgJ-42A5">sek</field>
                                                             </block>
                                                           </value>
                                                         </block>
                                                       </value>
                                                       <value name="ADD1">
                                                         <block type="text" id="9OiGG^=-Pvr87v_yZ#v[">
                                                           <field name="TEXT">h </field>
                                                         </block>
                                                       </value>
                                                       <value name="ADD2">
                                                         <block type="procedures_callcustomreturn" id="fhs##$#wC08Xn7LsWp3A">
                                                           <mutation name="mins">
                                                             <arg name="x"></arg>
                                                           </mutation>
                                                           <value name="ARG0">
                                                             <block type="variables_get" id="QV=n4!R6CAZ;9L8e}=r(">
                                                               <field name="VAR" id="ia)r=(wtIr{HMgJ-42A5">sek</field>
                                                             </block>
                                                           </value>
                                                         </block>
                                                       </value>
                                                       <value name="ADD3">
                                                         <block type="text" id="JL26[pT?EPyFx-Z^ny+0">
                                                           <field name="TEXT">m </field>
                                                         </block>
                                                       </value>
                                                       <value name="ADD4">
                                                         <block type="procedures_callcustomreturn" id="}=K9c/@Iaa}WnQ[5]RbG">
                                                           <mutation name="seks">
                                                             <arg name="x"></arg>
                                                           </mutation>
                                                           <value name="ARG0">
                                                             <block type="variables_get" id="E.D37:@`Vj,+AiVqQhr{">
                                                               <field name="VAR" id="ia)r=(wtIr{HMgJ-42A5">sek</field>
                                                             </block>
                                                           </value>
                                                         </block>
                                                       </value>
                                                       <value name="ADD5">
                                                         <block type="text" id="dJ5Z;BA3~DT3X]{UOu1c">
                                                           <field name="TEXT">s</field>
                                                         </block>
                                                       </value>
                                                     </block>
                                                   </value>
                                                 </block>
                                               </next>
                                             </block>
                                           </next>
                                         </block>
                                       </next>
                                     </block>
                                   </next>
                                 </block>
                               </statement>
                             </block>
                           </next>
                         </block>
                       </statement>
                     </block>
                   </next>
                 </block>
               </statement>
             </block>
             <block type="procedures_defcustomreturn" id="hNp+KJi*MwhKUiD,W+tM" x="887" y="237">
               <mutation statements="false">
                 <arg name="x" varid="fT;=_wfW%h4{R73!Jknb"></arg>
               </mutation>
               <field name="NAME">hours</field>
               <field name="SCRIPT">cmV0dXJuIE1hdGguZmxvb3IoICgoeCkvNjAvNjApICUgMjQgKTs=</field>
               <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment>
             </block>
             <block type="procedures_defcustomreturn" id=")7(`K1lbnQk}]T=rC%iJ" x="938" y="287">
               <mutation statements="false">
                 <arg name="x" varid="fT;=_wfW%h4{R73!Jknb"></arg>
               </mutation>
               <field name="NAME">mins</field>
               <field name="SCRIPT">cmV0dXJuIE1hdGguZmxvb3IoICgoeCkvNjApICUgNjAgKTs=</field>
               <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment>
             </block>
             <block type="procedures_defcustomreturn" id="^?Us{6]v{[qBvW/Ov:V|" x="963" y="337">
               <mutation statements="false">
                 <arg name="x" varid="fT;=_wfW%h4{R73!Jknb"></arg>
               </mutation>
               <field name="NAME">seks</field>
               <field name="SCRIPT">cmV0dXJuIE1hdGguZmxvb3IoICgoeCkpICUgNjAgKTs=</field>
               <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment>
             </block>
            </xml>
            

            dslraser 1 Reply Last reply Reply Quote 0
            • dslraser
              dslraser Forum Testing Most Active @liv-in-sky last edited by

              @liv-in-sky
              ich habe das mal für mich umgebaut. Eine Frage, was macht das sonst ? (wofür braucht es das ?)

              Bildschirmfoto 2021-04-09 um 11.40.08.png

              liv-in-sky 1 Reply Last reply Reply Quote 0
              • liv-in-sky
                liv-in-sky @dslraser last edited by liv-in-sky

                @dslraser sagte in Rückwärts laufender Timer:

                @liv-in-sky
                ich habe das mal für mich umgebaut. Eine Frage, was macht das sonst ? (wofür braucht es das ?)

                @dslraser was meinst du genau - das ganze script oder einen baustein

                das ganze script wahr ursprünglich als eieruhr gedacht, welche mit alexa gestartet wird. ich hatte mal ein script, welches die alexa timer anzeigt - aber nur in minuten oder stunden - der wunsch war, das ganze in minuten und sekunden anzugeben- was das script nicht hergibt.
                https://forum.iobroker.net/post/611848

                dslraser 1 Reply Last reply Reply Quote 0
                • dslraser
                  dslraser Forum Testing Most Active @liv-in-sky last edited by

                  @liv-in-sky sagte in Rückwärts laufender Timer:

                  baustein

                  in dem falls mache, das sonst im Screenshot, was ich deaktiviert habe.

                  liv-in-sky 1 Reply Last reply Reply Quote 0
                  • liv-in-sky
                    liv-in-sky @dslraser last edited by

                    @dslraser es war doch die frage: wenn ein wert true ist, dann bis 13:00 uhr
                    wnn der wert false ist, soll bis 12:00 gezählt werden

                    oder habe ich da etwas falsch verstanden

                    dslraser 2 Replies Last reply Reply Quote 0
                    • dslraser
                      dslraser Forum Testing Most Active @liv-in-sky last edited by

                      @liv-in-sky

                      Ich habe es jetzt so...

                      Bildschirmfoto 2021-04-09 um 11.53.22.png

                      Es funktioniert auch 👍
                      Ich muß jetzt aber erstmal weg....Ich melde mich heute Abend wieder
                      Abholzeit in den DP eintragen und Schalter auf true setzen

                      Timer.zip

                      liv-in-sky 1 Reply Last reply Reply Quote 1
                      • liv-in-sky
                        liv-in-sky @dslraser last edited by

                        @dslraser cool mit dem datenpunkt anlegen teil 👍

                        1 Reply Last reply Reply Quote 0
                        • dslraser
                          dslraser Forum Testing Most Active @liv-in-sky last edited by dslraser

                          @liv-in-sky sagte in Rückwärts laufender Timer:

                          @dslraser es war doch die frage: wenn ein wert true ist, dann bis 13:00 uhr
                          wnn der wert false ist, soll bis 12:00 gezählt werden

                          oder habe ich da etwas falsch verstanden

                          Nein, Du hast Recht....Ich schalte nur einen Timer mit true/false an/aus, der die gesetzte Abholzeit auswertet.

                          Edit: man könnte ja noch einen zweiten DP für die alternative Abholzeit anlegen und dann mit dem sonst Zweig...

                          1 Reply Last reply Reply Quote 0
                          • liv-in-sky
                            liv-in-sky last edited by

                            das ganze funktioniert auch über tage - mit diesem eintrag

                            Image 3.png

                            Image 4.png

                            der datenpunkt für die tage ist nicht integriert - müßte man noch einbinden - da aber die sekunden wichtig sind, wird gezählt - nur momentan falsch angezeigt, weil die tage nicht sichtbar sind

                            1 Reply Last reply Reply Quote 0
                            • David G.
                              David G. @dslraser last edited by

                              @liv-in-sky
                              Deine Variante ist auch cool. Nur nicht so flexibel.

                              @dslraser

                              Die Variante finde ich sympathisch, so kann man alle Werte in Datenpunkten angeben. Auch die abholzeit.

                              Hast du ggf mal einen Export?

                              Mal schauen, was ich da zusammenbauen kann.
                              Heute vormittag habe ich mit dem Adapter mytime gespielt. Damit geht auch was.
                              Ohne extra Adapter ist natürlich besser.

                              liv-in-sky dslraser 2 Replies Last reply Reply Quote 0
                              • liv-in-sky
                                liv-in-sky @David G. last edited by

                                @david-g
                                das script von @dslraser hat er gepostet https://forum.iobroker.net/post/612459

                                1 Reply Last reply Reply Quote 0
                                • dslraser
                                  dslraser Forum Testing Most Active @David G. last edited by

                                  @david-g sagte in Rückwärts laufender Timer:

                                  Hast du ggf mal einen Export?

                                  Muss noch bisschen aufgeräumt werden und die Pfade etwas flexibler...Heute Abend schaue ich nochmal. Ich habe vielleicht selbst Verwendung dafür. Sekunden brauche ich nicht zwingend, Du ?
                                  Und nochmal danke an @liv-in-sky

                                  David G. 1 Reply Last reply Reply Quote 0
                                  • David G.
                                    David G. @dslraser last edited by David G.

                                    @dslraser
                                    @OliverIO

                                    Hey,

                                    hab grad noch was an meiner Variante mit dem MyTime-Adapter getüftelt.
                                    Hab es jetzt am laufen.
                                    Ist zwar noch ein extra Adapter, jedoch verstehe ich das Blockly.......^^.

                                    So hab ich es jetzt:

                                    countdown.JPG

                                    Ist noch mein Testaufbau mit dem minütlichen Trigger und der Telegramm 😉

                                    Im Datenpunkt cmd gebe ich dem Adapter die zu berechnete Zeit.
                                    Im Datenpunkt Timer stehen die verbleibenden ms.

                                    EDIT:
                                    Und hier die fertige Variante, die noch meine Datenpunkte abfragt:

                                    fertig.JPG

                                    dslraser 1 Reply Last reply Reply Quote 1
                                    • dslraser
                                      dslraser Forum Testing Most Active @David G. last edited by dslraser

                                      @david-g
                                      Warum fragst Du zwei mal die Werte ab ?
                                      Ich glaube das äußere falls mache braucht es nicht.

                                      1617979181847-fertig.jpg

                                      David G. 1 Reply Last reply Reply Quote 0
                                      • David G.
                                        David G. @dslraser last edited by David G.

                                        @dslraser
                                        Beim ersten Falls-Block wird geprüft, ob einer der Abholtermine aktiv ist (Kann immer nur einer aktiv sein, wird von einem anderen Skript geregelt).
                                        Falls nicht, läuft das Skript nicht weiter.

                                        Im zweiten Falls-Block prüfe ich dann, welche Zeit gesetzt werden soll.

                                        Ist das mit der Erklärung auch unlogisch wie ich das gemacht hab?

                                        dslraser 1 Reply Last reply Reply Quote 0
                                        • dslraser
                                          dslraser Forum Testing Most Active @David G. last edited by

                                          @david-g
                                          Du prüfst ob früh oder spät wahr ist.
                                          Im zweiten falls prüfst Du nochmal ob früh wahr ist, wenn ja, dann setze die timerzeit auf 20 Uhr
                                          sonst falls (also wenn das erste nicht zutrifft) prüfst Du nochmal spät, ob spät wahr ist und setzt die timerzeit auf 21 Uhr
                                          Wenn beides nicht wahr ist passiert nichts.
                                          Du prüfst also zweimal ob früh wahr ist und auch zweimal ob spät wahr ist.

                                          David G. 1 Reply Last reply Reply Quote 0
                                          • David G.
                                            David G. @dslraser last edited by David G.

                                            @dslraser

                                            Genau, prüfe 2 mal.
                                            Aber wenn ich das äußere falls weg nehme, wird doch jedes mal der Datenpunkt vom Adapter neu befüllt der dann los rechnet und die Zeitrechnung unter den beiden falls auch noch durchgeführt oder?

                                            Ich möchte ja in der Tat nichts machen, wenn beide Zeiten auf false stehen.

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

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate

                                            820
                                            Online

                                            32.0k
                                            Users

                                            80.5k
                                            Topics

                                            1.3m
                                            Posts

                                            5
                                            37
                                            1200
                                            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