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

  • Default (No Skin)
  • No Skin
Collapse
ioBroker Logo

Community Forum

donate donate
  1. ioBroker Community Home
  2. Deutsch
  3. Skripten / Logik
  4. Blockly
  5. [gelöst] Tag und Nacht schaltung geht nicht

NEWS

  • Monatsrückblick Januar/Februar 2026 ist online!
    BluefoxB
    Bluefox
    18
    1
    816

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

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

[gelöst] Tag und Nacht schaltung geht nicht

Scheduled Pinned Locked Moved Blockly
36 Posts 4 Posters 3.2k Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B bullhead

    @paul53
    ja hab ich

    paul53P Offline
    paul53P Offline
    paul53
    wrote on last edited by
    #23

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

        Regler((obj.state ? obj.state.val : ""), Tagessoll);
    

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

    B 1 Reply Last reply
    0
    • paul53P paul53

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

          Regler((obj.state ? obj.state.val : ""), Tagessoll);
      
      B Offline
      B Offline
      bullhead
      wrote on last edited by
      #24

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

      paul53P 1 Reply Last reply
      0
      • B bullhead

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

        paul53P Offline
        paul53P Offline
        paul53
        wrote on last edited by
        #25

        @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.

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

        B 1 Reply Last reply
        0
        • paul53P paul53

          @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 Offline
          B Offline
          bullhead
          wrote on last edited by
          #26

          @paul53
          und in 34 steht das

          Regler(Wert, Nachtsoll);
          
          paul53P 1 Reply Last reply
          0
          • B bullhead

            @paul53
            und in 34 steht das

            Regler(Wert, Nachtsoll);
            
            paul53P Offline
            paul53P Offline
            paul53
            wrote on last edited by
            #27

            @bullhead sagte:

            und in 34 steht das

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

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

            B 2 Replies Last reply
            0
            • paul53P paul53

              @bullhead sagte:

              und in 34 steht das

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

              B Offline
              B Offline
              bullhead
              wrote on last edited by
              #28

              @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
              0
              • paul53P paul53

                @bullhead sagte:

                und in 34 steht das

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

                B Offline
                B Offline
                bullhead
                wrote on last edited by bullhead
                #29

                @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

                paul53P 3 Replies Last reply
                0
                • B 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

                  paul53P Offline
                  paul53P Offline
                  paul53
                  wrote on last edited by
                  #30

                  @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.

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

                  1 Reply Last reply
                  0
                  • B 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

                    paul53P Offline
                    paul53P Offline
                    paul53
                    wrote on last edited by paul53
                    #31

                    @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.

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

                    1 Reply Last reply
                    0
                    • B Offline
                      B Offline
                      bullhead
                      wrote on last edited by
                      #32

                      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
                      0
                      • B 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

                        paul53P Offline
                        paul53P Offline
                        paul53
                        wrote on last edited by
                        #33

                        @bullhead sagte:

                        zu funktionieren Sonoff schaltet

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

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

                        1 Reply Last reply
                        0
                        • B Offline
                          B Offline
                          bullhead
                          wrote on last edited by bullhead
                          #34

                          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|-1R6XIc`Wru~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="BxOpf1`0=}{|#)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.FA0Hlb`1U"></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.FA0Hlb`1U">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

                          paul53P 1 Reply Last reply
                          0
                          • B 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|-1R6XIc`Wru~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="BxOpf1`0=}{|#)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.FA0Hlb`1U"></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.FA0Hlb`1U">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

                            paul53P Offline
                            paul53P Offline
                            paul53
                            wrote on last edited by
                            #35

                            @bullhead sagte:

                            heizt weiter auch wenn die Temp. erreicht ist

                            Wird nicht bei 31°C am Tag ausgeschaltet ?

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

                            1 Reply Last reply
                            0
                            • B Offline
                              B Offline
                              bullhead
                              wrote on last edited by
                              #36

                              Stimmt da bin ich falsch gewesen
                              Passt schon alles

                              1 Reply Last reply
                              0

                              Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                              Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                              With your input, this post could be even better 💗

                              Register Login
                              Reply
                              • Reply as topic
                              Log in to reply
                              • Oldest to Newest
                              • Newest to Oldest
                              • Most Votes


                              Support us

                              ioBroker
                              Community Adapters
                              Donate

                              551

                              Online

                              32.8k

                              Users

                              82.7k

                              Topics

                              1.3m

                              Posts
                              Community
                              Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen | Einwilligungseinstellungen
                              ioBroker Community 2014-2025
                              logo
                              • Login

                              • Don't have an account? Register

                              • Login or register to search.
                              • First post
                                Last post
                              0
                              • Home
                              • Recent
                              • Tags
                              • Unread 0
                              • Categories
                              • Unreplied
                              • Popular
                              • GitHub
                              • Docu
                              • Hilfe