Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Blockly
    5. Script für Schalter und Bewegungsmelder ** gelöst **

    NEWS

    • Wir empfehlen: Node.js 22.x

    • Neuer Blog: Fotos und Eindrücke aus Solingen

    • ioBroker goes Matter ... Matter Adapter in Stable

    Script für Schalter und Bewegungsmelder ** gelöst **

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

      Script teil vorher würde nur 1 daten punkt abgefragt ob true oder false

      <block xmlns="https://developers.google.com/blockly/xml" type="on_ext" id="ov}D(Be]`(nzX#Js!}]h" x="113" y="-37">
        <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
        <field name="CONDITION">ne</field>
        <field name="ACK_CONDITION"></field>
        <value name="OID0">
          <shadow type="field_oid" id="SAKP82;OM?2N%*fzz[{{">
            <field name="oid">zigbee.0.001788010bdb63a3.on_press</field>
          </shadow>
        </value>
        <statement name="STATEMENT">
          <block type="control" id="y7[mgz]-NK5R{5ajJg|4">
            <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
            <field name="OID">zigbee.0.00158d0003275cf3.state</field>
            <field name="WITH_DELAY">FALSE</field>
            <value name="VALUE">
              <block type="on_source" id="x}P/*I%sVvM{9=$Nd)ln">
                <field name="ATTR">state.val</field>
              </block>
            </value>
            <next>
              <block type="variables_set" id="iA|yzw[fYyfX#3gi%pcq">
                <field name="VAR" id="oSQQ2fSPDU*qU`rN:}(2">manuell_ein</field>
                <value name="VALUE">
                  <block type="on_source" id="Rx]e4#tp[EJaM4_]T6Y^">
                    <field name="ATTR">state.val</field>
                  </block>
                </value>
                <next>
                  <block type="controls_if" id="?[IJ/6:3lbB5u-m,QzBJ">
                    <value name="IF0">
                      <block type="variables_get" id="ku~F=kmsW^D]e/3T{6]5">
                        <field name="VAR" id="oSQQ2fSPDU*qU`rN:}(2">manuell_ein</field>
                      </block>
                    </value>
                    <statement name="DO0">
                      <block type="timeouts_cleartimeout" id="j9UA4-ObYtdM3kj4!fvq">
                        <field name="NAME">timeout</field>
                      </block>
                    </statement>
                  </block>
                </next>
              </block>
            </next>
          </block>
        </statement>
      </block>
      

      445534f2-0dc5-4be2-b769-db1dcdfe6ae8-image.png
      im neuen sind es 2 unterschiedliche

      <xml xmlns="https://developers.google.com/blockly/xml">
        <block type="on_ext" id="3)0xb@gM3^9`aYO+ddjs" x="87" y="-112">
          <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
          <field name="CONDITION">ne</field>
          <field name="ACK_CONDITION"></field>
          <value name="OID0">
            <shadow type="field_oid" id="MUE-tV{njdV4VS:^YuW#">
              <field name="oid">zigbee.0.001788010bdb63a3.on_press</field>
            </shadow>
          </value>
          <statement name="STATEMENT">
            <block type="control" id="hH#8KL}T2emPgo!YHqwM">
              <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
              <field name="OID">zigbee.0.00158d0003275cf3.state</field>
              <field name="WITH_DELAY">FALSE</field>
              <value name="VALUE">
                <block type="logic_boolean" id=",Al96J;tkLE+[!tOC_TT">
                  <field name="BOOL">TRUE</field>
                </block>
              </value>
            </block>
          </statement>
          <next>
            <block type="on_ext" id="bu0Nedy?)lN++yIzSXYy">
              <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
              <field name="CONDITION">ne</field>
              <field name="ACK_CONDITION"></field>
              <value name="OID0">
                <shadow type="field_oid" id="y$w*dkn%~kg)b.vi2LGJ">
                  <field name="oid">zigbee.0.001788010bdb63a3.off_press</field>
                </shadow>
              </value>
              <statement name="STATEMENT">
                <block type="control" id="b9)`|#xwOkHj#J8H|x4}">
                  <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                  <field name="OID">zigbee.0.00158d0003275cf3.state</field>
                  <field name="WITH_DELAY">FALSE</field>
                  <value name="VALUE">
                    <block type="logic_boolean" id="#1]Qdl:%w-*|bvSGgjNJ">
                      <field name="BOOL">FALSE</field>
                    </block>
                  </value>
                </block>
              </statement>
            </block>
          </next>
        </block>
      </xml>
      

      85838133-03d7-42f2-bd38-5f74932e8c99-image.png

      paul53 1 Reply Last reply Reply Quote 0
      • paul53
        paul53 @Horst Böttcher last edited by paul53

        @horst-böttcher sagte: im neuen sind es 2 unterschiedliche

        Wo ist der Teil für den BWM?

        Blockly_temp.JPG

        Horst Böttcher 1 Reply Last reply Reply Quote 0
        • Horst Böttcher
          Horst Böttcher @paul53 last edited by Horst Böttcher

          @paul53
          Das ist das alte script mit bewegungsmelder

          <xml xmlns="https://developers.google.com/blockly/xml">
            <variables>
              <variable id="oSQQ2fSPDU*qU`rN:}(2">manuell_ein</variable>
              <variable type="timeout" id="timeout">timeout</variable>
            </variables>
            <block type="on_ext" id=")7viWO.,ae+4/i$Su{v1" x="123" y="-645">
              <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
              <field name="CONDITION">ne</field>
              <field name="ACK_CONDITION"></field>
              <value name="OID0">
                <shadow type="field_oid" id="C{a`XU,:c^M[AsDI7qnt">
                  <field name="oid">zigbee.0.bc33acfffec14868.occupancy</field>
                </shadow>
              </value>
              <statement name="STATEMENT">
                <block type="controls_if" id="9DsA`f[*y[El#p^C2%KJ">
                  <value name="IF0">
                    <block type="logic_negate" id="]lJ$,j5ZAt!F_OH~3dPJ">
                      <value name="BOOL">
                        <block type="variables_get" id=".ga$.J5quUYHnJ$p!JMm">
                          <field name="VAR" id="oSQQ2fSPDU*qU`rN:}(2">manuell_ein</field>
                        </block>
                      </value>
                    </block>
                  </value>
                  <statement name="DO0">
                    <block type="controls_if" id="_LepHk2DO1;iMdeh~a2%">
                      <mutation else="1"></mutation>
                      <value name="IF0">
                        <block type="logic_operation" id="al@D4zbs@a1Hl4,p2,=#" inline="false">
                          <field name="OP">AND</field>
                          <value name="B">
                            <block type="on_source" id="Ky@{xEqs3cF|h-fMkq0s">
                              <field name="ATTR">state.val</field>
                            </block>
                          </value>
                        </block>
                      </value>
                      <statement name="DO0">
                        <block type="timeouts_cleartimeout" id="0I-sY/$R5#4_j|mwo80c">
                          <field name="NAME">timeout</field>
                          <next>
                            <block type="controls_if" id="7M)STun%Th0%[,s830xz">
                              <value name="IF0">
                                <block type="logic_negate" id="X[cT]3:Cqum?`;{Qo!5N">
                                  <value name="BOOL">
                                    <block type="get_value" id="Tj5cklBH,7}eUyV46O,0">
                                      <field name="ATTR">val</field>
                                      <field name="OID">zigbee.0.00158d0003275cf3.state</field>
                                    </block>
                                  </value>
                                </block>
                              </value>
                              <statement name="DO0">
                                <block type="control" id="pfAa@mhg2tdjGForYOK(">
                                  <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                  <field name="OID">zigbee.0.00158d0003275cf3.state</field>
                                  <field name="WITH_DELAY">FALSE</field>
                                  <value name="VALUE">
                                    <block type="logic_boolean" id="cpv%OP+fg[x*Qd`Gr6NN">
                                      <field name="BOOL">TRUE</field>
                                    </block>
                                  </value>
                                  <next>
                                    <block type="control" id="qD)6D1AMS,$W,~NY:RD$">
                                      <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                      <field name="OID">zigbee.0.00158d0003275cf3.brightness</field>
                                      <field name="WITH_DELAY">FALSE</field>
                                      <value name="VALUE">
                                        <block type="get_value" id="%V{6.cnTS#f,1r!EM?vL">
                                          <field name="ATTR">val</field>
                                          <field name="OID">0_userdata.0.Sonstieges.Farbtemperatur.Helldunkel_nach_Zeit</field>
                                        </block>
                                      </value>
                                      <next>
                                        <block type="control" id="I/s7EPsv2CY=Hv?Ua-R#">
                                          <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                          <field name="OID">zigbee.0.00158d0003275cf3.colortemp</field>
                                          <field name="WITH_DELAY">FALSE</field>
                                          <value name="VALUE">
                                            <block type="get_value" id="`,;7T7Is)a*Kl~roS~Fg">
                                              <field name="ATTR">val</field>
                                              <field name="OID">0_userdata.0.Sonstieges.Farbtemperatur.Kalt_Warm</field>
                                            </block>
                                          </value>
                                        </block>
                                      </next>
                                    </block>
                                  </next>
                                </block>
                              </statement>
                            </block>
                          </next>
                        </block>
                      </statement>
                      <statement name="ELSE">
                        <block type="timeouts_settimeout" id="1;lyA@b?X+`r[NP8asP%">
                          <field name="NAME">timeout</field>
                          <field name="DELAY">2</field>
                          <field name="UNIT">min</field>
                          <statement name="STATEMENT">
                            <block type="controls_if" id="wye@q.,:qFUo-yr{qC/;">
                              <value name="IF0">
                                <block type="get_value" id="ZG#|FoPrKpBt2=an^%6T">
                                  <field name="ATTR">val</field>
                                  <field name="OID">zigbee.0.00158d0003275cf3.state</field>
                                </block>
                              </value>
                              <statement name="DO0">
                                <block type="control" id="nh8Y1!h#oxfCpka$9MOP">
                                  <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                  <field name="OID">zigbee.0.00158d0003275cf3.state</field>
                                  <field name="WITH_DELAY">FALSE</field>
                                  <value name="VALUE">
                                    <block type="logic_boolean" id="KzzUYq@FR=cqOTZ$JFrl">
                                      <field name="BOOL">FALSE</field>
                                    </block>
                                  </value>
                                </block>
                              </statement>
                            </block>
                          </statement>
                        </block>
                      </statement>
                    </block>
                  </statement>
                </block>
              </statement>
              <next>
                <block type="on_ext" id="ov}D(Be]`(nzX#Js!}]h">
                  <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
                  <field name="CONDITION">ne</field>
                  <field name="ACK_CONDITION"></field>
                  <value name="OID0">
                    <shadow type="field_oid" id="SAKP82;OM?2N%*fzz[{{">
                      <field name="oid">zigbee.0.001788010bdb63a3.on_press</field>
                    </shadow>
                  </value>
                  <statement name="STATEMENT">
                    <block type="control" id="y7[mgz]-NK5R{5ajJg|4">
                      <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                      <field name="OID">zigbee.0.00158d0003275cf3.state</field>
                      <field name="WITH_DELAY">FALSE</field>
                      <value name="VALUE">
                        <block type="on_source" id="x}P/*I%sVvM{9=$Nd)ln">
                          <field name="ATTR">state.val</field>
                        </block>
                      </value>
                      <next>
                        <block type="variables_set" id="iA|yzw[fYyfX#3gi%pcq">
                          <field name="VAR" id="oSQQ2fSPDU*qU`rN:}(2">manuell_ein</field>
                          <value name="VALUE">
                            <block type="on_source" id="Rx]e4#tp[EJaM4_]T6Y^">
                              <field name="ATTR">state.val</field>
                            </block>
                          </value>
                          <next>
                            <block type="controls_if" id="?[IJ/6:3lbB5u-m,QzBJ">
                              <value name="IF0">
                                <block type="variables_get" id="ku~F=kmsW^D]e/3T{6]5">
                                  <field name="VAR" id="oSQQ2fSPDU*qU`rN:}(2">manuell_ein</field>
                                </block>
                              </value>
                              <statement name="DO0">
                                <block type="timeouts_cleartimeout" id="j9UA4-ObYtdM3kj4!fvq">
                                  <field name="NAME">timeout</field>
                                </block>
                              </statement>
                            </block>
                          </next>
                        </block>
                      </next>
                    </block>
                  </statement>
                </block>
              </next>
            </block>
          </xml>
          

          ecbbbfe5-8a85-4235-9aad-d86425fb3e12-image.png

          paul53 2 Replies Last reply Reply Quote 0
          • paul53
            paul53 @Horst Böttcher last edited by

            @horst-böttcher sagte: Das ist das alte script mit bewegungsmelder

            ... und das funktioniert nicht?
            Wie verhalten sich "on_press" und "off_press"?

            Horst Böttcher 1 Reply Last reply Reply Quote 0
            • Horst Böttcher
              Horst Böttcher @paul53 last edited by

              @paul53
              Press on und off gehen kurz auf True und dann wieder auf false
              das ist dieser Taster
              51Zb-fd5PXL.SL1500.jpg

              1 Reply Last reply Reply Quote 0
              • paul53
                paul53 @Horst Böttcher last edited by

                @horst-böttcher sagte: das alte script mit bewegungsmelder
                ... Press on und off gehen kurz auf True und dann wieder auf false

                Dann ersetze den unteren Trigger durch folgende:

                Blockly_temp.JPG

                Horst Böttcher 2 Replies Last reply Reply Quote 0
                • Horst Böttcher
                  Horst Böttcher @paul53 last edited by Horst Böttcher

                  @paul53 ok muss ich morgen ausprobieren ich muss gleich zur arbeit und komme erst spät nach hause

                  erdit hab es eingebaut jetzt werde ich heute abend sehn ob sich meie n frau beschärt

                  1 Reply Last reply Reply Quote 0
                  • Horst Böttcher
                    Horst Böttcher @paul53 last edited by

                    @paul53 dank dir geht super

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

                    Support us

                    ioBroker
                    Community Adapters
                    Donate

                    498
                    Online

                    32.0k
                    Users

                    80.3k
                    Topics

                    1.3m
                    Posts

                    2
                    8
                    326
                    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