Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Blockly
    5. Hilfe Blockly 2 Uhrzeiten in objekt ausgeben

    NEWS

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

    • ioBroker goes Matter ... Matter Adapter in Stable

    • Monatsrückblick - April 2025

    Hilfe Blockly 2 Uhrzeiten in objekt ausgeben

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

      Hallo ich brauch mal eure hilfe in Blockly, ich habe 2 objekte.
      Objekt 1 aktuelle Uhrzeit
      Objekt 2 angabe in hh:mm wie lange etwas braucht

      Wie bekomme ich es jetzt hin das ich beide zusammen ausgebe in ein neues Objekt? Das es mir Quasi die Uhrzeit ausgibt wann es fertig ist.

      Homoran paul53 2 Replies Last reply Reply Quote 0
      • Homoran
        Homoran Global Moderator Administrators @Kammi_ last edited by Homoran

        @kammi_ sagte in Hilfe Blockly 2 Uhrzeiten in objekt ausgeben:

        beide zusammen ausgebe in ein neues Objekt

        wofür?

        Reicht es nicht

        @kammi_ sagte in Hilfe Blockly 2 Uhrzeiten in objekt ausgeben:

        die Uhrzeit ausgibt wann es fertig ist.

        ?

        oder soll beides in einem Datenpunkt ausgegeben wwrden, so wie hier:
        20241225_151230.jpg

        K 1 Reply Last reply Reply Quote 0
        • K
          Kammi_ @Homoran last edited by

          @homoran

          das ganze geht wegen Klipper und Klipper gibt in der API keine Endzeit an darum will ich mir die aktuelle Uhrzeit + Druckzeit in einen Datenpunkt scheiben.

          1 Reply Last reply Reply Quote 0
          • paul53
            paul53 @Kammi_ last edited by paul53

            @kammi_ sagte: Uhrzeit ausgibt wann es fertig ist.

            Vorschlag mit Gesamtlaufzeit ab Start:

            Blockly_temp.JPG

            @kammi_ sagte in Hilfe Blockly 2 Uhrzeiten in objekt ausgeben:

            Objekt 2 angabe in hh:mm wie lange etwas braucht

            Ist das die Gesamtlaufzeit ab Start oder die Restlaufzeit, die sich jede Minute ändert?

            K 1 Reply Last reply Reply Quote 0
            • K
              Kammi_ @paul53 last edited by Kammi_

              @paul53

              Objekt 2 ist die zeit die das model braucht zum drucken also ja sie zählt runter

              bräuchte es also praktisch so

              obj1+obj2=endzeit

              13:00+01:25=14:25 uhr

              paul53 1 Reply Last reply Reply Quote 0
              • paul53
                paul53 @Kammi_ last edited by paul53

                @kammi_ sagte: sie zählt runter

                Dann kann sie als Trigger dienen.

                Blockly_temp.JPG

                K 1 Reply Last reply Reply Quote 1
                • K
                  Kammi_ @paul53 last edited by

                  @paul53

                  Moin zusammen also ich hab das jetzt so umgesetzt, leider bekomm ich nich das Erbniss was rauskommen sollte

                  <xml xmlns="https://developers.google.com/blockly/xml">
                    <variables>
                      <variable id="p?m(Q~}+lHKnTkdA.teN">Liste</variable>
                      <variable id="cYsu{X{2u^QK6{/6tgFZ">Dauer1</variable>
                      <variable id="`z(j}#qcJTueW#9U#Qb(">Dauer2</variable>
                    </variables>
                    <block type="on" id="R#%dPl,}X#:)M5[g4(rt" x="-287" y="-637">
                      <field name="OID">0_userdata.0.Prusa_Mini_Data.qidi.rest</field>
                      <field name="CONDITION">ne</field>
                      <field name="ACK_CONDITION"></field>
                      <statement name="STATEMENT">
                        <block type="variables_set" id="NQR,n=$zBp-57#y[{G*E">
                          <field name="VAR" id="p?m(Q~}+lHKnTkdA.teN">Liste</field>
                          <value name="VALUE">
                            <block type="lists_split" id="Hc~dcqus~z$XpY6Do9eZ">
                              <mutation mode="SPLIT"></mutation>
                              <field name="MODE">SPLIT</field>
                              <value name="INPUT">
                                <block type="on_source" id="r4XHfwqrFJeZy@sk4N_%">
                                  <field name="ATTR">state.val</field>
                                </block>
                              </value>
                              <value name="DELIM">
                                <shadow type="text" id=":gnC;z^gb1_c4bPBv8nD">
                                  <field name="TEXT">:</field>
                                </shadow>
                              </value>
                            </block>
                          </value>
                          <next>
                            <block type="variables_set" id="cbN@2j?[=e$;,s~0B,}{">
                              <field name="VAR" id="cYsu{X{2u^QK6{/6tgFZ">Dauer1</field>
                              <value name="VALUE">
                                <block type="math_arithmetic" id="l[{t_i`,E*XUIN`I8Ql=">
                                  <field name="OP">ADD</field>
                                  <value name="A">
                                    <shadow type="math_number" id="lQ`|8NP,-a.,ZK!{R`A!">
                                      <field name="NUM">1</field>
                                    </shadow>
                                    <block type="math_arithmetic" id="~.c4=A*fWVoL/r1a+p,#">
                                      <field name="OP">MULTIPLY</field>
                                      <value name="A">
                                        <shadow type="math_number" id="1qOZ]AbIXqjsbSKJU=AE">
                                          <field name="NUM">60</field>
                                        </shadow>
                                      </value>
                                      <value name="B">
                                        <shadow type="math_number" id="]@kC7saoD2R$3qt:vZW|">
                                          <field name="NUM">1</field>
                                        </shadow>
                                        <block type="lists_getIndex" id="[|*.bmk_,:j|W_%9RNik">
                                          <mutation statement="false" at="false"></mutation>
                                          <field name="MODE">GET</field>
                                          <field name="WHERE">FIRST</field>
                                          <value name="VALUE">
                                            <block type="variables_get" id="m0.raSw!2z#t5TFNV^AW">
                                              <field name="VAR" id="p?m(Q~}+lHKnTkdA.teN">Liste</field>
                                            </block>
                                          </value>
                                        </block>
                                      </value>
                                    </block>
                                  </value>
                                  <value name="B">
                                    <shadow type="math_number" id="D2/iMsbrg.9k#1uxCu6f">
                                      <field name="NUM">1</field>
                                    </shadow>
                                    <block type="convert_tonumber" id="7w]y,z.}dmKuD1:g;5fe">
                                      <value name="VALUE">
                                        <block type="lists_getIndex" id="U3BeXkLtFB^AHS4p43(Y">
                                          <mutation statement="false" at="true"></mutation>
                                          <field name="MODE">GET</field>
                                          <field name="WHERE">FROM_START</field>
                                          <value name="VALUE">
                                            <block type="variables_get" id="GrvIBdf3i{:Kk0rfbBz/">
                                              <field name="VAR" id="p?m(Q~}+lHKnTkdA.teN">Liste</field>
                                            </block>
                                          </value>
                                          <value name="AT">
                                            <block type="math_number" id="A}//rz?@nh;KQ]f[}GNL">
                                              <field name="NUM">2</field>
                                            </block>
                                          </value>
                                        </block>
                                      </value>
                                    </block>
                                  </value>
                                </block>
                              </value>
                              <next>
                                <block type="variables_set" id="@E8I|8)~jUFh]!=afwzz">
                                  <field name="VAR" id="`z(j}#qcJTueW#9U#Qb(">Dauer2</field>
                                  <value name="VALUE">
                                    <block type="convert_from_date" id="i~pxj5?;ZhEM%5jh!n{]">
                                      <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
                                      <field name="OPTION">hh:mm</field>
                                      <value name="VALUE">
                                        <block type="time_calculation" id="^uagMF^!oe6N@wTaJh,7">
                                          <field name="OPERATION">+</field>
                                          <field name="UNIT">min</field>
                                          <value name="DATE_TIME">
                                            <shadow type="time_get" id=";/?yTk!H|c9r]d1TSK7`">
                                              <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
                                              <field name="OPTION">object</field>
                                            </shadow>
                                          </value>
                                          <value name="VALUE">
                                            <shadow type="math_number" id="Ks,5cQduUd-rMudL-^y5">
                                              <field name="NUM">1</field>
                                            </shadow>
                                            <block type="variables_get" id="Ynny|`s6fJjBS`gyNm5R">
                                              <field name="VAR" id="`z(j}#qcJTueW#9U#Qb(">Dauer2</field>
                                            </block>
                                          </value>
                                        </block>
                                      </value>
                                    </block>
                                  </value>
                                  <next>
                                    <block type="update" id="!jIJ=a3Jii;i5(+THi9O">
                                      <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                      <field name="OID">0_userdata.0.Prusa_Mini_Data.qidi.fertig</field>
                                      <field name="WITH_DELAY">FALSE</field>
                                      <value name="VALUE">
                                        <block type="text_join" id=":pd%2C(=c$kmKs1BoUf:">
                                          <mutation items="3"></mutation>
                                          <value name="ADD0">
                                            <block type="time_get" id="d.OR#y7GE|4~kch`SnLr">
                                              <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
                                              <field name="OPTION">hh:mm</field>
                                            </block>
                                          </value>
                                          <value name="ADD1">
                                            <block type="text" id="F/6J+oQj%dJb:!Zd*/mk">
                                              <field name="TEXT"> bis </field>
                                            </block>
                                          </value>
                                          <value name="ADD2">
                                            <block type="variables_get" id="sTyd)aYa3.upxw4*2x=f">
                                              <field name="VAR" id="`z(j}#qcJTueW#9U#Qb(">Dauer2</field>
                                            </block>
                                          </value>
                                        </block>
                                      </value>
                                    </block>
                                  </next>
                                </block>
                              </next>
                            </block>
                          </next>
                        </block>
                      </statement>
                    </block>
                  </xml>
                  

                  im Objekt steht dann

                  11:10 bis NaN:NaN
                  

                  Wo ist der fehler ?

                  paul53 1 Reply Last reply Reply Quote 0
                  • paul53
                    paul53 @Kammi_ last edited by

                    @kammi_ sagte: Wo ist der fehler ?

                    Du addierst die falsche Variable. Richtig:

                    Blockly_temp.JPG

                    K 1 Reply Last reply Reply Quote 0
                    • K
                      Kammi_ @paul53 last edited by Kammi_

                      @paul53

                      Danke für deine Hilfe hat funktioniert

                      qudi-fertig.png

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

                      Support us

                      ioBroker
                      Community Adapters
                      Donate

                      987
                      Online

                      31.7k
                      Users

                      79.7k
                      Topics

                      1.3m
                      Posts

                      3
                      9
                      395
                      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