Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Blockly
    5. Fenster offen Mitteilung auf mehrere Fenster umsetzten

    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

    Fenster offen Mitteilung auf mehrere Fenster umsetzten

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

      Tach allerseits
      Ich hab mir ein Blockly geschrieben, das Uhrzeitabhängig ein Fensterzustand abfragt, und bei Offen ein Telegram schickt.
      Jetzt würd ich das gern so umschreiben, das es nicht nur ein Fenster abfrägt, sondern eben alle. Und das eben am besten alles in diesem Blockly. Wie würdet ihr das umsetzten ?
      Anbei mein Versuch für das erste Fenster:

      <xml xmlns="https://developers.google.com/blockly/xml">
        <variables>
          <variable type="interval" id="Intervall">Intervall</variable>
        </variables>
        <block type="controls_if" id="m#w,{e3iK]pe)`1iPY;u" x="-12" y="13">
          <value name="IF0">
            <block type="time_compare" id="n.kiq!R)M2=(lpZIBUd=">
              <mutation xmlns="http://www.w3.org/1999/xhtml" end_time="true"></mutation>
              <field name="OPTION">between</field>
              <field name="START_TIME">20:00</field>
              <field name="END_TIME">23:00</field>
            </block>
          </value>
          <statement name="DO0">
            <block type="on" id="H]~Jt_;z[bu-m+vlVDqv">
              <field name="OID">hmip.0.devices.3014F711A00000DBE9953074.channels.1.windowOpen</field>
              <field name="CONDITION">ne</field>
              <field name="ACK_CONDITION"></field>
              <statement name="STATEMENT">
                <block type="controls_if" id="kEYcUI_gk4tHC0_%gVfg">
                  <mutation else="1"></mutation>
                  <value name="IF0">
                    <block type="logic_operation" id="b:4R|Ish?Ud3W/nq^P%r">
                      <field name="OP">AND</field>
                      <value name="A">
                        <block type="logic_compare" id="6^.ROl-]cg!ua%/f@#{=">
                          <field name="OP">EQ</field>
                          <value name="A">
                            <block type="get_value" id="KTO,ZYF]Q.t}fd9-},4n">
                              <field name="ATTR">val</field>
                              <field name="OID">hmip.0.devices.3014F711A00000DBE9953074.channels.1.windowOpen</field>
                            </block>
                          </value>
                          <value name="B">
                            <block type="logic_boolean" id="?@T.QQOZn{8eyrEq=5?8">
                              <field name="BOOL">TRUE</field>
                            </block>
                          </value>
                        </block>
                      </value>
                      <value name="B">
                        <block type="logic_compare" id="IfB[X{$bD4i$7k?90k3_">
                          <field name="OP">LT</field>
                          <value name="A">
                            <block type="get_value" id="b=^4IAuwjVhvYLuVn2O?">
                              <field name="ATTR">val</field>
                              <field name="OID">openweathermap.0.forecast.current.temperature</field>
                            </block>
                          </value>
                          <value name="B">
                            <block type="math_number" id="b1Le-*8G-tF9.tg!=0BX">
                              <field name="NUM">10</field>
                            </block>
                          </value>
                        </block>
                      </value>
                    </block>
                  </value>
                  <statement name="DO0">
                    <block type="timeouts_setinterval" id="-@,T)XH{XhH-KaFWD8X;">
                      <field name="NAME">Intervall</field>
                      <field name="INTERVAL">1</field>
                      <field name="UNIT">min</field>
                      <statement name="STATEMENT">
                        <block type="telegram" id="-dAX^XP6s0B(+hUYGzen">
                          <field name="INSTANCE"></field>
                          <field name="LOG"></field>
                          <field name="SILENT">FALSE</field>
                          <field name="PARSEMODE">default</field>
                          <value name="MESSAGE">
                            <shadow type="text" id="=5hd1YOmHxLN83Mu+9tk">
                              <field name="TEXT">Das Küchenfenster ist offen</field>
                            </shadow>
                          </value>
                        </block>
                      </statement>
                    </block>
                  </statement>
                  <statement name="ELSE">
                    <block type="timeouts_clearinterval" id="mDtar$u(Fc3/-nqW?}.V">
                      <field name="NAME">Intervall</field>
                    </block>
                  </statement>
                </block>
              </statement>
            </block>
          </statement>
        </block>
      </xml>
      

      Blockly_Fenster.JPG

      Dominik F. K 2 Replies Last reply Reply Quote 0
      • Dominik F.
        Dominik F. @IObroker_chris last edited by

        @IObroker_chris

        ich würde fogendes, bereits vorhandene und super laufende Skript nutzen:

        https://forum.iobroker.net/topic/31674/vorlage-generisches-fensteroffenskript-vis

        1 Reply Last reply Reply Quote 0
        • K
          ktmlauni @IObroker_chris last edited by

          @IObroker_chris
          Dein Ansatz ist besser als meiner von heute Morgen.
          Ich habe jetzt nur das Problem dass Dein Skript nur anläuft wenn das Fenster seinen Zustand wenigstens einmal ändert.

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

          Support us

          ioBroker
          Community Adapters
          Donate

          512
          Online

          31.9k
          Users

          80.2k
          Topics

          1.3m
          Posts

          3
          3
          571
          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