Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Blockly
    5. Licht mit Aktoren-Schalter,DP und Fenstersensor *gelöst*

    NEWS

    • Neuer Blog: Fotos und Eindrücke aus Solingen

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

    • ioBroker goes Matter ... Matter Adapter in Stable

    Licht mit Aktoren-Schalter,DP und Fenstersensor *gelöst*

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

      Hi Zs,

      ich habe ein Skript das super lief, bis wir zum renovieren einige Aktoren tauschen mussten.
      Es ging etwas Zeit ins Land und als ich mein Skript wieder in Betrieb nehmen wollte, hatte ich eine Endlosschleife gebaut.
      Ich finde aber den Fehler einfach nicht, bzw. komme nicht mehr auf die Lösung. 😄

      Probieren führt unweigerlich zu Frust der weiblichen Mitbehauserin, da wir dann disco rund ums Haus haben Vielleicht kann mir ja jemand grad den entscheidenenden Tipp geben?! 😄

      Folgendes soll eigentlich passieren:
      DP in Userdata.Licht.Gartenbeleuchtung soll wahr sein, wenn min. 1 der Aktoren auch wahr ist und falsch wenn alle falsch sind.

      Garten_Licht:4.State, Holzlampe & Terrassenlicht sollen eingeschaltet werden wenn:
      Terassentuer.Actual wahr ist und und nur nach Sonnenuntergang & vor Sonnenaufgang
      sowie aus wenn Actual falsch ist.

      Zusätzlich sollen noch
      Garten_Licht:4.State & switch_led bei Abenddämmerung ein und um 23:35 ausgeschaltet werden.

      Dazu soll noch bei Änderung des DP Userdata.Licht.Gartenbeleuchtung in wahr die
      Funktion Garten ein & bei falsch die Funktion aus geschaltet werden.
      Selbiges bei Garten_licht ( ist ein Homematic Ip wanschalter fürs Gartenlicht)

      So schaut es momentan aus:
      Bildschirmfoto 2023-08-26 um 17.56.04.png

      <block xmlns="https://developers.google.com/blockly/xml" type="procedures_defnoreturn" id="plXeo4*.}X^.GszP|@w{" x="-862.537109375" y="-1612.578125">
        <field name="NAME">Garten Ein</field>
        <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment>
        <statement name="STACK">
          <block type="control" id="JS|?Yjl2-@A3|^R`UPuy">
            <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
            <field name="OID">sonoff.0.Holzlampe.POWER</field>
            <field name="WITH_DELAY">FALSE</field>
            <value name="VALUE">
              <block type="logic_boolean" id="@p4(B%Yu44gdXvG^W}Bi">
                <field name="BOOL">TRUE</field>
              </block>
            </value>
            <next>
              <block type="control" id="`4^ed-LG!D*sbELB@;!|">
                <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                <field name="OID">hm-rpc.0.00085D89B90BD4.4.STATE</field>
                <field name="WITH_DELAY">FALSE</field>
                <value name="VALUE">
                  <block type="logic_boolean" id="r`M]nk7;#(d,NRVa%1_K">
                    <field name="BOOL">TRUE</field>
                  </block>
                </value>
                <next>
                  <block type="control" id="I)mhog^iQ+jp903nd`{S">
                    <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                    <field name="OID">shelly.2.shellyplus1#441793a3a1d4#1.Relay0.Switch</field>
                    <field name="WITH_DELAY">FALSE</field>
                    <value name="VALUE">
                      <block type="logic_boolean" id="|``(}PM)VK4iF9y_ZB7t">
                        <field name="BOOL">TRUE</field>
                      </block>
                    </value>
                    <next>
                      <block type="control" id="XIs=W;mB/X]UOAYT;W4Q">
                        <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                        <field name="OID">shelly.2.shellyplus1#441793a39f10#1.Relay0.Switch</field>
                        <field name="WITH_DELAY">FALSE</field>
                        <value name="VALUE">
                          <block type="logic_boolean" id="3-lvI|N-uJwewhfat1[M">
                            <field name="BOOL">TRUE</field>
                          </block>
                        </value>
                        <next>
                          <block type="control" id="F%sVb0Mt||v98xQ,YBg:">
                            <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation>
                            <field name="OID">tuya.0.bf99b0e69416e17744rd02.20</field>
                            <field name="WITH_DELAY">TRUE</field>
                            <field name="DELAY_MS">10</field>
                            <field name="UNIT">sec</field>
                            <field name="CLEAR_RUNNING">FALSE</field>
                            <value name="VALUE">
                              <block type="logic_boolean" id="acXjHB^5WB,7K9$,5]4I">
                                <field name="BOOL">TRUE</field>
                              </block>
                            </value>
                          </block>
                        </next>
                      </block>
                    </next>
                  </block>
                </next>
              </block>
            </next>
          </block>
        </statement>
      </block>
      
      paul53 2 Replies Last reply Reply Quote 0
      • paul53
        paul53 @SoerenKaiser99 last edited by

        @soerenkaiser99
        Die beiden Taster "PRESS_SHORT" fehlen in der Beschreibung. Außerdem funktioniert "PRESS_SHORT" nicht mit "wurde geändert", da der Wert immer true ist.

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

          @paul53 meintest du in meiner Textbeschreibung? Da wäre es Garten_licht Press_Short ist in einem anderen kanal. Ich hatte nur den Stae in 4 erwähnt, sorry.
          Ansonsten ist eben da mein Problem, die Gartenbeleuchtung via State als DB in userdate und den Schlater mit Press_Short zusammen zu bringen, so dass der state korrekt in Yhaka angezeigt wird, von allen seiten zu schalten ist, es sich aber keine Schleife ergibt

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

            @soerenkaiser99
            Dein Export enthält nur die Funktion Garten_Ein.

            @soerenkaiser99 sagte in Licht mit Aktoren-Schalter,DP und Fenstersensor steuern:

            DP Userdata.Licht.Gartenbeleuchtung in wahr die Funktion Garten ein & bei falsch die Funktion aus geschaltet werden.

            Sollen auch "switch_led" und "Gartenlicht:4.STATE" ausgeschaltet werden?

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

              @soerenkaiser99
              Vorschlag:

              Blockly_temp.JPG

              S 2 Replies Last reply Reply Quote 0
              • S
                SoerenKaiser99 @paul53 last edited by

                @paul53 Vielen Dank 😄
                so geht nun wieder alles. Ich habe den falls block beim Schalter entfernt, die Frau hasst es wenn die ned tun, egal warum und wieso 😄 aber sonst ist alles prima! Tausend Dank!

                <xml xmlns="https://developers.google.com/blockly/xml">
                  <block type="on" id="*o[JXvmq6XD-1%iR[+M0" x="-1612" y="-2613">
                    <field name="OID">hm-rpc.0.00085D89B90BD4.1.PRESS_SHORT</field>
                    <field name="CONDITION">true</field>
                    <field name="ACK_CONDITION"></field>
                    <statement name="STATEMENT">
                      <block type="update" id="Ou3tL6WhOy*Bu[;yYQ!R">
                        <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                        <field name="OID">0_userdata.0.Licht.Gartenbeleuchtung</field>
                        <field name="WITH_DELAY">FALSE</field>
                        <value name="VALUE">
                          <block type="logic_boolean" id="=P~L0K%H:^j4BrvnJJL=">
                            <field name="BOOL">FALSE</field>
                          </block>
                        </value>
                      </block>
                    </statement>
                    <next>
                      <block type="on" id="BYu`aFp}|.]2{n*ToB{n">
                        <field name="OID">hm-rpc.0.00085D89B90BD4.2.PRESS_SHORT</field>
                        <field name="CONDITION">true</field>
                        <field name="ACK_CONDITION"></field>
                        <statement name="STATEMENT">
                          <block type="update" id="@k@si/l0x5oUCnPK4sfG">
                            <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                            <field name="OID">0_userdata.0.Licht.Gartenbeleuchtung</field>
                            <field name="WITH_DELAY">FALSE</field>
                            <value name="VALUE">
                              <block type="logic_boolean" id="o40:FCJ7y|w(LEI5mZQj">
                                <field name="BOOL">TRUE</field>
                              </block>
                            </value>
                          </block>
                        </statement>
                        <next>
                          <block type="on" id="#K]kp]J0h/-L{(:X+DJV">
                            <field name="OID">alias.0.Sensoren.Terassetuersensor.open</field>
                            <field name="CONDITION">ne</field>
                            <field name="ACK_CONDITION"></field>
                            <statement name="STATEMENT">
                              <block type="update" id="[,4t9BBN=@xAfB6w@)km">
                                <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                <field name="OID">0_userdata.0.Licht.Gartenbeleuchtung</field>
                                <field name="WITH_DELAY">FALSE</field>
                                <value name="VALUE">
                                  <block type="on_source" id="s,(_MGF_8Aaf(~-wGj:z">
                                    <field name="ATTR">state.val</field>
                                  </block>
                                </value>
                              </block>
                            </statement>
                            <next>
                              <block type="on" id="2=wam/#)@cX?5Opj|[;H">
                                <field name="OID">0_userdata.0.Licht.Gartenbeleuchtung</field>
                                <field name="CONDITION">ne</field>
                                <field name="ACK_CONDITION"></field>
                                <statement name="STATEMENT">
                                  <block type="controls_if" id="gdGl4y*5G~F%h~^:6%%C">
                                    <value name="IF0">
                                      <block type="time_compare_ex" id="hR-`-sk,Vd!+{Wx5%b]G">
                                        <mutation xmlns="http://www.w3.org/1999/xhtml" end_time="true" actual_time="true"></mutation>
                                        <field name="USE_ACTUAL_TIME">TRUE</field>
                                        <field name="OPTION">not between</field>
                                        <value name="START_TIME">
                                          <shadow type="text" id="ytd}G5w3G!iZ)|n:aE+]">
                                            <field name="TEXT">12:00</field>
                                          </shadow>
                                          <block type="time_astro" id="J9OP3:?UU)YJq^u$937Y">
                                            <field name="TYPE">sunrise</field>
                                            <field name="OFFSET">0</field>
                                          </block>
                                        </value>
                                        <value name="END_TIME">
                                          <shadow type="text" id="[xIT_y.u1BAu];keKH{=">
                                            <field name="TEXT">18:00</field>
                                          </shadow>
                                          <block type="time_astro" id="D(T2)OJ/Ih5Arb?WA:);">
                                            <field name="TYPE">sunset</field>
                                            <field name="OFFSET">0</field>
                                          </block>
                                        </value>
                                      </block>
                                    </value>
                                    <statement name="DO0">
                                      <block type="control" id="]=5c+k!t]2Tks~uR)7.h">
                                        <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                        <field name="OID">hm-rpc.0.00085D89B90BD4.4.STATE</field>
                                        <field name="WITH_DELAY">FALSE</field>
                                        <value name="VALUE">
                                          <block type="on_source" id="bdO7a062Jqr?SvPP/p$,">
                                            <field name="ATTR">state.val</field>
                                          </block>
                                        </value>
                                        <next>
                                          <block type="control" id="JS|?Yjl2-@A3|^R`UPuy">
                                            <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                            <field name="OID">sonoff.0.Holzlampe.POWER</field>
                                            <field name="WITH_DELAY">FALSE</field>
                                            <value name="VALUE">
                                              <block type="on_source" id="8j1q5;W`T@;9@Fd,HzX|">
                                                <field name="ATTR">state.val</field>
                                              </block>
                                            </value>
                                            <next>
                                              <block type="control" id="I)mhog^iQ+jp903nd`{S">
                                                <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                <field name="OID">shelly.2.shellyplus1#441793a3a1d4#1.Relay0.Switch</field>
                                                <field name="WITH_DELAY">FALSE</field>
                                                <value name="VALUE">
                                                  <block type="on_source" id="?0A4{$6{]3t/si,qq+Z.">
                                                    <field name="ATTR">state.val</field>
                                                  </block>
                                                </value>
                                                <next>
                                                  <block type="control" id="XIs=W;mB/X]UOAYT;W4Q">
                                                    <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                                    <field name="OID">shelly.2.shellyplus1#441793a39f10#1.Relay0.Switch</field>
                                                    <field name="WITH_DELAY">FALSE</field>
                                                    <value name="VALUE">
                                                      <block type="on_source" id="gWz+z6#{F_x/3gJJ(pU~">
                                                        <field name="ATTR">state.val</field>
                                                      </block>
                                                    </value>
                                                  </block>
                                                </next>
                                              </block>
                                            </next>
                                          </block>
                                        </next>
                                      </block>
                                    </statement>
                                  </block>
                                </statement>
                                <next>
                                  <block type="create" id="ziOT+E[_qE:b6az5Zq.v">
                                    <field name="NAME">0_userdata.0.Licht.Gartenbeleuchtung</field>
                                    <value name="VALUE">
                                      <block type="logic_boolean" id="WQtQ%cE}1}2;qfGgPP@C">
                                        <field name="BOOL">FALSE</field>
                                      </block>
                                    </value>
                                  </block>
                                </next>
                              </block>
                            </next>
                          </block>
                        </next>
                      </block>
                    </next>
                  </block>
                  <block type="astro" id="|xcn%F284aD/`,f)irIW" x="-888" y="-2563">
                    <field name="TYPE">dusk</field>
                    <field name="OFFSET">0</field>
                    <statement name="STATEMENT">
                      <block type="control" id="Uk8/_.$!~m/I*r(AV-Ri">
                        <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                        <field name="OID">hm-rpc.0.00085D89B90BD4.4.STATE</field>
                        <field name="WITH_DELAY">FALSE</field>
                        <value name="VALUE">
                          <block type="logic_boolean" id="GX]Z+MG*=iCa5S{P_l{|">
                            <field name="BOOL">TRUE</field>
                          </block>
                        </value>
                        <next>
                          <block type="control" id="L7p]485Qq|_rRF9PqDeh">
                            <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation>
                            <field name="OID">tuya.0.bf99b0e69416e17744rd02.20</field>
                            <field name="WITH_DELAY">TRUE</field>
                            <field name="DELAY_MS">10</field>
                            <field name="UNIT">sec</field>
                            <field name="CLEAR_RUNNING">FALSE</field>
                            <value name="VALUE">
                              <block type="logic_boolean" id="u~ZI%(`dsNz+~anrdEkZ">
                                <field name="BOOL">TRUE</field>
                              </block>
                            </value>
                            <next>
                              <block type="control" id="BO)KneXt@*;pT:0sWnwc">
                                <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                <field name="OID">tuya.0.bfa9393d1da9c96d2fk1jj.20</field>
                                <field name="WITH_DELAY">FALSE</field>
                                <value name="VALUE">
                                  <block type="logic_boolean" id="kt.Zi{rj}e66QVMSra?3">
                                    <field name="BOOL">TRUE</field>
                                  </block>
                                </value>
                              </block>
                            </next>
                          </block>
                        </next>
                      </block>
                    </statement>
                  </block>
                  <block type="schedule" id="yzeU(IW:Qt#Toz.z!3Pp" x="-887" y="-2362">
                    <field name="SCHEDULE">{"time":{"exactTime":true,"start":"23:35"},"period":{"days":1}}</field>
                    <statement name="STATEMENT">
                      <block type="control" id="goecet,I.sULAmsWRSqv">
                        <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                        <field name="OID">hm-rpc.0.00085D89B90BD4.4.STATE</field>
                        <field name="WITH_DELAY">FALSE</field>
                        <value name="VALUE">
                          <block type="logic_boolean" id="8WLOMvT+pP[rqg$B7F`-">
                            <field name="BOOL">FALSE</field>
                          </block>
                        </value>
                        <next>
                          <block type="control" id="@*u|W740=TxB8k[9}Vh*">
                            <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                            <field name="OID">tuya.0.bfa9393d1da9c96d2fk1jj.20</field>
                            <field name="WITH_DELAY">FALSE</field>
                            <value name="VALUE">
                              <block type="logic_boolean" id="RE*JDZ`)jd7}!amLl[|9">
                                <field name="BOOL">FALSE</field>
                              </block>
                            </value>
                          </block>
                        </next>
                      </block>
                    </statement>
                  </block>
                </xml>
                
                1 Reply Last reply Reply Quote 0
                • S
                  SoerenKaiser99 @paul53 last edited by SoerenKaiser99

                  @paul53 hast du eine Idee was der Fehler bedeutet?

                  Alias subscription error. Please check your alias definitions: sourceId=0_userdata.0.Licht.Gartenbeleuchtung, sourceObj={"common":{"name":"0_userdata.0.Licht.Gartenbeleuchtung","role":"state","type":"mixed"},"native":{},"type":"state","from":"system.adapter.javascript.0","user":"system.user.admin","ts":1691788973908,"_id":"0_userdata.0.Licht.Gartenbeleuchtung","acl":{"object":1636,"state":1636,"owner":"system.user.admin","ownerGroup":"system.group.administrator"}}
                  

                  hab ich grad nach dem ändern in Log gefunden.
                  Evtl das ein Alias auf einen DP in userdata verweist? Ist am Ende nicht schlimm. war nur ein Test und ich kann den DP in userdata verwenden

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

                  Support us

                  ioBroker
                  Community Adapters
                  Donate

                  949
                  Online

                  31.7k
                  Users

                  79.9k
                  Topics

                  1.3m
                  Posts

                  2
                  7
                  336
                  Loading More Posts
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes
                  Reply
                  • Reply as topic
                  Log in to reply
                  Community
                  Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen
                  The ioBroker Community 2014-2023
                  logo