Skip to content
  • Aktuell
  • Tags
  • 0 Ungelesen 0
  • Kategorien
  • Unreplied
  • Beliebt
  • 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

  • Standard: (Kein Skin)
  • Kein Skin
Einklappen
ioBroker Logo
  1. ioBroker Community Home
  2. Deutsch
  3. Entwicklung
  4. Planung neuer Adapter: Smart Control

NEWS

  • UPDATE 31.10.: Amazon Alexa - ioBroker Skill läuft aus ?
    apollon77A
    apollon77
    48
    3
    8.2k

  • Monatsrückblick – September 2025
    BluefoxB
    Bluefox
    13
    1
    1.9k

  • Neues Video "KI im Smart Home" - ioBroker plus n8n
    BluefoxB
    Bluefox
    15
    1
    2.2k

Planung neuer Adapter: Smart Control

Geplant Angeheftet Gesperrt Verschoben Entwicklung
adapterentwicklungbewegungsmelderlichtgerätedatenpunkte
76 Beiträge 24 Kommentatoren 14.1k Aufrufe 57 Watching
  • Älteste zuerst
  • Neuste zuerst
  • Meiste Stimmen
Antworten
  • In einem neuen Thema antworten
Anmelden zum Antworten
Dieses Thema wurde gelöscht. Nur Nutzer mit entsprechenden Rechten können es sehen.
  • EdgarME Offline
    EdgarME Offline
    EdgarM
    Developer
    schrieb am zuletzt editiert von
    #59

    Hallo @Mic ,

    mal sehen ob ich etwas übersehen habe:

    Kann man mit dem Adapter SmartControl auf einen Taster steuern? Also Taster benutzen -> Licht an, Taster nochmal benutzen -> Licht aus?

    Ich habe es so wenigstens nicht geschafft das Licht auszubekommen.

    grüße

    bisher produktive Zentralen: FHEM,openhab,node-red, homeassistant
    Geräte von: Homematic (ca 20 ), Hue(15),Osram(10),tradfri(10), shelly(4), aqara(20+)

    1 Antwort Letzte Antwort
    0
    • Christoph1337C Offline
      Christoph1337C Offline
      Christoph1337
      schrieb am zuletzt editiert von Christoph1337
      #60

      @Mic

      Sehr cool das endlich jemand einen Adapter dafür baut!! Ich hab ewig an meinem Bewegungsmelder Script getüftelt bis es halbwegs lief und ich freu mich darauf deinen Adapter zu testen.

      Ich hänge dir mal meine Blockly Funktion dafür an. Vielleicht gibt das ja noch Inspirationen dafür.

      Grundsätzlich habe ich folgendes drin:

      • Globaler DP "AutoLight" falls "false" wird kein Licht mehr automatisch geschaltet
      • Globaler DP "NightLightMode" falls "true" wird nicht geschaltet oder ein anderes Lichtszenario
      • Globaler DP "AtHome" falls "false" Alle Lichter ausschalten
      • Globaler DP LuxLimit Grenzwert für schalten von Licht
      • Je Raum gibt es weitere weitere Einstellungen (Schaltzeit, IgnoreNightMode,KeepOn (if true), KeepOff (if true), ExtraOffSwitches (Geräte zusätzlich abgeschaltet werden aber keinen Trigger für ON haben), LuxLimit (individuell)
      • Funktion für das Schalten verschiedener Lichter in dem Raum je nach Bedingung.
      • Debug Ausgabe

      Was mir bei Blockly am Anfang sehr viele Probleme gemacht hat war, dass die Verwendung von Timeouts in einer Funktion beim Aufruf von mehreren Räumen überschrieben werden. Das habe ich letztendlich mit einem Timer gelöst, der an den DP gehängt wird und beim neu schreiben gelöscht wird.

      <xml xmlns="https://developers.google.com/blockly/xml">
        <variables>
          <variable id="xjjCO3x]~#p7S0:#%i0_">switches</variable>
          <variable id="N=.oocr,|f!EjH[T#m4W">TurnON</variable>
          <variable id=".vDs7L59v=fy*rrUz[gY">OFFTime</variable>
          <variable id="IX/gU^R_Zpb]{vD5A]Sn">RoomName</variable>
          <variable id="@Bz823N{#FDtr?!utT_^">pir_01</variable>
          <variable id="0I[}CDRB#1t;RiBC2c!N">pir_02</variable>
          <variable id=",RO*rmH)Gb7=:?$7ny,.">pir_lux_01</variable>
          <variable id="vS_F0r}]%+GePgY3vks8">pir_lux_02</variable>
          <variable id="l;ilJ`6Z6%G5EJ2clI_)">pir_lux_limit</variable>
          <variable id="v5r*F/J_D*#a2B^L/XDs">extraOFFswitches</variable>
          <variable id="VpvRaw-o{?h#_.0;LXn;">KeepOn</variable>
          <variable id="dt+.dW.Wy09/+7%X.I|+">KeepOff</variable>
          <variable id="(5n|JY/|pl^WYG41i],:">IgnoreNightMode</variable>
          <variable id="#DF~YDx#7HA~2_~c}$P?">switch</variable>
          <variable id=":#q3xGH!O9R*~b!?qxmd">counter</variable>
          <variable id="UFl:*B!P.|vFu=[uU3T/">return</variable>
          <variable id="q-]g;q9Z=eMBOK-}p/L`">wz_select_return</variable>
          <variable id="Z}*@ZQ],86inGv;ML!G/">GlobalLuxLimit</variable>
        </variables>
        <block type="procedures_defreturn" id="ME|_L*VJRiX!B)!0O7?j" x="13" y="13">
          <field name="NAME">wz_select_device</field>
          <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment>
          <statement name="STACK">
            <block type="controls_if" id="l@l1b(]$~rI~T]PtFCck">
              <mutation elseif="1" else="1"></mutation>
              <value name="IF0">
                <block type="logic_operation" id="cs-2Q(5s^2mYurlgJ%IE" inline="false">
                  <field name="OP">AND</field>
                  <value name="A">
                    <block type="logic_operation" id="b02ov67EMjyk~?LmK[TG" inline="false">
                      <field name="OP">AND</field>
                      <value name="A">
                        <block type="logic_operation" id="Acq#6xiNAjQ76BM%;-8%" inline="false">
                          <field name="OP">AND</field>
                          <value name="A">
                            <block type="logic_compare" id="ix3U/jZb=T(ku}juSZnR">
                              <field name="OP">GTE</field>
                              <value name="A">
                                <block type="time_get" id=".5N6%Z#/3hY=:$B|~NaO">
                                  <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
                                  <field name="OPTION">wd</field>
                                </block>
                              </value>
                              <value name="B">
                                <block type="math_number" id="pDE#FhTH~mt`S[0zb_||">
                                  <field name="NUM">6</field>
                                </block>
                              </value>
                            </block>
                          </value>
                          <value name="B">
                            <block type="logic_compare" id="w/-BADhf0d5cMO.$wH^q">
                              <field name="OP">LTE</field>
                              <value name="A">
                                <block type="time_get" id="~Jq=3I?Is=1)GJd17c+q">
                                  <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
                                  <field name="OPTION">wd</field>
                                </block>
                              </value>
                              <value name="B">
                                <block type="math_number" id="#v}=gS`Y]=O%]cz#G#jc">
                                  <field name="NUM">7</field>
                                </block>
                              </value>
                            </block>
                          </value>
                        </block>
                      </value>
                      <value name="B">
                        <block type="logic_operation" id="ULgxMsVMe_]tA]Fsly[$" inline="false">
                          <field name="OP">OR</field>
                          <value name="A">
                            <block type="time_compare" id="0!GQRrVZYt:T:lTJyJgl">
                              <mutation xmlns="http://www.w3.org/1999/xhtml" end_time="true"></mutation>
                              <field name="OPTION">between</field>
                              <field name="START_TIME">12:00</field>
                              <field name="END_TIME">14:00</field>
                            </block>
                          </value>
                          <value name="B">
                            <block type="time_compare" id="aQEM|C(l^s7,5JV@`^B;">
                              <mutation xmlns="http://www.w3.org/1999/xhtml" end_time="true"></mutation>
                              <field name="OPTION">between</field>
                              <field name="START_TIME">18:00</field>
                              <field name="END_TIME">20:00</field>
                            </block>
                          </value>
                        </block>
                      </value>
                    </block>
                  </value>
                  <value name="B">
                    <block type="logic_negate" id="[I6Mx+jpR[AKmmmXoxWv">
                      <value name="BOOL">
                        <block type="get_value_var" id="l@za~3?OhxT$Fo#=c)Wx">
                          <field name="ATTR">val</field>
                          <value name="OID">
                            <shadow type="text">
                              <field name="TEXT"></field>
                            </shadow>
                            <block type="field_oid" id="DqdZ(z^Eu3wpe1!CoGSA">
                              <field name="oid">0_userdata.0.GlobalVars.Wohnzimmer_TV</field>
                            </block>
                          </value>
                        </block>
                      </value>
                    </block>
                  </value>
                </block>
              </value>
              <statement name="DO0">
                <block type="variables_set" id="|o-y%I+j~uij@H,-{AdA">
                  <field name="VAR" id="q-]g;q9Z=eMBOK-}p/L`">wz_select_return</field>
                  <value name="VALUE">
                    <block type="lists_create_with" id="r`WR05*_(l~!0%}P8dyO">
                      <mutation items="1"></mutation>
                      <value name="ADD0">
                        <block type="field_oid" id="p?t*.kHQgbbg-P1}L:],">
                          <field name="oid">scene.0.Szene_wohnzimmer-essen</field>
                        </block>
                      </value>
                    </block>
                  </value>
                  <next>
                    <block type="debug" id=":a:ZL|ZKs-wm8Q;T^M%?">
                      <field name="Severity">log</field>
                      <value name="TEXT">
                        <shadow type="text" id="M;/vC3q?i$VcB0{[N#_A">
                          <field name="TEXT">wz essen</field>
                        </shadow>
                      </value>
                    </block>
                  </next>
                </block>
              </statement>
              <value name="IF1">
                <block type="logic_operation" id="_k0k~kNq2Ce,UYgh;mqi" inline="false">
                  <field name="OP">AND</field>
                  <value name="A">
                    <block type="get_value_var" id="(pebLF9+cQ7,^ifb==,6">
                      <field name="ATTR">val</field>
                      <value name="OID">
                        <shadow type="text" id="U/S$)3xsk-3;8#~.*hJ2">
                          <field name="TEXT"></field>
                        </shadow>
                        <block type="field_oid" id="=a4%;97[zTAEkm+ujijj">
                          <field name="oid">0_userdata.0.GlobalVars.Wohnzimmer_TV</field>
                        </block>
                      </value>
                    </block>
                  </value>
                  <value name="B">
                    <block type="time_compare" id="Jp4c.~(5PKa:]iIs#QLk">
                      <mutation xmlns="http://www.w3.org/1999/xhtml" end_time="true"></mutation>
                      <field name="OPTION">between</field>
                      <field name="START_TIME">18:00</field>
                      <field name="END_TIME">00:30</field>
                    </block>
                  </value>
                </block>
              </value>
              <statement name="DO1">
                <block type="variables_set" id="L@}i_6o.rb2dA0Mh9zVP">
                  <field name="VAR" id="q-]g;q9Z=eMBOK-}p/L`">wz_select_return</field>
                  <value name="VALUE">
                    <block type="lists_create_with" id="qwZKDCG9dtX!Y[CfqU`x">
                      <mutation items="1"></mutation>
                      <value name="ADD0">
                        <block type="field_oid" id="Mk^tguqoO%!UdMC_uaO-">
                          <field name="oid">scene.0.Szene_wohnzimmer-gemuetlich</field>
                        </block>
                      </value>
                    </block>
                  </value>
                  <next>
                    <block type="debug" id="2Xc+Q8zQ*KyLt{LGbHM!">
                      <field name="Severity">log</field>
                      <value name="TEXT">
                        <shadow type="text" id="Doe2PlebWaPQx`@}YqiF">
                          <field name="TEXT">wz gemütlich</field>
                        </shadow>
                      </value>
                    </block>
                  </next>
                </block>
              </statement>
              <statement name="ELSE">
                <block type="variables_set" id="USp?u8vp6Mfq;65wHEz6">
                  <field name="VAR" id="q-]g;q9Z=eMBOK-}p/L`">wz_select_return</field>
                  <value name="VALUE">
                    <block type="lists_create_with" id="ke72Y:uae96cIQ6VA#$G">
                      <mutation items="1"></mutation>
                      <value name="ADD0">
                        <block type="field_oid" id="4+{(idsPPS`v${5x;K?O">
                          <field name="oid">scene.0.Szene_pir-wohnzimmer</field>
                        </block>
                      </value>
                    </block>
                  </value>
                  <next>
                    <block type="debug" id="M%)Ez?.pywI6}bbth`Vx">
                      <field name="Severity">log</field>
                      <value name="TEXT">
                        <shadow type="text" id="x((%Rv2R;44c_sv`g2nS">
                          <field name="TEXT">wz pir</field>
                        </shadow>
                      </value>
                    </block>
                  </next>
                </block>
              </statement>
            </block>
          </statement>
          <value name="RETURN">
            <block type="variables_get" id="WmE)4):S{xnzH$T+yOSQ">
              <field name="VAR" id="q-]g;q9Z=eMBOK-}p/L`">wz_select_return</field>
            </block>
          </value>
        </block>
        <block type="procedures_defreturn" id="Uq+c:7kOmR1R|/)C-~iW" x="13" y="588">
          <mutation>
            <arg name="RoomName" varid="IX/gU^R_Zpb]{vD5A]Sn"></arg>
            <arg name="pir_01" varid="@Bz823N{#FDtr?!utT_^"></arg>
            <arg name="pir_02" varid="0I[}CDRB#1t;RiBC2c!N"></arg>
            <arg name="pir_lux_01" varid=",RO*rmH)Gb7=:?$7ny,."></arg>
            <arg name="pir_lux_02" varid="vS_F0r}]%+GePgY3vks8"></arg>
            <arg name="pir_lux_limit" varid="l;ilJ`6Z6%G5EJ2clI_)"></arg>
            <arg name="switches" varid="xjjCO3x]~#p7S0:#%i0_"></arg>
            <arg name="extraOFFswitches" varid="v5r*F/J_D*#a2B^L/XDs"></arg>
            <arg name="OFFTime" varid=".vDs7L59v=fy*rrUz[gY"></arg>
            <arg name="KeepOn" varid="VpvRaw-o{?h#_.0;LXn;"></arg>
            <arg name="KeepOff" varid="dt+.dW.Wy09/+7%X.I|+"></arg>
            <arg name="IgnoreNightMode" varid="(5n|JY/|pl^WYG41i],:"></arg>
          </mutation>
          <field name="NAME">PIROnOff</field>
          <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment>
          <statement name="STACK">
            <block type="controls_if" id="[O7.(Z@={-u+:!D79Gz%">
              <value name="IF0">
                <block type="logic_compare" id="jlr_x$?NA^WZomQtcw#5">
                  <field name="OP">EQ</field>
                  <value name="A">
                    <block type="variables_get" id="F=+u75K9%VDi8G/n|D8k">
                      <field name="VAR" id="0I[}CDRB#1t;RiBC2c!N">pir_02</field>
                    </block>
                  </value>
                  <value name="B">
                    <block type="logic_null" id="Sh,:KvsF[rusl~@}EMqY"></block>
                  </value>
                </block>
              </value>
              <statement name="DO0">
                <block type="variables_set" id="whX@Da6CE@|naMUw;N8~">
                  <field name="VAR" id="0I[}CDRB#1t;RiBC2c!N">pir_02</field>
                  <value name="VALUE">
                    <block type="variables_get" id="6rDG8,DskG60`#/v/8mv">
                      <field name="VAR" id="@Bz823N{#FDtr?!utT_^">pir_01</field>
                    </block>
                  </value>
                </block>
              </statement>
              <next>
                <block type="controls_if" id="I[hD8l1p/IA;zpe?h|UC">
                  <value name="IF0">
                    <block type="logic_compare" id="~)koIzn#%8#nG.hQ2r4w">
                      <field name="OP">EQ</field>
                      <value name="A">
                        <block type="variables_get" id=",|L(K7dZVR%t;!_rN$Lh">
                          <field name="VAR" id="vS_F0r}]%+GePgY3vks8">pir_lux_02</field>
                        </block>
                      </value>
                      <value name="B">
                        <block type="logic_null" id="W%bpS%eSC]264c{ywR]f"></block>
                      </value>
                    </block>
                  </value>
                  <statement name="DO0">
                    <block type="variables_set" id="U[5P1LV5cgm)K(sdn+T)">
                      <field name="VAR" id="vS_F0r}]%+GePgY3vks8">pir_lux_02</field>
                      <value name="VALUE">
                        <block type="variables_get" id="S=$NF3KdW#f|mCa_Is.$">
                          <field name="VAR" id=",RO*rmH)Gb7=:?$7ny,.">pir_lux_01</field>
                        </block>
                      </value>
                    </block>
                  </statement>
                  <next>
                    <block type="debug" id="13({Y~ad[1lz?(?.I:8s">
                      <field name="Severity">log</field>
                      <value name="TEXT">
                        <shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="jJ`TpoG`qlcAh?|:PC!V">
                          <field name="TEXT">etwas erkannt</field>
                        </shadow>
                        <block type="text_join" id="zzz|U{L6aADQM6wC=`Dw">
                          <mutation items="8"></mutation>
                          <value name="ADD0">
                            <block type="text" id="FpG~%IV|WdP}+zffCI-w">
                              <field name="TEXT">PIR: </field>
                            </block>
                          </value>
                          <value name="ADD1">
                            <block type="variables_get" id="8~Do34ZHjM/ehND*@x}H">
                              <field name="VAR" id="@Bz823N{#FDtr?!utT_^">pir_01</field>
                            </block>
                          </value>
                          <value name="ADD2">
                            <block type="text" id="UQ6$1$e!x0vW2VMG$^%n">
                              <field name="TEXT"> hat Wert - </field>
                            </block>
                          </value>
                          <value name="ADD3">
                            <block type="get_value_var" id="aM`8)xK*ukDYKs(Q^iD[">
                              <field name="ATTR">val</field>
                              <value name="OID">
                                <shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="{aui]%Z@m*m=!^M`#XS9">
                                  <field name="TEXT"></field>
                                </shadow>
                                <block type="variables_get" id="ozTuQEY[4$%5^%RXh-@g">
                                  <field name="VAR" id="@Bz823N{#FDtr?!utT_^">pir_01</field>
                                </block>
                              </value>
                            </block>
                          </value>
                          <value name="ADD4">
                            <block type="text" id="h^0tVD{s|6(nm~@3uSfO">
                              <field name="TEXT"> - </field>
                            </block>
                          </value>
                          <value name="ADD5">
                            <block type="variables_get" id="2k{1r:Z$*Jk{fQYZ0hvv">
                              <field name="VAR" id="0I[}CDRB#1t;RiBC2c!N">pir_02</field>
                            </block>
                          </value>
                          <value name="ADD6">
                            <block type="text" id=".8YO}6ABP*HDMGU^1$,P">
                              <field name="TEXT"> hat Wert - </field>
                            </block>
                          </value>
                          <value name="ADD7">
                            <block type="get_value_var" id="3IIJGJ3XEK8fV0.c_0Vl">
                              <field name="ATTR">val</field>
                              <value name="OID">
                                <shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="{aui]%Z@m*m=!^M`#XS9">
                                  <field name="TEXT"></field>
                                </shadow>
                                <block type="variables_get" id="PeBl3q,Yiuq6kwlkcJS`">
                                  <field name="VAR" id="0I[}CDRB#1t;RiBC2c!N">pir_02</field>
                                </block>
                              </value>
                            </block>
                          </value>
                        </block>
                      </value>
                      <next>
                        <block type="debug" id="m$k.v~~pRKsfF#2rGjXW">
                          <field name="Severity">log</field>
                          <value name="TEXT">
                            <shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="jJ`TpoG`qlcAh?|:PC!V">
                              <field name="TEXT">etwas erkannt</field>
                            </shadow>
                            <block type="text_join" id="A.Yww;)O(D?h8Sr4CUO8">
                              <mutation items="8"></mutation>
                              <value name="ADD0">
                                <block type="text" id="6Js:%RU{%E1rE0ie3O=Y">
                                  <field name="TEXT">PIR_LUX: </field>
                                </block>
                              </value>
                              <value name="ADD1">
                                <block type="variables_get" id="8pcxW~%+x5HIJ5:kQD_X">
                                  <field name="VAR" id=",RO*rmH)Gb7=:?$7ny,.">pir_lux_01</field>
                                </block>
                              </value>
                              <value name="ADD2">
                                <block type="text" id="y:)7;uyP|i,=qBJ?/940">
                                  <field name="TEXT"> hat Wert - </field>
                                </block>
                              </value>
                              <value name="ADD3">
                                <block type="get_value_var" id="?jc{.no|7@Ox}M*3Yiy=">
                                  <field name="ATTR">val</field>
                                  <value name="OID">
                                    <shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="{aui]%Z@m*m=!^M`#XS9">
                                      <field name="TEXT"></field>
                                    </shadow>
                                    <block type="variables_get" id="AB#BN4sUMf1_zVuW(5AD">
                                      <field name="VAR" id=",RO*rmH)Gb7=:?$7ny,.">pir_lux_01</field>
                                    </block>
                                  </value>
                                </block>
                              </value>
                              <value name="ADD4">
                                <block type="text" id="zLrVDg5V7`Jy|NUNf`89">
                                  <field name="TEXT"> - </field>
                                </block>
                              </value>
                              <value name="ADD5">
                                <block type="variables_get" id="RYUXo|IpuVD31K6d}E)(">
                                  <field name="VAR" id="vS_F0r}]%+GePgY3vks8">pir_lux_02</field>
                                </block>
                              </value>
                              <value name="ADD6">
                                <block type="text" id="E(roxUb_{AJQE1[!k~Or">
                                  <field name="TEXT"> hat Wert - </field>
                                </block>
                              </value>
                              <value name="ADD7">
                                <block type="get_value_var" id="|{-zrh)6pw7)U2flh#WT">
                                  <field name="ATTR">val</field>
                                  <value name="OID">
                                    <shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="{aui]%Z@m*m=!^M`#XS9">
                                      <field name="TEXT"></field>
                                    </shadow>
                                    <block type="variables_get" id="249q+VQJ1tc`_z|^QKw$">
                                      <field name="VAR" id="vS_F0r}]%+GePgY3vks8">pir_lux_02</field>
                                    </block>
                                  </value>
                                </block>
                              </value>
                            </block>
                          </value>
                          <next>
                            <block type="controls_if" id="Uv[/#yCo:db^kgX|;k#H">
                              <mutation else="1"></mutation>
                              <value name="IF0">
                                <block type="logic_compare" id="6FH^Rk2p_]%Y2(K/PyPd">
                                  <field name="OP">EQ</field>
                                  <value name="A">
                                    <block type="get_value" id="?!x8nVCyZfBkPYEG~Az?">
                                      <field name="ATTR">val</field>
                                      <field name="OID">0_userdata.0.GlobalVars.AutoLight</field>
                                    </block>
                                  </value>
                                  <value name="B">
                                    <block type="logic_boolean" id="mZ;i7U3C#%kFJmTC+jkZ">
                                      <field name="BOOL">TRUE</field>
                                    </block>
                                  </value>
                                </block>
                              </value>
                              <statement name="DO0">
                                <block type="controls_if" id="09?,,2EP+_g3qIdzKQ9!">
                                  <mutation elseif="1" else="1"></mutation>
                                  <value name="IF0">
                                    <block type="logic_operation" id="zuG2C2rk:;Za}.Lrj-pi" inline="false">
                                      <field name="OP">OR</field>
                                      <value name="A">
                                        <block type="logic_compare" id=")O-7|;y09npok-y_s;xi">
                                          <field name="OP">EQ</field>
                                          <value name="A">
                                            <block type="get_value_var" id="[Kk:Cgtf21QQI591Ga/Z">
                                              <field name="ATTR">val</field>
                                              <value name="OID">
                                                <shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="l!pgo+GlmzwwC]_HI91`">
                                                  <field name="TEXT"></field>
                                                </shadow>
                                                <block type="variables_get" id="!|RO+tg}lwGLL-Pej?4p">
                                                  <field name="VAR" id="@Bz823N{#FDtr?!utT_^">pir_01</field>
                                                </block>
                                              </value>
                                            </block>
                                          </value>
                                          <value name="B">
                                            <block type="logic_boolean" id="s=N^7s!QM8EZ!(mqVN|p">
                                              <field name="BOOL">TRUE</field>
                                            </block>
                                          </value>
                                        </block>
                                      </value>
                                      <value name="B">
                                        <block type="logic_compare" id="-!zo65PRFGd6$*tak9@2">
                                          <field name="OP">EQ</field>
                                          <value name="A">
                                            <block type="get_value_var" id="SN;`|g13#K`Jza}JAJ[D">
                                              <field name="ATTR">val</field>
                                              <value name="OID">
                                                <shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="l!pgo+GlmzwwC]_HI91`">
                                                  <field name="TEXT"></field>
                                                </shadow>
                                                <block type="variables_get" id="FD5QuQkT/qYQlMe*NKaZ">
                                                  <field name="VAR" id="0I[}CDRB#1t;RiBC2c!N">pir_02</field>
                                                </block>
                                              </value>
                                            </block>
                                          </value>
                                          <value name="B">
                                            <block type="logic_boolean" id="A]D?RX],u~M!S5N%S:N{">
                                              <field name="BOOL">TRUE</field>
                                            </block>
                                          </value>
                                        </block>
                                      </value>
                                    </block>
                                  </value>
                                  <statement name="DO0">
                                    <block type="controls_if" id=";UN%Cl)(@D=Y,KA}2Nmv">
                                      <mutation else="1"></mutation>
                                      <value name="IF0">
                                        <block type="logic_operation" id="GjUv+]z0Msa=Pi4,I:oV" inline="false">
                                          <field name="OP">OR</field>
                                          <value name="A">
                                            <block type="logic_compare" id="+yk,-(9trX?JsdI[AT|:">
                                              <field name="OP">LTE</field>
                                              <value name="A">
                                                <block type="get_value_var" id="OXD;U1Q;-9Q7.!Djz`D;">
                                                  <field name="ATTR">val</field>
                                                  <value name="OID">
                                                    <shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="l!pgo+GlmzwwC]_HI91`">
                                                      <field name="TEXT"></field>
                                                    </shadow>
                                                    <block type="variables_get" id="SXXoJ_W7}7hHfR6dtN:O">
                                                      <field name="VAR" id=",RO*rmH)Gb7=:?$7ny,.">pir_lux_01</field>
                                                    </block>
                                                  </value>
                                                </block>
                                              </value>
                                              <value name="B">
                                                <block type="variables_get" id="#WWg!0nb[;hd2BjXuxyU">
                                                  <field name="VAR" id="l;ilJ`6Z6%G5EJ2clI_)">pir_lux_limit</field>
                                                </block>
                                              </value>
                                            </block>
                                          </value>
                                          <value name="B">
                                            <block type="logic_compare" id="eTUQ*ww|/ed@9;S%s}-j">
                                              <field name="OP">LTE</field>
                                              <value name="A">
                                                <block type="get_value_var" id="YK(7;gzM6dVPS:A73yEM">
                                                  <field name="ATTR">val</field>
                                                  <value name="OID">
                                                    <shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="l!pgo+GlmzwwC]_HI91`">
                                                      <field name="TEXT"></field>
                                                    </shadow>
                                                    <block type="variables_get" id="7m_{g`_/[MXWAl-`DC#.">
                                                      <field name="VAR" id="vS_F0r}]%+GePgY3vks8">pir_lux_02</field>
                                                    </block>
                                                  </value>
                                                </block>
                                              </value>
                                              <value name="B">
                                                <block type="variables_get" id="0%tca!9u76jk}{6-?%gU">
                                                  <field name="VAR" id="l;ilJ`6Z6%G5EJ2clI_)">pir_lux_limit</field>
                                                </block>
                                              </value>
                                            </block>
                                          </value>
                                        </block>
                                      </value>
                                      <statement name="DO0">
                                        <block type="controls_if" id="my:jHuH-uZ[heLt5odjN">
                                          <mutation else="1"></mutation>
                                          <value name="IF0">
                                            <block type="logic_operation" id="2@Oub9,o`$uLYKd#ike;" inline="false">
                                              <field name="OP">OR</field>
                                              <value name="A">
                                                <block type="logic_compare" id="fDk/.),o=!;r%8}@Oj((">
                                                  <field name="OP">EQ</field>
                                                  <value name="A">
                                                    <block type="get_value" id="MLk5m2`)K$Ln,8X1nzY,">
                                                      <field name="ATTR">val</field>
                                                      <field name="OID">0_userdata.0.GlobalVars.NightLightMode</field>
                                                    </block>
                                                  </value>
                                                  <value name="B">
                                                    <block type="logic_boolean" id="QU=Z,j)pD7B2@NT8DZT3">
                                                      <field name="BOOL">FALSE</field>
                                                    </block>
                                                  </value>
                                                </block>
                                              </value>
                                              <value name="B">
                                                <block type="logic_compare" id="|DV~^IlJv:Ox0YnUc(BZ">
                                                  <field name="OP">EQ</field>
                                                  <value name="A">
                                                    <block type="variables_get" id="/4K81(B*=/]_T^fFEX!p">
                                                      <field name="VAR" id="(5n|JY/|pl^WYG41i],:">IgnoreNightMode</field>
                                                    </block>
                                                  </value>
                                                  <value name="B">
                                                    <block type="logic_boolean" id="vhBU1H5MlSZkTK|)_(M4">
                                                      <field name="BOOL">TRUE</field>
                                                    </block>
                                                  </value>
                                                </block>
                                              </value>
                                            </block>
                                          </value>
                                          <statement name="DO0">
                                            <block type="controls_if" id="bd`D]$NJk`XfFoJR)D(9">
                                              <mutation else="1"></mutation>
                                              <value name="IF0">
                                                <block type="logic_compare" id="foMR6tBoUz!~0uvQ!h)/">
                                                  <field name="OP">EQ</field>
                                                  <value name="A">
                                                    <block type="variables_get" id="c{KA+=Oqc=kiOQpE$h^b">
                                                      <field name="VAR" id="dt+.dW.Wy09/+7%X.I|+">KeepOff</field>
                                                    </block>
                                                  </value>
                                                  <value name="B">
                                                    <block type="logic_boolean" id="F8Y;KnErl}VAcHtBaqV*">
                                                      <field name="BOOL">FALSE</field>
                                                    </block>
                                                  </value>
                                                </block>
                                              </value>
                                              <statement name="DO0">
                                                <block type="debug" id="{XM_Z[.V#$`fKe=q6]pi">
                                                  <field name="Severity">log</field>
                                                  <value name="TEXT">
                                                    <shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="g1ueDh_2oKR+gkXL:9pO">
                                                      <field name="TEXT">Schalte Licht AN</field>
                                                    </shadow>
                                                    <block type="procedures_callreturn" id="OT^6G[h;^:Iaf!H3(sI(">
                                                      <mutation name="SetSwitchlist">
                                                        <arg name="switches"></arg>
                                                        <arg name="TurnON"></arg>
                                                        <arg name="OFFTime"></arg>
                                                      </mutation>
                                                      <value name="ARG0">
                                                        <block type="variables_get" id="j]:ZsWiNYrm{qG~5`8FR">
                                                          <field name="VAR" id="xjjCO3x]~#p7S0:#%i0_">switches</field>
                                                        </block>
                                                      </value>
                                                      <value name="ARG1">
                                                        <block type="logic_boolean" id="Xm$Z%t5Txvj2h*3@(z/d">
                                                          <field name="BOOL">TRUE</field>
                                                        </block>
                                                      </value>
                                                      <value name="ARG2">
                                                        <block type="math_number" id="rM2-%6M0Aws#{Yq}[fW#">
                                                          <field name="NUM">0</field>
                                                        </block>
                                                      </value>
                                                    </block>
                                                  </value>
                                                </block>
                                              </statement>
                                              <statement name="ELSE">
                                                <block type="debug" id="KGn4QdU`T-)yKwG+iNN^">
                                                  <field name="Severity">log</field>
                                                  <value name="TEXT">
                                                    <shadow type="text" id="Mie1Y-G5Qe_DU9A]RORD">
                                                      <field name="TEXT">KeepOff aktiv</field>
                                                    </shadow>
                                                  </value>
                                                </block>
                                              </statement>
                                            </block>
                                          </statement>
                                          <statement name="ELSE">
                                            <block type="debug" id="$[}zC!R!}1DzHgyjg]7Y">
                                              <field name="Severity">log</field>
                                              <value name="TEXT">
                                                <shadow type="text" id="oj7c6l7Jo.9P?{BQn]bz">
                                                  <field name="TEXT">NightMode ist aktiviert</field>
                                                </shadow>
                                              </value>
                                            </block>
                                          </statement>
                                        </block>
                                      </statement>
                                      <statement name="ELSE">
                                        <block type="debug" id=",Ym^I`tBP[(f/~}UUyvZ">
                                          <field name="Severity">log</field>
                                          <value name="TEXT">
                                            <shadow type="text" id="5p]hJo6He4uf],!kf/f1">
                                              <field name="TEXT">Lux-Limit nicht erreicht</field>
                                            </shadow>
                                          </value>
                                        </block>
                                      </statement>
                                    </block>
                                  </statement>
                                  <value name="IF1">
                                    <block type="logic_operation" id="Y9HcpuFnRwAcU+DRYnzs" inline="false">
                                      <field name="OP">AND</field>
                                      <value name="A">
                                        <block type="logic_compare" id="}fhd$Qugm+Y_NZAUow?L">
                                          <field name="OP">EQ</field>
                                          <value name="A">
                                            <block type="get_value_var" id="EA}#b?R`A;Z9O]1ifL/U">
                                              <field name="ATTR">val</field>
                                              <value name="OID">
                                                <shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="..N%+1lwIwm=r.aG-acQ">
                                                  <field name="TEXT"></field>
                                                </shadow>
                                                <block type="variables_get" id="w,;R}@a)@_pkf$S(4pL!">
                                                  <field name="VAR" id="@Bz823N{#FDtr?!utT_^">pir_01</field>
                                                </block>
                                              </value>
                                            </block>
                                          </value>
                                          <value name="B">
                                            <block type="logic_boolean" id="B04@`]HK4baj1{WnXJ@R">
                                              <field name="BOOL">FALSE</field>
                                            </block>
                                          </value>
                                        </block>
                                      </value>
                                      <value name="B">
                                        <block type="logic_compare" id="Aj1mhM#}c4:VCVxv`wf!">
                                          <field name="OP">EQ</field>
                                          <value name="A">
                                            <block type="get_value_var" id="77)-SO(|n.sYV?!*uk-v">
                                              <field name="ATTR">val</field>
                                              <value name="OID">
                                                <shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="..N%+1lwIwm=r.aG-acQ">
                                                  <field name="TEXT"></field>
                                                </shadow>
                                                <block type="variables_get" id="wWyw1M_Qu-i{]+ZB1:y2">
                                                  <field name="VAR" id="0I[}CDRB#1t;RiBC2c!N">pir_02</field>
                                                </block>
                                              </value>
                                            </block>
                                          </value>
                                          <value name="B">
                                            <block type="logic_boolean" id="B1cUqzunb:@p4kyyFAQc">
                                              <field name="BOOL">FALSE</field>
                                            </block>
                                          </value>
                                        </block>
                                      </value>
                                    </block>
                                  </value>
                                  <statement name="DO1">
                                    <block type="controls_if" id="gP1*@4yos%O0lP;b}pNB">
                                      <mutation else="1"></mutation>
                                      <value name="IF0">
                                        <block type="logic_compare" id="%6q}y6+`0U.pq2g#.2]d">
                                          <field name="OP">EQ</field>
                                          <value name="A">
                                            <block type="variables_get" id="veC@9j2mM%s%VV6699[[">
                                              <field name="VAR" id="VpvRaw-o{?h#_.0;LXn;">KeepOn</field>
                                            </block>
                                          </value>
                                          <value name="B">
                                            <block type="logic_boolean" id="/O~8zybjznA@dt-c@aOL">
                                              <field name="BOOL">FALSE</field>
                                            </block>
                                          </value>
                                        </block>
                                      </value>
                                      <statement name="DO0">
                                        <block type="debug" id="K_%4zoRRL,YF:}lvWA=P">
                                          <field name="Severity">log</field>
                                          <value name="TEXT">
                                            <shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="EEDPy`ac^p!TSLb$aq::">
                                              <field name="TEXT">warte einen moment bis aus</field>
                                            </shadow>
                                            <block type="text_join" id="D;c]Ryf7si+PeeL0=!N^">
                                              <mutation items="3"></mutation>
                                              <value name="ADD0">
                                                <block type="text" id="Z/70*s;axS=/Id:=X^q8">
                                                  <field name="TEXT">Warte </field>
                                                </block>
                                              </value>
                                              <value name="ADD1">
                                                <block type="variables_get" id="O4TW=,f+N0AaVd*MiNvO">
                                                  <field name="VAR" id=".vDs7L59v=fy*rrUz[gY">OFFTime</field>
                                                </block>
                                              </value>
                                              <value name="ADD2">
                                                <block type="text" id="wiGGDqtwX]z#pXf%mdvW">
                                                  <field name="TEXT"> Minuten bis OFF</field>
                                                </block>
                                              </value>
                                            </block>
                                          </value>
                                          <next>
                                            <block type="debug" id="15rPv#n#;3jitxTUDEIT">
                                              <field name="Severity">log</field>
                                              <value name="TEXT">
                                                <shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="g1ueDh_2oKR+gkXL:9pO">
                                                  <field name="TEXT">Schalte Licht AN</field>
                                                </shadow>
                                                <block type="procedures_callreturn" id="*k?WNwCJ0aPyUlzN#a+w">
                                                  <mutation name="SetSwitchlist">
                                                    <arg name="switches"></arg>
                                                    <arg name="TurnON"></arg>
                                                    <arg name="OFFTime"></arg>
                                                  </mutation>
                                                  <value name="ARG0">
                                                    <block type="variables_get" id="ZX.1a@SjH4vzl@:UEBd4">
                                                      <field name="VAR" id="xjjCO3x]~#p7S0:#%i0_">switches</field>
                                                    </block>
                                                  </value>
                                                  <value name="ARG1">
                                                    <block type="logic_boolean" id="7iFP3(LXB6rzjk!lsYqP">
                                                      <field name="BOOL">FALSE</field>
                                                    </block>
                                                  </value>
                                                  <value name="ARG2">
                                                    <block type="variables_get" id="|_#g|ZY2ShK[%eT-/nR8">
                                                      <field name="VAR" id=".vDs7L59v=fy*rrUz[gY">OFFTime</field>
                                                    </block>
                                                  </value>
                                                </block>
                                              </value>
                                              <next>
                                                <block type="debug" id="!xYW,+B]Db9[aIwPo,C!">
                                                  <field name="Severity">log</field>
                                                  <value name="TEXT">
                                                    <shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="g1ueDh_2oKR+gkXL:9pO">
                                                      <field name="TEXT">Schalte Licht AN</field>
                                                    </shadow>
                                                    <block type="procedures_callreturn" id="/fW6EVniBm487}BR6x$N">
                                                      <mutation name="SetSwitchlist">
                                                        <arg name="switches"></arg>
                                                        <arg name="TurnON"></arg>
                                                        <arg name="OFFTime"></arg>
                                                      </mutation>
                                                      <value name="ARG0">
                                                        <block type="variables_get" id="dWrb*+`1}G$e|Dtk}lSg">
                                                          <field name="VAR" id="v5r*F/J_D*#a2B^L/XDs">extraOFFswitches</field>
                                                        </block>
                                                      </value>
                                                      <value name="ARG1">
                                                        <block type="logic_boolean" id="?Q]jg}0S{r1=6qR?QVBy">
                                                          <field name="BOOL">FALSE</field>
                                                        </block>
                                                      </value>
                                                      <value name="ARG2">
                                                        <block type="variables_get" id="ZHEfb=L^*DR$G~S,aaUU">
                                                          <field name="VAR" id=".vDs7L59v=fy*rrUz[gY">OFFTime</field>
                                                        </block>
                                                      </value>
                                                    </block>
                                                  </value>
                                                </block>
                                              </next>
                                            </block>
                                          </next>
                                        </block>
                                      </statement>
                                      <statement name="ELSE">
                                        <block type="debug" id="RoF6h7sWR!@iX!pzB:PJ">
                                          <field name="Severity">log</field>
                                          <value name="TEXT">
                                            <shadow type="text" id="e)Z3x84fp]xeIVE$kQyL">
                                              <field name="TEXT">KeepOn aktiv</field>
                                            </shadow>
                                          </value>
                                        </block>
                                      </statement>
                                    </block>
                                  </statement>
                                  <statement name="ELSE">
                                    <block type="debug" id="YqWeRdU|(Tbc6l?nx)rT">
                                      <field name="Severity">log</field>
                                      <value name="TEXT">
                                        <shadow type="text" id="7R:0S=+L;a~6g,e@izq.">
                                          <field name="TEXT">Diese Ausgabe sollte nie kommen</field>
                                        </shadow>
                                      </value>
                                      <next>
                                        <block type="debug" id="AcmL]1^kiJ?y63QM+{WT" collapsed="true" disabled="true">
                                          <field name="Severity">warn</field>
                                          <value name="TEXT">
                                            <shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="i1Fbtc$Ax`kx:je)u(z?">
                                              <field name="TEXT">test</field>
                                            </shadow>
                                            <block type="text_join" id="rpCEJ)?!!49X)k0/*i/!">
                                              <mutation items="19"></mutation>
                                              <value name="ADD0">
                                                <block type="variables_get" id="c,qbd7Q(nCTXLaHb4OU%">
                                                  <field name="VAR" id="IX/gU^R_Zpb]{vD5A]Sn">RoomName</field>
                                                </block>
                                              </value>
                                              <value name="ADD1">
                                                <block type="text_newline" id="%Ik4z(5$X/?J+jQubsu4">
                                                  <field name="Type">\n</field>
                                                </block>
                                              </value>
                                              <value name="ADD2">
                                                <block type="text_join" id="2XGYG631?#H6eU%]_CR*">
                                                  <mutation items="2"></mutation>
                                                  <value name="ADD0">
                                                    <block type="text" id="hG7Wb)xULJV+|Lg0of%r">
                                                      <field name="TEXT">pir1: </field>
                                                    </block>
                                                  </value>
                                                  <value name="ADD1">
                                                    <block type="get_value_var" id=":[^;#--,=6lsmqN5syA7">
                                                      <field name="ATTR">val</field>
                                                      <value name="OID">
                                                        <shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="KWLPWGd)pP|x?)+`Fpf]">
                                                          <field name="TEXT"></field>
                                                        </shadow>
                                                        <block type="variables_get" id="6+zw,fJ7?_~ju*Z;%of@">
                                                          <field name="VAR" id="@Bz823N{#FDtr?!utT_^">pir_01</field>
                                                        </block>
                                                      </value>
                                                    </block>
                                                  </value>
                                                </block>
                                              </value>
                                              <value name="ADD3">
                                                <block type="text_newline" id="I=LXvd%[2Pk6i/X[u;0*">
                                                  <field name="Type">\n</field>
                                                </block>
                                              </value>
                                              <value name="ADD4">
                                                <block type="text_join" id="c{QG4zZ?l~4*1^wok/pQ">
                                                  <mutation items="2"></mutation>
                                                  <value name="ADD0">
                                                    <block type="text" id="M{GSL,`(~}pQ#2U67wOa">
                                                      <field name="TEXT">pir2: </field>
                                                    </block>
                                                  </value>
                                                  <value name="ADD1">
                                                    <block type="get_value_var" id=")!UYW.hyznN:gQ;SdzE#">
                                                      <field name="ATTR">val</field>
                                                      <value name="OID">
                                                        <shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="(VS#ar)mX#FH0??a`YpE">
                                                          <field name="TEXT"></field>
                                                        </shadow>
                                                        <block type="variables_get" id="%;,.b-1n3Q`x=i_P[4vm">
                                                          <field name="VAR" id="0I[}CDRB#1t;RiBC2c!N">pir_02</field>
                                                        </block>
                                                      </value>
                                                    </block>
                                                  </value>
                                                </block>
                                              </value>
                                              <value name="ADD5">
                                                <block type="text_newline" id="Q{AczwXB+2+H_GY^V!^n">
                                                  <field name="Type">\n</field>
                                                </block>
                                              </value>
                                              <value name="ADD6">
                                                <block type="text_join" id="32C,uF1^t#{UHw0][q93">
                                                  <mutation items="2"></mutation>
                                                  <value name="ADD0">
                                                    <block type="text" id="dFa:8_P}IR^_:nz_z_dO">
                                                      <field name="TEXT">globallux: </field>
                                                    </block>
                                                  </value>
                                                  <value name="ADD1">
                                                    <block type="variables_get" id=",Or5XiX-3X^JCPc$TZXR">
                                                      <field name="VAR" id="Z}*@ZQ],86inGv;ML!G/">GlobalLuxLimit</field>
                                                    </block>
                                                  </value>
                                                </block>
                                              </value>
                                              <value name="ADD7">
                                                <block type="text_newline" id="9=A#2My=k/T0#yX4}O3N">
                                                  <field name="Type">\n</field>
                                                </block>
                                              </value>
                                              <value name="ADD8">
                                                <block type="text_join" id="!pl#DxkwBOo[#FmhEU][">
                                                  <mutation items="2"></mutation>
                                                  <value name="ADD0">
                                                    <block type="text" id="Q3h@!@QF_[k]vWzB5_2.">
                                                      <field name="TEXT">pirlux1: </field>
                                                    </block>
                                                  </value>
                                                  <value name="ADD1">
                                                    <block type="get_value_var" id="[,6n}%mfloy_0]eXm:Gq">
                                                      <field name="ATTR">val</field>
                                                      <value name="OID">
                                                        <shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="D1(g!9bHQJTuB3|[v(_c">
                                                          <field name="TEXT"></field>
                                                        </shadow>
                                                        <block type="variables_get" id="1NDs=?3k6Cyr`FPFfx3%">
                                                          <field name="VAR" id=",RO*rmH)Gb7=:?$7ny,.">pir_lux_01</field>
                                                        </block>
                                                      </value>
                                                    </block>
                                                  </value>
                                                </block>
                                              </value>
                                              <value name="ADD9">
                                                <block type="text_newline" id="JNAUqM;Cc/t[Nw^,glSw">
                                                  <field name="Type">\n</field>
                                                </block>
                                              </value>
                                              <value name="ADD10">
                                                <block type="text_join" id="swNic27o0_au*F^3ZCKd">
                                                  <mutation items="2"></mutation>
                                                  <value name="ADD0">
                                                    <block type="text" id="vr}:sf4i]:8k!nl:T}:,">
                                                      <field name="TEXT">pirlux2: </field>
                                                    </block>
                                                  </value>
                                                  <value name="ADD1">
                                                    <block type="get_value_var" id="#AuZ%*phOL2fIynrTg+V">
                                                      <field name="ATTR">val</field>
                                                      <value name="OID">
                                                        <shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="ZJ|8Hav~G`]Cw(k/cChq">
                                                          <field name="TEXT"></field>
                                                        </shadow>
                                                        <block type="variables_get" id="U^gz2:[g-S*=I`i)3O~m">
                                                          <field name="VAR" id="vS_F0r}]%+GePgY3vks8">pir_lux_02</field>
                                                        </block>
                                                      </value>
                                                    </block>
                                                  </value>
                                                </block>
                                              </value>
                                              <value name="ADD11">
                                                <block type="text_newline" id="tQp]vzu1j),1zqnA=%kI">
                                                  <field name="Type">\n</field>
                                                </block>
                                              </value>
                                              <value name="ADD12">
                                                <block type="text_join" id="6`CpDnDEH3fD$y$Tr.3`">
                                                  <mutation items="2"></mutation>
                                                  <value name="ADD0">
                                                    <block type="text" id="hvc9H|$dYS/([AXNBRu8">
                                                      <field name="TEXT">keepoff: </field>
                                                    </block>
                                                  </value>
                                                  <value name="ADD1">
                                                    <block type="variables_get" id="9Cu!b{}G1U%p%_cAT]8{">
                                                      <field name="VAR" id="dt+.dW.Wy09/+7%X.I|+">KeepOff</field>
                                                    </block>
                                                  </value>
                                                </block>
                                              </value>
                                              <value name="ADD13">
                                                <block type="text_newline" id="Xh.~^jNAi8vQfu,XBwY/">
                                                  <field name="Type">\n</field>
                                                </block>
                                              </value>
                                              <value name="ADD14">
                                                <block type="text_join" id="PIJsihRA^q^8=b^R[iQ9">
                                                  <mutation items="2"></mutation>
                                                  <value name="ADD0">
                                                    <block type="text" id="VRS.ox6#^x38buHk*P8[">
                                                      <field name="TEXT">keepon: </field>
                                                    </block>
                                                  </value>
                                                  <value name="ADD1">
                                                    <block type="variables_get" id="0ysKwoLmG^d{,=-Kh4C:">
                                                      <field name="VAR" id="VpvRaw-o{?h#_.0;LXn;">KeepOn</field>
                                                    </block>
                                                  </value>
                                                </block>
                                              </value>
                                              <value name="ADD15">
                                                <block type="text_newline" id="}0CIvBLSU)hH!zF)*Cr@">
                                                  <field name="Type">\n</field>
                                                </block>
                                              </value>
                                              <value name="ADD16">
                                                <block type="text_join" id="qZ5C%ICEMmGMSwQVpzkF">
                                                  <mutation items="2"></mutation>
                                                  <value name="ADD0">
                                                    <block type="text" id="UG`[U$3_0K}:PCnWdN7y">
                                                      <field name="TEXT">offtime: </field>
                                                    </block>
                                                  </value>
                                                  <value name="ADD1">
                                                    <block type="variables_get" id="gK{}F7N:?$FLcHumKGSD">
                                                      <field name="VAR" id=".vDs7L59v=fy*rrUz[gY">OFFTime</field>
                                                    </block>
                                                  </value>
                                                </block>
                                              </value>
                                              <value name="ADD17">
                                                <block type="text_newline" id="jfKTL$`gU)~]mK(.q|l9">
                                                  <field name="Type">\n</field>
                                                </block>
                                              </value>
                                              <value name="ADD18">
                                                <block type="text_join" id="|{:o[_0#lDt!rr++hzFw">
                                                  <mutation items="2"></mutation>
                                                  <value name="ADD0">
                                                    <block type="text" id="OH5gl[1+!/]+TT+I+)]X">
                                                      <field name="TEXT">switches: </field>
                                                    </block>
                                                  </value>
                                                  <value name="ADD1">
                                                    <block type="variables_get" id="{7JOz9JWX{|Kgb2i[]m}">
                                                      <field name="VAR" id="xjjCO3x]~#p7S0:#%i0_">switches</field>
                                                    </block>
                                                  </value>
                                                </block>
                                              </value>
                                            </block>
                                          </value>
                                        </block>
                                      </next>
                                    </block>
                                  </statement>
                                </block>
                              </statement>
                              <statement name="ELSE">
                                <block type="debug" id="4w2|1F,M`I5e77zwa.ns">
                                  <field name="Severity">log</field>
                                  <value name="TEXT">
                                    <shadow type="text" id="bbxou~4]2_z*wGe#{4[k">
                                      <field name="TEXT">AutoLight ist deaktiviert</field>
                                    </shadow>
                                  </value>
                                </block>
                              </statement>
                              <next>
                                <block type="comment" id="hoxnMLgQ2aNN0m=5Y:}m">
                                  <field name="COMMENT">AtHomeTimer</field>
                                  <next>
                                    <block type="controls_if" id="v*U[9UI_|4@c)yiirCvb">
                                      <value name="IF0">
                                        <block type="logic_compare" id="}W#E1zCXZitL.S|r_*u,">
                                          <field name="OP">EQ</field>
                                          <value name="A">
                                            <block type="get_value" id=",Nlb[/RysL/LlIrpQ+e.">
                                              <field name="ATTR">val</field>
                                              <field name="OID">0_userdata.0.GlobalVars.AtHome</field>
                                            </block>
                                          </value>
                                          <value name="B">
                                            <block type="logic_boolean" id="sOIRl}w5*9@4|Cu}Qa?F">
                                              <field name="BOOL">FALSE</field>
                                            </block>
                                          </value>
                                        </block>
                                      </value>
                                      <statement name="DO0">
                                        <block type="debug" id="vcPx3~z~f}j@TgeL8)8S">
                                          <field name="Severity">debug</field>
                                          <value name="TEXT">
                                            <shadow type="text" id="{V%?2,E+`DP%Jt6u@jBz">
                                              <field name="TEXT">Schalte OFF in 10 Minuten weil nicht zuhause</field>
                                            </shadow>
                                          </value>
                                          <next>
                                            <block type="comment" id="RVtp!r)ays=b{:K7RYxJ">
                                              <field name="COMMENT">AtHomeTimer</field>
                                              <next>
                                                <block type="debug" id="jQU}W-zBlE`x1UT+%n.v">
                                                  <field name="Severity">debug</field>
                                                  <value name="TEXT">
                                                    <shadow type="text" id="397}R%`ouk+n%Ab}WH%%">
                                                      <field name="TEXT">Schalte OFF weil nicht zuhause</field>
                                                    </shadow>
                                                  </value>
                                                  <next>
                                                    <block type="debug" id="zFy.s;7+hO@}w7+K1uY[">
                                                      <field name="Severity">log</field>
                                                      <value name="TEXT">
                                                        <shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="g1ueDh_2oKR+gkXL:9pO">
                                                          <field name="TEXT">Schalte Licht AN</field>
                                                        </shadow>
                                                        <block type="procedures_callreturn" id="~mNhEHA+,LT?rX%eZ2lR">
                                                          <mutation name="SetSwitchlist">
                                                            <arg name="switches"></arg>
                                                            <arg name="TurnON"></arg>
                                                            <arg name="OFFTime"></arg>
                                                          </mutation>
                                                          <value name="ARG0">
                                                            <block type="variables_get" id="_Yf;JY5.:8UL{r9*yAn;">
                                                              <field name="VAR" id="xjjCO3x]~#p7S0:#%i0_">switches</field>
                                                            </block>
                                                          </value>
                                                          <value name="ARG1">
                                                            <block type="logic_boolean" id="f%n5w^9=kBCnrPPhJn;=">
                                                              <field name="BOOL">FALSE</field>
                                                            </block>
                                                          </value>
                                                          <value name="ARG2">
                                                            <block type="math_number" id="i_ImUcS(?61s*B~NN-39">
                                                              <field name="NUM">10</field>
                                                            </block>
                                                          </value>
                                                        </block>
                                                      </value>
                                                    </block>
                                                  </next>
                                                </block>
                                              </next>
                                            </block>
                                          </next>
                                        </block>
                                      </statement>
                                    </block>
                                  </next>
                                </block>
                              </next>
                            </block>
                          </next>
                        </block>
                      </next>
                    </block>
                  </next>
                </block>
              </next>
            </block>
          </statement>
          <value name="RETURN">
            <block type="text_join" id="!bwM/xMn9lV`jZFwfsa/">
              <mutation items="2"></mutation>
              <value name="ADD0">
                <block type="text" id="NjBm7Pn=DYJEAIm@_6UC">
                  <field name="TEXT">PIR Done: </field>
                </block>
              </value>
              <value name="ADD1">
                <block type="variables_get" id="u_!p(H,3VMjs5mEvL+43">
                  <field name="VAR" id="IX/gU^R_Zpb]{vD5A]Sn">RoomName</field>
                </block>
              </value>
            </block>
          </value>
        </block>
        <block type="on_ext" id=";^LGVCUKOD;aGmWXc=c6" x="13" y="3188">
          <mutation xmlns="http://www.w3.org/1999/xhtml" items="4"></mutation>
          <field name="CONDITION">ne</field>
          <field name="ACK_CONDITION"></field>
          <value name="OID0">
            <shadow xmlns="http://www.w3.org/1999/xhtml" type="field_oid" id="=Z_mw^?rB%bQC7u}kx|%">
              <field name="oid">deconz.0.Sensors.40.presence</field>
            </shadow>
            <block type="field_oid" id="JsYO^Vgi0)-y|F+^oviC">
              <field name="oid">0_userdata.0.GlobalVars.AtHome</field>
            </block>
          </value>
          <value name="OID1">
            <shadow xmlns="http://www.w3.org/1999/xhtml" type="field_oid" id="$nQiwk=`v3y=fQ]PvUN0">
              <field name="oid">default</field>
            </shadow>
            <block type="field_oid" id="[}`A:Y9U/u;5q,+v,W48">
              <field name="oid">deconz.0.Sensors.25.presence</field>
            </block>
          </value>
          <value name="OID2">
            <shadow xmlns="http://www.w3.org/1999/xhtml" type="field_oid" id="]e+nkTtwhknTJrrtFP4I">
              <field name="oid">default</field>
            </shadow>
            <block type="field_oid" id="N#U0xQObgj/`[$L^lonm">
              <field name="oid">deconz.0.Sensors.12.presence</field>
            </block>
          </value>
          <value name="OID3">
            <shadow type="field_oid" id="O;xK`Y0:=Myj8klNmIBi">
              <field name="oid">default</field>
            </shadow>
            <block type="field_oid" id="A{Zk{I]]+wwcj:MI]+He">
              <field name="oid">0_userdata.0.GlobalVars.Wohnzimmer_TV</field>
            </block>
          </value>
          <statement name="STATEMENT">
            <block type="debug" id="u8|~_n$bA:aWJ`UqCTFC">
              <field name="Severity">log</field>
              <value name="TEXT">
                <shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="ynfu|Z|NikvpCQ:1o:BB">
                  <field name="TEXT">test</field>
                </shadow>
                <block type="procedures_callreturn" id="nLv0b%CGK37Z)cY~zw/z">
                  <mutation name="PIROnOff">
                    <arg name="RoomName"></arg>
                    <arg name="pir_01"></arg>
                    <arg name="pir_02"></arg>
                    <arg name="pir_lux_01"></arg>
                    <arg name="pir_lux_02"></arg>
                    <arg name="pir_lux_limit"></arg>
                    <arg name="switches"></arg>
                    <arg name="extraOFFswitches"></arg>
                    <arg name="OFFTime"></arg>
                    <arg name="KeepOn"></arg>
                    <arg name="KeepOff"></arg>
                    <arg name="IgnoreNightMode"></arg>
                  </mutation>
                  <value name="ARG0">
                    <block type="text" id="}I(7Bqqm)_X~_X|bEiB1">
                      <field name="TEXT">Wohnzimmer</field>
                    </block>
                  </value>
                  <value name="ARG1">
                    <block type="field_oid" id="d`u(D,@Raq%;fP4CKEJt">
                      <field name="oid">deconz.0.Sensors.25.presence</field>
                    </block>
                  </value>
                  <value name="ARG2">
                    <block type="field_oid" id="NUjj.[urXP,8St`J=il:">
                      <field name="oid">deconz.0.Sensors.12.presence</field>
                    </block>
                  </value>
                  <value name="ARG3">
                    <block type="field_oid" id="c4R}~dbft8bbBgzDj3|r">
                      <field name="oid">deconz.0.Sensors.26.lux</field>
                    </block>
                  </value>
                  <value name="ARG4">
                    <block type="field_oid" id="{^ndJH5O0Hu5[@t(aCqz">
                      <field name="oid">deconz.0.Sensors.11.lux</field>
                    </block>
                  </value>
                  <value name="ARG5">
                    <block type="variables_get" id="vO{DatzV5%jA(Um]`XI*">
                      <field name="VAR" id="Z}*@ZQ],86inGv;ML!G/">GlobalLuxLimit</field>
                    </block>
                  </value>
                  <value name="ARG6">
                    <block type="procedures_callreturn" id="4b:WqC9H[=9`.[Ojfj?}">
                      <mutation name="wz_select_device"></mutation>
                    </block>
                  </value>
                  <value name="ARG7">
                    <block type="lists_create_with" id="c*D~`u7fuL5XaFK,!dJj">
                      <mutation items="7"></mutation>
                      <value name="ADD0">
                        <block type="field_oid" id="l;tyX^aUS_sSz%qL*TA)">
                          <field name="oid">deconz.0.Lights.21.on</field>
                        </block>
                      </value>
                      <value name="ADD1">
                        <block type="field_oid" id="t30:yg6P5=n3yIO$o^JK">
                          <field name="oid">deconz.0.Lights.22.on</field>
                        </block>
                      </value>
                      <value name="ADD2">
                        <block type="field_oid" id="mTIp`Y(Qt[?)#9bwPzRW">
                          <field name="oid">deconz.0.Lights.25.on</field>
                        </block>
                      </value>
                      <value name="ADD3">
                        <block type="field_oid" id="8ERU2+Cpj6jc128qe|Y!">
                          <field name="oid">deconz.0.Lights.26.on</field>
                        </block>
                      </value>
                      <value name="ADD4">
                        <block type="field_oid" id="F.g)-!0lCT):XZgMp@y,">
                          <field name="oid">milight-smart-light.2.wz_tv.fullColor-1.on</field>
                        </block>
                      </value>
                      <value name="ADD5">
                        <block type="field_oid" id="-Pi@+Lq]TB1.=9-_3Bdk">
                          <field name="oid">deconz.0.Lights.2.on</field>
                        </block>
                      </value>
                      <value name="ADD6">
                        <block type="field_oid" id="#t5{77?jGUrm/b@71+d]">
                          <field name="oid">scene.0.Szene_pir-wohnzimmer</field>
                        </block>
                      </value>
                    </block>
                  </value>
                  <value name="ARG8">
                    <block type="math_number" id="DpGu,O=HhqM~YNvwYd(q">
                      <field name="NUM">15</field>
                    </block>
                  </value>
                  <value name="ARG9">
                    <block type="get_value_var" id="`0Sf$59Dvioli#0BigAu">
                      <field name="ATTR">val</field>
                      <value name="OID">
                        <shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="clv1]niZbc4686`koi;*">
                          <field name="TEXT"></field>
                        </shadow>
                        <block type="field_oid" id="[aYgpU8$]POx,/._r.ZL">
                          <field name="oid">0_userdata.0.GlobalVars.Wohnzimmer_TV</field>
                        </block>
                      </value>
                    </block>
                  </value>
                  <value name="ARG10">
                    <block type="logic_boolean" id="RwUt,vY#EAiFlDjIpHC1">
                      <field name="BOOL">FALSE</field>
                    </block>
                  </value>
                  <value name="ARG11">
                    <block type="logic_boolean" id="hD~{MtehXnYitYJ:{oei">
                      <field name="BOOL">FALSE</field>
                    </block>
                  </value>
                </block>
              </value>
            </block>
          </statement>
        </block>
        <block type="procedures_defreturn" id="97)riRpuhw.aXAyJOQ#[" x="13" y="3913">
          <mutation>
            <arg name="switches" varid="xjjCO3x]~#p7S0:#%i0_"></arg>
            <arg name="TurnON" varid="N=.oocr,|f!EjH[T#m4W"></arg>
            <arg name="OFFTime" varid=".vDs7L59v=fy*rrUz[gY"></arg>
          </mutation>
          <field name="NAME">SetSwitchlist</field>
          <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment>
          <statement name="STACK">
            <block type="controls_forEach" id="?W@B=92zUWf^!ER$H:2S">
              <field name="VAR" id="#DF~YDx#7HA~2_~c}$P?">switch</field>
              <value name="LIST">
                <block type="variables_get" id="cFsXd};PL_5F@w6(c(Qg">
                  <field name="VAR" id="xjjCO3x]~#p7S0:#%i0_">switches</field>
                </block>
              </value>
              <statement name="DO">
                <block type="controls_if" id="~kwRL!VPw_s!Z|Lw:Y=t">
                  <mutation else="1"></mutation>
                  <value name="IF0">
                    <block type="variables_get" id="~Hs{Nb8!2FayVhlmP{_o">
                      <field name="VAR" id="#DF~YDx#7HA~2_~c}$P?">switch</field>
                    </block>
                  </value>
                  <statement name="DO0">
                    <block type="debug" id="gjY2qE}KLN:vNc$SoY~/">
                      <field name="Severity">log</field>
                      <value name="TEXT">
                        <shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="6Lv/kM);m|r--.+Hld*_">
                          <field name="TEXT">test</field>
                        </shadow>
                        <block type="text_join" id="N7@;X%^/S.U5nHl*eN=T">
                          <mutation items="6"></mutation>
                          <value name="ADD0">
                            <block type="text" id="yG%!Tu:2Cm3+)#s)HGga">
                              <field name="TEXT">Schalte: </field>
                            </block>
                          </value>
                          <value name="ADD1">
                            <block type="variables_get" id="|Wz|g-AiGzZSF(sbV,7L">
                              <field name="VAR" id="#DF~YDx#7HA~2_~c}$P?">switch</field>
                            </block>
                          </value>
                          <value name="ADD2">
                            <block type="text" id="gTBof0-WEUX0K|/%@NqH">
                              <field name="TEXT"> - </field>
                            </block>
                          </value>
                          <value name="ADD3">
                            <block type="variables_get" id="SF|0p5(O[YcG%OBo}h3w">
                              <field name="VAR" id="N=.oocr,|f!EjH[T#m4W">TurnON</field>
                            </block>
                          </value>
                          <value name="ADD4">
                            <block type="text" id=".y0Iqt1N6.gIv/P9fYSd">
                              <field name="TEXT"> - delay </field>
                            </block>
                          </value>
                          <value name="ADD5">
                            <block type="variables_get" id="-3KJjwlYCU;SI:}WNZz@">
                              <field name="VAR" id=".vDs7L59v=fy*rrUz[gY">OFFTime</field>
                            </block>
                          </value>
                        </block>
                      </value>
                      <next>
                        <block type="control_ex" id="79VIhFd[8OR7W~)]+Q7u">
                          <field name="TYPE">false</field>
                          <field name="CLEAR_RUNNING">TRUE</field>
                          <value name="OID">
                            <shadow xmlns="http://www.w3.org/1999/xhtml" type="field_oid" id=",6QIA.:kmqHzLpOpp8{;">
                              <field name="oid">Object ID</field>
                            </shadow>
                            <block type="variables_get" id="G:^~pH88w+vU!!SqMNx^">
                              <field name="VAR" id="#DF~YDx#7HA~2_~c}$P?">switch</field>
                            </block>
                          </value>
                          <value name="VALUE">
                            <shadow xmlns="http://www.w3.org/1999/xhtml" type="logic_boolean" id="M)y7lc35WCOB-sP@0.+Y">
                              <field name="BOOL">TRUE</field>
                            </shadow>
                            <block type="variables_get" id="CRtJGnM(7mlyCrjtAS#2">
                              <field name="VAR" id="N=.oocr,|f!EjH[T#m4W">TurnON</field>
                            </block>
                          </value>
                          <value name="DELAY_MS">
                            <shadow xmlns="http://www.w3.org/1999/xhtml" type="math_number" id="*6fVY^7+fvHLGB^6ICUb">
                              <field name="NUM">0</field>
                            </shadow>
                            <block type="math_arithmetic" id="pM[;2Up_AS8vj(_EDMK)">
                              <field name="OP">ADD</field>
                              <value name="A">
                                <shadow xmlns="http://www.w3.org/1999/xhtml" type="math_number" id="bVbb!f6+5,f}Wl`KX4^f">
                                  <field name="NUM">1</field>
                                </shadow>
                                <block type="math_arithmetic" id="JrRlB#cNt~OPNxUEH.;#">
                                  <field name="OP">MULTIPLY</field>
                                  <value name="A">
                                    <shadow xmlns="http://www.w3.org/1999/xhtml" type="math_number" id="G{^vO}H,^Q{6{Y#)%NQE">
                                      <field name="NUM">10</field>
                                    </shadow>
                                    <block type="variables_get" id="bZmmlv;6v=s;zh!Gb/h0">
                                      <field name="VAR" id=".vDs7L59v=fy*rrUz[gY">OFFTime</field>
                                    </block>
                                  </value>
                                  <value name="B">
                                    <shadow type="math_number" id="``T4@SD7}ao:1:$~a5?R">
                                      <field name="NUM">60000</field>
                                    </shadow>
                                  </value>
                                </block>
                              </value>
                              <value name="B">
                                <shadow xmlns="http://www.w3.org/1999/xhtml" type="math_number" id="*61~~OTr35.DVn~j@84c">
                                  <field name="NUM">1</field>
                                </shadow>
                                <block type="math_random_int" id="Dvdm;BUT|h?pR6|d8Ncr">
                                  <value name="FROM">
                                    <shadow type="math_number" id="My|V/L|ec}ckrD)G)|2n">
                                      <field name="NUM">1</field>
                                    </shadow>
                                  </value>
                                  <value name="TO">
                                    <shadow type="math_number" id="xKoCsxqCSQp{q${^Y**t">
                                      <field name="NUM">500</field>
                                    </shadow>
                                  </value>
                                </block>
                              </value>
                            </block>
                          </value>
                        </block>
                      </next>
                    </block>
                  </statement>
                  <statement name="ELSE">
                    <block type="debug" id="=.|w?9nf5~~PyKL5=g46">
                      <field name="Severity">log</field>
                      <value name="TEXT">
                        <shadow type="text" id="G=+l93Z8O{D|r+-TKizq">
                          <field name="TEXT">Switches Eintrag ist leer</field>
                        </shadow>
                      </value>
                    </block>
                  </statement>
                </block>
              </statement>
            </block>
          </statement>
          <value name="RETURN">
            <block type="text" id="(U$(5asPxY/vxdWptKjo">
              <field name="TEXT">SetSwitches</field>
            </block>
          </value>
        </block>
        <block type="procedures_defreturn" id="Ly=3A3kJj[%)$pL1Y*Js" x="13" y="4513">
          <mutation>
            <arg name="switches" varid="xjjCO3x]~#p7S0:#%i0_"></arg>
          </mutation>
          <field name="NAME">GetSwitches</field>
          <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment>
          <statement name="STACK">
            <block type="variables_set" id="XFx8yOAtiL4G[Z;-r39M">
              <field name="VAR" id=":#q3xGH!O9R*~b!?qxmd">counter</field>
              <value name="VALUE">
                <block type="math_number" id="A}w2Qz(.Sb}.d_=K[)kV">
                  <field name="NUM">0</field>
                </block>
              </value>
              <next>
                <block type="controls_forEach" id="OYbqZv/z,%U*6pycO0Ia">
                  <field name="VAR" id="#DF~YDx#7HA~2_~c}$P?">switch</field>
                  <value name="LIST">
                    <block type="variables_get" id="?2SsKISMzWqd/!ldagRl">
                      <field name="VAR" id="xjjCO3x]~#p7S0:#%i0_">switches</field>
                    </block>
                  </value>
                  <statement name="DO">
                    <block type="controls_if" id="*)}3??[G]V$)lT*Dc(kl">
                      <value name="IF0">
                        <block type="variables_get" id="qsq)yI{bGs5rs35sMFev">
                          <field name="VAR" id="#DF~YDx#7HA~2_~c}$P?">switch</field>
                        </block>
                      </value>
                      <statement name="DO0">
                        <block type="controls_if" id="-Rxingu-2hBJ?hm)NC8r">
                          <mutation else="1"></mutation>
                          <value name="IF0">
                            <block type="logic_compare" id="%R@E-(.[4?QEQ(XUEkUU">
                              <field name="OP">EQ</field>
                              <value name="A">
                                <block type="get_value_var" id="6RXvDhz[f3Nc+|--=VEN">
                                  <field name="ATTR">val</field>
                                  <value name="OID">
                                    <shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="O:I4V1*pY/CJ6le4+IP@">
                                      <field name="TEXT"></field>
                                    </shadow>
                                    <block type="variables_get" id="5tn`VgHa5Ba+g^i3hn]1">
                                      <field name="VAR" id="#DF~YDx#7HA~2_~c}$P?">switch</field>
                                    </block>
                                  </value>
                                </block>
                              </value>
                              <value name="B">
                                <block type="logic_boolean" id="-l?E7{+i:c.,=!NAAvc*">
                                  <field name="BOOL">TRUE</field>
                                </block>
                              </value>
                            </block>
                          </value>
                          <statement name="DO0">
                            <block type="math_change" id="sbUQ?-Q!Dkk~Ppqv{a_m">
                              <field name="VAR" id=":#q3xGH!O9R*~b!?qxmd">counter</field>
                              <value name="DELTA">
                                <shadow type="math_number" id="cl$?.u]-:?xmJw8Ai!_Q">
                                  <field name="NUM">1</field>
                                </shadow>
                              </value>
                            </block>
                          </statement>
                          <statement name="ELSE">
                            <block type="variables_set" id="Ip0ZYg-1)*0N9c0Avxhp">
                              <field name="VAR" id=":#q3xGH!O9R*~b!?qxmd">counter</field>
                              <value name="VALUE">
                                <block type="math_number" id=":]i@+YY1zf=2pmyk940O">
                                  <field name="NUM">0</field>
                                </block>
                              </value>
                            </block>
                          </statement>
                        </block>
                      </statement>
                    </block>
                  </statement>
                  <next>
                    <block type="controls_if" id=",mB*mcs]MX,^99pPJUa{">
                      <mutation else="1"></mutation>
                      <value name="IF0">
                        <block type="logic_compare" id="|pnl;7.yklmYt**dQ(^0">
                          <field name="OP">EQ</field>
                          <value name="A">
                            <block type="variables_get" id="}IuVQ4.8q2.^[k6ZDPEO">
                              <field name="VAR" id=":#q3xGH!O9R*~b!?qxmd">counter</field>
                            </block>
                          </value>
                          <value name="B">
                            <block type="lists_length" id="}:5;_`YuLk6Hg3HVw[@d">
                              <value name="VALUE">
                                <block type="variables_get" id="e!:Q`NRUF#W.,-{8(^Oe">
                                  <field name="VAR" id="xjjCO3x]~#p7S0:#%i0_">switches</field>
                                </block>
                              </value>
                            </block>
                          </value>
                        </block>
                      </value>
                      <statement name="DO0">
                        <block type="debug" id="P9{2K[xAC7^JZaWZ;V~P">
                          <field name="Severity">log</field>
                          <value name="TEXT">
                            <shadow type="text" id="AD(k:Pz|uh5edFFT2Q*W">
                              <field name="TEXT">Switches sind AN</field>
                            </shadow>
                          </value>
                          <next>
                            <block type="variables_set" id="6QcH=2!04EY?p9o/ChzL">
                              <field name="VAR" id="UFl:*B!P.|vFu=[uU3T/">return</field>
                              <value name="VALUE">
                                <block type="logic_boolean" id="NMtD{*YcoYw9zD@Z2WDp">
                                  <field name="BOOL">TRUE</field>
                                </block>
                              </value>
                            </block>
                          </next>
                        </block>
                      </statement>
                      <statement name="ELSE">
                        <block type="debug" id="~CIg6id=8ds{FM[;#Udk">
                          <field name="Severity">log</field>
                          <value name="TEXT">
                            <shadow type="text" id="gE$ehZm~b8}1t7Kr6+9E">
                              <field name="TEXT">Switches sind AUS</field>
                            </shadow>
                          </value>
                          <next>
                            <block type="variables_set" id="3OFGY-djS_YMS$;~.+s]">
                              <field name="VAR" id="UFl:*B!P.|vFu=[uU3T/">return</field>
                              <value name="VALUE">
                                <block type="logic_boolean" id="ym(,6;S:c{KTq-}6A2In">
                                  <field name="BOOL">FALSE</field>
                                </block>
                              </value>
                            </block>
                          </next>
                        </block>
                      </statement>
                    </block>
                  </next>
                </block>
              </next>
            </block>
          </statement>
          <value name="RETURN">
            <block type="variables_get" id="F6:BVND*:t/WUU}QVqc3">
              <field name="VAR" id="UFl:*B!P.|vFu=[uU3T/">return</field>
            </block>
          </value>
        </block>
      </xml>
      
      ? 1 Antwort Letzte Antwort
      2
      • Christoph1337C Christoph1337

        @Mic

        Sehr cool das endlich jemand einen Adapter dafür baut!! Ich hab ewig an meinem Bewegungsmelder Script getüftelt bis es halbwegs lief und ich freu mich darauf deinen Adapter zu testen.

        Ich hänge dir mal meine Blockly Funktion dafür an. Vielleicht gibt das ja noch Inspirationen dafür.

        Grundsätzlich habe ich folgendes drin:

        • Globaler DP "AutoLight" falls "false" wird kein Licht mehr automatisch geschaltet
        • Globaler DP "NightLightMode" falls "true" wird nicht geschaltet oder ein anderes Lichtszenario
        • Globaler DP "AtHome" falls "false" Alle Lichter ausschalten
        • Globaler DP LuxLimit Grenzwert für schalten von Licht
        • Je Raum gibt es weitere weitere Einstellungen (Schaltzeit, IgnoreNightMode,KeepOn (if true), KeepOff (if true), ExtraOffSwitches (Geräte zusätzlich abgeschaltet werden aber keinen Trigger für ON haben), LuxLimit (individuell)
        • Funktion für das Schalten verschiedener Lichter in dem Raum je nach Bedingung.
        • Debug Ausgabe

        Was mir bei Blockly am Anfang sehr viele Probleme gemacht hat war, dass die Verwendung von Timeouts in einer Funktion beim Aufruf von mehreren Räumen überschrieben werden. Das habe ich letztendlich mit einem Timer gelöst, der an den DP gehängt wird und beim neu schreiben gelöscht wird.

        <xml xmlns="https://developers.google.com/blockly/xml">
          <variables>
            <variable id="xjjCO3x]~#p7S0:#%i0_">switches</variable>
            <variable id="N=.oocr,|f!EjH[T#m4W">TurnON</variable>
            <variable id=".vDs7L59v=fy*rrUz[gY">OFFTime</variable>
            <variable id="IX/gU^R_Zpb]{vD5A]Sn">RoomName</variable>
            <variable id="@Bz823N{#FDtr?!utT_^">pir_01</variable>
            <variable id="0I[}CDRB#1t;RiBC2c!N">pir_02</variable>
            <variable id=",RO*rmH)Gb7=:?$7ny,.">pir_lux_01</variable>
            <variable id="vS_F0r}]%+GePgY3vks8">pir_lux_02</variable>
            <variable id="l;ilJ`6Z6%G5EJ2clI_)">pir_lux_limit</variable>
            <variable id="v5r*F/J_D*#a2B^L/XDs">extraOFFswitches</variable>
            <variable id="VpvRaw-o{?h#_.0;LXn;">KeepOn</variable>
            <variable id="dt+.dW.Wy09/+7%X.I|+">KeepOff</variable>
            <variable id="(5n|JY/|pl^WYG41i],:">IgnoreNightMode</variable>
            <variable id="#DF~YDx#7HA~2_~c}$P?">switch</variable>
            <variable id=":#q3xGH!O9R*~b!?qxmd">counter</variable>
            <variable id="UFl:*B!P.|vFu=[uU3T/">return</variable>
            <variable id="q-]g;q9Z=eMBOK-}p/L`">wz_select_return</variable>
            <variable id="Z}*@ZQ],86inGv;ML!G/">GlobalLuxLimit</variable>
          </variables>
          <block type="procedures_defreturn" id="ME|_L*VJRiX!B)!0O7?j" x="13" y="13">
            <field name="NAME">wz_select_device</field>
            <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment>
            <statement name="STACK">
              <block type="controls_if" id="l@l1b(]$~rI~T]PtFCck">
                <mutation elseif="1" else="1"></mutation>
                <value name="IF0">
                  <block type="logic_operation" id="cs-2Q(5s^2mYurlgJ%IE" inline="false">
                    <field name="OP">AND</field>
                    <value name="A">
                      <block type="logic_operation" id="b02ov67EMjyk~?LmK[TG" inline="false">
                        <field name="OP">AND</field>
                        <value name="A">
                          <block type="logic_operation" id="Acq#6xiNAjQ76BM%;-8%" inline="false">
                            <field name="OP">AND</field>
                            <value name="A">
                              <block type="logic_compare" id="ix3U/jZb=T(ku}juSZnR">
                                <field name="OP">GTE</field>
                                <value name="A">
                                  <block type="time_get" id=".5N6%Z#/3hY=:$B|~NaO">
                                    <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
                                    <field name="OPTION">wd</field>
                                  </block>
                                </value>
                                <value name="B">
                                  <block type="math_number" id="pDE#FhTH~mt`S[0zb_||">
                                    <field name="NUM">6</field>
                                  </block>
                                </value>
                              </block>
                            </value>
                            <value name="B">
                              <block type="logic_compare" id="w/-BADhf0d5cMO.$wH^q">
                                <field name="OP">LTE</field>
                                <value name="A">
                                  <block type="time_get" id="~Jq=3I?Is=1)GJd17c+q">
                                    <mutation xmlns="http://www.w3.org/1999/xhtml" format="false" language="false"></mutation>
                                    <field name="OPTION">wd</field>
                                  </block>
                                </value>
                                <value name="B">
                                  <block type="math_number" id="#v}=gS`Y]=O%]cz#G#jc">
                                    <field name="NUM">7</field>
                                  </block>
                                </value>
                              </block>
                            </value>
                          </block>
                        </value>
                        <value name="B">
                          <block type="logic_operation" id="ULgxMsVMe_]tA]Fsly[$" inline="false">
                            <field name="OP">OR</field>
                            <value name="A">
                              <block type="time_compare" id="0!GQRrVZYt:T:lTJyJgl">
                                <mutation xmlns="http://www.w3.org/1999/xhtml" end_time="true"></mutation>
                                <field name="OPTION">between</field>
                                <field name="START_TIME">12:00</field>
                                <field name="END_TIME">14:00</field>
                              </block>
                            </value>
                            <value name="B">
                              <block type="time_compare" id="aQEM|C(l^s7,5JV@`^B;">
                                <mutation xmlns="http://www.w3.org/1999/xhtml" end_time="true"></mutation>
                                <field name="OPTION">between</field>
                                <field name="START_TIME">18:00</field>
                                <field name="END_TIME">20:00</field>
                              </block>
                            </value>
                          </block>
                        </value>
                      </block>
                    </value>
                    <value name="B">
                      <block type="logic_negate" id="[I6Mx+jpR[AKmmmXoxWv">
                        <value name="BOOL">
                          <block type="get_value_var" id="l@za~3?OhxT$Fo#=c)Wx">
                            <field name="ATTR">val</field>
                            <value name="OID">
                              <shadow type="text">
                                <field name="TEXT"></field>
                              </shadow>
                              <block type="field_oid" id="DqdZ(z^Eu3wpe1!CoGSA">
                                <field name="oid">0_userdata.0.GlobalVars.Wohnzimmer_TV</field>
                              </block>
                            </value>
                          </block>
                        </value>
                      </block>
                    </value>
                  </block>
                </value>
                <statement name="DO0">
                  <block type="variables_set" id="|o-y%I+j~uij@H,-{AdA">
                    <field name="VAR" id="q-]g;q9Z=eMBOK-}p/L`">wz_select_return</field>
                    <value name="VALUE">
                      <block type="lists_create_with" id="r`WR05*_(l~!0%}P8dyO">
                        <mutation items="1"></mutation>
                        <value name="ADD0">
                          <block type="field_oid" id="p?t*.kHQgbbg-P1}L:],">
                            <field name="oid">scene.0.Szene_wohnzimmer-essen</field>
                          </block>
                        </value>
                      </block>
                    </value>
                    <next>
                      <block type="debug" id=":a:ZL|ZKs-wm8Q;T^M%?">
                        <field name="Severity">log</field>
                        <value name="TEXT">
                          <shadow type="text" id="M;/vC3q?i$VcB0{[N#_A">
                            <field name="TEXT">wz essen</field>
                          </shadow>
                        </value>
                      </block>
                    </next>
                  </block>
                </statement>
                <value name="IF1">
                  <block type="logic_operation" id="_k0k~kNq2Ce,UYgh;mqi" inline="false">
                    <field name="OP">AND</field>
                    <value name="A">
                      <block type="get_value_var" id="(pebLF9+cQ7,^ifb==,6">
                        <field name="ATTR">val</field>
                        <value name="OID">
                          <shadow type="text" id="U/S$)3xsk-3;8#~.*hJ2">
                            <field name="TEXT"></field>
                          </shadow>
                          <block type="field_oid" id="=a4%;97[zTAEkm+ujijj">
                            <field name="oid">0_userdata.0.GlobalVars.Wohnzimmer_TV</field>
                          </block>
                        </value>
                      </block>
                    </value>
                    <value name="B">
                      <block type="time_compare" id="Jp4c.~(5PKa:]iIs#QLk">
                        <mutation xmlns="http://www.w3.org/1999/xhtml" end_time="true"></mutation>
                        <field name="OPTION">between</field>
                        <field name="START_TIME">18:00</field>
                        <field name="END_TIME">00:30</field>
                      </block>
                    </value>
                  </block>
                </value>
                <statement name="DO1">
                  <block type="variables_set" id="L@}i_6o.rb2dA0Mh9zVP">
                    <field name="VAR" id="q-]g;q9Z=eMBOK-}p/L`">wz_select_return</field>
                    <value name="VALUE">
                      <block type="lists_create_with" id="qwZKDCG9dtX!Y[CfqU`x">
                        <mutation items="1"></mutation>
                        <value name="ADD0">
                          <block type="field_oid" id="Mk^tguqoO%!UdMC_uaO-">
                            <field name="oid">scene.0.Szene_wohnzimmer-gemuetlich</field>
                          </block>
                        </value>
                      </block>
                    </value>
                    <next>
                      <block type="debug" id="2Xc+Q8zQ*KyLt{LGbHM!">
                        <field name="Severity">log</field>
                        <value name="TEXT">
                          <shadow type="text" id="Doe2PlebWaPQx`@}YqiF">
                            <field name="TEXT">wz gemütlich</field>
                          </shadow>
                        </value>
                      </block>
                    </next>
                  </block>
                </statement>
                <statement name="ELSE">
                  <block type="variables_set" id="USp?u8vp6Mfq;65wHEz6">
                    <field name="VAR" id="q-]g;q9Z=eMBOK-}p/L`">wz_select_return</field>
                    <value name="VALUE">
                      <block type="lists_create_with" id="ke72Y:uae96cIQ6VA#$G">
                        <mutation items="1"></mutation>
                        <value name="ADD0">
                          <block type="field_oid" id="4+{(idsPPS`v${5x;K?O">
                            <field name="oid">scene.0.Szene_pir-wohnzimmer</field>
                          </block>
                        </value>
                      </block>
                    </value>
                    <next>
                      <block type="debug" id="M%)Ez?.pywI6}bbth`Vx">
                        <field name="Severity">log</field>
                        <value name="TEXT">
                          <shadow type="text" id="x((%Rv2R;44c_sv`g2nS">
                            <field name="TEXT">wz pir</field>
                          </shadow>
                        </value>
                      </block>
                    </next>
                  </block>
                </statement>
              </block>
            </statement>
            <value name="RETURN">
              <block type="variables_get" id="WmE)4):S{xnzH$T+yOSQ">
                <field name="VAR" id="q-]g;q9Z=eMBOK-}p/L`">wz_select_return</field>
              </block>
            </value>
          </block>
          <block type="procedures_defreturn" id="Uq+c:7kOmR1R|/)C-~iW" x="13" y="588">
            <mutation>
              <arg name="RoomName" varid="IX/gU^R_Zpb]{vD5A]Sn"></arg>
              <arg name="pir_01" varid="@Bz823N{#FDtr?!utT_^"></arg>
              <arg name="pir_02" varid="0I[}CDRB#1t;RiBC2c!N"></arg>
              <arg name="pir_lux_01" varid=",RO*rmH)Gb7=:?$7ny,."></arg>
              <arg name="pir_lux_02" varid="vS_F0r}]%+GePgY3vks8"></arg>
              <arg name="pir_lux_limit" varid="l;ilJ`6Z6%G5EJ2clI_)"></arg>
              <arg name="switches" varid="xjjCO3x]~#p7S0:#%i0_"></arg>
              <arg name="extraOFFswitches" varid="v5r*F/J_D*#a2B^L/XDs"></arg>
              <arg name="OFFTime" varid=".vDs7L59v=fy*rrUz[gY"></arg>
              <arg name="KeepOn" varid="VpvRaw-o{?h#_.0;LXn;"></arg>
              <arg name="KeepOff" varid="dt+.dW.Wy09/+7%X.I|+"></arg>
              <arg name="IgnoreNightMode" varid="(5n|JY/|pl^WYG41i],:"></arg>
            </mutation>
            <field name="NAME">PIROnOff</field>
            <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment>
            <statement name="STACK">
              <block type="controls_if" id="[O7.(Z@={-u+:!D79Gz%">
                <value name="IF0">
                  <block type="logic_compare" id="jlr_x$?NA^WZomQtcw#5">
                    <field name="OP">EQ</field>
                    <value name="A">
                      <block type="variables_get" id="F=+u75K9%VDi8G/n|D8k">
                        <field name="VAR" id="0I[}CDRB#1t;RiBC2c!N">pir_02</field>
                      </block>
                    </value>
                    <value name="B">
                      <block type="logic_null" id="Sh,:KvsF[rusl~@}EMqY"></block>
                    </value>
                  </block>
                </value>
                <statement name="DO0">
                  <block type="variables_set" id="whX@Da6CE@|naMUw;N8~">
                    <field name="VAR" id="0I[}CDRB#1t;RiBC2c!N">pir_02</field>
                    <value name="VALUE">
                      <block type="variables_get" id="6rDG8,DskG60`#/v/8mv">
                        <field name="VAR" id="@Bz823N{#FDtr?!utT_^">pir_01</field>
                      </block>
                    </value>
                  </block>
                </statement>
                <next>
                  <block type="controls_if" id="I[hD8l1p/IA;zpe?h|UC">
                    <value name="IF0">
                      <block type="logic_compare" id="~)koIzn#%8#nG.hQ2r4w">
                        <field name="OP">EQ</field>
                        <value name="A">
                          <block type="variables_get" id=",|L(K7dZVR%t;!_rN$Lh">
                            <field name="VAR" id="vS_F0r}]%+GePgY3vks8">pir_lux_02</field>
                          </block>
                        </value>
                        <value name="B">
                          <block type="logic_null" id="W%bpS%eSC]264c{ywR]f"></block>
                        </value>
                      </block>
                    </value>
                    <statement name="DO0">
                      <block type="variables_set" id="U[5P1LV5cgm)K(sdn+T)">
                        <field name="VAR" id="vS_F0r}]%+GePgY3vks8">pir_lux_02</field>
                        <value name="VALUE">
                          <block type="variables_get" id="S=$NF3KdW#f|mCa_Is.$">
                            <field name="VAR" id=",RO*rmH)Gb7=:?$7ny,.">pir_lux_01</field>
                          </block>
                        </value>
                      </block>
                    </statement>
                    <next>
                      <block type="debug" id="13({Y~ad[1lz?(?.I:8s">
                        <field name="Severity">log</field>
                        <value name="TEXT">
                          <shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="jJ`TpoG`qlcAh?|:PC!V">
                            <field name="TEXT">etwas erkannt</field>
                          </shadow>
                          <block type="text_join" id="zzz|U{L6aADQM6wC=`Dw">
                            <mutation items="8"></mutation>
                            <value name="ADD0">
                              <block type="text" id="FpG~%IV|WdP}+zffCI-w">
                                <field name="TEXT">PIR: </field>
                              </block>
                            </value>
                            <value name="ADD1">
                              <block type="variables_get" id="8~Do34ZHjM/ehND*@x}H">
                                <field name="VAR" id="@Bz823N{#FDtr?!utT_^">pir_01</field>
                              </block>
                            </value>
                            <value name="ADD2">
                              <block type="text" id="UQ6$1$e!x0vW2VMG$^%n">
                                <field name="TEXT"> hat Wert - </field>
                              </block>
                            </value>
                            <value name="ADD3">
                              <block type="get_value_var" id="aM`8)xK*ukDYKs(Q^iD[">
                                <field name="ATTR">val</field>
                                <value name="OID">
                                  <shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="{aui]%Z@m*m=!^M`#XS9">
                                    <field name="TEXT"></field>
                                  </shadow>
                                  <block type="variables_get" id="ozTuQEY[4$%5^%RXh-@g">
                                    <field name="VAR" id="@Bz823N{#FDtr?!utT_^">pir_01</field>
                                  </block>
                                </value>
                              </block>
                            </value>
                            <value name="ADD4">
                              <block type="text" id="h^0tVD{s|6(nm~@3uSfO">
                                <field name="TEXT"> - </field>
                              </block>
                            </value>
                            <value name="ADD5">
                              <block type="variables_get" id="2k{1r:Z$*Jk{fQYZ0hvv">
                                <field name="VAR" id="0I[}CDRB#1t;RiBC2c!N">pir_02</field>
                              </block>
                            </value>
                            <value name="ADD6">
                              <block type="text" id=".8YO}6ABP*HDMGU^1$,P">
                                <field name="TEXT"> hat Wert - </field>
                              </block>
                            </value>
                            <value name="ADD7">
                              <block type="get_value_var" id="3IIJGJ3XEK8fV0.c_0Vl">
                                <field name="ATTR">val</field>
                                <value name="OID">
                                  <shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="{aui]%Z@m*m=!^M`#XS9">
                                    <field name="TEXT"></field>
                                  </shadow>
                                  <block type="variables_get" id="PeBl3q,Yiuq6kwlkcJS`">
                                    <field name="VAR" id="0I[}CDRB#1t;RiBC2c!N">pir_02</field>
                                  </block>
                                </value>
                              </block>
                            </value>
                          </block>
                        </value>
                        <next>
                          <block type="debug" id="m$k.v~~pRKsfF#2rGjXW">
                            <field name="Severity">log</field>
                            <value name="TEXT">
                              <shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="jJ`TpoG`qlcAh?|:PC!V">
                                <field name="TEXT">etwas erkannt</field>
                              </shadow>
                              <block type="text_join" id="A.Yww;)O(D?h8Sr4CUO8">
                                <mutation items="8"></mutation>
                                <value name="ADD0">
                                  <block type="text" id="6Js:%RU{%E1rE0ie3O=Y">
                                    <field name="TEXT">PIR_LUX: </field>
                                  </block>
                                </value>
                                <value name="ADD1">
                                  <block type="variables_get" id="8pcxW~%+x5HIJ5:kQD_X">
                                    <field name="VAR" id=",RO*rmH)Gb7=:?$7ny,.">pir_lux_01</field>
                                  </block>
                                </value>
                                <value name="ADD2">
                                  <block type="text" id="y:)7;uyP|i,=qBJ?/940">
                                    <field name="TEXT"> hat Wert - </field>
                                  </block>
                                </value>
                                <value name="ADD3">
                                  <block type="get_value_var" id="?jc{.no|7@Ox}M*3Yiy=">
                                    <field name="ATTR">val</field>
                                    <value name="OID">
                                      <shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="{aui]%Z@m*m=!^M`#XS9">
                                        <field name="TEXT"></field>
                                      </shadow>
                                      <block type="variables_get" id="AB#BN4sUMf1_zVuW(5AD">
                                        <field name="VAR" id=",RO*rmH)Gb7=:?$7ny,.">pir_lux_01</field>
                                      </block>
                                    </value>
                                  </block>
                                </value>
                                <value name="ADD4">
                                  <block type="text" id="zLrVDg5V7`Jy|NUNf`89">
                                    <field name="TEXT"> - </field>
                                  </block>
                                </value>
                                <value name="ADD5">
                                  <block type="variables_get" id="RYUXo|IpuVD31K6d}E)(">
                                    <field name="VAR" id="vS_F0r}]%+GePgY3vks8">pir_lux_02</field>
                                  </block>
                                </value>
                                <value name="ADD6">
                                  <block type="text" id="E(roxUb_{AJQE1[!k~Or">
                                    <field name="TEXT"> hat Wert - </field>
                                  </block>
                                </value>
                                <value name="ADD7">
                                  <block type="get_value_var" id="|{-zrh)6pw7)U2flh#WT">
                                    <field name="ATTR">val</field>
                                    <value name="OID">
                                      <shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="{aui]%Z@m*m=!^M`#XS9">
                                        <field name="TEXT"></field>
                                      </shadow>
                                      <block type="variables_get" id="249q+VQJ1tc`_z|^QKw$">
                                        <field name="VAR" id="vS_F0r}]%+GePgY3vks8">pir_lux_02</field>
                                      </block>
                                    </value>
                                  </block>
                                </value>
                              </block>
                            </value>
                            <next>
                              <block type="controls_if" id="Uv[/#yCo:db^kgX|;k#H">
                                <mutation else="1"></mutation>
                                <value name="IF0">
                                  <block type="logic_compare" id="6FH^Rk2p_]%Y2(K/PyPd">
                                    <field name="OP">EQ</field>
                                    <value name="A">
                                      <block type="get_value" id="?!x8nVCyZfBkPYEG~Az?">
                                        <field name="ATTR">val</field>
                                        <field name="OID">0_userdata.0.GlobalVars.AutoLight</field>
                                      </block>
                                    </value>
                                    <value name="B">
                                      <block type="logic_boolean" id="mZ;i7U3C#%kFJmTC+jkZ">
                                        <field name="BOOL">TRUE</field>
                                      </block>
                                    </value>
                                  </block>
                                </value>
                                <statement name="DO0">
                                  <block type="controls_if" id="09?,,2EP+_g3qIdzKQ9!">
                                    <mutation elseif="1" else="1"></mutation>
                                    <value name="IF0">
                                      <block type="logic_operation" id="zuG2C2rk:;Za}.Lrj-pi" inline="false">
                                        <field name="OP">OR</field>
                                        <value name="A">
                                          <block type="logic_compare" id=")O-7|;y09npok-y_s;xi">
                                            <field name="OP">EQ</field>
                                            <value name="A">
                                              <block type="get_value_var" id="[Kk:Cgtf21QQI591Ga/Z">
                                                <field name="ATTR">val</field>
                                                <value name="OID">
                                                  <shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="l!pgo+GlmzwwC]_HI91`">
                                                    <field name="TEXT"></field>
                                                  </shadow>
                                                  <block type="variables_get" id="!|RO+tg}lwGLL-Pej?4p">
                                                    <field name="VAR" id="@Bz823N{#FDtr?!utT_^">pir_01</field>
                                                  </block>
                                                </value>
                                              </block>
                                            </value>
                                            <value name="B">
                                              <block type="logic_boolean" id="s=N^7s!QM8EZ!(mqVN|p">
                                                <field name="BOOL">TRUE</field>
                                              </block>
                                            </value>
                                          </block>
                                        </value>
                                        <value name="B">
                                          <block type="logic_compare" id="-!zo65PRFGd6$*tak9@2">
                                            <field name="OP">EQ</field>
                                            <value name="A">
                                              <block type="get_value_var" id="SN;`|g13#K`Jza}JAJ[D">
                                                <field name="ATTR">val</field>
                                                <value name="OID">
                                                  <shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="l!pgo+GlmzwwC]_HI91`">
                                                    <field name="TEXT"></field>
                                                  </shadow>
                                                  <block type="variables_get" id="FD5QuQkT/qYQlMe*NKaZ">
                                                    <field name="VAR" id="0I[}CDRB#1t;RiBC2c!N">pir_02</field>
                                                  </block>
                                                </value>
                                              </block>
                                            </value>
                                            <value name="B">
                                              <block type="logic_boolean" id="A]D?RX],u~M!S5N%S:N{">
                                                <field name="BOOL">TRUE</field>
                                              </block>
                                            </value>
                                          </block>
                                        </value>
                                      </block>
                                    </value>
                                    <statement name="DO0">
                                      <block type="controls_if" id=";UN%Cl)(@D=Y,KA}2Nmv">
                                        <mutation else="1"></mutation>
                                        <value name="IF0">
                                          <block type="logic_operation" id="GjUv+]z0Msa=Pi4,I:oV" inline="false">
                                            <field name="OP">OR</field>
                                            <value name="A">
                                              <block type="logic_compare" id="+yk,-(9trX?JsdI[AT|:">
                                                <field name="OP">LTE</field>
                                                <value name="A">
                                                  <block type="get_value_var" id="OXD;U1Q;-9Q7.!Djz`D;">
                                                    <field name="ATTR">val</field>
                                                    <value name="OID">
                                                      <shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="l!pgo+GlmzwwC]_HI91`">
                                                        <field name="TEXT"></field>
                                                      </shadow>
                                                      <block type="variables_get" id="SXXoJ_W7}7hHfR6dtN:O">
                                                        <field name="VAR" id=",RO*rmH)Gb7=:?$7ny,.">pir_lux_01</field>
                                                      </block>
                                                    </value>
                                                  </block>
                                                </value>
                                                <value name="B">
                                                  <block type="variables_get" id="#WWg!0nb[;hd2BjXuxyU">
                                                    <field name="VAR" id="l;ilJ`6Z6%G5EJ2clI_)">pir_lux_limit</field>
                                                  </block>
                                                </value>
                                              </block>
                                            </value>
                                            <value name="B">
                                              <block type="logic_compare" id="eTUQ*ww|/ed@9;S%s}-j">
                                                <field name="OP">LTE</field>
                                                <value name="A">
                                                  <block type="get_value_var" id="YK(7;gzM6dVPS:A73yEM">
                                                    <field name="ATTR">val</field>
                                                    <value name="OID">
                                                      <shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="l!pgo+GlmzwwC]_HI91`">
                                                        <field name="TEXT"></field>
                                                      </shadow>
                                                      <block type="variables_get" id="7m_{g`_/[MXWAl-`DC#.">
                                                        <field name="VAR" id="vS_F0r}]%+GePgY3vks8">pir_lux_02</field>
                                                      </block>
                                                    </value>
                                                  </block>
                                                </value>
                                                <value name="B">
                                                  <block type="variables_get" id="0%tca!9u76jk}{6-?%gU">
                                                    <field name="VAR" id="l;ilJ`6Z6%G5EJ2clI_)">pir_lux_limit</field>
                                                  </block>
                                                </value>
                                              </block>
                                            </value>
                                          </block>
                                        </value>
                                        <statement name="DO0">
                                          <block type="controls_if" id="my:jHuH-uZ[heLt5odjN">
                                            <mutation else="1"></mutation>
                                            <value name="IF0">
                                              <block type="logic_operation" id="2@Oub9,o`$uLYKd#ike;" inline="false">
                                                <field name="OP">OR</field>
                                                <value name="A">
                                                  <block type="logic_compare" id="fDk/.),o=!;r%8}@Oj((">
                                                    <field name="OP">EQ</field>
                                                    <value name="A">
                                                      <block type="get_value" id="MLk5m2`)K$Ln,8X1nzY,">
                                                        <field name="ATTR">val</field>
                                                        <field name="OID">0_userdata.0.GlobalVars.NightLightMode</field>
                                                      </block>
                                                    </value>
                                                    <value name="B">
                                                      <block type="logic_boolean" id="QU=Z,j)pD7B2@NT8DZT3">
                                                        <field name="BOOL">FALSE</field>
                                                      </block>
                                                    </value>
                                                  </block>
                                                </value>
                                                <value name="B">
                                                  <block type="logic_compare" id="|DV~^IlJv:Ox0YnUc(BZ">
                                                    <field name="OP">EQ</field>
                                                    <value name="A">
                                                      <block type="variables_get" id="/4K81(B*=/]_T^fFEX!p">
                                                        <field name="VAR" id="(5n|JY/|pl^WYG41i],:">IgnoreNightMode</field>
                                                      </block>
                                                    </value>
                                                    <value name="B">
                                                      <block type="logic_boolean" id="vhBU1H5MlSZkTK|)_(M4">
                                                        <field name="BOOL">TRUE</field>
                                                      </block>
                                                    </value>
                                                  </block>
                                                </value>
                                              </block>
                                            </value>
                                            <statement name="DO0">
                                              <block type="controls_if" id="bd`D]$NJk`XfFoJR)D(9">
                                                <mutation else="1"></mutation>
                                                <value name="IF0">
                                                  <block type="logic_compare" id="foMR6tBoUz!~0uvQ!h)/">
                                                    <field name="OP">EQ</field>
                                                    <value name="A">
                                                      <block type="variables_get" id="c{KA+=Oqc=kiOQpE$h^b">
                                                        <field name="VAR" id="dt+.dW.Wy09/+7%X.I|+">KeepOff</field>
                                                      </block>
                                                    </value>
                                                    <value name="B">
                                                      <block type="logic_boolean" id="F8Y;KnErl}VAcHtBaqV*">
                                                        <field name="BOOL">FALSE</field>
                                                      </block>
                                                    </value>
                                                  </block>
                                                </value>
                                                <statement name="DO0">
                                                  <block type="debug" id="{XM_Z[.V#$`fKe=q6]pi">
                                                    <field name="Severity">log</field>
                                                    <value name="TEXT">
                                                      <shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="g1ueDh_2oKR+gkXL:9pO">
                                                        <field name="TEXT">Schalte Licht AN</field>
                                                      </shadow>
                                                      <block type="procedures_callreturn" id="OT^6G[h;^:Iaf!H3(sI(">
                                                        <mutation name="SetSwitchlist">
                                                          <arg name="switches"></arg>
                                                          <arg name="TurnON"></arg>
                                                          <arg name="OFFTime"></arg>
                                                        </mutation>
                                                        <value name="ARG0">
                                                          <block type="variables_get" id="j]:ZsWiNYrm{qG~5`8FR">
                                                            <field name="VAR" id="xjjCO3x]~#p7S0:#%i0_">switches</field>
                                                          </block>
                                                        </value>
                                                        <value name="ARG1">
                                                          <block type="logic_boolean" id="Xm$Z%t5Txvj2h*3@(z/d">
                                                            <field name="BOOL">TRUE</field>
                                                          </block>
                                                        </value>
                                                        <value name="ARG2">
                                                          <block type="math_number" id="rM2-%6M0Aws#{Yq}[fW#">
                                                            <field name="NUM">0</field>
                                                          </block>
                                                        </value>
                                                      </block>
                                                    </value>
                                                  </block>
                                                </statement>
                                                <statement name="ELSE">
                                                  <block type="debug" id="KGn4QdU`T-)yKwG+iNN^">
                                                    <field name="Severity">log</field>
                                                    <value name="TEXT">
                                                      <shadow type="text" id="Mie1Y-G5Qe_DU9A]RORD">
                                                        <field name="TEXT">KeepOff aktiv</field>
                                                      </shadow>
                                                    </value>
                                                  </block>
                                                </statement>
                                              </block>
                                            </statement>
                                            <statement name="ELSE">
                                              <block type="debug" id="$[}zC!R!}1DzHgyjg]7Y">
                                                <field name="Severity">log</field>
                                                <value name="TEXT">
                                                  <shadow type="text" id="oj7c6l7Jo.9P?{BQn]bz">
                                                    <field name="TEXT">NightMode ist aktiviert</field>
                                                  </shadow>
                                                </value>
                                              </block>
                                            </statement>
                                          </block>
                                        </statement>
                                        <statement name="ELSE">
                                          <block type="debug" id=",Ym^I`tBP[(f/~}UUyvZ">
                                            <field name="Severity">log</field>
                                            <value name="TEXT">
                                              <shadow type="text" id="5p]hJo6He4uf],!kf/f1">
                                                <field name="TEXT">Lux-Limit nicht erreicht</field>
                                              </shadow>
                                            </value>
                                          </block>
                                        </statement>
                                      </block>
                                    </statement>
                                    <value name="IF1">
                                      <block type="logic_operation" id="Y9HcpuFnRwAcU+DRYnzs" inline="false">
                                        <field name="OP">AND</field>
                                        <value name="A">
                                          <block type="logic_compare" id="}fhd$Qugm+Y_NZAUow?L">
                                            <field name="OP">EQ</field>
                                            <value name="A">
                                              <block type="get_value_var" id="EA}#b?R`A;Z9O]1ifL/U">
                                                <field name="ATTR">val</field>
                                                <value name="OID">
                                                  <shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="..N%+1lwIwm=r.aG-acQ">
                                                    <field name="TEXT"></field>
                                                  </shadow>
                                                  <block type="variables_get" id="w,;R}@a)@_pkf$S(4pL!">
                                                    <field name="VAR" id="@Bz823N{#FDtr?!utT_^">pir_01</field>
                                                  </block>
                                                </value>
                                              </block>
                                            </value>
                                            <value name="B">
                                              <block type="logic_boolean" id="B04@`]HK4baj1{WnXJ@R">
                                                <field name="BOOL">FALSE</field>
                                              </block>
                                            </value>
                                          </block>
                                        </value>
                                        <value name="B">
                                          <block type="logic_compare" id="Aj1mhM#}c4:VCVxv`wf!">
                                            <field name="OP">EQ</field>
                                            <value name="A">
                                              <block type="get_value_var" id="77)-SO(|n.sYV?!*uk-v">
                                                <field name="ATTR">val</field>
                                                <value name="OID">
                                                  <shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="..N%+1lwIwm=r.aG-acQ">
                                                    <field name="TEXT"></field>
                                                  </shadow>
                                                  <block type="variables_get" id="wWyw1M_Qu-i{]+ZB1:y2">
                                                    <field name="VAR" id="0I[}CDRB#1t;RiBC2c!N">pir_02</field>
                                                  </block>
                                                </value>
                                              </block>
                                            </value>
                                            <value name="B">
                                              <block type="logic_boolean" id="B1cUqzunb:@p4kyyFAQc">
                                                <field name="BOOL">FALSE</field>
                                              </block>
                                            </value>
                                          </block>
                                        </value>
                                      </block>
                                    </value>
                                    <statement name="DO1">
                                      <block type="controls_if" id="gP1*@4yos%O0lP;b}pNB">
                                        <mutation else="1"></mutation>
                                        <value name="IF0">
                                          <block type="logic_compare" id="%6q}y6+`0U.pq2g#.2]d">
                                            <field name="OP">EQ</field>
                                            <value name="A">
                                              <block type="variables_get" id="veC@9j2mM%s%VV6699[[">
                                                <field name="VAR" id="VpvRaw-o{?h#_.0;LXn;">KeepOn</field>
                                              </block>
                                            </value>
                                            <value name="B">
                                              <block type="logic_boolean" id="/O~8zybjznA@dt-c@aOL">
                                                <field name="BOOL">FALSE</field>
                                              </block>
                                            </value>
                                          </block>
                                        </value>
                                        <statement name="DO0">
                                          <block type="debug" id="K_%4zoRRL,YF:}lvWA=P">
                                            <field name="Severity">log</field>
                                            <value name="TEXT">
                                              <shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="EEDPy`ac^p!TSLb$aq::">
                                                <field name="TEXT">warte einen moment bis aus</field>
                                              </shadow>
                                              <block type="text_join" id="D;c]Ryf7si+PeeL0=!N^">
                                                <mutation items="3"></mutation>
                                                <value name="ADD0">
                                                  <block type="text" id="Z/70*s;axS=/Id:=X^q8">
                                                    <field name="TEXT">Warte </field>
                                                  </block>
                                                </value>
                                                <value name="ADD1">
                                                  <block type="variables_get" id="O4TW=,f+N0AaVd*MiNvO">
                                                    <field name="VAR" id=".vDs7L59v=fy*rrUz[gY">OFFTime</field>
                                                  </block>
                                                </value>
                                                <value name="ADD2">
                                                  <block type="text" id="wiGGDqtwX]z#pXf%mdvW">
                                                    <field name="TEXT"> Minuten bis OFF</field>
                                                  </block>
                                                </value>
                                              </block>
                                            </value>
                                            <next>
                                              <block type="debug" id="15rPv#n#;3jitxTUDEIT">
                                                <field name="Severity">log</field>
                                                <value name="TEXT">
                                                  <shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="g1ueDh_2oKR+gkXL:9pO">
                                                    <field name="TEXT">Schalte Licht AN</field>
                                                  </shadow>
                                                  <block type="procedures_callreturn" id="*k?WNwCJ0aPyUlzN#a+w">
                                                    <mutation name="SetSwitchlist">
                                                      <arg name="switches"></arg>
                                                      <arg name="TurnON"></arg>
                                                      <arg name="OFFTime"></arg>
                                                    </mutation>
                                                    <value name="ARG0">
                                                      <block type="variables_get" id="ZX.1a@SjH4vzl@:UEBd4">
                                                        <field name="VAR" id="xjjCO3x]~#p7S0:#%i0_">switches</field>
                                                      </block>
                                                    </value>
                                                    <value name="ARG1">
                                                      <block type="logic_boolean" id="7iFP3(LXB6rzjk!lsYqP">
                                                        <field name="BOOL">FALSE</field>
                                                      </block>
                                                    </value>
                                                    <value name="ARG2">
                                                      <block type="variables_get" id="|_#g|ZY2ShK[%eT-/nR8">
                                                        <field name="VAR" id=".vDs7L59v=fy*rrUz[gY">OFFTime</field>
                                                      </block>
                                                    </value>
                                                  </block>
                                                </value>
                                                <next>
                                                  <block type="debug" id="!xYW,+B]Db9[aIwPo,C!">
                                                    <field name="Severity">log</field>
                                                    <value name="TEXT">
                                                      <shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="g1ueDh_2oKR+gkXL:9pO">
                                                        <field name="TEXT">Schalte Licht AN</field>
                                                      </shadow>
                                                      <block type="procedures_callreturn" id="/fW6EVniBm487}BR6x$N">
                                                        <mutation name="SetSwitchlist">
                                                          <arg name="switches"></arg>
                                                          <arg name="TurnON"></arg>
                                                          <arg name="OFFTime"></arg>
                                                        </mutation>
                                                        <value name="ARG0">
                                                          <block type="variables_get" id="dWrb*+`1}G$e|Dtk}lSg">
                                                            <field name="VAR" id="v5r*F/J_D*#a2B^L/XDs">extraOFFswitches</field>
                                                          </block>
                                                        </value>
                                                        <value name="ARG1">
                                                          <block type="logic_boolean" id="?Q]jg}0S{r1=6qR?QVBy">
                                                            <field name="BOOL">FALSE</field>
                                                          </block>
                                                        </value>
                                                        <value name="ARG2">
                                                          <block type="variables_get" id="ZHEfb=L^*DR$G~S,aaUU">
                                                            <field name="VAR" id=".vDs7L59v=fy*rrUz[gY">OFFTime</field>
                                                          </block>
                                                        </value>
                                                      </block>
                                                    </value>
                                                  </block>
                                                </next>
                                              </block>
                                            </next>
                                          </block>
                                        </statement>
                                        <statement name="ELSE">
                                          <block type="debug" id="RoF6h7sWR!@iX!pzB:PJ">
                                            <field name="Severity">log</field>
                                            <value name="TEXT">
                                              <shadow type="text" id="e)Z3x84fp]xeIVE$kQyL">
                                                <field name="TEXT">KeepOn aktiv</field>
                                              </shadow>
                                            </value>
                                          </block>
                                        </statement>
                                      </block>
                                    </statement>
                                    <statement name="ELSE">
                                      <block type="debug" id="YqWeRdU|(Tbc6l?nx)rT">
                                        <field name="Severity">log</field>
                                        <value name="TEXT">
                                          <shadow type="text" id="7R:0S=+L;a~6g,e@izq.">
                                            <field name="TEXT">Diese Ausgabe sollte nie kommen</field>
                                          </shadow>
                                        </value>
                                        <next>
                                          <block type="debug" id="AcmL]1^kiJ?y63QM+{WT" collapsed="true" disabled="true">
                                            <field name="Severity">warn</field>
                                            <value name="TEXT">
                                              <shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="i1Fbtc$Ax`kx:je)u(z?">
                                                <field name="TEXT">test</field>
                                              </shadow>
                                              <block type="text_join" id="rpCEJ)?!!49X)k0/*i/!">
                                                <mutation items="19"></mutation>
                                                <value name="ADD0">
                                                  <block type="variables_get" id="c,qbd7Q(nCTXLaHb4OU%">
                                                    <field name="VAR" id="IX/gU^R_Zpb]{vD5A]Sn">RoomName</field>
                                                  </block>
                                                </value>
                                                <value name="ADD1">
                                                  <block type="text_newline" id="%Ik4z(5$X/?J+jQubsu4">
                                                    <field name="Type">\n</field>
                                                  </block>
                                                </value>
                                                <value name="ADD2">
                                                  <block type="text_join" id="2XGYG631?#H6eU%]_CR*">
                                                    <mutation items="2"></mutation>
                                                    <value name="ADD0">
                                                      <block type="text" id="hG7Wb)xULJV+|Lg0of%r">
                                                        <field name="TEXT">pir1: </field>
                                                      </block>
                                                    </value>
                                                    <value name="ADD1">
                                                      <block type="get_value_var" id=":[^;#--,=6lsmqN5syA7">
                                                        <field name="ATTR">val</field>
                                                        <value name="OID">
                                                          <shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="KWLPWGd)pP|x?)+`Fpf]">
                                                            <field name="TEXT"></field>
                                                          </shadow>
                                                          <block type="variables_get" id="6+zw,fJ7?_~ju*Z;%of@">
                                                            <field name="VAR" id="@Bz823N{#FDtr?!utT_^">pir_01</field>
                                                          </block>
                                                        </value>
                                                      </block>
                                                    </value>
                                                  </block>
                                                </value>
                                                <value name="ADD3">
                                                  <block type="text_newline" id="I=LXvd%[2Pk6i/X[u;0*">
                                                    <field name="Type">\n</field>
                                                  </block>
                                                </value>
                                                <value name="ADD4">
                                                  <block type="text_join" id="c{QG4zZ?l~4*1^wok/pQ">
                                                    <mutation items="2"></mutation>
                                                    <value name="ADD0">
                                                      <block type="text" id="M{GSL,`(~}pQ#2U67wOa">
                                                        <field name="TEXT">pir2: </field>
                                                      </block>
                                                    </value>
                                                    <value name="ADD1">
                                                      <block type="get_value_var" id=")!UYW.hyznN:gQ;SdzE#">
                                                        <field name="ATTR">val</field>
                                                        <value name="OID">
                                                          <shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="(VS#ar)mX#FH0??a`YpE">
                                                            <field name="TEXT"></field>
                                                          </shadow>
                                                          <block type="variables_get" id="%;,.b-1n3Q`x=i_P[4vm">
                                                            <field name="VAR" id="0I[}CDRB#1t;RiBC2c!N">pir_02</field>
                                                          </block>
                                                        </value>
                                                      </block>
                                                    </value>
                                                  </block>
                                                </value>
                                                <value name="ADD5">
                                                  <block type="text_newline" id="Q{AczwXB+2+H_GY^V!^n">
                                                    <field name="Type">\n</field>
                                                  </block>
                                                </value>
                                                <value name="ADD6">
                                                  <block type="text_join" id="32C,uF1^t#{UHw0][q93">
                                                    <mutation items="2"></mutation>
                                                    <value name="ADD0">
                                                      <block type="text" id="dFa:8_P}IR^_:nz_z_dO">
                                                        <field name="TEXT">globallux: </field>
                                                      </block>
                                                    </value>
                                                    <value name="ADD1">
                                                      <block type="variables_get" id=",Or5XiX-3X^JCPc$TZXR">
                                                        <field name="VAR" id="Z}*@ZQ],86inGv;ML!G/">GlobalLuxLimit</field>
                                                      </block>
                                                    </value>
                                                  </block>
                                                </value>
                                                <value name="ADD7">
                                                  <block type="text_newline" id="9=A#2My=k/T0#yX4}O3N">
                                                    <field name="Type">\n</field>
                                                  </block>
                                                </value>
                                                <value name="ADD8">
                                                  <block type="text_join" id="!pl#DxkwBOo[#FmhEU][">
                                                    <mutation items="2"></mutation>
                                                    <value name="ADD0">
                                                      <block type="text" id="Q3h@!@QF_[k]vWzB5_2.">
                                                        <field name="TEXT">pirlux1: </field>
                                                      </block>
                                                    </value>
                                                    <value name="ADD1">
                                                      <block type="get_value_var" id="[,6n}%mfloy_0]eXm:Gq">
                                                        <field name="ATTR">val</field>
                                                        <value name="OID">
                                                          <shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="D1(g!9bHQJTuB3|[v(_c">
                                                            <field name="TEXT"></field>
                                                          </shadow>
                                                          <block type="variables_get" id="1NDs=?3k6Cyr`FPFfx3%">
                                                            <field name="VAR" id=",RO*rmH)Gb7=:?$7ny,.">pir_lux_01</field>
                                                          </block>
                                                        </value>
                                                      </block>
                                                    </value>
                                                  </block>
                                                </value>
                                                <value name="ADD9">
                                                  <block type="text_newline" id="JNAUqM;Cc/t[Nw^,glSw">
                                                    <field name="Type">\n</field>
                                                  </block>
                                                </value>
                                                <value name="ADD10">
                                                  <block type="text_join" id="swNic27o0_au*F^3ZCKd">
                                                    <mutation items="2"></mutation>
                                                    <value name="ADD0">
                                                      <block type="text" id="vr}:sf4i]:8k!nl:T}:,">
                                                        <field name="TEXT">pirlux2: </field>
                                                      </block>
                                                    </value>
                                                    <value name="ADD1">
                                                      <block type="get_value_var" id="#AuZ%*phOL2fIynrTg+V">
                                                        <field name="ATTR">val</field>
                                                        <value name="OID">
                                                          <shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="ZJ|8Hav~G`]Cw(k/cChq">
                                                            <field name="TEXT"></field>
                                                          </shadow>
                                                          <block type="variables_get" id="U^gz2:[g-S*=I`i)3O~m">
                                                            <field name="VAR" id="vS_F0r}]%+GePgY3vks8">pir_lux_02</field>
                                                          </block>
                                                        </value>
                                                      </block>
                                                    </value>
                                                  </block>
                                                </value>
                                                <value name="ADD11">
                                                  <block type="text_newline" id="tQp]vzu1j),1zqnA=%kI">
                                                    <field name="Type">\n</field>
                                                  </block>
                                                </value>
                                                <value name="ADD12">
                                                  <block type="text_join" id="6`CpDnDEH3fD$y$Tr.3`">
                                                    <mutation items="2"></mutation>
                                                    <value name="ADD0">
                                                      <block type="text" id="hvc9H|$dYS/([AXNBRu8">
                                                        <field name="TEXT">keepoff: </field>
                                                      </block>
                                                    </value>
                                                    <value name="ADD1">
                                                      <block type="variables_get" id="9Cu!b{}G1U%p%_cAT]8{">
                                                        <field name="VAR" id="dt+.dW.Wy09/+7%X.I|+">KeepOff</field>
                                                      </block>
                                                    </value>
                                                  </block>
                                                </value>
                                                <value name="ADD13">
                                                  <block type="text_newline" id="Xh.~^jNAi8vQfu,XBwY/">
                                                    <field name="Type">\n</field>
                                                  </block>
                                                </value>
                                                <value name="ADD14">
                                                  <block type="text_join" id="PIJsihRA^q^8=b^R[iQ9">
                                                    <mutation items="2"></mutation>
                                                    <value name="ADD0">
                                                      <block type="text" id="VRS.ox6#^x38buHk*P8[">
                                                        <field name="TEXT">keepon: </field>
                                                      </block>
                                                    </value>
                                                    <value name="ADD1">
                                                      <block type="variables_get" id="0ysKwoLmG^d{,=-Kh4C:">
                                                        <field name="VAR" id="VpvRaw-o{?h#_.0;LXn;">KeepOn</field>
                                                      </block>
                                                    </value>
                                                  </block>
                                                </value>
                                                <value name="ADD15">
                                                  <block type="text_newline" id="}0CIvBLSU)hH!zF)*Cr@">
                                                    <field name="Type">\n</field>
                                                  </block>
                                                </value>
                                                <value name="ADD16">
                                                  <block type="text_join" id="qZ5C%ICEMmGMSwQVpzkF">
                                                    <mutation items="2"></mutation>
                                                    <value name="ADD0">
                                                      <block type="text" id="UG`[U$3_0K}:PCnWdN7y">
                                                        <field name="TEXT">offtime: </field>
                                                      </block>
                                                    </value>
                                                    <value name="ADD1">
                                                      <block type="variables_get" id="gK{}F7N:?$FLcHumKGSD">
                                                        <field name="VAR" id=".vDs7L59v=fy*rrUz[gY">OFFTime</field>
                                                      </block>
                                                    </value>
                                                  </block>
                                                </value>
                                                <value name="ADD17">
                                                  <block type="text_newline" id="jfKTL$`gU)~]mK(.q|l9">
                                                    <field name="Type">\n</field>
                                                  </block>
                                                </value>
                                                <value name="ADD18">
                                                  <block type="text_join" id="|{:o[_0#lDt!rr++hzFw">
                                                    <mutation items="2"></mutation>
                                                    <value name="ADD0">
                                                      <block type="text" id="OH5gl[1+!/]+TT+I+)]X">
                                                        <field name="TEXT">switches: </field>
                                                      </block>
                                                    </value>
                                                    <value name="ADD1">
                                                      <block type="variables_get" id="{7JOz9JWX{|Kgb2i[]m}">
                                                        <field name="VAR" id="xjjCO3x]~#p7S0:#%i0_">switches</field>
                                                      </block>
                                                    </value>
                                                  </block>
                                                </value>
                                              </block>
                                            </value>
                                          </block>
                                        </next>
                                      </block>
                                    </statement>
                                  </block>
                                </statement>
                                <statement name="ELSE">
                                  <block type="debug" id="4w2|1F,M`I5e77zwa.ns">
                                    <field name="Severity">log</field>
                                    <value name="TEXT">
                                      <shadow type="text" id="bbxou~4]2_z*wGe#{4[k">
                                        <field name="TEXT">AutoLight ist deaktiviert</field>
                                      </shadow>
                                    </value>
                                  </block>
                                </statement>
                                <next>
                                  <block type="comment" id="hoxnMLgQ2aNN0m=5Y:}m">
                                    <field name="COMMENT">AtHomeTimer</field>
                                    <next>
                                      <block type="controls_if" id="v*U[9UI_|4@c)yiirCvb">
                                        <value name="IF0">
                                          <block type="logic_compare" id="}W#E1zCXZitL.S|r_*u,">
                                            <field name="OP">EQ</field>
                                            <value name="A">
                                              <block type="get_value" id=",Nlb[/RysL/LlIrpQ+e.">
                                                <field name="ATTR">val</field>
                                                <field name="OID">0_userdata.0.GlobalVars.AtHome</field>
                                              </block>
                                            </value>
                                            <value name="B">
                                              <block type="logic_boolean" id="sOIRl}w5*9@4|Cu}Qa?F">
                                                <field name="BOOL">FALSE</field>
                                              </block>
                                            </value>
                                          </block>
                                        </value>
                                        <statement name="DO0">
                                          <block type="debug" id="vcPx3~z~f}j@TgeL8)8S">
                                            <field name="Severity">debug</field>
                                            <value name="TEXT">
                                              <shadow type="text" id="{V%?2,E+`DP%Jt6u@jBz">
                                                <field name="TEXT">Schalte OFF in 10 Minuten weil nicht zuhause</field>
                                              </shadow>
                                            </value>
                                            <next>
                                              <block type="comment" id="RVtp!r)ays=b{:K7RYxJ">
                                                <field name="COMMENT">AtHomeTimer</field>
                                                <next>
                                                  <block type="debug" id="jQU}W-zBlE`x1UT+%n.v">
                                                    <field name="Severity">debug</field>
                                                    <value name="TEXT">
                                                      <shadow type="text" id="397}R%`ouk+n%Ab}WH%%">
                                                        <field name="TEXT">Schalte OFF weil nicht zuhause</field>
                                                      </shadow>
                                                    </value>
                                                    <next>
                                                      <block type="debug" id="zFy.s;7+hO@}w7+K1uY[">
                                                        <field name="Severity">log</field>
                                                        <value name="TEXT">
                                                          <shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="g1ueDh_2oKR+gkXL:9pO">
                                                            <field name="TEXT">Schalte Licht AN</field>
                                                          </shadow>
                                                          <block type="procedures_callreturn" id="~mNhEHA+,LT?rX%eZ2lR">
                                                            <mutation name="SetSwitchlist">
                                                              <arg name="switches"></arg>
                                                              <arg name="TurnON"></arg>
                                                              <arg name="OFFTime"></arg>
                                                            </mutation>
                                                            <value name="ARG0">
                                                              <block type="variables_get" id="_Yf;JY5.:8UL{r9*yAn;">
                                                                <field name="VAR" id="xjjCO3x]~#p7S0:#%i0_">switches</field>
                                                              </block>
                                                            </value>
                                                            <value name="ARG1">
                                                              <block type="logic_boolean" id="f%n5w^9=kBCnrPPhJn;=">
                                                                <field name="BOOL">FALSE</field>
                                                              </block>
                                                            </value>
                                                            <value name="ARG2">
                                                              <block type="math_number" id="i_ImUcS(?61s*B~NN-39">
                                                                <field name="NUM">10</field>
                                                              </block>
                                                            </value>
                                                          </block>
                                                        </value>
                                                      </block>
                                                    </next>
                                                  </block>
                                                </next>
                                              </block>
                                            </next>
                                          </block>
                                        </statement>
                                      </block>
                                    </next>
                                  </block>
                                </next>
                              </block>
                            </next>
                          </block>
                        </next>
                      </block>
                    </next>
                  </block>
                </next>
              </block>
            </statement>
            <value name="RETURN">
              <block type="text_join" id="!bwM/xMn9lV`jZFwfsa/">
                <mutation items="2"></mutation>
                <value name="ADD0">
                  <block type="text" id="NjBm7Pn=DYJEAIm@_6UC">
                    <field name="TEXT">PIR Done: </field>
                  </block>
                </value>
                <value name="ADD1">
                  <block type="variables_get" id="u_!p(H,3VMjs5mEvL+43">
                    <field name="VAR" id="IX/gU^R_Zpb]{vD5A]Sn">RoomName</field>
                  </block>
                </value>
              </block>
            </value>
          </block>
          <block type="on_ext" id=";^LGVCUKOD;aGmWXc=c6" x="13" y="3188">
            <mutation xmlns="http://www.w3.org/1999/xhtml" items="4"></mutation>
            <field name="CONDITION">ne</field>
            <field name="ACK_CONDITION"></field>
            <value name="OID0">
              <shadow xmlns="http://www.w3.org/1999/xhtml" type="field_oid" id="=Z_mw^?rB%bQC7u}kx|%">
                <field name="oid">deconz.0.Sensors.40.presence</field>
              </shadow>
              <block type="field_oid" id="JsYO^Vgi0)-y|F+^oviC">
                <field name="oid">0_userdata.0.GlobalVars.AtHome</field>
              </block>
            </value>
            <value name="OID1">
              <shadow xmlns="http://www.w3.org/1999/xhtml" type="field_oid" id="$nQiwk=`v3y=fQ]PvUN0">
                <field name="oid">default</field>
              </shadow>
              <block type="field_oid" id="[}`A:Y9U/u;5q,+v,W48">
                <field name="oid">deconz.0.Sensors.25.presence</field>
              </block>
            </value>
            <value name="OID2">
              <shadow xmlns="http://www.w3.org/1999/xhtml" type="field_oid" id="]e+nkTtwhknTJrrtFP4I">
                <field name="oid">default</field>
              </shadow>
              <block type="field_oid" id="N#U0xQObgj/`[$L^lonm">
                <field name="oid">deconz.0.Sensors.12.presence</field>
              </block>
            </value>
            <value name="OID3">
              <shadow type="field_oid" id="O;xK`Y0:=Myj8klNmIBi">
                <field name="oid">default</field>
              </shadow>
              <block type="field_oid" id="A{Zk{I]]+wwcj:MI]+He">
                <field name="oid">0_userdata.0.GlobalVars.Wohnzimmer_TV</field>
              </block>
            </value>
            <statement name="STATEMENT">
              <block type="debug" id="u8|~_n$bA:aWJ`UqCTFC">
                <field name="Severity">log</field>
                <value name="TEXT">
                  <shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="ynfu|Z|NikvpCQ:1o:BB">
                    <field name="TEXT">test</field>
                  </shadow>
                  <block type="procedures_callreturn" id="nLv0b%CGK37Z)cY~zw/z">
                    <mutation name="PIROnOff">
                      <arg name="RoomName"></arg>
                      <arg name="pir_01"></arg>
                      <arg name="pir_02"></arg>
                      <arg name="pir_lux_01"></arg>
                      <arg name="pir_lux_02"></arg>
                      <arg name="pir_lux_limit"></arg>
                      <arg name="switches"></arg>
                      <arg name="extraOFFswitches"></arg>
                      <arg name="OFFTime"></arg>
                      <arg name="KeepOn"></arg>
                      <arg name="KeepOff"></arg>
                      <arg name="IgnoreNightMode"></arg>
                    </mutation>
                    <value name="ARG0">
                      <block type="text" id="}I(7Bqqm)_X~_X|bEiB1">
                        <field name="TEXT">Wohnzimmer</field>
                      </block>
                    </value>
                    <value name="ARG1">
                      <block type="field_oid" id="d`u(D,@Raq%;fP4CKEJt">
                        <field name="oid">deconz.0.Sensors.25.presence</field>
                      </block>
                    </value>
                    <value name="ARG2">
                      <block type="field_oid" id="NUjj.[urXP,8St`J=il:">
                        <field name="oid">deconz.0.Sensors.12.presence</field>
                      </block>
                    </value>
                    <value name="ARG3">
                      <block type="field_oid" id="c4R}~dbft8bbBgzDj3|r">
                        <field name="oid">deconz.0.Sensors.26.lux</field>
                      </block>
                    </value>
                    <value name="ARG4">
                      <block type="field_oid" id="{^ndJH5O0Hu5[@t(aCqz">
                        <field name="oid">deconz.0.Sensors.11.lux</field>
                      </block>
                    </value>
                    <value name="ARG5">
                      <block type="variables_get" id="vO{DatzV5%jA(Um]`XI*">
                        <field name="VAR" id="Z}*@ZQ],86inGv;ML!G/">GlobalLuxLimit</field>
                      </block>
                    </value>
                    <value name="ARG6">
                      <block type="procedures_callreturn" id="4b:WqC9H[=9`.[Ojfj?}">
                        <mutation name="wz_select_device"></mutation>
                      </block>
                    </value>
                    <value name="ARG7">
                      <block type="lists_create_with" id="c*D~`u7fuL5XaFK,!dJj">
                        <mutation items="7"></mutation>
                        <value name="ADD0">
                          <block type="field_oid" id="l;tyX^aUS_sSz%qL*TA)">
                            <field name="oid">deconz.0.Lights.21.on</field>
                          </block>
                        </value>
                        <value name="ADD1">
                          <block type="field_oid" id="t30:yg6P5=n3yIO$o^JK">
                            <field name="oid">deconz.0.Lights.22.on</field>
                          </block>
                        </value>
                        <value name="ADD2">
                          <block type="field_oid" id="mTIp`Y(Qt[?)#9bwPzRW">
                            <field name="oid">deconz.0.Lights.25.on</field>
                          </block>
                        </value>
                        <value name="ADD3">
                          <block type="field_oid" id="8ERU2+Cpj6jc128qe|Y!">
                            <field name="oid">deconz.0.Lights.26.on</field>
                          </block>
                        </value>
                        <value name="ADD4">
                          <block type="field_oid" id="F.g)-!0lCT):XZgMp@y,">
                            <field name="oid">milight-smart-light.2.wz_tv.fullColor-1.on</field>
                          </block>
                        </value>
                        <value name="ADD5">
                          <block type="field_oid" id="-Pi@+Lq]TB1.=9-_3Bdk">
                            <field name="oid">deconz.0.Lights.2.on</field>
                          </block>
                        </value>
                        <value name="ADD6">
                          <block type="field_oid" id="#t5{77?jGUrm/b@71+d]">
                            <field name="oid">scene.0.Szene_pir-wohnzimmer</field>
                          </block>
                        </value>
                      </block>
                    </value>
                    <value name="ARG8">
                      <block type="math_number" id="DpGu,O=HhqM~YNvwYd(q">
                        <field name="NUM">15</field>
                      </block>
                    </value>
                    <value name="ARG9">
                      <block type="get_value_var" id="`0Sf$59Dvioli#0BigAu">
                        <field name="ATTR">val</field>
                        <value name="OID">
                          <shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="clv1]niZbc4686`koi;*">
                            <field name="TEXT"></field>
                          </shadow>
                          <block type="field_oid" id="[aYgpU8$]POx,/._r.ZL">
                            <field name="oid">0_userdata.0.GlobalVars.Wohnzimmer_TV</field>
                          </block>
                        </value>
                      </block>
                    </value>
                    <value name="ARG10">
                      <block type="logic_boolean" id="RwUt,vY#EAiFlDjIpHC1">
                        <field name="BOOL">FALSE</field>
                      </block>
                    </value>
                    <value name="ARG11">
                      <block type="logic_boolean" id="hD~{MtehXnYitYJ:{oei">
                        <field name="BOOL">FALSE</field>
                      </block>
                    </value>
                  </block>
                </value>
              </block>
            </statement>
          </block>
          <block type="procedures_defreturn" id="97)riRpuhw.aXAyJOQ#[" x="13" y="3913">
            <mutation>
              <arg name="switches" varid="xjjCO3x]~#p7S0:#%i0_"></arg>
              <arg name="TurnON" varid="N=.oocr,|f!EjH[T#m4W"></arg>
              <arg name="OFFTime" varid=".vDs7L59v=fy*rrUz[gY"></arg>
            </mutation>
            <field name="NAME">SetSwitchlist</field>
            <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment>
            <statement name="STACK">
              <block type="controls_forEach" id="?W@B=92zUWf^!ER$H:2S">
                <field name="VAR" id="#DF~YDx#7HA~2_~c}$P?">switch</field>
                <value name="LIST">
                  <block type="variables_get" id="cFsXd};PL_5F@w6(c(Qg">
                    <field name="VAR" id="xjjCO3x]~#p7S0:#%i0_">switches</field>
                  </block>
                </value>
                <statement name="DO">
                  <block type="controls_if" id="~kwRL!VPw_s!Z|Lw:Y=t">
                    <mutation else="1"></mutation>
                    <value name="IF0">
                      <block type="variables_get" id="~Hs{Nb8!2FayVhlmP{_o">
                        <field name="VAR" id="#DF~YDx#7HA~2_~c}$P?">switch</field>
                      </block>
                    </value>
                    <statement name="DO0">
                      <block type="debug" id="gjY2qE}KLN:vNc$SoY~/">
                        <field name="Severity">log</field>
                        <value name="TEXT">
                          <shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="6Lv/kM);m|r--.+Hld*_">
                            <field name="TEXT">test</field>
                          </shadow>
                          <block type="text_join" id="N7@;X%^/S.U5nHl*eN=T">
                            <mutation items="6"></mutation>
                            <value name="ADD0">
                              <block type="text" id="yG%!Tu:2Cm3+)#s)HGga">
                                <field name="TEXT">Schalte: </field>
                              </block>
                            </value>
                            <value name="ADD1">
                              <block type="variables_get" id="|Wz|g-AiGzZSF(sbV,7L">
                                <field name="VAR" id="#DF~YDx#7HA~2_~c}$P?">switch</field>
                              </block>
                            </value>
                            <value name="ADD2">
                              <block type="text" id="gTBof0-WEUX0K|/%@NqH">
                                <field name="TEXT"> - </field>
                              </block>
                            </value>
                            <value name="ADD3">
                              <block type="variables_get" id="SF|0p5(O[YcG%OBo}h3w">
                                <field name="VAR" id="N=.oocr,|f!EjH[T#m4W">TurnON</field>
                              </block>
                            </value>
                            <value name="ADD4">
                              <block type="text" id=".y0Iqt1N6.gIv/P9fYSd">
                                <field name="TEXT"> - delay </field>
                              </block>
                            </value>
                            <value name="ADD5">
                              <block type="variables_get" id="-3KJjwlYCU;SI:}WNZz@">
                                <field name="VAR" id=".vDs7L59v=fy*rrUz[gY">OFFTime</field>
                              </block>
                            </value>
                          </block>
                        </value>
                        <next>
                          <block type="control_ex" id="79VIhFd[8OR7W~)]+Q7u">
                            <field name="TYPE">false</field>
                            <field name="CLEAR_RUNNING">TRUE</field>
                            <value name="OID">
                              <shadow xmlns="http://www.w3.org/1999/xhtml" type="field_oid" id=",6QIA.:kmqHzLpOpp8{;">
                                <field name="oid">Object ID</field>
                              </shadow>
                              <block type="variables_get" id="G:^~pH88w+vU!!SqMNx^">
                                <field name="VAR" id="#DF~YDx#7HA~2_~c}$P?">switch</field>
                              </block>
                            </value>
                            <value name="VALUE">
                              <shadow xmlns="http://www.w3.org/1999/xhtml" type="logic_boolean" id="M)y7lc35WCOB-sP@0.+Y">
                                <field name="BOOL">TRUE</field>
                              </shadow>
                              <block type="variables_get" id="CRtJGnM(7mlyCrjtAS#2">
                                <field name="VAR" id="N=.oocr,|f!EjH[T#m4W">TurnON</field>
                              </block>
                            </value>
                            <value name="DELAY_MS">
                              <shadow xmlns="http://www.w3.org/1999/xhtml" type="math_number" id="*6fVY^7+fvHLGB^6ICUb">
                                <field name="NUM">0</field>
                              </shadow>
                              <block type="math_arithmetic" id="pM[;2Up_AS8vj(_EDMK)">
                                <field name="OP">ADD</field>
                                <value name="A">
                                  <shadow xmlns="http://www.w3.org/1999/xhtml" type="math_number" id="bVbb!f6+5,f}Wl`KX4^f">
                                    <field name="NUM">1</field>
                                  </shadow>
                                  <block type="math_arithmetic" id="JrRlB#cNt~OPNxUEH.;#">
                                    <field name="OP">MULTIPLY</field>
                                    <value name="A">
                                      <shadow xmlns="http://www.w3.org/1999/xhtml" type="math_number" id="G{^vO}H,^Q{6{Y#)%NQE">
                                        <field name="NUM">10</field>
                                      </shadow>
                                      <block type="variables_get" id="bZmmlv;6v=s;zh!Gb/h0">
                                        <field name="VAR" id=".vDs7L59v=fy*rrUz[gY">OFFTime</field>
                                      </block>
                                    </value>
                                    <value name="B">
                                      <shadow type="math_number" id="``T4@SD7}ao:1:$~a5?R">
                                        <field name="NUM">60000</field>
                                      </shadow>
                                    </value>
                                  </block>
                                </value>
                                <value name="B">
                                  <shadow xmlns="http://www.w3.org/1999/xhtml" type="math_number" id="*61~~OTr35.DVn~j@84c">
                                    <field name="NUM">1</field>
                                  </shadow>
                                  <block type="math_random_int" id="Dvdm;BUT|h?pR6|d8Ncr">
                                    <value name="FROM">
                                      <shadow type="math_number" id="My|V/L|ec}ckrD)G)|2n">
                                        <field name="NUM">1</field>
                                      </shadow>
                                    </value>
                                    <value name="TO">
                                      <shadow type="math_number" id="xKoCsxqCSQp{q${^Y**t">
                                        <field name="NUM">500</field>
                                      </shadow>
                                    </value>
                                  </block>
                                </value>
                              </block>
                            </value>
                          </block>
                        </next>
                      </block>
                    </statement>
                    <statement name="ELSE">
                      <block type="debug" id="=.|w?9nf5~~PyKL5=g46">
                        <field name="Severity">log</field>
                        <value name="TEXT">
                          <shadow type="text" id="G=+l93Z8O{D|r+-TKizq">
                            <field name="TEXT">Switches Eintrag ist leer</field>
                          </shadow>
                        </value>
                      </block>
                    </statement>
                  </block>
                </statement>
              </block>
            </statement>
            <value name="RETURN">
              <block type="text" id="(U$(5asPxY/vxdWptKjo">
                <field name="TEXT">SetSwitches</field>
              </block>
            </value>
          </block>
          <block type="procedures_defreturn" id="Ly=3A3kJj[%)$pL1Y*Js" x="13" y="4513">
            <mutation>
              <arg name="switches" varid="xjjCO3x]~#p7S0:#%i0_"></arg>
            </mutation>
            <field name="NAME">GetSwitches</field>
            <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment>
            <statement name="STACK">
              <block type="variables_set" id="XFx8yOAtiL4G[Z;-r39M">
                <field name="VAR" id=":#q3xGH!O9R*~b!?qxmd">counter</field>
                <value name="VALUE">
                  <block type="math_number" id="A}w2Qz(.Sb}.d_=K[)kV">
                    <field name="NUM">0</field>
                  </block>
                </value>
                <next>
                  <block type="controls_forEach" id="OYbqZv/z,%U*6pycO0Ia">
                    <field name="VAR" id="#DF~YDx#7HA~2_~c}$P?">switch</field>
                    <value name="LIST">
                      <block type="variables_get" id="?2SsKISMzWqd/!ldagRl">
                        <field name="VAR" id="xjjCO3x]~#p7S0:#%i0_">switches</field>
                      </block>
                    </value>
                    <statement name="DO">
                      <block type="controls_if" id="*)}3??[G]V$)lT*Dc(kl">
                        <value name="IF0">
                          <block type="variables_get" id="qsq)yI{bGs5rs35sMFev">
                            <field name="VAR" id="#DF~YDx#7HA~2_~c}$P?">switch</field>
                          </block>
                        </value>
                        <statement name="DO0">
                          <block type="controls_if" id="-Rxingu-2hBJ?hm)NC8r">
                            <mutation else="1"></mutation>
                            <value name="IF0">
                              <block type="logic_compare" id="%R@E-(.[4?QEQ(XUEkUU">
                                <field name="OP">EQ</field>
                                <value name="A">
                                  <block type="get_value_var" id="6RXvDhz[f3Nc+|--=VEN">
                                    <field name="ATTR">val</field>
                                    <value name="OID">
                                      <shadow xmlns="http://www.w3.org/1999/xhtml" type="text" id="O:I4V1*pY/CJ6le4+IP@">
                                        <field name="TEXT"></field>
                                      </shadow>
                                      <block type="variables_get" id="5tn`VgHa5Ba+g^i3hn]1">
                                        <field name="VAR" id="#DF~YDx#7HA~2_~c}$P?">switch</field>
                                      </block>
                                    </value>
                                  </block>
                                </value>
                                <value name="B">
                                  <block type="logic_boolean" id="-l?E7{+i:c.,=!NAAvc*">
                                    <field name="BOOL">TRUE</field>
                                  </block>
                                </value>
                              </block>
                            </value>
                            <statement name="DO0">
                              <block type="math_change" id="sbUQ?-Q!Dkk~Ppqv{a_m">
                                <field name="VAR" id=":#q3xGH!O9R*~b!?qxmd">counter</field>
                                <value name="DELTA">
                                  <shadow type="math_number" id="cl$?.u]-:?xmJw8Ai!_Q">
                                    <field name="NUM">1</field>
                                  </shadow>
                                </value>
                              </block>
                            </statement>
                            <statement name="ELSE">
                              <block type="variables_set" id="Ip0ZYg-1)*0N9c0Avxhp">
                                <field name="VAR" id=":#q3xGH!O9R*~b!?qxmd">counter</field>
                                <value name="VALUE">
                                  <block type="math_number" id=":]i@+YY1zf=2pmyk940O">
                                    <field name="NUM">0</field>
                                  </block>
                                </value>
                              </block>
                            </statement>
                          </block>
                        </statement>
                      </block>
                    </statement>
                    <next>
                      <block type="controls_if" id=",mB*mcs]MX,^99pPJUa{">
                        <mutation else="1"></mutation>
                        <value name="IF0">
                          <block type="logic_compare" id="|pnl;7.yklmYt**dQ(^0">
                            <field name="OP">EQ</field>
                            <value name="A">
                              <block type="variables_get" id="}IuVQ4.8q2.^[k6ZDPEO">
                                <field name="VAR" id=":#q3xGH!O9R*~b!?qxmd">counter</field>
                              </block>
                            </value>
                            <value name="B">
                              <block type="lists_length" id="}:5;_`YuLk6Hg3HVw[@d">
                                <value name="VALUE">
                                  <block type="variables_get" id="e!:Q`NRUF#W.,-{8(^Oe">
                                    <field name="VAR" id="xjjCO3x]~#p7S0:#%i0_">switches</field>
                                  </block>
                                </value>
                              </block>
                            </value>
                          </block>
                        </value>
                        <statement name="DO0">
                          <block type="debug" id="P9{2K[xAC7^JZaWZ;V~P">
                            <field name="Severity">log</field>
                            <value name="TEXT">
                              <shadow type="text" id="AD(k:Pz|uh5edFFT2Q*W">
                                <field name="TEXT">Switches sind AN</field>
                              </shadow>
                            </value>
                            <next>
                              <block type="variables_set" id="6QcH=2!04EY?p9o/ChzL">
                                <field name="VAR" id="UFl:*B!P.|vFu=[uU3T/">return</field>
                                <value name="VALUE">
                                  <block type="logic_boolean" id="NMtD{*YcoYw9zD@Z2WDp">
                                    <field name="BOOL">TRUE</field>
                                  </block>
                                </value>
                              </block>
                            </next>
                          </block>
                        </statement>
                        <statement name="ELSE">
                          <block type="debug" id="~CIg6id=8ds{FM[;#Udk">
                            <field name="Severity">log</field>
                            <value name="TEXT">
                              <shadow type="text" id="gE$ehZm~b8}1t7Kr6+9E">
                                <field name="TEXT">Switches sind AUS</field>
                              </shadow>
                            </value>
                            <next>
                              <block type="variables_set" id="3OFGY-djS_YMS$;~.+s]">
                                <field name="VAR" id="UFl:*B!P.|vFu=[uU3T/">return</field>
                                <value name="VALUE">
                                  <block type="logic_boolean" id="ym(,6;S:c{KTq-}6A2In">
                                    <field name="BOOL">FALSE</field>
                                  </block>
                                </value>
                              </block>
                            </next>
                          </block>
                        </statement>
                      </block>
                    </next>
                  </block>
                </next>
              </block>
            </statement>
            <value name="RETURN">
              <block type="variables_get" id="F6:BVND*:t/WUU}QVqc3">
                <field name="VAR" id="UFl:*B!P.|vFu=[uU3T/">return</field>
              </block>
            </value>
          </block>
        </xml>
        
        ? Offline
        ? Offline
        Ein ehemaliger Benutzer
        schrieb am zuletzt editiert von
        #61

        @Christoph1337 Fettschrift super 👍🏽👍🏽

        Christoph1337C 1 Antwort Letzte Antwort
        1
        • ? Ein ehemaliger Benutzer

          @Christoph1337 Fettschrift super 👍🏽👍🏽

          Christoph1337C Offline
          Christoph1337C Offline
          Christoph1337
          schrieb am zuletzt editiert von
          #62

          @ilovegym 😃

          Ich hoffe das hilft!

          1 Antwort Letzte Antwort
          0
          • M Offline
            M Offline
            MarkusMac
            schrieb am zuletzt editiert von
            #63

            @Mic erstmal ein großes Kompliment! Solch ein Adapter ist überfällig und wie du die Thematik umsetzt ist wirklich super! Danke dafür! Bin sehr gespannt und freue mich schon auf die nächsten Versionen. 🙂

            Ich nutze im Bad eine Yeelight Deckenlampe, die ich mit einem Bewegungsmelder ein und wieder ausschalte. Allerdings werden bei mir im Skript jedes Mal vorm Einschalten diverse Attribute gesetzt. In Abhängigkeit der Astrozeit eine bestimmte Farbtemperatur und außerdem in Abhängigkeit der Tageszeit, Wochentag und/oder Feiertag die Helligkeit, die Ausschaltverzögerung und der Lichtmodus (dunkles "Moonlight" oder normales Licht.)

            Ich vermute, dass man das mit deinem Adapter auch umsetzen könnte, indem man mit ihm einfach einen Datenpunkt "Badlampe" ein und aus schaltet und dann sämtliche zusätzliche Logik (nämlich die Lampenattribute berechnen und die Lampe einschalten) über ein eigenes Skript löst, welches bei Änderung des "Badlampen"-Datenpunktes triggert. Das müsste gehen, oder?

            Was dann aber noch nicht funktionieren würde ist folgendes: Ich lasse die Lampe nicht sofort ausgehen, wenn für einen bestimmten Zeitraum keine Bewegung mehr festgestelt wurde, sondern ich dimme sie erst für 5 Sekunden runter. Wenn also dann noch jemand im Bad ist, kann man durch hektische Armbewegungen dafür sorgen, dass das Licht nicht ausgeht... 😉
            Ob man sowas mit dem Adapter hinbekommt, müsste man mal ausprobieren.

            Werde ich mir in den nächsten Tagen mal anschauen.

            Christoph1337C 1 Antwort Letzte Antwort
            0
            • M MarkusMac

              @Mic erstmal ein großes Kompliment! Solch ein Adapter ist überfällig und wie du die Thematik umsetzt ist wirklich super! Danke dafür! Bin sehr gespannt und freue mich schon auf die nächsten Versionen. 🙂

              Ich nutze im Bad eine Yeelight Deckenlampe, die ich mit einem Bewegungsmelder ein und wieder ausschalte. Allerdings werden bei mir im Skript jedes Mal vorm Einschalten diverse Attribute gesetzt. In Abhängigkeit der Astrozeit eine bestimmte Farbtemperatur und außerdem in Abhängigkeit der Tageszeit, Wochentag und/oder Feiertag die Helligkeit, die Ausschaltverzögerung und der Lichtmodus (dunkles "Moonlight" oder normales Licht.)

              Ich vermute, dass man das mit deinem Adapter auch umsetzen könnte, indem man mit ihm einfach einen Datenpunkt "Badlampe" ein und aus schaltet und dann sämtliche zusätzliche Logik (nämlich die Lampenattribute berechnen und die Lampe einschalten) über ein eigenes Skript löst, welches bei Änderung des "Badlampen"-Datenpunktes triggert. Das müsste gehen, oder?

              Was dann aber noch nicht funktionieren würde ist folgendes: Ich lasse die Lampe nicht sofort ausgehen, wenn für einen bestimmten Zeitraum keine Bewegung mehr festgestelt wurde, sondern ich dimme sie erst für 5 Sekunden runter. Wenn also dann noch jemand im Bad ist, kann man durch hektische Armbewegungen dafür sorgen, dass das Licht nicht ausgeht... 😉
              Ob man sowas mit dem Adapter hinbekommt, müsste man mal ausprobieren.

              Werde ich mir in den nächsten Tagen mal anschauen.

              Christoph1337C Offline
              Christoph1337C Offline
              Christoph1337
              schrieb am zuletzt editiert von
              #64

              @MarkusMac Colle Idee mit dem hektischen winken und dimmen :D:D:D:D:D:D

              1 Antwort Letzte Antwort
              0
              • Christoph1337C Offline
                Christoph1337C Offline
                Christoph1337
                schrieb am zuletzt editiert von
                #65

                @Mic

                https://github.com/ioBroker/AdapterRequests/issues/439

                🙂

                1 Antwort Letzte Antwort
                0
                • MichMeinM Offline
                  MichMeinM Offline
                  MichMein
                  schrieb am zuletzt editiert von MichMein
                  #66

                  @Mic, zu erst einmal vielen Dank für die Entwicklung Deines Adapters, dieser ist ziemlich gut gelungen.
                  Ich habe ihn mal installiert und nach einigen "Stolperfallen" habe ich es tatsächlich geschafft meinen Rolladen mit einem Aqara Opple zu öffnen und zu schließen. Um einen Rolladen zu steuern ist er sicherlich nicht wirklich konzipiert, aber es funktioniert.

                  Folgende Fehler sind mir aufgefallen,

                  • beim öffnen der DropDown Menüs sind diese nicht vollständig zu sehen und es erscheint rechts ein Scrollbalken, siehe Screenshot.
                  • um die Checkboxen in den DropDown Menüs aktivieren zu können muss ich links neben die Checkbox klicken. Klicke ich direkt in die Checkbox wird diese nicht aktiviert, allerdings werden "speichern" und "Speichern und schliessen" wieder aktiv.
                  • im Log ist mir aufgefallen das dort die Einträge immer doppelt geschrieben werden, siehe Log.

                  Fragen, Anregungen und Verbesserungen,

                  • da Du den Adpater so gestaltet hast das immer ein Schedule angelegt werden muss, hier die Frage ob Du bei den Zeiten eine "immer" oder "ganztägig" Checkbox hinzufügen kannst, eventuell auch eine "Täglich" Checkbox bei den Wochentagen.
                  • besteht die Möglichkeit unter "Target Devices" ein Toggle einzufügen, um mit einem Trigger der nur "true" kann einen Aktor von true auf false und wieder true schalten zu können. Dies wäre für meine Rolladensteuerung sehr praktisch und vielleicht auch für andere Dinge. Und in diesem Zug auch das Delay herabsetzen für das nochmalige betätigen des Triggers.

                  Vielen Dank, das wars wohl erstmal

                  2020-07-08 19:07:44.300 - info: smartcontrol.0 (10721) Trigger 'Rolladen terrassentür auf' activated for 'Rolladen Terrassentür auf'. Turned on 'Rolladen Terrassentür auf'.
                  2020-07-08 19:07:44.843 - info: smartcontrol.0 (10721) State 'sonoff.0.Jalousie Terrassentür.POWER1' changed to 'true' -> 'targetDevices.Rolladen Terrassentür auf' set to true.
                  2020-07-08 19:07:44.855 - info: smartcontrol.0 (10721) State 'sonoff.0.Jalousie Terrassentür.POWER1' changed to 'true' -> 'targetDevices.Rolladen Terrassentür auf' set to true.
                  2020-07-08 19:08:15.355 - info: smartcontrol.0 (10721) State 'sonoff.0.Jalousie Terrassentür.POWER1' changed to 'false' -> 'targetDevices.Rolladen Terrassentür auf' set to true.
                  2020-07-08 19:08:15.370 - info: smartcontrol.0 (10721) State 'sonoff.0.Jalousie Terrassentür.POWER1' changed to 'false' -> 'targetDevices.Rolladen Terrassentür auf' set to true.
                  2020-07-08 19:11:46.973 - info: smartcontrol.0 (10721) State 'sonoff.0.Jalousie Terrassentür.POWER1' changed to 'false' -> 'targetDevices.Rolladen Terrassentür auf' set to true.
                  2020-07-08 19:11:47.038 - info: smartcontrol.0 (10721) State 'sonoff.0.Jalousie Terrassentür.POWER2' changed to 'false' -> 'targetDevices.Rolladen Terrassentür zu' set to true.
                  2020-07-08 19:16:47.016 - info: smartcontrol.0 (10721) State 'sonoff.0.Jalousie Terrassentür.POWER1' changed to 'false' -> 'targetDevices.Rolladen Terrassentür auf' set to true.
                  2020-07-08 19:16:47.023 - info: smartcontrol.0 (10721) State 'sonoff.0.Jalousie Terrassentür.POWER2' changed to 'false' -> 'targetDevices.Rolladen Terrassentür zu' set to true.
                  2020-07-08 19:21:46.948 - info: smartcontrol.0 (10721) State 'sonoff.0.Jalousie Terrassentür.POWER1' changed to 'false' -> 'targetDevices.Rolladen Terrassentür auf' set to true.
                  2020-07-08 19:21:46.994 - info: smartcontrol.0 (10721) State 'sonoff.0.Jalousie Terrassentür.POWER2' changed to 'false' -> 'targetDevices.Rolladen Terrassentür zu' set to true.
                  2020-07-08 19:26:47.060 - info: smartcontrol.0 (10721) State 'sonoff.0.Jalousie Terrassentür.POWER1' changed to 'false' -> 'targetDevices.Rolladen Terrassentür auf' set to true.
                  2020-07-08 19:26:47.070 - info: smartcontrol.0 (10721) State 'sonoff.0.Jalousie Terrassentür.POWER2' changed to 'false' -> 'targetDevices.Rolladen Terrassentür zu' set to true.
                  2020-07-08 19:31:47.021 - info: smartcontrol.0 (10721) State 'sonoff.0.Jalousie Terrassentür.POWER1' changed to 'false' -> 'targetDevices.Rolladen Terrassentür auf' set to true.
                  2020-07-08 19:31:47.073 - info: smartcontrol.0 (10721) State 'sonoff.0.Jalousie Terrassentür.POWER2' changed to 'false' -> 'targetDevices.Rolladen Terrassentür zu' set to true.
                  2020-07-08 19:36:46.918 - info: smartcontrol.0 (10721) State 'sonoff.0.Jalousie Terrassentür.POWER1' changed to 'false' -> 'targetDevices.Rolladen Terrassentür auf' set to true.
                  2020-07-08 19:36:46.943 - info: smartcontrol.0 (10721) State 'sonoff.0.Jalousie Terrassentür.POWER2' changed to 'false' -> 'targetDevices.Rolladen Terrassentür zu' set to true.
                  2020-07-08 19:38:04.569 - info: smartcontrol.0 (10721) Trigger 'Rolladen terrassentür zu' activated for 'Rolladen Terrassentür zu'. Turned on 'Rolladen Terrassentür zu'.
                  2020-07-08 19:38:05.147 - info: smartcontrol.0 (10721) State 'sonoff.0.Jalousie Terrassentür.POWER2' changed to 'true' -> 'targetDevices.Rolladen Terrassentür zu' set to true.
                  2020-07-08 19:38:05.169 - info: smartcontrol.0 (10721) State 'sonoff.0.Jalousie Terrassentür.POWER2' changed to 'true' -> 'targetDevices.Rolladen Terrassentür zu' set to true.
                  2020-07-08 19:38:10.587 - info: smartcontrol.0 (10721) Trigger 'Rolladen terrassentür zu' activated for 'Rolladen Terrassentür zu'. However, devices 'Rolladen Terrassentür zu' not turned on as these are already on.
                  2020-07-08 19:38:16.371 - info: smartcontrol.0 (10721) Trigger 'Rolladen terrassentür auf' activated for 'Rolladen Terrassentür auf'. Turned on 'Rolladen Terrassentür auf'.
                  2020-07-08 19:38:16.474 - info: smartcontrol.0 (10721) State 'sonoff.0.Jalousie Terrassentür.POWER2' changed to 'false' -> 'targetDevices.Rolladen Terrassentür zu' set to true.
                  2020-07-08 19:38:16.492 - info: smartcontrol.0 (10721) State 'sonoff.0.Jalousie Terrassentür.POWER2' changed to 'false' -> 'targetDevices.Rolladen Terrassentür zu' set to true.
                  2020-07-08 19:38:17.048 - info: smartcontrol.0 (10721) State 'sonoff.0.Jalousie Terrassentür.POWER1' changed to 'true' -> 'targetDevices.Rolladen Terrassentür auf' set to true.
                  2020-07-08 19:38:17.089 - info: smartcontrol.0 (10721) State 'sonoff.0.Jalousie Terrassentür.POWER1' changed to 'true' -> 'targetDevices.Rolladen Terrassentür auf' set to true.
                  2020-07-08 19:38:28.938 - info: smartcontrol.0 (10721) State 'sonoff.0.Jalousie Terrassentür.POWER1' changed to 'false' -> 'targetDevices.Rolladen Terrassentür auf' set to true.
                  2020-07-08 19:38:28.945 - info: smartcontrol.0 (10721) State 'sonoff.0.Jalousie Terrassentür.POWER1' changed to 'false' -> 'targetDevices.Rolladen Terrassentür auf' set to true.
                  2020-07-08 19:41:46.966 - info: smartcontrol.0 (10721) State 'sonoff.0.Jalousie Terrassentür.POWER1' changed to 'false' -> 'targetDevices.Rolladen Terrassentür auf' set to true.
                  2020-07-08 19:41:46.972 - info: smartcontrol.0 (10721) State 'sonoff.0.Jalousie Terrassentür.POWER2' changed to 'false' -> 'targetDevices.Rolladen Terrassentür zu' set to true.
                  2020-07-08 19:46:46.885 - info: smartcontrol.0 (10721) State 'sonoff.0.Jalousie Terrassentür.POWER1' changed to 'false' -> 'targetDevices.Rolladen Terrassentür auf' set to true.
                  2020-07-08 19:46:46.893 - info: smartcontrol.0 (10721) State 'sonoff.0.Jalousie Terrassentür.POWER2' changed to 'false' -> 'targetDevices.Rolladen Terrassentür zu' set to true.
                  2020-07-08 19:51:46.997 - info: smartcontrol.0 (10721) State 'sonoff.0.Jalousie Terrassentür.POWER1' changed to 'false' -> 'targetDevices.Rolladen Terrassentür auf' set to true.
                  2020-07-08 19:51:47.043 - info: smartcontrol.0 (10721) State 'sonoff.0.Jalousie Terrassentür.POWER2' changed to 'false' -> 'targetDevices.Rolladen Terrassentür zu' set to true.
                  2020-07-08 19:56:47.010 - info: smartcontrol.0 (10721) State 'sonoff.0.Jalousie Terrassentür.POWER1' changed to 'false' -> 'targetDevices.Rolladen Terrassentür auf' set to true.
                  2020-07-08 19:56:47.017 - info: smartcontrol.0 (10721) State 'sonoff.0.Jalousie Terrassentür.POWER2' changed to 'false' -> 'targetDevices.Rolladen Terrassentür zu' set to true.
                  2020-07-08 20:01:47.006 - info: smartcontrol.0 (10721) State 'sonoff.0.Jalousie Terrassentür.POWER1' changed to 'false' -> 'targetDevices.Rolladen Terrassentür auf' set to true.
                  2020-07-08 20:01:47.013 - info: smartcontrol.0 (10721) State 'sonoff.0.Jalousie Terrassentür.POWER2' changed to 'false' -> 'targetDevices.Rolladen Terrassentür zu' set to true.
                  2020-07-08 20:06:46.909 - info: smartcontrol.0 (10721) State 'sonoff.0.Jalousie Terrassentür.POWER1' changed to 'false' -> 'targetDevices.Rolladen Terrassentür auf' set to true.
                  2020-07-08 20:06:46.913 - info: smartcontrol.0 (10721) State 'sonoff.0.Jalousie Terrassentür.POWER2' changed to 'false' -> 'targetDevices.Rolladen Terrassentür zu' set to true.
                  2020-07-08 20:11:46.931 - info: smartcontrol.0 (10721) State 'sonoff.0.Jalousie Terrassentür.POWER1' changed to 'false' -> 'targetDevices.Rolladen Terrassentür auf' set to true.
                  2020-07-08 20:11:46.941 - info: smartcontrol.0 (10721) State 'sonoff.0.Jalousie Terrassentür.POWER2' changed to 'false' -> 'targetDevices.Rolladen Terrassentür zu' set to true.
                  2020-07-08 20:16:46.952 - info: smartcontrol.0 (10721) State 'sonoff.0.Jalousie Terrassentür.POWER1' changed to 'false' -> 'targetDevices.Rolladen Terrassentür auf' set to true.
                  2020-07-08 20:16:47.001 - info: smartcontrol.0 (10721) State 'sonoff.0.Jalousie Terrassentür.POWER2' changed to 'false' -> 'targetDevices.Rolladen Terrassentür zu' set to true.
                  

                  DropDown.png

                  Gruß Michael
                  Sofern Beiträge hilfreich für Dich sind, nutze das Voting unten rechts.

                  1 Antwort Letzte Antwort
                  0
                  • MicM Offline
                    MicM Offline
                    Mic
                    Developer
                    schrieb am zuletzt editiert von Mic
                    #67

                    @EdgarM

                    Kann man mit dem Adapter SmartControl auf einen Taster steuern? Also Taster benutzen -> Licht an, Taster nochmal benutzen -> Licht aus?

                    In die Wunschliste aufgenommen.

                    @Christoph1337

                    Ich hänge dir mal meine Blockly Funktion dafür an.

                    Danke, aber da bin ich leider raus, ich entwickle nicht mit Blockly und ist mir viel zu simplifiziert, ich brauche sauberes JavaScript 😉
                    Zu den "globalen Datenpunkten" (true/false): Das kannst du dann hier einpflegen:
                    a6d03ec3-1157-49d6-9384-4ae3b055dd47-image.png

                    Räume pflegst du in Zones:
                    edec80ea-54d1-4240-bf2b-cc312629cb88-image.png

                    Was mir bei Blockly am Anfang sehr viele Probleme gemacht hat war, dass die Verwendung von Timeouts in einer Funktion beim Aufruf von mehreren Räumen überschrieben werden.

                    Der Adapter macht nicht nur einen Timer, sondern viele pro Szenario 😉

                    Das müsste gehen, oder?

                    Sollte es. Muss dann auch getestet werden. Ich kann und werde hier übrigens nicht jeden individuellen Anwenderwunsch abbilden. Sondern versuche zu sammeln, und wo die meisten "Schmerzen" sind, wird als erstes eingebunden 😉

                    Ich lasse die Lampe nicht sofort ausgehen, wenn für einen bestimmten Zeitraum keine Bewegung mehr festgestelt wurde, sondern ich dimme sie erst für 5 Sekunden runter.
                    Klingt erst mal sehr speziell, die wenigsten Anwender haben in jedem Raum Dimmer. Bitte melde dich mit diesem Request noch mal in einigen Wochen nach Veröffentlichung des Adapters. Ich möchte erst mal nur möglichst generisch abbilden. Außerdem nutze ich selbst keine Dimmer, sondern steuere diese bei Bedarf mit JavaScript-Adapter....
                    Aber Use Case habe ich verstanden.

                    @Christoph1337

                    https://github.com/ioBroker/AdapterRequests/issues/439

                    https://github.com/ioBroker/AdapterRequests/issues/439#issuecomment-655728824 😉

                    @MichMein

                    beim öffnen der DropDown Menüs sind diese nicht vollständig zu sehen und es erscheint rechts ein Scrollbalken, siehe Screenshot.

                    Kann ich nicht nachvollziehen, aber hab hier lokal auch eine neuere Version und fixe, wie ich dazu komme. Upload zu Github mache ich dann erst später.

                    um die Checkboxen in den DropDown Menüs aktivieren zu können muss ich links neben die Checkbox klicken. Klicke ich direkt in die Checkbox wird diese nicht aktiviert, allerdings werden "speichern" und "Speichern und schliessen" wieder aktiv.

                    Liegt am ioBroker Admin, und nicht diesem Adapter. https://github.com/ioBroker/ioBroker.admin/issues/590
                    Problem wurde behoben und kommt mit dem nächsten ioBroker Adapter Admin release.

                    besteht die Möglichkeit unter "Target Devices" ein Toggle einzufügen, um mit einem Trigger der nur "true" kann einen Aktor von true auf false und wieder true schalten zu können.

                    Siehe oben, ist in die zukünftige Wunschliste aufgenommen.

                    Christoph1337C 1 Antwort Letzte Antwort
                    1
                    • MichMeinM Offline
                      MichMeinM Offline
                      MichMein
                      schrieb am zuletzt editiert von
                      #68

                      @Mic, vielen Dank für Deine schnelle Rückmeldung. Den Beitrag von @EdgarM habe ich wohl übersehen 🙄

                      @MichMein sagte in Planung neuer Adapter: Smart Control:

                      • da Du den Adpater so gestaltet hast das immer ein Schedule angelegt werden muss, hier die Frage ob Du bei den Zeiten eine "immer" oder "ganztägig" Checkbox hinzufügen kannst, eventuell auch eine "Täglich" Checkbox bei den Wochentagen.

                      Wie sieht es damit aus?

                      Gruß Michael
                      Sofern Beiträge hilfreich für Dich sind, nutze das Voting unten rechts.

                      1 Antwort Letzte Antwort
                      1
                      • MicM Mic

                        @EdgarM

                        Kann man mit dem Adapter SmartControl auf einen Taster steuern? Also Taster benutzen -> Licht an, Taster nochmal benutzen -> Licht aus?

                        In die Wunschliste aufgenommen.

                        @Christoph1337

                        Ich hänge dir mal meine Blockly Funktion dafür an.

                        Danke, aber da bin ich leider raus, ich entwickle nicht mit Blockly und ist mir viel zu simplifiziert, ich brauche sauberes JavaScript 😉
                        Zu den "globalen Datenpunkten" (true/false): Das kannst du dann hier einpflegen:
                        a6d03ec3-1157-49d6-9384-4ae3b055dd47-image.png

                        Räume pflegst du in Zones:
                        edec80ea-54d1-4240-bf2b-cc312629cb88-image.png

                        Was mir bei Blockly am Anfang sehr viele Probleme gemacht hat war, dass die Verwendung von Timeouts in einer Funktion beim Aufruf von mehreren Räumen überschrieben werden.

                        Der Adapter macht nicht nur einen Timer, sondern viele pro Szenario 😉

                        Das müsste gehen, oder?

                        Sollte es. Muss dann auch getestet werden. Ich kann und werde hier übrigens nicht jeden individuellen Anwenderwunsch abbilden. Sondern versuche zu sammeln, und wo die meisten "Schmerzen" sind, wird als erstes eingebunden 😉

                        Ich lasse die Lampe nicht sofort ausgehen, wenn für einen bestimmten Zeitraum keine Bewegung mehr festgestelt wurde, sondern ich dimme sie erst für 5 Sekunden runter.
                        Klingt erst mal sehr speziell, die wenigsten Anwender haben in jedem Raum Dimmer. Bitte melde dich mit diesem Request noch mal in einigen Wochen nach Veröffentlichung des Adapters. Ich möchte erst mal nur möglichst generisch abbilden. Außerdem nutze ich selbst keine Dimmer, sondern steuere diese bei Bedarf mit JavaScript-Adapter....
                        Aber Use Case habe ich verstanden.

                        @Christoph1337

                        https://github.com/ioBroker/AdapterRequests/issues/439

                        https://github.com/ioBroker/AdapterRequests/issues/439#issuecomment-655728824 😉

                        @MichMein

                        beim öffnen der DropDown Menüs sind diese nicht vollständig zu sehen und es erscheint rechts ein Scrollbalken, siehe Screenshot.

                        Kann ich nicht nachvollziehen, aber hab hier lokal auch eine neuere Version und fixe, wie ich dazu komme. Upload zu Github mache ich dann erst später.

                        um die Checkboxen in den DropDown Menüs aktivieren zu können muss ich links neben die Checkbox klicken. Klicke ich direkt in die Checkbox wird diese nicht aktiviert, allerdings werden "speichern" und "Speichern und schliessen" wieder aktiv.

                        Liegt am ioBroker Admin, und nicht diesem Adapter. https://github.com/ioBroker/ioBroker.admin/issues/590
                        Problem wurde behoben und kommt mit dem nächsten ioBroker Adapter Admin release.

                        besteht die Möglichkeit unter "Target Devices" ein Toggle einzufügen, um mit einem Trigger der nur "true" kann einen Aktor von true auf false und wieder true schalten zu können.

                        Siehe oben, ist in die zukünftige Wunschliste aufgenommen.

                        Christoph1337C Offline
                        Christoph1337C Offline
                        Christoph1337
                        schrieb am zuletzt editiert von
                        #69

                        @Mic hehe. Mit dem blockly ging es auch nicht direkt um den Code sondern die Logik. Ich dachte das hilft vielleicht für die eine oder andere Idee 🙂

                        1 Antwort Letzte Antwort
                        0
                        • Christoph1337C Offline
                          Christoph1337C Offline
                          Christoph1337
                          schrieb am zuletzt editiert von
                          #70

                          @Mic ich hätte noch eine feature Idee. Wenn man schon so einen Adapter hat, wäre es cool wenn dieser automatisch eine HTML Tabelle generiert wo alle Schalter mit Zuordnung enthalten sind. Das wäre gerade für den Start für viele einfacher da man sich nicht in vis großartig einarbeiten muss. Am besten sogar responsive für verschiedene Auflösungen

                          1 Antwort Letzte Antwort
                          0
                          • F Offline
                            F Offline
                            frostnatt
                            schrieb am zuletzt editiert von frostnatt
                            #71

                            @Mic said in Planung neuer Adapter: Smart Control:

                            Ich verstehe deinen Use-Case nicht ganz, also z.B.

                            0 ms: Bewegung löst aus (zigbee.0.XXX.occupancy -> true). Derzeitige Helligkeit (lt. zigbee.0.XXX.illuminance z.B. 30)
                            5 ms: Der Adapter liest die Helligkeit (30) und stellt fest, sie ist unterhalb von z.B. 60 --> also soll geschaltet werden.
                            10 ms: Licht wird eingeschaltet.
                            500 ms: Helligkeit (zigbee.0.XXX.illuminance) ist jetzt 500

                            Wüsste jetzt nicht, warum man hier einen Timestamp zum Vergleich bräuchte? Helligkeit wird ja ermittelt, bevor geschaltet wird, daher ist doch die Verzögerung hier egal.

                            Der Aqara Sensor aktualisiert Lux-Wert nur wenn eine Bewegung erkannt wird. Mein Problem ist, dass das Script (in meinem Fall) nicht mit dem aktuellen Helligkeitswert arbeitet. Es wartet ja nicht, bis dieser aktualisiert wird, sondern prüft einfach nur. Wenn der Lux-Datenpunkt aber erst nach dieser Prüfung mit dem aktuellen Wert beschrieben wird (ist bei mir so, denn ich benutzte ein eigenes Script zum Beschreiben der Datenpunkte, die Werte werden aus einem Json Objekt geparst, welches ich über mqtt empfange. Dieses Objekt ist so aufgebaut, dass Lux-Wert als letztes Element vorkommt) Die Zeitverzögerung zwischen Beschreiben von Occupancy und Lux habe ich nicht gemessen, bin mir aber ziemlich sicher, dass das aquara-motion-control Script die Prüfung schneller ausführt...
                            Ich hoffe, ich habe mein Problem ausführlich beschrieben.
                            Ich könnte meinen Parser auch so abändern, dass der Lux-Datenpunkt vor dem Occupancy beschrieben wird, finde aber dass eine Timestamp Prüfung hier sinnvoll ist. Es wird bestimmt noch Leute mit ähnlichen Timing Problemen geben...

                            Viele Grüße

                            1 Antwort Letzte Antwort
                            1
                            • V Offline
                              V Offline
                              vain
                              schrieb am zuletzt editiert von
                              #72

                              @Mic Erst einmal Riesen Lob für das was jetzt schon von diesem Adapter existiert. Vielen Dank für deine Zeit und Hingabe! 👍

                              Du hattest gestern in dem GitHub Adapter Request zur Lichtsteuerung (#439) auf diesen Topic hier verwiesen. Wollte mal ganz direkt fragen ob du dir vorstellen kannst eine HCL-Steuerung von Leuchtmitteln im Smart Control zu integrieren. Ganz gleich wie dann die Priorisierung aussähe.

                              Ich hatte dazu auch meine JavaScripte vorgestellt wie ich das aktuell umsetze.
                              Siehe hier

                              Beste Grüße
                              vain

                              1 Antwort Letzte Antwort
                              1
                              • MicM Offline
                                MicM Offline
                                Mic
                                Developer
                                schrieb am zuletzt editiert von Mic
                                #73

                                Danke für eure Antworten 🙂

                                @MichMein sagte in Planung neuer Adapter: Smart Control:

                                da Du den Adpater so gestaltet hast das immer ein Schedule angelegt werden muss, hier die Frage ob Du bei den Zeiten eine "immer" oder "ganztägig" Checkbox hinzufügen kannst, eventuell auch eine "Täglich" Checkbox bei den Wochentagen.

                                Wird dann leider etwas unübersichtlich in der Tabelle. Stattdessen empfehle ich, eine Zeile, die alle Zeiträume abdeckt, anzulegen, und dann beliebig zu kopieren.
                                schrr.gif

                                @Christoph1337 sagte in Planung neuer Adapter: Smart Control:

                                @Mic ich hätte noch eine feature Idee. Wenn man schon so einen Adapter hat, wäre es cool wenn dieser automatisch eine HTML Tabelle generiert wo alle Schalter mit Zuordnung enthalten sind. Das wäre gerade für den Start für viele einfacher da man sich nicht in vis großartig einarbeiten muss. Am besten sogar responsive für verschiedene Auflösungen

                                Habe es aufgenommen als Vorschlag.

                                @frostnatt sagte in Planung neuer Adapter: Smart Control:

                                Der Aqara Sensor aktualisiert Lux-Wert nur wenn eine Bewegung erkannt wird. Mein Problem ist, dass das Script (in meinem Fall) nicht mit dem aktuellen Helligkeitswert arbeitet. Es wartet ja nicht, bis dieser aktualisiert wird, sondern prüft einfach nur. Wenn der Lux-Datenpunkt aber erst nach dieser Prüfung mit dem aktuellen Wert beschrieben wird (ist bei mir so, denn ich benutzte ein eigenes Script zum Beschreiben der Datenpunkte, die Werte werden aus einem Json Objekt geparst, welches ich über mqtt empfange. Dieses Objekt ist so aufgebaut, dass Lux-Wert als letztes Element vorkommt) Die Zeitverzögerung zwischen Beschreiben von Occupancy und Lux habe ich nicht gemessen, bin mir aber ziemlich sicher, dass das aquara-motion-control Script die Prüfung schneller ausführt...
                                Ich hoffe, ich habe mein Problem ausführlich beschrieben.
                                Ich könnte meinen Parser auch so abändern, dass der Lux-Datenpunkt vor dem Occupancy beschrieben wird, finde aber dass eine Timestamp Prüfung hier sinnvoll ist. Es wird bestimmt noch Leute mit ähnlichen Timing Problemen geben...

                                Verstehe... Hmm... guter Punkt. Habe es aufgenommen als Vorschlag.

                                @vain sagte in Planung neuer Adapter: Smart Control:

                                Du hattest gestern in dem GitHub Adapter Request zur Lichtsteuerung (#439) auf diesen Topic hier verwiesen. Wollte mal ganz direkt fragen ob du dir vorstellen kannst eine HCL-Steuerung von Leuchtmitteln im Smart Control zu integrieren. Ganz gleich wie dann die Priorisierung aussähe.
                                Ich hatte dazu auch meine JavaScripte vorgestellt wie ich das aktuell umsetze.

                                Super Idee das mit deinem Script!
                                Allerdings muss ich den Scope des Adapters einschränken, denn sonst ist der nicht mehr pflegbar.

                                Auf dieses Topic habe ich in #439 verwiesen wegen der ursprünglichen Anfrage:

                                Ich stelle mir eine einfache GUI vor in der man den Räumen die Sensoren und Aktoren zuordnet. Dazu ein paar globale Einstellungen für Schaltzeit, Helligkeit, Anwesenheit usw. gepaart mit individuellen Raumeinstellungen.

                                Ich selbst habe auch Scripts für Lichter. Je nach Tageszeit usw. wird da beim Setzen eines Datenpunktes auf "true" ein unterschiedliches Licht gesetzt, und falls an, dann auch angepasst je nach neuer Tageszeit.
                                Derzeit sollte das aber meines Erachtens in einem separaten Adapter abgedeckt werden, sonst wird das hier zu viel. Dieser Adapter kann ja jederzeit einen Datenpunkt schalten, und dann kann sich ein Script oder Adapter um die restlichen Spezial-Dinge kümmern.

                                Ich schließe das aber nicht explizit aus, nur die nächsten Monate habe ich einen anderen Fokus, auch aufgrund meiner sehr eingeschränkten Zeit. Gerne kann jemand in der Zwischenzeit einen separaten Adapter hierfür entwickeln, und wir können dann auch später überlegen, diese zu verschmelzen.

                                1 Antwort Letzte Antwort
                                0
                                • MicM Offline
                                  MicM Offline
                                  Mic
                                  Developer
                                  schrieb am zuletzt editiert von
                                  #74

                                  Hier übrigens zusammengefasst alle aktuell gesammelten Vorschläge zur potenziellen Umsetzung:

                                  To Do (to be considered for further development and future releases

                                  • (frostnatt) - 2020-07-09 - Timing issue for Aquara motion sensors if brightness. ioBroker Forum Link
                                  • (Christoph1337) - 2020-09-07 - automatisch eine HTML Tabelle generiert wo alle Schalter mit Zuordnung enthalten sind. Das wäre gerade für den Start für viele einfacher da man sich nicht in vis großartig einarbeiten muss. Am besten sogar responsive für verschiedene Auflösungen. ioBroker Forum Link
                                  • (EdgarM) - 2020-07-08 - Taster benutzen -> Licht an, Taster nochmal benutzen -> Licht aus ioBroker Forum Link
                                  • (frostnatt) - 2020-07-05 - Es wäre ein gewisses "misbehaviour-handling" wünschenswert, wenn zum Beispiel der Occupancy-Datenpunkt nicht auf False gesetzt wird. Hier könnte man zwischen "nichts tun" und "in z Minuten ausschalten" wählen. ioBroker Forum Link
                                  • (OstfrieseUnterwegs) - 2020-07-03 - Add option to disregard additional schedule table if a time specific trigger is activated - ioBroker Forum Link
                                  • (OstfrieseUnterwegs) - 2020-07-03 - Think about a better name for "Room/Area", which is actually like a complex 'scene'. Maybe "zone"? - ioBroker Forum Link -> renamed to "Zones"
                                  • (OstfrieseUnterwegs) - 2020-07-03 - Cron Wizard - ioBroker Forum Link
                                  • (looxer01) - 2020-06-22 - IFTTT etc. - ioBroker Forum Link
                                  • (EdgarM) - 2020-06-18 - Several ideas - ioBroker Forum Link
                                  • (siggi85) - 2020-05-24 - time depending light control features - ioBroker Forum Link
                                  • (klassisch) - 2020-05-24 - several suggestions - ioBroker Forum Link
                                  • (Mic-M) - 2020-05-23 - die Möglichkeit, nach x Minuten ausschalten zu lassen (z.B. nach 2 Stunden) falls kein Trigger wie BWM mehr was auslöst, um Fälle abzudecken wie "der User ist eingeschlafen" ioBroker Forum Link
                                  • (MartyBr) & (crunship) - 2020-05-17 - Manuelles schalten soll Bewegungsmelder außer Kraft setzen. ioBroker Forum Link | ioBroker Forum Link 2 | Script

                                  Ich werde diese dann noch im Detail prüfen, priorisieren, usw.

                                  FredFF 1 Antwort Letzte Antwort
                                  2
                                  • MicM Mic

                                    Hier übrigens zusammengefasst alle aktuell gesammelten Vorschläge zur potenziellen Umsetzung:

                                    To Do (to be considered for further development and future releases

                                    • (frostnatt) - 2020-07-09 - Timing issue for Aquara motion sensors if brightness. ioBroker Forum Link
                                    • (Christoph1337) - 2020-09-07 - automatisch eine HTML Tabelle generiert wo alle Schalter mit Zuordnung enthalten sind. Das wäre gerade für den Start für viele einfacher da man sich nicht in vis großartig einarbeiten muss. Am besten sogar responsive für verschiedene Auflösungen. ioBroker Forum Link
                                    • (EdgarM) - 2020-07-08 - Taster benutzen -> Licht an, Taster nochmal benutzen -> Licht aus ioBroker Forum Link
                                    • (frostnatt) - 2020-07-05 - Es wäre ein gewisses "misbehaviour-handling" wünschenswert, wenn zum Beispiel der Occupancy-Datenpunkt nicht auf False gesetzt wird. Hier könnte man zwischen "nichts tun" und "in z Minuten ausschalten" wählen. ioBroker Forum Link
                                    • (OstfrieseUnterwegs) - 2020-07-03 - Add option to disregard additional schedule table if a time specific trigger is activated - ioBroker Forum Link
                                    • (OstfrieseUnterwegs) - 2020-07-03 - Think about a better name for "Room/Area", which is actually like a complex 'scene'. Maybe "zone"? - ioBroker Forum Link -> renamed to "Zones"
                                    • (OstfrieseUnterwegs) - 2020-07-03 - Cron Wizard - ioBroker Forum Link
                                    • (looxer01) - 2020-06-22 - IFTTT etc. - ioBroker Forum Link
                                    • (EdgarM) - 2020-06-18 - Several ideas - ioBroker Forum Link
                                    • (siggi85) - 2020-05-24 - time depending light control features - ioBroker Forum Link
                                    • (klassisch) - 2020-05-24 - several suggestions - ioBroker Forum Link
                                    • (Mic-M) - 2020-05-23 - die Möglichkeit, nach x Minuten ausschalten zu lassen (z.B. nach 2 Stunden) falls kein Trigger wie BWM mehr was auslöst, um Fälle abzudecken wie "der User ist eingeschlafen" ioBroker Forum Link
                                    • (MartyBr) & (crunship) - 2020-05-17 - Manuelles schalten soll Bewegungsmelder außer Kraft setzen. ioBroker Forum Link | ioBroker Forum Link 2 | Script

                                    Ich werde diese dann noch im Detail prüfen, priorisieren, usw.

                                    FredFF Online
                                    FredFF Online
                                    FredF
                                    Most Active Forum Testing
                                    schrieb am zuletzt editiert von
                                    #75

                                    @Mic
                                    Du machst einen aber auch neugierig und schaffst es die Spannung aufrecht zu halten. ⚡ 🆙
                                    Ich will doch erst auf den offiziellen Teststart warten, mann, mann, mann...😜

                                    MicM 1 Antwort Letzte Antwort
                                    0
                                    • FredFF FredF

                                      @Mic
                                      Du machst einen aber auch neugierig und schaffst es die Spannung aufrecht zu halten. ⚡ 🆙
                                      Ich will doch erst auf den offiziellen Teststart warten, mann, mann, mann...😜

                                      MicM Offline
                                      MicM Offline
                                      Mic
                                      Developer
                                      schrieb am zuletzt editiert von
                                      #76

                                      @FredF sagte in Planung neuer Adapter: Smart Control:

                                      @Mic
                                      Du machst einen aber auch neugierig und schaffst es die Spannung aufrecht zu halten. ⚡ 🆙
                                      Ich will doch erst auf den offiziellen Teststart warten, mann, mann, mann...😜

                                      Hier nun der offizielle Aufruf zum Testen 😎

                                      Aufruf: Neuen SmartControl-Adapter 0.1.0-alpha.3 testen

                                      Bitte dort weiter machen, und nicht mehr hier. Danke!

                                      1 Antwort Letzte Antwort
                                      0
                                      Antworten
                                      • In einem neuen Thema antworten
                                      Anmelden zum Antworten
                                      • Älteste zuerst
                                      • Neuste zuerst
                                      • Meiste Stimmen


                                      Support us

                                      ioBroker
                                      Community Adapters
                                      Donate

                                      734

                                      Online

                                      32.4k

                                      Benutzer

                                      81.4k

                                      Themen

                                      1.3m

                                      Beiträge
                                      Community
                                      Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen
                                      ioBroker Community 2014-2025
                                      logo
                                      • Anmelden

                                      • Du hast noch kein Konto? Registrieren

                                      • Anmelden oder registrieren, um zu suchen
                                      • Erster Beitrag
                                        Letzter Beitrag
                                      0
                                      • Aktuell
                                      • Tags
                                      • Ungelesen 0
                                      • Kategorien
                                      • Unreplied
                                      • Beliebt
                                      • GitHub
                                      • Docu
                                      • Hilfe