Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Licht-Schaltung funktioniert so leider nicht

    NEWS

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

    • ioBroker goes Matter ... Matter Adapter in Stable

    • Monatsrückblick - April 2025

    Licht-Schaltung funktioniert so leider nicht

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

      Hallo,

      ich habe eine Lichtschaltung für mein Außenlicht in Blockly erzeugt. Sie soll nach Monat und Datum geschaltet werden. In den Monaten August bis April soll diese durchgehend geschaltet werden, und im Mai nur bis zum 10.05.

      <xml xmlns="https://developers.google.com/blockly/xml">
        <variables>
          <variable id="w4CllnQ]G]vE~FX,ZmPe">außenlampe</variable>
        </variables>
        <block type="schedule" id="$.#CJ|4!+D[_Au!07_K8" x="-662" y="-1012">
          <field name="SCHEDULE">50 4 * * *</field>
          <statement name="STATEMENT">
            <block type="variables_set" id="@Z@81=2fTx7UYINFnJKQ">
              <field name="VAR" id="w4CllnQ]G]vE~FX,ZmPe">außenlampe</field>
              <value name="VALUE">
                <block type="logic_operation" id="3XV_u:GpN3x1S!GN,K]w" inline="false">
                  <field name="OP">OR</field>
                  <value name="A">
                    <block type="logic_operation" id="]1ZGv/Nsq:if)ozGx7;v" inline="false">
                      <field name="OP">OR</field>
                      <value name="A">
                        <block type="logic_compare" id="53+6gAWomL3s~8+a~Z#G">
                          <field name="OP">GTE</field>
                          <value name="A">
                            <block type="time_get" id="IcTc|OH7q:6xT9oxyuZm">
                              <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="%ZFW]s;p;F/Nt7mL0n;u">
                              <field name="NUM">8</field>
                            </block>
                          </value>
                        </block>
                      </value>
                      <value name="B">
                        <block type="logic_compare" id="tnytvYCffo~nc}q#]Co`">
                          <field name="OP">LTE</field>
                          <value name="A">
                            <block type="time_get" id="G^,DSBNO/tQYUCT(u-pn">
                              <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="v+7CiJj!hY4=z~pe{CK_">
                              <field name="NUM">4</field>
                            </block>
                          </value>
                        </block>
                      </value>
                    </block>
                  </value>
                  <value name="B">
                    <block type="logic_operation" id="SdTgz#clbihNm7x#.Ja)">
                      <field name="OP">AND</field>
                      <value name="A">
                        <block type="logic_compare" id="Z}-sqWL!G%!hKUM+ixnQ">
                          <field name="OP">EQ</field>
                          <value name="A">
                            <block type="time_get" id="a5SO)sPXtFrsO(h8ppb^">
                              <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="eB99JR+kw+f6GCT3zwy[">
                              <field name="NUM">5</field>
                            </block>
                          </value>
                        </block>
                      </value>
                      <value name="B">
                        <block type="logic_compare" id="a./{c0K+WRoph{|8p;_~">
                          <field name="OP">LTE</field>
                          <value name="A">
                            <block type="time_get" id="vsYUB#4OZA|}j@-7eLaj">
                              <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
                              <field name="OPTION">d</field>
                            </block>
                          </value>
                          <value name="B">
                            <block type="math_number" id="47{YO/L}pN1?_!)l-x[3">
                              <field name="NUM">10</field>
                            </block>
                          </value>
                        </block>
                      </value>
                    </block>
                  </value>
                </block>
              </value>
              <next>
                <block type="controls_if" id="*{K|*8f.N:kZRghQK+w%">
                  <mutation else="1"></mutation>
                  <value name="IF0">
                    <block type="variables_get" id="pwB^;s(~L@YXR)S9.h=D">
                      <field name="VAR" id="w4CllnQ]G]vE~FX,ZmPe">außenlampe</field>
                    </block>
                  </value>
                  <statement name="DO0">
                    <block type="control" id="dT4H+Ze!m9|rRlNLu%`d">
                      <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                      <field name="OID">alexa2.0.Smart-Home-Devices.60369cc6-eafc-4aa2-83c6-8a79fbfa37e5.powerState</field>
                      <field name="WITH_DELAY">FALSE</field>
                      <value name="VALUE">
                        <block type="logic_boolean" id="OR*;0!fPA%0~j}2bl;+)">
                          <field name="BOOL">TRUE</field>
                        </block>
                      </value>
                      <next>
                        <block type="control" id="f/WLcPMUK!A^r-x~-:qD">
                          <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation>
                          <field name="OID">alexa2.0.Smart-Home-Devices.60369cc6-eafc-4aa2-83c6-8a79fbfa37e5.powerState</field>
                          <field name="WITH_DELAY">TRUE</field>
                          <field name="DELAY_MS">20</field>
                          <field name="UNIT">min</field>
                          <field name="CLEAR_RUNNING">FALSE</field>
                          <value name="VALUE">
                            <block type="logic_boolean" id="(PaU-6h[6jYS;]p-7NQv">
                              <field name="BOOL">FALSE</field>
                            </block>
                          </value>
                          <next>
                            <block type="telegram" id="(dYm(Ef{_~?AozWV8,5Y">
                              <field name="INSTANCE">.0</field>
                              <field name="LOG"></field>
                              <field name="SILENT">FALSE</field>
                              <field name="PARSEMODE">default</field>
                              <field name="DISABLE_WEB_PAGE_PREVIEW">FALSE</field>
                              <value name="MESSAGE">
                                <shadow type="text" id="}:c5ZBmFb-CHsgbfka:x">
                                  <field name="TEXT">text</field>
                                </shadow>
                                <block type="logic_ternary" id="2GW6f#R%(48!+be+r9o7">
                                  <value name="IF">
                                    <block type="logic_compare" id="dXv,/t~h;$RHzy)y8[=9">
                                      <field name="OP">EQ</field>
                                      <value name="A">
                                        <block type="get_value" id=",.KVGGt|Zae3eunZ;v0[">
                                          <field name="ATTR">val</field>
                                          <field name="OID">alexa2.0.Smart-Home-Devices.60369cc6-eafc-4aa2-83c6-8a79fbfa37e5.powerState</field>
                                        </block>
                                      </value>
                                      <value name="B">
                                        <block type="logic_boolean" id="*y#}*(s)F9yub#yd$i8p">
                                          <field name="BOOL">TRUE</field>
                                        </block>
                                      </value>
                                    </block>
                                  </value>
                                  <value name="THEN">
                                    <block type="text" id="BM2D_iM2gCU0u_3MNFud">
                                      <field name="TEXT">Aussenlampe geschaltet</field>
                                    </block>
                                  </value>
                                  <value name="ELSE">
                                    <block type="text" id="#WwmHvNy;5!+LX2[-EGN">
                                      <field name="TEXT">Aussenlampe ausgeschaltet</field>
                                    </block>
                                  </value>
                                </block>
                              </value>
                            </block>
                          </next>
                        </block>
                      </next>
                    </block>
                  </statement>
                  <statement name="ELSE">
                    <block type="telegram" id="*c@V]dIeLT*5w^zYg~J+">
                      <field name="INSTANCE">.0</field>
                      <field name="LOG"></field>
                      <field name="SILENT">FALSE</field>
                      <field name="PARSEMODE">default</field>
                      <field name="DISABLE_WEB_PAGE_PREVIEW">FALSE</field>
                      <value name="MESSAGE">
                        <shadow type="text">
                          <field name="TEXT">text</field>
                        </shadow>
                        <block type="logic_ternary" id="N44uXp!k}/^`mu;r:Y_j">
                          <value name="IF">
                            <block type="logic_compare" id="X=1s+#n~lgH4{`ssA`=M">
                              <field name="OP">EQ</field>
                              <value name="A">
                                <block type="get_value" id="[Xs(FhOyTEUkdy6TZiRj">
                                  <field name="ATTR">val</field>
                                  <field name="OID">alexa2.0.Smart-Home-Devices.60369cc6-eafc-4aa2-83c6-8a79fbfa37e5.powerState</field>
                                </block>
                              </value>
                              <value name="B">
                                <block type="logic_boolean" id="%VkyiQ$ZH7v=t`GD^3Io">
                                  <field name="BOOL">TRUE</field>
                                </block>
                              </value>
                            </block>
                          </value>
                          <value name="THEN">
                            <block type="text" id="ZQ-#;U_sz)]qdvroV*?G">
                              <field name="TEXT">Aussenlampe  1geschaltet</field>
                            </block>
                          </value>
                          <value name="ELSE">
                            <block type="text" id="XBcY%ZhjT7o885^!C6Yw">
                              <field name="TEXT">Aussenlampe 1ausgeschaltet</field>
                            </block>
                          </value>
                        </block>
                      </value>
                    </block>
                  </statement>
                </block>
              </next>
            </block>
          </statement>
        </block>
      </xml>
      

      schaltung aussen.jpg
      Gruß
      Mico

      maximal1981 1 Reply Last reply Reply Quote 0
      • maximal1981
        maximal1981 @Mico last edited by

        @mico was funktioniert nicht?

        bei mir geht es, man könnte den ersten "oder" Teil entfernen, und es im cron eintragen.
        fürs ausschalten wirst du so nie eine Meldung erhalten.

        M 1 Reply Last reply Reply Quote 0
        • M
          Mico @maximal1981 last edited by

          @maximal1981
          Die Lampe ist nach wie vor um 05:00 an. Die Meldung sollte auch nur fürs Ausprobieren sein damit ich sicher bin das Sie eingeschaltet war.

          maximal1981 1 Reply Last reply Reply Quote 0
          • maximal1981
            maximal1981 @Mico last edited by

            @mico natürlich ist sie um 0500 noch an.
            wenn man um 0450 startet und 20 min verzögert = 0510

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

            Support us

            ioBroker
            Community Adapters
            Donate

            879
            Online

            31.7k
            Users

            79.8k
            Topics

            1.3m
            Posts

            2
            4
            179
            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