Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Blockly
    5. [gelöst] Tag und Nacht schaltung geht nicht

    NEWS

    • Neuer Blog: Fotos und Eindrücke aus Solingen

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

    • ioBroker goes Matter ... Matter Adapter in Stable

    [gelöst] Tag und Nacht schaltung geht nicht

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

      jetzt habe ich eine Fehler meldung

      Hilft das was

      javascript.0	2020-03-12 14:56:38.674	warn	(7681) at processImmediate (timers.js:658:5)
      javascript.0	2020-03-12 14:56:38.674	warn	(7681) at tryOnImmediate (timers.js:676:5)
      javascript.0	2020-03-12 14:56:38.674	warn	(7681) at runCallback (timers.js:705:18)
      javascript.0	2020-03-12 14:56:38.673	warn	(7681) at Immediate.setImmediate (/opt/iobroker/node_modules/iobroker.js-controller/lib/adapter.js:4851:37)
      javascript.0	2020-03-12 14:56:38.673	warn	(7681) at Object.stateChange (/opt/iobroker/node_modules/iobroker.javascript/main.js:450:25)
      javascript.0	2020-03-12 14:56:38.672	warn	(7681) at Object.callback (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:1123:38)
      javascript.0	2020-03-12 14:56:38.671	warn	(7681) at Object.<anonymous> (script.js.Schlangen-Rack.Rack_1.Heizung_Nacht_1:36:7)
      javascript.0	2020-03-12 14:56:38.669	warn	(7681) getState "sonoff-Rack-Schlangen.POWER1" not found (3)
      javascript.0	2020-03-12 14:56:28.334	warn	(7681) at processImmediate (timers.js:658:5)
      javascript.0	2020-03-12 14:56:28.334	warn	(7681) at tryOnImmediate (timers.js:676:5)
      javascript.0	2020-03-12 14:56:28.333	warn	(7681) at runCallback (timers.js:705:18)
      javascript.0	2020-03-12 14:56:28.333	warn	(7681) at Immediate.setImmediate (/opt/iobroker/node_modules/iobroker.js-controller/lib/adapter.js:4851:37)
      javascript.0	2020-03-12 14:56:28.332	warn	(7681) at Object.stateChange (/opt/iobroker/node_modules/iobroker.javascript/main.js:450:25)
      javascript.0	2020-03-12 14:56:28.332	warn	(7681) at Object.callback (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:1123:38)
      javascript.0	2020-03-12 14:56:28.331	warn	(7681) at Object.<anonymous> (script.js.Schlangen-Rack.Rack_1.Heizung_Nacht_1:36:7)
      javascript.0	2020-03-12 14:56:28.329	warn	(7681) getState "sonoff-Rack-Schlangen.POWER1" not found (3)
      javascript.0	2020-03-12 13:55:00.865	info	(7681) script.js.Schlangen-Rack.Rack_1.Heizung_Nacht_1: registered 1 subscription and 0 schedules
      javascript.0	2020-03-12 13:55:00.860	info	(7681) Start javascript script.js.Schlangen-Rack.Rack_1.Heizung_Nacht_1
      
      paul53 1 Reply Last reply Reply Quote 0
      • paul53
        paul53 @bullhead last edited by paul53

        @bullhead sagte:

        getState "sonoff-Rack-Schlangen.POWER1" not found

        Die Datenpunkt-ID ist falsch. Richtig: sonoff.0.sonoff-Rack-Schlangen.POWER1. Außerdem darf Wert keine Variable sein, sondern eine Eigenschaft des Trigger-Datenpunktes.

        <xml xmlns="http://www.w3.org/1999/xhtml">
         <variables>
           <variable type="" id="bF1xF|Wnc?9aqBo-}j:F">ist</variable>
           <variable type="" id="Cgu*4]bTekqu6B`AOVaM">soll</variable>
           <variable type="" id="lS[T.(34r52Ro$RrYf$v">Tagessoll</variable>
           <variable type="" id="?9qG~uNR}~O*-o9AVAYZ">aktor</variable>
           <variable type="" id="prt;U,4Y$1:xn})ZeQ71">Nachtsoll</variable>
         </variables>
         <block type="on" id="d8M=06k^P_$Yh$j[{8|L" x="-987" y="-587">
           <field name="OID">mihome.0.devices.weather_v1_158d0002321578.temperature</field>
           <field name="CONDITION">any</field>
           <field name="ACK_CONDITION"></field>
           <statement name="STATEMENT">
             <block type="controls_if" id="8-yMOI;phMDsfr~;V[2W">
               <mutation elseif="2" else="1"></mutation>
               <value name="IF0">
                 <block type="logic_operation" id="g^awKGhR7a,Z3-@C2/|Z" inline="false">
                   <field name="OP">OR</field>
                   <value name="A">
                     <block type="logic_compare" id="iUX5rOd`7?w{Umy8Ti8Y">
                       <field name="OP">EQ</field>
                       <value name="A">
                         <block type="time_get" id="D3xc7?^_P$8=92I.;5kK">
                           <mutation format="false" language="false"></mutation>
                           <field name="OPTION">M</field>
                         </block>
                       </value>
                       <value name="B">
                         <block type="math_number" id="8f^Acdo^6-=3[JI3mJ(p">
                           <field name="NUM">12</field>
                         </block>
                       </value>
                     </block>
                   </value>
                   <value name="B">
                     <block type="logic_compare" id="}^[sxxzogz{MOBfdfEyS">
                       <field name="OP">LT</field>
                       <value name="A">
                         <block type="time_get" id="7^OvZsjNw]hV^Y2zA2yp">
                           <mutation format="false" language="false"></mutation>
                           <field name="OPTION">M</field>
                         </block>
                       </value>
                       <value name="B">
                         <block type="math_number" id="*YJ}fF%z43Ez:~c(uw{B">
                           <field name="NUM">3</field>
                         </block>
                       </value>
                     </block>
                   </value>
                 </block>
               </value>
               <statement name="DO0">
                 <block type="variables_set" id="%.l]Rt_l`]OS,B6Wb(i=">
                   <field name="VAR" id="lS[T.(34r52Ro$RrYf$v" variabletype="">Tagessoll</field>
                   <value name="VALUE">
                     <block type="math_number" id="Jkf6:GW^!p,rVb,GKkP9">
                       <field name="NUM">28</field>
                     </block>
                   </value>
                   <next>
                     <block type="variables_set" id="~zXbbWH}7-RHaI{1yL^b">
                       <field name="VAR" id="prt;U,4Y$1:xn})ZeQ71" variabletype="">Nachtsoll</field>
                       <value name="VALUE">
                         <block type="math_number" id="ES4v@p@Ix|N/{.j~xe8*">
                           <field name="NUM">24</field>
                         </block>
                       </value>
                     </block>
                   </next>
                 </block>
               </statement>
               <value name="IF1">
                 <block type="logic_compare" id="8D6(!F^,+d/gvVzRu@!5">
                   <field name="OP">LT</field>
                   <value name="A">
                     <block type="time_get" id="]RR)o#6Z(3Isp{G_j3VD">
                       <mutation format="false" language="false"></mutation>
                       <field name="OPTION">M</field>
                     </block>
                   </value>
                   <value name="B">
                     <block type="math_number" id="oY^Mli;qUetc_[k^-v@w">
                       <field name="NUM">6</field>
                     </block>
                   </value>
                 </block>
               </value>
               <statement name="DO1">
                 <block type="variables_set" id="}F@zjdF4Gh_5Ww}hf]PD">
                   <field name="VAR" id="lS[T.(34r52Ro$RrYf$v" variabletype="">Tagessoll</field>
                   <value name="VALUE">
                     <block type="math_number" id="vv3~^Fw,PfY*:]]SlP/E">
                       <field name="NUM">29</field>
                     </block>
                   </value>
                   <next>
                     <block type="variables_set" id="$A{kn#Q)3`^M7+xo~0R,">
                       <field name="VAR" id="prt;U,4Y$1:xn})ZeQ71" variabletype="">Nachtsoll</field>
                       <value name="VALUE">
                         <block type="math_number" id="J_#x^in`q`4OtGn5j3=?">
                           <field name="NUM">26</field>
                         </block>
                       </value>
                     </block>
                   </next>
                 </block>
               </statement>
               <value name="IF2">
                 <block type="logic_compare" id="l8m@TAVItkEcBqf@`e[u">
                   <field name="OP">LT</field>
                   <value name="A">
                     <block type="time_get" id="r@V]M]hXw.X*t*Kz/3[8">
                       <mutation format="false" language="false"></mutation>
                       <field name="OPTION">M</field>
                     </block>
                   </value>
                   <value name="B">
                     <block type="math_number" id="cu`IR32c;eZe3S~h?l1%">
                       <field name="NUM">9</field>
                     </block>
                   </value>
                 </block>
               </value>
               <statement name="DO2">
                 <block type="variables_set" id="d1h_q@[A,vableeCu}Pk">
                   <field name="VAR" id="lS[T.(34r52Ro$RrYf$v" variabletype="">Tagessoll</field>
                   <value name="VALUE">
                     <block type="math_number" id="5mcGtuJ)/2Q~ha2!cn24">
                       <field name="NUM">32</field>
                     </block>
                   </value>
                   <next>
                     <block type="variables_set" id="zz8}a-[BRF=gSFiobre,">
                       <field name="VAR" id="prt;U,4Y$1:xn})ZeQ71" variabletype="">Nachtsoll</field>
                       <value name="VALUE">
                         <block type="math_number" id=")@[eR9f^o7tZC5jSUDZT">
                           <field name="NUM">30</field>
                         </block>
                       </value>
                     </block>
                   </next>
                 </block>
               </statement>
               <statement name="ELSE">
                 <block type="variables_set" id="bIip$EC]g?-{~4zPXXkq">
                   <field name="VAR" id="lS[T.(34r52Ro$RrYf$v" variabletype="">Tagessoll</field>
                   <value name="VALUE">
                     <block type="math_number" id=":VJ$p)qSL/61CF%M[q;,">
                       <field name="NUM">30</field>
                     </block>
                   </value>
                   <next>
                     <block type="variables_set" id="5)rGP-sVEC~y!pVGNOLJ">
                       <field name="VAR" id="prt;U,4Y$1:xn})ZeQ71" variabletype="">Nachtsoll</field>
                       <value name="VALUE">
                         <block type="math_number" id="dzZU~MjAY{MM$|f/O#]B">
                           <field name="NUM">28</field>
                         </block>
                       </value>
                     </block>
                   </next>
                 </block>
               </statement>
               <next>
                 <block type="controls_if" id="tqj]c9z!29H`!Idm${_a">
                   <mutation else="1"></mutation>
                   <value name="IF0">
                     <block type="time_compare" id="Eb8dLv|-1R6XIc`Wru~0">
                       <mutation end_time="true"></mutation>
                       <field name="OPTION">between</field>
                       <field name="START_TIME">09:00</field>
                       <field name="END_TIME">20:00</field>
                     </block>
                   </value>
                   <statement name="DO0">
                     <block type="procedures_callnoreturn" id="*wIu7J*/)DB/(MCUvVNF" inline="true">
                       <mutation name="Regler">
                         <arg name="ist"></arg>
                         <arg name="soll"></arg>
                       </mutation>
                       <value name="ARG0">
                         <block type="on_source" id="ArzmS4VQ4Hb^pgIG_fo?">
                           <field name="ATTR">state.val</field>
                         </block>
                       </value>
                       <value name="ARG1">
                         <block type="variables_get" id="lt{@-X8A3RJF}!E9xg;L">
                           <field name="VAR" id="lS[T.(34r52Ro$RrYf$v" variabletype="">Tagessoll</field>
                         </block>
                       </value>
                     </block>
                   </statement>
                   <statement name="ELSE">
                     <block type="procedures_callnoreturn" id="$4k{;]z?~Dp)P*dHGlXS" inline="true">
                       <mutation name="Regler">
                         <arg name="ist"></arg>
                         <arg name="soll"></arg>
                       </mutation>
                       <value name="ARG0">
                         <block type="on_source" id="6q1C8$4]0TLNTl/OMoS}">
                           <field name="ATTR">state.val</field>
                         </block>
                       </value>
                       <value name="ARG1">
                         <block type="variables_get" id="R^-+8:6JAd8zy6WuG%xS">
                           <field name="VAR" id="prt;U,4Y$1:xn})ZeQ71" variabletype="">Nachtsoll</field>
                         </block>
                       </value>
                     </block>
                   </statement>
                   <next>
                     <block type="controls_if" id="7tC3QtnbS[#f[st385TK">
                       <value name="IF0">
                         <block type="logic_compare" id="BS[,Cian(C|t#_4^N.^J">
                           <field name="OP">NEQ</field>
                           <value name="A">
                             <block type="get_value_var" id="1jo*`VAZdDC+$C,ep3o3">
                               <field name="ATTR">val</field>
                               <value name="OID">
                                 <shadow type="text" id="rHk4II?vZ#Ok-buhY-le">
                                   <field name="TEXT">sonoff.0.sonoff-Rack-Schlangen.POWER1</field>
                                 </shadow>
                               </value>
                             </block>
                           </value>
                           <value name="B">
                             <block type="variables_get" id="BEBiQ4Ne-C.kkXl@mrb|">
                               <field name="VAR" id="?9qG~uNR}~O*-o9AVAYZ" variabletype="">aktor</field>
                             </block>
                           </value>
                         </block>
                       </value>
                       <statement name="DO0">
                         <block type="control" id="]2+3.aeXxPWVXlE,;}4q">
                           <mutation delay_input="false"></mutation>
                           <field name="OID">sonoff.0.sonoff-Rack-Schlangen.POWER1</field>
                           <field name="WITH_DELAY">FALSE</field>
                           <value name="VALUE">
                             <block type="variables_get" id="BxOpf1`0=}{|#)BnlW|n">
                               <field name="VAR" id="?9qG~uNR}~O*-o9AVAYZ" variabletype="">aktor</field>
                             </block>
                           </value>
                         </block>
                       </statement>
                     </block>
                   </next>
                 </block>
               </next>
             </block>
           </statement>
         </block>
         <block type="procedures_defnoreturn" id="kb-O}ffpR!p-{y(H{7kn" x="-512" y="-187">
           <mutation>
             <arg name="ist" varid="bF1xF|Wnc?9aqBo-}j:F"></arg>
             <arg name="soll" varid="Cgu*4]bTekqu6B`AOVaM"></arg>
           </mutation>
           <field name="NAME">Regler</field>
           <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment>
           <statement name="STACK">
             <block type="controls_if" id="uBXU(T~2C%^)46+Si?7X">
               <mutation elseif="1"></mutation>
               <value name="IF0">
                 <block type="logic_compare" id="k4D02ADyI/QoRh}r*V%Y">
                   <field name="OP">LTE</field>
                   <value name="A">
                     <block type="variables_get" id="Z5E5ZG~r3tAGoNTS5td7">
                       <field name="VAR" id="bF1xF|Wnc?9aqBo-}j:F" variabletype="">ist</field>
                     </block>
                   </value>
                   <value name="B">
                     <block type="variables_get" id="#an=Dx+1C}BaTs0r,%8;">
                       <field name="VAR" id="Cgu*4]bTekqu6B`AOVaM" variabletype="">soll</field>
                     </block>
                   </value>
                 </block>
               </value>
               <statement name="DO0">
                 <block type="variables_set" id="DpB@.$tm{{mCxSc$1+0l">
                   <field name="VAR" id="?9qG~uNR}~O*-o9AVAYZ" variabletype="">aktor</field>
                   <value name="VALUE">
                     <block type="logic_boolean" id="^D_0pWJUUzH;EN6q{W4,">
                       <field name="BOOL">TRUE</field>
                     </block>
                   </value>
                 </block>
               </statement>
               <value name="IF1">
                 <block type="logic_compare" id="kZIi4OoR[oz))CJNRC*.">
                   <field name="OP">GTE</field>
                   <value name="A">
                     <block type="variables_get" id="Fj%$pQV.mnq^!KVAWQ}%">
                       <field name="VAR" id="bF1xF|Wnc?9aqBo-}j:F" variabletype="">ist</field>
                     </block>
                   </value>
                   <value name="B">
                     <block type="math_arithmetic" id="+W/t_av2pk+^lH0svpWT">
                       <field name="OP">ADD</field>
                       <value name="A">
                         <shadow type="math_number" id="+odctnC6b23q#EZXBnd:">
                           <field name="NUM">1</field>
                         </shadow>
                         <block type="variables_get" id="+uqFEF/UH0Q92DU4DDWb">
                           <field name="VAR" id="Cgu*4]bTekqu6B`AOVaM" variabletype="">soll</field>
                         </block>
                       </value>
                       <value name="B">
                         <shadow type="math_number" id=")a:3t{4J%_.O(N?$7%N5">
                           <field name="NUM">1</field>
                         </shadow>
                       </value>
                     </block>
                   </value>
                 </block>
               </value>
               <statement name="DO1">
                 <block type="variables_set" id="E0)N%8C!IC[DGCSSKB7Y">
                   <field name="VAR" id="?9qG~uNR}~O*-o9AVAYZ" variabletype="">aktor</field>
                   <value name="VALUE">
                     <block type="logic_boolean" id="c(0Px%3xu=^}z%~#7Qk/">
                       <field name="BOOL">FALSE</field>
                     </block>
                   </value>
                 </block>
               </statement>
             </block>
           </statement>
         </block>
        </xml>
        

        1 Reply Last reply Reply Quote 0
        • B
          bullhead last edited by

          Das geht auch nicht.
          hab keinen plan warum das nicht geht 😞 😞

          J paul53 2 Replies Last reply Reply Quote 0
          • J
            Jan1 @bullhead last edited by

            @bullhead
            Poste mal Dein aktuelles Blockly als Screenshot.

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

              @bullhead sagte:

              Das geht auch nicht.

              Hast Du den XML-Code aus dem letzten Post importiert ? Ich hatte ihn zwischenzeitlich nochmal geändert wegen Wert.

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

                @paul53
                ja hab ich

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

                  @bullhead
                  Steht bei Javascript-Code jetzt in Zeile 32 ?

                      Regler((obj.state ? obj.state.val : ""), Tagessoll);
                  
                  B 1 Reply Last reply Reply Quote 0
                  • B
                    bullhead @paul53 last edited by

                    @paul53
                    nein da steht das
                    Regler(Wert, Tagessoll);

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

                      @bullhead sagte:

                      nein da steht das
                      Regler(Wert, Tagessoll);

                      Ja, das ist falsch. Da warst Du mit dem Importieren schneller, als ich es korrigieren konnte.

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

                        @paul53
                        und in 34 steht das

                        Regler(Wert, Nachtsoll);
                        paul53 1 Reply Last reply Reply Quote 0
                        • paul53
                          paul53 @bullhead last edited by

                          @bullhead sagte:

                          und in 34 steht das

                          Ist genauso falsch. Im Export oben ist die Korrektur enthalten.

                          B 2 Replies Last reply Reply Quote 0
                          • B
                            bullhead @paul53 last edited by

                            @paul53
                            ich kopiere das oben was im export drinnen ist und importiere es bei mir dann mal schauen ob es geht

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

                              @paul53
                              Also bis jetzt scheint es zu funktionieren Sonoff schaltet
                              und nur mal noch zur info für mich, das Script schaltet dann z.b. wenn ich 29°C einstelle +1°C schaltet er dann aus und unter 29°C wieder ein oder?

                              Wegen dem Script kann man da sagen an was das liegt das er die Datenpunkt-ID nicht richtig nimmt

                              paul53 3 Replies Last reply Reply Quote 0
                              • paul53
                                paul53 @bullhead last edited by

                                @bullhead sagte:

                                wenn ich 29°C einstelle +1°C schaltet er dann aus und unter 29°C wieder ein oder?

                                Ja, bei <= 29°C wird wieder eingeschaltet.

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

                                  @bullhead sagte:

                                  an was das liegt das er die Datenpunkt-ID nicht richtig nimmt

                                  Verstehe die Frage nicht. Die Datenpunkt-ID für getState() wird in Blockly als Text übergeben und Du hast Dich wahrscheinlich vertippt.

                                  1 Reply Last reply Reply Quote 0
                                  • B
                                    bullhead last edited by

                                    Das kann natürlich auch sein.
                                    Werde ich ja sehen ob ich noch Probleme bekomme, wenn ich noch Blockly Scripte erstelle.
                                    Bin ja erst am Anfang was ich alles vor habe.

                                    Aber Danke nochmal für die Hilfe

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

                                      @bullhead sagte:

                                      zu funktionieren Sonoff schaltet

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

                                      1 Reply Last reply Reply Quote 0
                                      • B
                                        bullhead last edited by bullhead

                                        Muss leider sagen das es jetzt nicht mehr geht, seit es Juni (6) ist.
                                        Schaltet den Sonoff nicht richtig also heizt weiter auch wenn die Temp. erreicht ist
                                        Finde leider nicht raus warum, könnte mir da jemand bitte helfen


                                        <xml xmlns="https://developers.google.com/blockly/xml">
                                        <variables>
                                        <variable id="x$ePuFJQIhohSRe@U2g">ist</variable>
                                        <variable id="}bm_h$z?kj.FA0Hlb1U">soll</variable> <variable id="lS[T.(34r52Ro$RrYf$v">Tagessoll</variable> <variable id="?9qG~uNR}~O*-o9AVAYZ">aktor</variable> <variable id="prt;U,4Y$1:xn})ZeQ71">Nachtsoll</variable> </variables> <block type="on" id="d8M=06k^P_$Yh$j[{8|L" x="-988" y="-663"> <field name="OID">mihome.0.devices.weather_v1_158d0002321578.temperature</field> <field name="CONDITION">any</field> <field name="ACK_CONDITION"></field> <statement name="STATEMENT"> <block type="controls_if" id="8-yMOI;phMDsfr~;V[2W"> <mutation elseif="2" else="1"></mutation> <value name="IF0"> <block type="logic_operation" id="g^awKGhR7a,Z3-@C2/|Z" inline="false"> <field name="OP">OR</field> <value name="A"> <block type="logic_compare" id="iUX5rOd7?w{Umy8Ti8Y">
                                        <field name="OP">EQ</field>
                                        <value name="A">
                                        <block type="time_get" id="D3xc7?^P$8=92I.;5kK">
                                        <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
                                        <field name="OPTION">M</field>
                                        </block>
                                        </value>
                                        <value name="B">
                                        <block type="math_number" id="8f^Acdo^6-=3[JI3mJ(p">
                                        <field name="NUM">12</field>
                                        </block>
                                        </value>
                                        </block>
                                        </value>
                                        <value name="B">
                                        <block type="logic_compare" id="}^[sxxzogz{MOBfdfEyS">
                                        <field name="OP">LT</field>
                                        <value name="A">
                                        <block type="time_get" id="7^OvZsjNw]hV^Y2zA2yp">
                                        <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
                                        <field name="OPTION">M</field>
                                        </block>
                                        </value>
                                        <value name="B">
                                        <block type="math_number" id="*YJ}fF%z43Ez:~c(uw{B">
                                        <field name="NUM">3</field>
                                        </block>
                                        </value>
                                        </block>
                                        </value>
                                        </block>
                                        </value>
                                        <statement name="DO0">
                                        <block type="variables_set" id="%.l]Rt_l]OS,B6Wb(i="> <field name="VAR" id="lS[T.(34r52Ro$RrYf$v">Tagessoll</field> <value name="VALUE"> <block type="math_number" id="Jkf6:GW^!p,rVb,GKkP9"> <field name="NUM">27</field> </block> </value> <next> <block type="variables_set" id="~zXbbWH}7-RHaI{1yL^b"> <field name="VAR" id="prt;U,4Y$1:xn})ZeQ71">Nachtsoll</field> <value name="VALUE"> <block type="math_number" id="ES4v@p@Ix|N/{.j~xe8*"> <field name="NUM">23</field> </block> </value> </block> </next> </block> </statement> <value name="IF1"> <block type="logic_compare" id="8D6(!F^,+d/gvVzRu@!5"> <field name="OP">LT</field> <value name="A"> <block type="time_get" id="]RR)o#6Z(3Isp{G_j3VD"> <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation> <field name="OPTION">M</field> </block> </value> <value name="B"> <block type="math_number" id="oY^Mli;qUetc_[k^-v@w"> <field name="NUM">6</field> </block> </value> </block> </value> <statement name="DO1"> <block type="variables_set" id="}F@zjdF4Gh_5Ww}hf]PD"> <field name="VAR" id="lS[T.(34r52Ro$RrYf$v">Tagessoll</field> <value name="VALUE"> <block type="math_number" id="vv3~^Fw,PfY*:]]SlP/E"> <field name="NUM">28</field> </block> </value> <next> <block type="variables_set" id="$A{kn#Q)3^M7+xo~0R,">
                                        <field name="VAR" id="prt;U,4Y$1:xn})ZeQ71">Nachtsoll</field>
                                        <value name="VALUE">
                                        <block type="math_number" id="J
                                        #x^inq4OtGn5j3=?">
                                        <field name="NUM">25</field>
                                        </block>
                                        </value>
                                        </block>
                                        </next>
                                        </block>
                                        </statement>
                                        <value name="IF2">
                                        <block type="logic_compare" id="l8m@TAVItkEcBqf@e[u"> <field name="OP">LT</field> <value name="A"> <block type="time_get" id="r@V]M]hXw.X*t*Kz/3[8"> <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation> <field name="OPTION">M</field> </block> </value> <value name="B"> <block type="math_number" id="cuIR32c;eZe3S~h?l1%">
                                        <field name="NUM">9</field>
                                        </block>
                                        </value>
                                        </block>
                                        </value>
                                        <statement name="DO2">
                                        <block type="variables_set" id="d1h_q@[A,vableeCu}Pk">
                                        <field name="VAR" id="lS[T.(34r52Ro$RrYf$v">Tagessoll</field>
                                        <value name="VALUE">
                                        <block type="math_number" id="5mcGtuJ)/2Q~ha2!cn24">
                                        <field name="NUM">30</field>
                                        </block>
                                        </value>
                                        <next>
                                        <block type="variables_set" id="zz8}a-[BRF=gSFiobre,">
                                        <field name="VAR" id="prt;U,4Y$1:xn})ZeQ71">Nachtsoll</field>
                                        <value name="VALUE">
                                        <block type="math_number" id=")@[eR9f^o7tZC5jSUDZT">
                                        <field name="NUM">28</field>
                                        </block>
                                        </value>
                                        </block>
                                        </next>
                                        </block>
                                        </statement>
                                        <statement name="ELSE">
                                        <block type="variables_set" id="bIip$EC]g?-{~4zPXXkq">
                                        <field name="VAR" id="lS[T.(34r52Ro$RrYf$v">Tagessoll</field>
                                        <value name="VALUE">
                                        <block type="math_number" id=":VJ$p)qSL/61CF%M[q;,">
                                        <field name="NUM">29</field>
                                        </block>
                                        </value>
                                        <next>
                                        <block type="variables_set" id="5)rGP-sVEC~y!pVGNOLJ">
                                        <field name="VAR" id="prt;U,4Y$1:xn})ZeQ71">Nachtsoll</field>
                                        <value name="VALUE">
                                        <block type="math_number" id="dzZU~MjAY{MM$|f/O#]B">
                                        <field name="NUM">27</field>
                                        </block>
                                        </value>
                                        </block>
                                        </next>
                                        </block>
                                        </statement>
                                        <next>
                                        <block type="controls_if" id="tqj]c9z!29H!Idm${_a"> <mutation else="1"></mutation> <value name="IF0"> <block type="time_compare" id="Eb8dLv|-1R6XIcWru~0">
                                        <mutation xmlns="http://www.w3.org/1999/xhtml" end_time="true"></mutation>
                                        <field name="OPTION">between</field>
                                        <field name="START_TIME">09:00</field>
                                        <field name="END_TIME">19:00</field>
                                        </block>
                                        </value>
                                        <statement name="DO0">
                                        <block type="procedures_callnoreturn" id="wIu7J/)DB/(MCUvVNF" inline="true">
                                        <mutation name="Regler">
                                        <arg name="ist"></arg>
                                        <arg name="soll"></arg>
                                        </mutation>
                                        <value name="ARG0">
                                        <block type="on_source" id="ArzmS4VQ4Hb^pgIG_fo?">
                                        <field name="ATTR">state.val</field>
                                        </block>
                                        </value>
                                        <value name="ARG1">
                                        <block type="variables_get" id="lt{@-X8A3RJF}!E9xg;L">
                                        <field name="VAR" id="lS[T.(34r52Ro$RrYf$v">Tagessoll</field>
                                        </block>
                                        </value>
                                        </block>
                                        </statement>
                                        <statement name="ELSE">
                                        <block type="procedures_callnoreturn" id="$4k{;]z?~Dp)P
                                        dHGlXS" inline="true">
                                        <mutation name="Regler">
                                        <arg name="ist"></arg>
                                        <arg name="soll"></arg>
                                        </mutation>
                                        <value name="ARG0">
                                        <block type="on_source" id="6q1C8$4]0TLNTl/OMoS}">
                                        <field name="ATTR">state.val</field>
                                        </block>
                                        </value>
                                        <value name="ARG1">
                                        <block type="variables_get" id="R^-+8:6JAd8zy6WuG%xS">
                                        <field name="VAR" id="prt;U,4Y$1:xn})ZeQ71">Nachtsoll</field>
                                        </block>
                                        </value>
                                        </block>
                                        </statement>
                                        <next>
                                        <block type="controls_if" id="7tC3QtnbS[#f[st385TK">
                                        <value name="IF0">
                                        <block type="logic_compare" id="BS[,Cian(C|t#4^N.^J">
                                        <field name="OP">NEQ</field>
                                        <value name="A">
                                        <block type="get_value_var" id="1jo*VAZdDC+$C,ep3o3"> <field name="ATTR">val</field> <value name="OID"> <shadow type="text" id="rHk4II?vZ#Ok-buhY-le"> <field name="TEXT">sonoff.0.sonoff-Rack-Schlangen.POWER1</field> </shadow> </value> </block> </value> <value name="B"> <block type="variables_get" id="BEBiQ4Ne-C.kkXl@mrb|"> <field name="VAR" id="?9qG~uNR}~O*-o9AVAYZ">aktor</field> </block> </value> </block> </value> <statement name="DO0"> <block type="control" id="]2+3.aeXxPWVXlE,;}4q"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">sonoff.0.sonoff-Rack-Schlangen.POWER1</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="variables_get" id="BxOpf10=}{|#)BnlW|n">
                                        <field name="VAR" id="?9qG~uNR}~O*-o9AVAYZ">aktor</field>
                                        </block>
                                        </value>
                                        </block>
                                        </statement>
                                        </block>
                                        </next>
                                        </block>
                                        </next>
                                        </block>
                                        </statement>
                                        </block>
                                        <block type="procedures_defnoreturn" id="kb-O}ffpR!p-{y(H{7kn" x="-512" y="-262">
                                        <mutation>
                                        <arg name="ist" varid="x$ePuFJQIhohSRe@U2g"></arg>
                                        <arg name="soll" varid="}bm_h$z?kj.FA0Hlb1U"></arg> </mutation> <field name="NAME">Regler</field> <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment> <statement name="STACK"> <block type="controls_if" id="uBXU(T~2C%^)46+Si?7X"> <mutation elseif="1"></mutation> <value name="IF0"> <block type="logic_compare" id="k4D02ADyI/QoRh}r*V%Y"> <field name="OP">LTE</field> <value name="A"> <block type="variables_get" id="Z5E5ZG~r3tAGoNTS5td7"> <field name="VAR" id="*x$ePuFJQIhohSRe@U2g">ist</field> </block> </value> <value name="B"> <block type="variables_get" id="#an=Dx+1C}BaTs0r,%8;"> <field name="VAR" id="}bm_h$z?kj.FA0Hlb1U">soll</field>
                                        </block>
                                        </value>
                                        </block>
                                        </value>
                                        <statement name="DO0">
                                        <block type="variables_set" id="DpB@.$tm{{mCxSc$1+0l">
                                        <field name="VAR" id="?9qG~uNR}~O
                                        -o9AVAYZ">aktor</field>
                                        <value name="VALUE">
                                        <block type="logic_boolean" id="^D_0pWJUUzH;EN6q{W4,">
                                        <field name="BOOL">TRUE</field>
                                        </block>
                                        </value>
                                        </block>
                                        </statement>
                                        <value name="IF1">
                                        <block type="logic_compare" id="kZIi4OoR[oz))CJNRC*.">
                                        <field name="OP">GTE</field>
                                        <value name="A">
                                        <block type="variables_get" id="Fj%$pQV.mnq^!KVAWQ}%">
                                        <field name="VAR" id="*x$ePuFJQIhohSRe@U2g">ist</field>
                                        </block>
                                        </value>
                                        <value name="B">
                                        <block type="math_arithmetic" id="+W/t_av2pk+^lH0svpWT">
                                        <field name="OP">ADD</field>
                                        <value name="A">
                                        <shadow xmlns="http://www.w3.org/1999/xhtml" type="math_number" id="+odctnC6b23q#EZXBnd:">
                                        <field name="NUM">1</field>
                                        </shadow>
                                        <block type="variables_get" id="+uqFEF/UH0Q92DU4DDWb">
                                        <field name="VAR" id="}bm_h$z?kj.FA0Hlb`1U">soll</field>
                                        </block>
                                        </value>
                                        <value name="B">
                                        <shadow type="math_number" id=")a:3t{4J%
                                        .O(N?$7%N5">
                                        <field name="NUM">1</field>
                                        </shadow>
                                        </value>
                                        </block>
                                        </value>
                                        </block>
                                        </value>
                                        <statement name="DO1">
                                        <block type="variables_set" id="E0)N%8C!IC[DGCSSKB7Y">
                                        <field name="VAR" id="?9qG~uNR}~O*-o9AVAYZ">aktor</field>
                                        <value name="VALUE">
                                        <block type="logic_boolean" id="c(0Px%3xu=^}z%~#7Qk/">
                                        <field name="BOOL">FALSE</field>
                                        </block>
                                        </value>
                                        </block>
                                        </statement>
                                        </block>
                                        </statement>
                                        </block>
                                        </xml>


                                        var ist, soll, Tagessoll, aktor, Nachtsoll;

                                        // Beschreibe diese Funktion …
                                        function Regler(ist, soll) {
                                        if (ist <= soll) {
                                        aktor = true;
                                        } else if (ist >= soll + 1) {
                                        aktor = false;
                                        }
                                        }

                                        on({id: "mihome.0.devices.weather_v1_158d0002321578.temperature"/Temperature/, change: "any"}, function (obj) {
                                        var value = obj.state.val;
                                        var oldValue = obj.oldState.val;
                                        if ((new Date().getMonth() + 1) == 12 || (new Date().getMonth() + 1) < 3) {
                                        Tagessoll = 27;
                                        Nachtsoll = 23;
                                        } else if ((new Date().getMonth() + 1) < 6) {
                                        Tagessoll = 28;
                                        Nachtsoll = 25;
                                        } else if ((new Date().getMonth() + 1) < 9) {
                                        Tagessoll = 30;
                                        Nachtsoll = 28;
                                        } else {
                                        Tagessoll = 29;
                                        Nachtsoll = 27;
                                        }
                                        if (compareTime("09:00", "19:00", "between")) {
                                        Regler((obj.state ? obj.state.val : ""), Tagessoll);
                                        } else {
                                        Regler((obj.state ? obj.state.val : ""), Nachtsoll);
                                        }
                                        if (getState('sonoff.0.sonoff-Rack-Schlangen.POWER1').val != aktor) {
                                        setState("sonoff.0.sonoff-Rack-Schlangen.POWER1"/sonoff-Rack-Schlangen POWER1/, aktor);
                                        }
                                        });

                                        Rack_Temp.JPG

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

                                          @bullhead sagte:

                                          heizt weiter auch wenn die Temp. erreicht ist

                                          Wird nicht bei 31°C am Tag ausgeschaltet ?

                                          1 Reply Last reply Reply Quote 0
                                          • B
                                            bullhead last edited by

                                            Stimmt da bin ich falsch gewesen
                                            Passt schon alles

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

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate

                                            868
                                            Online

                                            31.9k
                                            Users

                                            80.1k
                                            Topics

                                            1.3m
                                            Posts

                                            4
                                            36
                                            1963
                                            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