Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Blockly
    5. Probleme u.a. mit Timeout bzw. Intervallen

    NEWS

    • Wir empfehlen: Node.js 22.x

    • Neuer Blog: Fotos und Eindrücke aus Solingen

    • ioBroker goes Matter ... Matter Adapter in Stable

    Probleme u.a. mit Timeout bzw. Intervallen

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

      Hallo,
      ich habe folgendes vor:
      wenn der Trigger (Adapter Zeitschaltuhr) einsetzt, soll folgendes passieren:

      1. Das Licht soll angeschaltet werden.
      2. Zeitgleich soll die Musik angeschaltet werden (Sonos API). Alle 60 Sekunden soll die Lautstärke um 5 Prozent auf max 30 Prozent erhöht werden. Die Musik soll nach 15 Minuten komplett ausgeschaltet werden.
      3. Danach wird das Licht ausgeschaltet
      4. Rollos fahren je nach Helligkeit hoch bzw. es wird eine andere Lampe geschaltet.

      Der Punkt 4 scheint zu funktionieren.
      Probleme gibt es bei mir mit der Lautstärke. Diese wird nicht erhöht. Außerdem schaltet sich die Musik nicht aus.
      Würde bitte jemand über das Skript schauen und ggf. dieses umbauen oder mir Tipps geben? Vielen Dank im Voraus.

      <xml xmlns="https://developers.google.com/blockly/xml">
       <variables>
         <variable type="interval" id="Intervall">Intervall</variable>
         <variable id="qF^Dv{8_res2E03z3U@Y">Lautstärke</variable>
         <variable type="timeout" id="timeout">timeout</variable>
       </variables>
       <block type="comment" id="TY5y@;wbT[:1UNV3)Mn," x="-487" y="-562">
         <field name="COMMENT">Wecker Arbeitszeit Michael</field>
         <next>
           <block type="on_ext" id="+J`Ya(FkCm@@I%;}V9S-">
             <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="9UlabIyzFWK#;A3.1TrN">
                 <field name="oid">0_userdata.0.Zeitschaltuhr.Arbeitszeit_Michael</field>
               </shadow>
             </value>
             <statement name="STATEMENT">
               <block type="controls_if" id="9!JB5^oh2Fua~+NlU2dP">
                 <value name="IF0">
                   <block type="on_source" id="svY?Oji:cqb@z%kd(soQ">
                     <field name="ATTR">state.val</field>
                   </block>
                 </value>
                 <statement name="DO0">
                   <block type="control" id="9enx6r}oJ-L735=b/T89">
                     <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                     <field name="OID">deconz.0.Lights.2.on</field>
                     <field name="WITH_DELAY">FALSE</field>
                     <value name="VALUE">
                       <block type="logic_boolean" id="Zk{!JHwgTD$m@D-XG#-0">
                         <field name="BOOL">TRUE</field>
                       </block>
                     </value>
                     <next>
                       <block type="timeouts_setinterval" id="LHobo@~`tYSb_wORrp83">
                         <field name="NAME">Intervall</field>
                         <field name="INTERVAL">60</field>
                         <field name="UNIT">sec</field>
                         <statement name="STATEMENT">
                           <block type="variables_set" id="w.lPzP3b=?.Cn-.Np!A?">
                             <field name="VAR" id="qF^Dv{8_res2E03z3U@Y">Lautstärke</field>
                             <value name="VALUE">
                               <block type="math_arithmetic" id=":FC/6IM8q}t-z*g%2^.j">
                                 <field name="OP">ADD</field>
                                 <value name="A">
                                   <shadow type="math_number" id="w$n2??9k1FK8i*=Peet_">
                                     <field name="NUM">1</field>
                                   </shadow>
                                   <block type="variables_get" id="`!{L^1wQ,G}_.@2LH/s+">
                                     <field name="VAR" id="qF^Dv{8_res2E03z3U@Y">Lautstärke</field>
                                   </block>
                                 </value>
                                 <value name="B">
                                   <shadow type="math_number" id="`1O6QUZA-xcFx[n}]5R(">
                                     <field name="NUM">5</field>
                                   </shadow>
                                 </value>
                               </block>
                             </value>
                             <next>
                               <block type="request" id="[LWIqL3]-L7%qZRoWX;+">
                                 <mutation xmlns="http://www.w3.org/1999/xhtml" with_statement="false"></mutation>
                                 <field name="WITH_STATEMENT">FALSE</field>
                                 <field name="LOG"></field>
                                 <value name="URL">
                                   <shadow type="text">
                                     <field name="TEXT"></field>
                                   </shadow>
                                   <block type="text_join" id="2:dYCeT?=yK#eBy$q{`N">
                                     <mutation items="4"></mutation>
                                     <value name="ADD0">
                                       <block type="text" id="8!;rzj$=r}{%C;:mjWs0">
                                         <field name="TEXT">http://192.168.178.28:5005/Schlafzimmer/favourite</field>
                                       </block>
                                     </value>
                                     <value name="ADD1">
                                       <block type="text" id="wO.5x+!_,yy^nV]-1KJs">
                                         <field name="TEXT">/Klassik Radio/</field>
                                       </block>
                                     </value>
                                     <value name="ADD2">
                                       <block type="text" id="?}S?m%M%xlOvI;eT}fFI">
                                         <field name="TEXT">/de-de/</field>
                                       </block>
                                     </value>
                                     <value name="ADD3">
                                       <block type="variables_get" id="*^TJ%+aX[7T*IuIx4^Zm">
                                         <field name="VAR" id="qF^Dv{8_res2E03z3U@Y">Lautstärke</field>
                                       </block>
                                     </value>
                                   </block>
                                 </value>
                                 <next>
                                   <block type="controls_if" id="2gHVpYUU),gPKZ5tPPO%">
                                     <value name="IF0">
                                       <block type="logic_compare" id="=uBkky$,|[2[x9Rbo(yr">
                                         <field name="OP">EQ</field>
                                         <value name="A">
                                           <block type="variables_get" id="hfY%TP1h;]ALw]Nj[wbV">
                                             <field name="VAR" id="qF^Dv{8_res2E03z3U@Y">Lautstärke</field>
                                           </block>
                                         </value>
                                         <value name="B">
                                           <block type="math_number" id="3dw6BQdb0RIAa=XExV_v">
                                             <field name="NUM">30</field>
                                           </block>
                                         </value>
                                       </block>
                                     </value>
                                     <statement name="DO0">
                                       <block type="timeouts_clearinterval" id="UR}BnKsVE8CkkNFT`VT+">
                                         <field name="NAME">Intervall</field>
                                         <next>
                                           <block type="timeouts_cleartimeout" id=".8bM:B{vs4Nhd,NlK!7L">
                                             <field name="NAME">timeout</field>
                                             <next>
                                               <block type="timeouts_settimeout_variable" id="tBAwQ7lkZtQqmpUZW;5n">
                                                 <field name="NAME">timeout</field>
                                                 <value name="DELAY_MS">
                                                   <shadow type="math_number" id="I^%F##+hFPN5$;dzAm^n">
                                                     <field name="NUM">15000</field>
                                                   </shadow>
                                                 </value>
                                                 <statement name="STATEMENT">
                                                   <block type="request" id="!244Ao(pOU7LRkyE~_Xz">
                                                     <mutation xmlns="http://www.w3.org/1999/xhtml" with_statement="false"></mutation>
                                                     <field name="WITH_STATEMENT">FALSE</field>
                                                     <field name="LOG"></field>
                                                     <value name="URL">
                                                       <shadow type="text" id="z;H=FGbjopJqdg@4Gmi#">
                                                         <field name="TEXT"></field>
                                                       </shadow>
                                                       <block type="text" id="3S*=2y:{dv8x`eYa648y">
                                                         <field name="TEXT">http://192.168.178.28:5005/Schlafzimmer/pause</field>
                                                       </block>
                                                     </value>
                                                   </block>
                                                 </statement>
                                               </block>
                                             </next>
                                           </block>
                                         </next>
                                       </block>
                                     </statement>
                                   </block>
                                 </next>
                               </block>
                             </next>
                           </block>
                         </statement>
                         <next>
                           <block type="control" id="i(/8:aF`_dzR.cCA_pnD">
                             <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation>
                             <field name="OID">deconz.0.Lights.2.on</field>
                             <field name="WITH_DELAY">TRUE</field>
                             <field name="DELAY_MS">5</field>
                             <field name="UNIT">min</field>
                             <field name="CLEAR_RUNNING">FALSE</field>
                             <value name="VALUE">
                               <block type="logic_boolean" id="hNyGaR/Lb+t,5hAV@|s=">
                                 <field name="BOOL">FALSE</field>
                               </block>
                             </value>
                             <next>
                               <block type="controls_if" id="d#N#%.#xuF$~J(v;$^q8">
                                 <mutation elseif="1"></mutation>
                                 <value name="IF0">
                                   <block type="logic_operation" id="f0dvO.q8859VGMt65BcC" inline="false">
                                     <field name="OP">OR</field>
                                     <value name="A">
                                       <block type="logic_compare" id="A5NHF4%[7LSA{iT5=iFC">
                                         <field name="OP">GTE</field>
                                         <value name="A">
                                           <block type="get_value" id="SeZlOti9#.5`]kdmVWTb">
                                             <field name="ATTR">val</field>
                                             <field name="OID">hm-rpc.1.00181BE9946BC5.1.ILLUMINATION</field>
                                           </block>
                                         </value>
                                         <value name="B">
                                           <block type="math_number" id="^ZaM|+yf{Vx.q*{{rixF">
                                             <field name="NUM">21</field>
                                           </block>
                                         </value>
                                       </block>
                                     </value>
                                     <value name="B">
                                       <block type="time_astro" id="drJReRn?arNc=~YoqAJZ">
                                         <field name="TYPE">sunrise</field>
                                         <field name="OFFSET">0</field>
                                       </block>
                                     </value>
                                   </block>
                                 </value>
                                 <statement name="DO0">
                                   <block type="control" id="76OyQT2Gplv8z?curpPy">
                                     <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                     <field name="OID">hm-rpc.1.00165D899FBB0A.14.LEVEL</field>
                                     <field name="WITH_DELAY">FALSE</field>
                                     <value name="VALUE">
                                       <block type="math_number" id="QL}AW@CL/Lk8q6^]w_M9">
                                         <field name="NUM">100</field>
                                       </block>
                                     </value>
                                     <next>
                                       <block type="control" id="*pU6?cekcBpo]OHI+Mp5">
                                         <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                         <field name="OID">hm-rpc.1.00165D899FBB0A.10.LEVEL</field>
                                         <field name="WITH_DELAY">FALSE</field>
                                         <value name="VALUE">
                                           <block type="math_number" id="D;9)u-Ue:`aaK;bo!B3o">
                                             <field name="NUM">100</field>
                                           </block>
                                         </value>
                                       </block>
                                     </next>
                                   </block>
                                 </statement>
                                 <value name="IF1">
                                   <block type="logic_operation" id="*7BZOQ@{*);$.dO[?Y?+" inline="false">
                                     <field name="OP">AND</field>
                                     <value name="A">
                                       <block type="logic_compare" id="*6aWE,Eg%{1b6A9!z{#/">
                                         <field name="OP">LTE</field>
                                         <value name="A">
                                           <block type="get_value" id="MS4dd5H9YHJQ([Sd[RSC">
                                             <field name="ATTR">val</field>
                                             <field name="OID">hm-rpc.1.00181BE9946BC5.1.ILLUMINATION</field>
                                           </block>
                                         </value>
                                         <value name="B">
                                           <block type="math_number" id="BfEDmJ!!7uvik`_|f:9o">
                                             <field name="NUM">20</field>
                                           </block>
                                         </value>
                                       </block>
                                     </value>
                                     <value name="B">
                                       <block type="logic_negate" id="/c*{fHI-N1U%kKx~@{/b">
                                         <value name="BOOL">
                                           <block type="time_astro" id="l{6Tzmp7]k8^|P?YMsA5">
                                             <field name="TYPE">sunrise</field>
                                             <field name="OFFSET">0</field>
                                           </block>
                                         </value>
                                       </block>
                                     </value>
                                   </block>
                                 </value>
                                 <statement name="DO1">
                                   <block type="control" id="F)V$?Y#MCFW?B|dhN?5a">
                                     <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                     <field name="OID">hm-rpc.1.00169D8997A0F8.10.LEVEL</field>
                                     <field name="WITH_DELAY">FALSE</field>
                                     <value name="VALUE">
                                       <block type="math_number" id="8?UR6^c/b`eVB9f:@zU1">
                                         <field name="NUM">30</field>
                                       </block>
                                     </value>
                                   </block>
                                 </statement>
                                 <next>
                                   <block type="control" id=",?z8mS`6qIB~qHf:|x98">
                                     <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                     <field name="OID">0_userdata.0.Zeitschaltuhr.Arbeitszeit_Michael</field>
                                     <field name="WITH_DELAY">FALSE</field>
                                     <value name="VALUE">
                                       <block type="logic_boolean" id="_R+r{jvp,KVZJmXUxN,1">
                                         <field name="BOOL">FALSE</field>
                                       </block>
                                     </value>
                                   </block>
                                 </next>
                               </block>
                             </next>
                           </block>
                         </next>
                       </block>
                     </next>
                   </block>
                 </statement>
               </block>
             </statement>
           </block>
         </next>
       </block>
      </xml>
      

      BananaJoe 1 Reply Last reply Reply Quote 0
      • BananaJoe
        BananaJoe Most Active @jwerlsdf last edited by BananaJoe

        @jwerlsdf

        <xml xmlns="https://developers.google.com/blockly/xml">
          <variables>
            <variable id="qF^Dv{8_res2E03z3U@Y">Lautstärke</variable>
          </variables>
          <block type="comment" id="TY5y@;wbT[:1UNV3)Mn," x="-487" y="-562">
            <field name="COMMENT">Wecker Arbeitszeit Michael</field>
            <next>
              <block type="on_ext" id="+J`Ya(FkCm@@I%;}V9S-">
                <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="9UlabIyzFWK#;A3.1TrN">
                    <field name="oid">0_userdata.0.Zeitschaltuhr.Arbeitszeit_Michael</field>
                  </shadow>
                </value>
                <statement name="STATEMENT">
                  <block type="controls_if" id="9!JB5^oh2Fua~+NlU2dP">
                    <value name="IF0">
                      <block type="on_source" id="svY?Oji:cqb@z%kd(soQ">
                        <field name="ATTR">state.val</field>
                      </block>
                    </value>
                    <statement name="DO0">
                      <block type="comment" id="L#g*Q?G,:jnb,_c7C=]`">
                        <field name="COMMENT">Licht an</field>
                        <next>
                          <block type="control" id="9enx6r}oJ-L735=b/T89">
                            <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                            <field name="OID">deconz.0.Lights.2.on</field>
                            <field name="WITH_DELAY">FALSE</field>
                            <value name="VALUE">
                              <block type="logic_boolean" id="Zk{!JHwgTD$m@D-XG#-0">
                                <field name="BOOL">TRUE</field>
                              </block>
                            </value>
                            <next>
                              <block type="comment" id="9Rj5emq1QUyEF9M^J|x^">
                                <field name="COMMENT">Lautstärke auf 30 erhöhen, um 5 alle 60 Sekunden</field>
                                <next>
                                  <block type="variables_set" id="F@iNKcR]|q8@0l%{~j%^">
                                    <field name="VAR" id="qF^Dv{8_res2E03z3U@Y">Lautstärke</field>
                                    <value name="VALUE">
                                      <block type="math_number" id="(zbYz^bus9HU3%UyjDD)">
                                        <field name="NUM">0</field>
                                      </block>
                                    </value>
                                    <next>
                                      <block type="controls_repeat_ext" id="-_pA=Wi7:9!3aP,KY67H">
                                        <value name="TIMES">
                                          <shadow type="math_number" id="6ar6?`^OUL@no8Tw~x9V">
                                            <field name="NUM">6</field>
                                          </shadow>
                                        </value>
                                        <statement name="DO">
                                          <block type="variables_set" id="w.lPzP3b=?.Cn-.Np!A?">
                                            <field name="VAR" id="qF^Dv{8_res2E03z3U@Y">Lautstärke</field>
                                            <value name="VALUE">
                                              <block type="math_arithmetic" id=":FC/6IM8q}t-z*g%2^.j">
                                                <field name="OP">ADD</field>
                                                <value name="A">
                                                  <shadow type="math_number" id="w$n2??9k1FK8i*=Peet_">
                                                    <field name="NUM">1</field>
                                                  </shadow>
                                                  <block type="variables_get" id="`!{L^1wQ,G}_.@2LH/s+">
                                                    <field name="VAR" id="qF^Dv{8_res2E03z3U@Y">Lautstärke</field>
                                                  </block>
                                                </value>
                                                <value name="B">
                                                  <shadow type="math_number" id="`1O6QUZA-xcFx[n}]5R(">
                                                    <field name="NUM">5</field>
                                                  </shadow>
                                                </value>
                                              </block>
                                            </value>
                                            <next>
                                              <block type="request" id="[LWIqL3]-L7%qZRoWX;+">
                                                <mutation xmlns="http://www.w3.org/1999/xhtml" with_statement="false"></mutation>
                                                <field name="WITH_STATEMENT">FALSE</field>
                                                <field name="LOG"></field>
                                                <value name="URL">
                                                  <shadow type="text">
                                                    <field name="TEXT"></field>
                                                  </shadow>
                                                  <block type="text_join" id="2:dYCeT?=yK#eBy$q{`N">
                                                    <mutation items="4"></mutation>
                                                    <value name="ADD0">
                                                      <block type="text" id="8!;rzj$=r}{%C;:mjWs0">
                                                        <field name="TEXT">http://192.168.178.28:5005/Schlafzimmer/favourite</field>
                                                      </block>
                                                    </value>
                                                    <value name="ADD1">
                                                      <block type="text" id="wO.5x+!_,yy^nV]-1KJs">
                                                        <field name="TEXT">/Klassik Radio/</field>
                                                      </block>
                                                    </value>
                                                    <value name="ADD2">
                                                      <block type="text" id="?}S?m%M%xlOvI;eT}fFI">
                                                        <field name="TEXT">/de-de/</field>
                                                      </block>
                                                    </value>
                                                    <value name="ADD3">
                                                      <block type="variables_get" id="*^TJ%+aX[7T*IuIx4^Zm">
                                                        <field name="VAR" id="qF^Dv{8_res2E03z3U@Y">Lautstärke</field>
                                                      </block>
                                                    </value>
                                                  </block>
                                                </value>
                                                <next>
                                                  <block type="timeouts_wait" id="-Pgm){S{)TO.?@zHc`H`">
                                                    <field name="DELAY">60</field>
                                                    <field name="UNIT">sec</field>
                                                  </block>
                                                </next>
                                              </block>
                                            </next>
                                          </block>
                                        </statement>
                                        <next>
                                          <block type="comment" id="VdFTu-#kd(ShM.sd,L7X">
                                            <field name="COMMENT">Nach insgesamt 15 Minuten Ausschalten - 5 sind schon um</field>
                                            <next>
                                              <block type="timeouts_wait" id="yT)/_bSn_y4Qh{i)Q?Ql">
                                                <field name="DELAY">10</field>
                                                <field name="UNIT">min</field>
                                                <next>
                                                  <block type="request" id="!244Ao(pOU7LRkyE~_Xz">
                                                    <mutation xmlns="http://www.w3.org/1999/xhtml" with_statement="false"></mutation>
                                                    <field name="WITH_STATEMENT">FALSE</field>
                                                    <field name="LOG"></field>
                                                    <value name="URL">
                                                      <shadow type="text" id="z;H=FGbjopJqdg@4Gmi#">
                                                        <field name="TEXT"></field>
                                                      </shadow>
                                                      <block type="text" id="3S*=2y:{dv8x`eYa648y">
                                                        <field name="TEXT">http://192.168.178.28:5005/Schlafzimmer/pause</field>
                                                      </block>
                                                    </value>
                                                    <next>
                                                      <block type="control" id="i(/8:aF`_dzR.cCA_pnD">
                                                        <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                        <field name="OID">deconz.0.Lights.2.on</field>
                                                        <field name="WITH_DELAY">FALSE</field>
                                                        <value name="VALUE">
                                                          <block type="logic_boolean" id="hNyGaR/Lb+t,5hAV@|s=">
                                                            <field name="BOOL">FALSE</field>
                                                          </block>
                                                        </value>
                                                        <next>
                                                          <block type="comment" id="Y}n,,#e^hHTVb=iTJx.I">
                                                            <field name="COMMENT">Ggf. Rollos hochfahren</field>
                                                            <next>
                                                              <block type="controls_if" id="d#N#%.#xuF$~J(v;$^q8">
                                                                <mutation elseif="1"></mutation>
                                                                <value name="IF0">
                                                                  <block type="logic_operation" id="f0dvO.q8859VGMt65BcC" inline="false">
                                                                    <field name="OP">OR</field>
                                                                    <value name="A">
                                                                      <block type="logic_compare" id="A5NHF4%[7LSA{iT5=iFC">
                                                                        <field name="OP">GTE</field>
                                                                        <value name="A">
                                                                          <block type="get_value" id="SeZlOti9#.5`]kdmVWTb">
                                                                            <field name="ATTR">val</field>
                                                                            <field name="OID">hm-rpc.1.00181BE9946BC5.1.ILLUMINATION</field>
                                                                          </block>
                                                                        </value>
                                                                        <value name="B">
                                                                          <block type="math_number" id="^ZaM|+yf{Vx.q*{{rixF">
                                                                            <field name="NUM">21</field>
                                                                          </block>
                                                                        </value>
                                                                      </block>
                                                                    </value>
                                                                    <value name="B">
                                                                      <block type="time_astro" id="drJReRn?arNc=~YoqAJZ">
                                                                        <field name="TYPE">sunrise</field>
                                                                        <field name="OFFSET">0</field>
                                                                      </block>
                                                                    </value>
                                                                  </block>
                                                                </value>
                                                                <statement name="DO0">
                                                                  <block type="control" id="76OyQT2Gplv8z?curpPy">
                                                                    <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                                    <field name="OID">hm-rpc.1.00165D899FBB0A.14.LEVEL</field>
                                                                    <field name="WITH_DELAY">FALSE</field>
                                                                    <value name="VALUE">
                                                                      <block type="math_number" id="QL}AW@CL/Lk8q6^]w_M9">
                                                                        <field name="NUM">100</field>
                                                                      </block>
                                                                    </value>
                                                                    <next>
                                                                      <block type="control" id="*pU6?cekcBpo]OHI+Mp5">
                                                                        <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                                        <field name="OID">hm-rpc.1.00165D899FBB0A.10.LEVEL</field>
                                                                        <field name="WITH_DELAY">FALSE</field>
                                                                        <value name="VALUE">
                                                                          <block type="math_number" id="D;9)u-Ue:`aaK;bo!B3o">
                                                                            <field name="NUM">100</field>
                                                                          </block>
                                                                        </value>
                                                                      </block>
                                                                    </next>
                                                                  </block>
                                                                </statement>
                                                                <value name="IF1">
                                                                  <block type="logic_operation" id="*7BZOQ@{*);$.dO[?Y?+" inline="false">
                                                                    <field name="OP">AND</field>
                                                                    <value name="A">
                                                                      <block type="logic_compare" id="*6aWE,Eg%{1b6A9!z{#/">
                                                                        <field name="OP">LTE</field>
                                                                        <value name="A">
                                                                          <block type="get_value" id="MS4dd5H9YHJQ([Sd[RSC">
                                                                            <field name="ATTR">val</field>
                                                                            <field name="OID">hm-rpc.1.00181BE9946BC5.1.ILLUMINATION</field>
                                                                          </block>
                                                                        </value>
                                                                        <value name="B">
                                                                          <block type="math_number" id="BfEDmJ!!7uvik`_|f:9o">
                                                                            <field name="NUM">20</field>
                                                                          </block>
                                                                        </value>
                                                                      </block>
                                                                    </value>
                                                                    <value name="B">
                                                                      <block type="logic_negate" id="/c*{fHI-N1U%kKx~@{/b">
                                                                        <value name="BOOL">
                                                                          <block type="time_astro" id="l{6Tzmp7]k8^|P?YMsA5">
                                                                            <field name="TYPE">sunrise</field>
                                                                            <field name="OFFSET">0</field>
                                                                          </block>
                                                                        </value>
                                                                      </block>
                                                                    </value>
                                                                  </block>
                                                                </value>
                                                                <statement name="DO1">
                                                                  <block type="control" id="F)V$?Y#MCFW?B|dhN?5a">
                                                                    <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                                    <field name="OID">hm-rpc.1.00169D8997A0F8.10.LEVEL</field>
                                                                    <field name="WITH_DELAY">FALSE</field>
                                                                    <value name="VALUE">
                                                                      <block type="math_number" id="8?UR6^c/b`eVB9f:@zU1">
                                                                        <field name="NUM">30</field>
                                                                      </block>
                                                                    </value>
                                                                  </block>
                                                                </statement>
                                                                <next>
                                                                  <block type="control" id=",?z8mS`6qIB~qHf:|x98">
                                                                    <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                                    <field name="OID">0_userdata.0.Zeitschaltuhr.Arbeitszeit_Michael</field>
                                                                    <field name="WITH_DELAY">FALSE</field>
                                                                    <value name="VALUE">
                                                                      <block type="logic_boolean" id="_R+r{jvp,KVZJmXUxN,1">
                                                                        <field name="BOOL">FALSE</field>
                                                                      </block>
                                                                    </value>
                                                                  </block>
                                                                </next>
                                                              </block>
                                                            </next>
                                                          </block>
                                                        </next>
                                                      </block>
                                                    </next>
                                                  </block>
                                                </next>
                                              </block>
                                            </next>
                                          </block>
                                        </next>
                                      </block>
                                    </next>
                                  </block>
                                </next>
                              </block>
                            </next>
                          </block>
                        </next>
                      </block>
                    </statement>
                  </block>
                </statement>
              </block>
            </next>
          </block>
        </xml>
        

        8cbe61a3-d511-44e4-8157-c95db5020db9-image.png

        Natürlich nur eine von vielen Möglichkeiten. Wenn es keine URL-Aufrufe gewesen wären hätte ich wohl die Datenpunkte einfach mit Verzögerung beschrieben.

        Ein Fehler bei dir ist - meine ich - das die Variable Lautstärke nicht auf einen Startwert gesetzt wurde.
        Beim nächsten Durchlauf am nächsten Tag steht diese dann noch auf 30

        J 1 Reply Last reply Reply Quote 0
        • J
          jwerlsdf @BananaJoe last edited by

          @bananajoe
          Vielen Dank. Du hast mir die richtigen Denkanstöße gegeben.
          Ich habe im Skript noch folgendes verändert:
          Damit der stream nicht immer neu startet, nehme ich den "volume"-Befehl um die Lautstärke zu ändern. Dadurch bleibt der stream am laufen.
          Nun läuft es so wie ich es gerne möchte. Vielen Dank noch einmal!!!
          Hier noch einmal das überarbeitete Skript, falls jemand es noch braucht.

          <xml xmlns="https://developers.google.com/blockly/xml">
           <variables>
             <variable id="qF^Dv{8_res2E03z3U@Y">Lautstärke</variable>
           </variables>
           <block type="comment" id="TY5y@;wbT[:1UNV3)Mn," x="-487" y="-562">
             <field name="COMMENT">Wecker Arbeitszeit Michael</field>
             <next>
               <block type="on_ext" id="+J`Ya(FkCm@@I%;}V9S-">
                 <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="9UlabIyzFWK#;A3.1TrN">
                     <field name="oid">0_userdata.0.Zeitschaltuhr.Arbeitszeit_Michael</field>
                   </shadow>
                 </value>
                 <statement name="STATEMENT">
                   <block type="controls_if" id="9!JB5^oh2Fua~+NlU2dP">
                     <value name="IF0">
                       <block type="on_source" id="svY?Oji:cqb@z%kd(soQ">
                         <field name="ATTR">state.val</field>
                       </block>
                     </value>
                     <statement name="DO0">
                       <block type="comment" id="L#g*Q?G,:jnb,_c7C=]`">
                         <field name="COMMENT">Licht an</field>
                         <next>
                           <block type="control" id="9enx6r}oJ-L735=b/T89">
                             <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                             <field name="OID">deconz.0.Lights.2.on</field>
                             <field name="WITH_DELAY">FALSE</field>
                             <value name="VALUE">
                               <block type="logic_boolean" id="Zk{!JHwgTD$m@D-XG#-0">
                                 <field name="BOOL">TRUE</field>
                               </block>
                             </value>
                             <next>
                               <block type="comment" id="9Rj5emq1QUyEF9M^J|x^">
                                 <field name="COMMENT">Lautstärke auf 30 erhöhen, um 3 alle 60 Sekunden</field>
                                 <next>
                                   <block type="variables_set" id="F@iNKcR]|q8@0l%{~j%^">
                                     <field name="VAR" id="qF^Dv{8_res2E03z3U@Y">Lautstärke</field>
                                     <value name="VALUE">
                                       <block type="math_number" id="(zbYz^bus9HU3%UyjDD)">
                                         <field name="NUM">0</field>
                                       </block>
                                     </value>
                                     <next>
                                       <block type="request" id="t#;jt[1.U=y(R4b!Ks8r">
                                         <mutation xmlns="http://www.w3.org/1999/xhtml" with_statement="false"></mutation>
                                         <field name="WITH_STATEMENT">FALSE</field>
                                         <field name="LOG"></field>
                                         <value name="URL">
                                           <shadow type="text" id="fpINO0bmlEi-;lPB6FbD">
                                             <field name="TEXT"></field>
                                           </shadow>
                                           <block type="text_join" id="{hI~.Q5.anFY{_dr(,OU">
                                             <mutation items="4"></mutation>
                                             <value name="ADD0">
                                               <block type="text" id="Beo`gB_BguS4kvua-46T">
                                                 <field name="TEXT">http://192.168.178.28:5005/Schlafzimmer/favourite</field>
                                               </block>
                                             </value>
                                             <value name="ADD1">
                                               <block type="text" id="0{Aj_L_vJ=D6C1W@?W,{">
                                                 <field name="TEXT">/Klassik Radio</field>
                                               </block>
                                             </value>
                                             <value name="ADD2">
                                               <block type="text" id="]UR3+;XkR6d*ambIM1B~">
                                                 <field name="TEXT">/de-de/</field>
                                               </block>
                                             </value>
                                             <value name="ADD3">
                                               <block type="variables_get" id="o$^,jOl.K/U-c@oi[f)6">
                                                 <field name="VAR" id="qF^Dv{8_res2E03z3U@Y">Lautstärke</field>
                                               </block>
                                             </value>
                                           </block>
                                         </value>
                                         <next>
                                           <block type="controls_repeat_ext" id="-_pA=Wi7:9!3aP,KY67H">
                                             <value name="TIMES">
                                               <shadow type="math_number" id="6ar6?`^OUL@no8Tw~x9V">
                                                 <field name="NUM">10</field>
                                               </shadow>
                                             </value>
                                             <statement name="DO">
                                               <block type="variables_set" id="w.lPzP3b=?.Cn-.Np!A?">
                                                 <field name="VAR" id="qF^Dv{8_res2E03z3U@Y">Lautstärke</field>
                                                 <value name="VALUE">
                                                   <block type="math_arithmetic" id=":FC/6IM8q}t-z*g%2^.j">
                                                     <field name="OP">ADD</field>
                                                     <value name="A">
                                                       <shadow type="math_number" id="w$n2??9k1FK8i*=Peet_">
                                                         <field name="NUM">1</field>
                                                       </shadow>
                                                       <block type="variables_get" id="`!{L^1wQ,G}_.@2LH/s+">
                                                         <field name="VAR" id="qF^Dv{8_res2E03z3U@Y">Lautstärke</field>
                                                       </block>
                                                     </value>
                                                     <value name="B">
                                                       <shadow type="math_number" id="`1O6QUZA-xcFx[n}]5R(">
                                                         <field name="NUM">3</field>
                                                       </shadow>
                                                     </value>
                                                   </block>
                                                 </value>
                                                 <next>
                                                   <block type="request" id="[LWIqL3]-L7%qZRoWX;+">
                                                     <mutation xmlns="http://www.w3.org/1999/xhtml" with_statement="false"></mutation>
                                                     <field name="WITH_STATEMENT">FALSE</field>
                                                     <field name="LOG"></field>
                                                     <value name="URL">
                                                       <shadow type="text">
                                                         <field name="TEXT"></field>
                                                       </shadow>
                                                       <block type="text_join" id="2:dYCeT?=yK#eBy$q{`N">
                                                         <mutation items="3"></mutation>
                                                         <value name="ADD0">
                                                           <block type="text" id="8!;rzj$=r}{%C;:mjWs0">
                                                             <field name="TEXT">http://192.168.178.28:5005/Schlafzimmer/</field>
                                                           </block>
                                                         </value>
                                                         <value name="ADD1">
                                                           <block type="text" id="wO.5x+!_,yy^nV]-1KJs">
                                                             <field name="TEXT">volume/</field>
                                                           </block>
                                                         </value>
                                                         <value name="ADD2">
                                                           <block type="variables_get" id="*^TJ%+aX[7T*IuIx4^Zm">
                                                             <field name="VAR" id="qF^Dv{8_res2E03z3U@Y">Lautstärke</field>
                                                           </block>
                                                         </value>
                                                       </block>
                                                     </value>
                                                     <next>
                                                       <block type="timeouts_wait" id="-Pgm){S{)TO.?@zHc`H`">
                                                         <field name="DELAY">60</field>
                                                         <field name="UNIT">sec</field>
                                                       </block>
                                                     </next>
                                                   </block>
                                                 </next>
                                               </block>
                                             </statement>
                                             <next>
                                               <block type="control" id="i(/8:aF`_dzR.cCA_pnD">
                                                 <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                 <field name="OID">deconz.0.Lights.2.on</field>
                                                 <field name="WITH_DELAY">FALSE</field>
                                                 <value name="VALUE">
                                                   <block type="logic_boolean" id="hNyGaR/Lb+t,5hAV@|s=">
                                                     <field name="BOOL">FALSE</field>
                                                   </block>
                                                 </value>
                                                 <next>
                                                   <block type="comment" id="Y}n,,#e^hHTVb=iTJx.I">
                                                     <field name="COMMENT">Ggf. Rollos hochfahren</field>
                                                     <next>
                                                       <block type="controls_if" id="d#N#%.#xuF$~J(v;$^q8">
                                                         <mutation elseif="1"></mutation>
                                                         <value name="IF0">
                                                           <block type="logic_operation" id="f0dvO.q8859VGMt65BcC" inline="false">
                                                             <field name="OP">OR</field>
                                                             <value name="A">
                                                               <block type="logic_compare" id="A5NHF4%[7LSA{iT5=iFC">
                                                                 <field name="OP">GTE</field>
                                                                 <value name="A">
                                                                   <block type="get_value" id="SeZlOti9#.5`]kdmVWTb">
                                                                     <field name="ATTR">val</field>
                                                                     <field name="OID">hm-rpc.1.00181BE9946BC5.1.ILLUMINATION</field>
                                                                   </block>
                                                                 </value>
                                                                 <value name="B">
                                                                   <block type="math_number" id="^ZaM|+yf{Vx.q*{{rixF">
                                                                     <field name="NUM">21</field>
                                                                   </block>
                                                                 </value>
                                                               </block>
                                                             </value>
                                                             <value name="B">
                                                               <block type="time_astro" id="drJReRn?arNc=~YoqAJZ">
                                                                 <field name="TYPE">sunrise</field>
                                                                 <field name="OFFSET">0</field>
                                                               </block>
                                                             </value>
                                                           </block>
                                                         </value>
                                                         <statement name="DO0">
                                                           <block type="control" id="76OyQT2Gplv8z?curpPy">
                                                             <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                             <field name="OID">hm-rpc.1.00165D899FBB0A.14.LEVEL</field>
                                                             <field name="WITH_DELAY">FALSE</field>
                                                             <value name="VALUE">
                                                               <block type="math_number" id="QL}AW@CL/Lk8q6^]w_M9">
                                                                 <field name="NUM">100</field>
                                                               </block>
                                                             </value>
                                                             <next>
                                                               <block type="control" id="*pU6?cekcBpo]OHI+Mp5">
                                                                 <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                                 <field name="OID">hm-rpc.1.00165D899FBB0A.10.LEVEL</field>
                                                                 <field name="WITH_DELAY">FALSE</field>
                                                                 <value name="VALUE">
                                                                   <block type="math_number" id="D;9)u-Ue:`aaK;bo!B3o">
                                                                     <field name="NUM">100</field>
                                                                   </block>
                                                                 </value>
                                                               </block>
                                                             </next>
                                                           </block>
                                                         </statement>
                                                         <value name="IF1">
                                                           <block type="logic_operation" id="*7BZOQ@{*);$.dO[?Y?+" inline="false">
                                                             <field name="OP">AND</field>
                                                             <value name="A">
                                                               <block type="logic_compare" id="*6aWE,Eg%{1b6A9!z{#/">
                                                                 <field name="OP">LTE</field>
                                                                 <value name="A">
                                                                   <block type="get_value" id="MS4dd5H9YHJQ([Sd[RSC">
                                                                     <field name="ATTR">val</field>
                                                                     <field name="OID">hm-rpc.1.00181BE9946BC5.1.ILLUMINATION</field>
                                                                   </block>
                                                                 </value>
                                                                 <value name="B">
                                                                   <block type="math_number" id="BfEDmJ!!7uvik`_|f:9o">
                                                                     <field name="NUM">20</field>
                                                                   </block>
                                                                 </value>
                                                               </block>
                                                             </value>
                                                             <value name="B">
                                                               <block type="logic_negate" id="/c*{fHI-N1U%kKx~@{/b">
                                                                 <value name="BOOL">
                                                                   <block type="time_astro" id="l{6Tzmp7]k8^|P?YMsA5">
                                                                     <field name="TYPE">sunrise</field>
                                                                     <field name="OFFSET">0</field>
                                                                   </block>
                                                                 </value>
                                                               </block>
                                                             </value>
                                                           </block>
                                                         </value>
                                                         <statement name="DO1">
                                                           <block type="control" id="F)V$?Y#MCFW?B|dhN?5a">
                                                             <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                             <field name="OID">hm-rpc.1.00169D8997A0F8.10.LEVEL</field>
                                                             <field name="WITH_DELAY">FALSE</field>
                                                             <value name="VALUE">
                                                               <block type="math_number" id="8?UR6^c/b`eVB9f:@zU1">
                                                                 <field name="NUM">30</field>
                                                               </block>
                                                             </value>
                                                           </block>
                                                         </statement>
                                                         <next>
                                                           <block type="comment" id="VdFTu-#kd(ShM.sd,L7X">
                                                             <field name="COMMENT">Nach insgesamt 10 Min. plus 2 Min. Pause: Radio Ausschalten</field>
                                                             <next>
                                                               <block type="timeouts_wait" id="yT)/_bSn_y4Qh{i)Q?Ql">
                                                                 <field name="DELAY">2</field>
                                                                 <field name="UNIT">min</field>
                                                                 <next>
                                                                   <block type="request" id="!244Ao(pOU7LRkyE~_Xz">
                                                                     <mutation xmlns="http://www.w3.org/1999/xhtml" with_statement="false"></mutation>
                                                                     <field name="WITH_STATEMENT">FALSE</field>
                                                                     <field name="LOG"></field>
                                                                     <value name="URL">
                                                                       <shadow type="text" id="z;H=FGbjopJqdg@4Gmi#">
                                                                         <field name="TEXT"></field>
                                                                       </shadow>
                                                                       <block type="text" id="3S*=2y:{dv8x`eYa648y">
                                                                         <field name="TEXT">http://192.168.178.28:5005/Schlafzimmer/pause</field>
                                                                       </block>
                                                                     </value>
                                                                     <next>
                                                                       <block type="comment" id="*#r9|^TNZNjzuUk.4AKV">
                                                                         <field name="COMMENT">Datenpunkt Wecker auf false schalten</field>
                                                                         <next>
                                                                           <block type="control" id=",?z8mS`6qIB~qHf:|x98">
                                                                             <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                                             <field name="OID">0_userdata.0.Zeitschaltuhr.Arbeitszeit_Michael</field>
                                                                             <field name="WITH_DELAY">FALSE</field>
                                                                             <value name="VALUE">
                                                                               <block type="logic_boolean" id="_R+r{jvp,KVZJmXUxN,1">
                                                                                 <field name="BOOL">FALSE</field>
                                                                               </block>
                                                                             </value>
                                                                           </block>
                                                                         </next>
                                                                       </block>
                                                                     </next>
                                                                   </block>
                                                                 </next>
                                                               </block>
                                                             </next>
                                                           </block>
                                                         </next>
                                                       </block>
                                                     </next>
                                                   </block>
                                                 </next>
                                               </block>
                                             </next>
                                           </block>
                                         </next>
                                       </block>
                                     </next>
                                   </block>
                                 </next>
                               </block>
                             </next>
                           </block>
                         </next>
                       </block>
                     </statement>
                   </block>
                 </statement>
               </block>
             </next>
           </block>
          </xml>
          

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

          Support us

          ioBroker
          Community Adapters
          Donate

          836
          Online

          32.0k
          Users

          80.5k
          Topics

          1.3m
          Posts

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