Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Blockly
    5. Hilfe bei Skript BWM und Hue + Shelly

    NEWS

    • Wir empfehlen: Node.js 22.x

    • Neuer Blog: Fotos und Eindrücke aus Solingen

    • ioBroker goes Matter ... Matter Adapter in Stable

    Hilfe bei Skript BWM und Hue + Shelly

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

      Hallo Leute!

      Ich hab folgendes Setup in der Küche

      1 HUE BWM
      2 Ledstreifne bei Arbeitsfläche

      jetzt habe ich die Deckenbeleuchtung auf Shelly umgebaut (Wechselschalter EDGE setting) ich muss also umschalten im Skript verwenden und mit Watt prüfen ob es schon an war

      Ziel:

      Tagsüber wenns hell genug ist soll die Decke nicht mit angehen ?!? wie das bei Hue kann man es in der App einstellen wird dann tagsüber PRESENCE im iobroker nicht umgeschalten?

      also nur wenn es dunkel ist und zw 22:00 - 6:00 auch nicht.

      Weiters sollte eine gewisse Minutenzahl ohne Bewegung gepudert werden damit wenn man steht und sich beim Kochen wenig bewegt das Licht nicht immer aus und angeht.

      Hätte hier jemand die Muse mir beim Script zu helfen bzw mir dieses anpassen.

      ich komm nach 2 stunden leider nicht weiter als das

      <xml xmlns="http://www.w3.org/1999/xhtml">
        <variables>
          <variable type="undefined" id="LampeAus">LampeAus</variable>
        </variables>
        <block type="on_ext" id="jKGzmF9.YaF(fmPo.mWx" x="-387" y="-412">
          <mutation items="1"></mutation>
          <field name="CONDITION">true</field>
          <field name="ACK_CONDITION"></field>
          <value name="OID0">
            <shadow type="field_oid" id="rn?qw-/+i|2Jh99JvM9M">
              <field name="oid">hue.0.Philips_hue.Arbeitsplatte_1.on</field>
            </shadow>
          </value>
          <statement name="STATEMENT">
            <block type="controls_if" id="Mb]Q+EB,+(UxpMRk:,,k">
              <value name="IF0">
                <block type="logic_compare" id="+B3j$/3GCKc/79O?]LmP">
                  <field name="OP">LT</field>
                  <value name="A">
                    <block type="get_value" id="zzmG4:XV~b}VE`l_t``:">
                      <field name="ATTR">val</field>
                      <field name="OID">shelly.0.SHSW-25#68D7BF#1.Relay0.Power</field>
                    </block>
                  </value>
                  <value name="B">
                    <block type="text" id="sZh8)W/;RHDCbZiTWwqf">
                      <field name="TEXT">1</field>
                    </block>
                  </value>
                </block>
              </value>
              <statement name="DO0">
                <block type="toggle" id="ii3x~(Xf=,CVhR}U;EGl">
                  <mutation delay_input="false"></mutation>
                  <field name="OID">shelly.0.SHSW-25#68D7BF#1.Relay0.Switch</field>
                  <field name="WITH_DELAY">FALSE</field>
                </block>
              </statement>
              <next>
                <block type="timeouts_settimeout" id="|/ueUjoWt{]4.D0f[L$Q">
                  <field name="NAME">LampeAus</field>
                  <field name="DELAY">1</field>
                  <field name="UNIT">min</field>
                  <statement name="STATEMENT">
                    <block type="toggle" id="RjAYtdyd=-s7u,?-Xp4+">
                      <mutation delay_input="false"></mutation>
                      <field name="OID">shelly.0.SHSW-25#68D7BF#1.Relay0.Switch</field>
                      <field name="WITH_DELAY">FALSE</field>
                    </block>
                  </statement>
                </block>
              </next>
            </block>
          </statement>
        </block>
      </xml>
      

      Bildschirmfoto 2019-12-28 um 17.20.07.png

      lg
      tom

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

        @freaktech sagte

        nur wenn es dunkel ist und zw 22:00 - 6:00 auch nicht.
        Weiters sollte eine gewisse Minutenzahl ohne Bewegung gepudert werden damit wenn man steht und sich beim Kochen wenig bewegt das Licht nicht immer aus und angeht.

        Versuche es mal so:

        Blockly_temp.JPG

        <xml xmlns="http://www.w3.org/1999/xhtml">
          <variables>
            <variable type="undefined" id="LampeAus">LampeAus</variable>
          </variables>
          <block type="on_ext" id="jKGzmF9.YaF(fmPo.mWx" x="-387" y="-412">
            <mutation items="1"></mutation>
            <field name="CONDITION">ne</field>
            <field name="ACK_CONDITION"></field>
            <value name="OID0">
              <shadow type="field_oid" id="rn?qw-/+i|2Jh99JvM9M">
                <field name="oid">hue.0.Philips_hue.Arbeitsplatte_1.on</field>
              </shadow>
            </value>
            <statement name="STATEMENT">
              <block type="controls_if" id=";e,@`+CWt9Jhq%7*t)sS">
                <mutation else="1"></mutation>
                <value name="IF0">
                  <block type="logic_operation" id="8Fbeh-1B6p[y7TkJnAX[" inline="false">
                    <field name="OP">AND</field>
                    <value name="A">
                      <block type="logic_operation" id="8=N34xIfS2gB%[.^(y+W" inline="false">
                        <field name="OP">AND</field>
                        <value name="A">
                          <block type="on_source" id="G}L!v4TBCVIWX5m@`!kB">
                            <field name="ATTR">state.val</field>
                          </block>
                        </value>
                        <value name="B">
                          <block type="time_compare" id="]g`n@M?L2wkqX%^oVbOk">
                            <mutation end_time="true"></mutation>
                            <field name="OPTION">between</field>
                            <field name="START_TIME">6:00</field>
                            <field name="END_TIME">22:00</field>
                          </block>
                        </value>
                      </block>
                    </value>
                    <value name="B">
                      <block type="time_compare_ex" id="`g`6|CWnqNhJ2qomiTjM" inline="false">
                        <mutation 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=";*%y^Dafr6+^|x=Eq2gs">
                            <field name="TEXT">12:00</field>
                          </shadow>
                          <block type="time_astro" id="c81Caxu%z[bYU`]:)*{]">
                            <field name="TYPE">sunrise</field>
                            <field name="OFFSET">0</field>
                          </block>
                        </value>
                        <value name="END_TIME">
                          <shadow type="text" id="o$*e:CJ9Pcy4aKG;)S:D">
                            <field name="TEXT">18:00</field>
                          </shadow>
                          <block type="time_astro" id="~c+YTLv7:.KR^t+|V2@_">
                            <field name="TYPE">sunset</field>
                            <field name="OFFSET">0</field>
                          </block>
                        </value>
                      </block>
                    </value>
                  </block>
                </value>
                <statement name="DO0">
                  <block type="timeouts_cleartimeout" id="gr5M?[u_D7UO(}VH]$J~">
                    <field name="NAME">LampeAus</field>
                    <next>
                      <block type="controls_if" id="Mb]Q+EB,+(UxpMRk:,,k">
                        <value name="IF0">
                          <block type="logic_compare" id="+B3j$/3GCKc/79O?]LmP">
                            <field name="OP">LT</field>
                            <value name="A">
                              <block type="get_value" id="zzmG4:XV~b}VE`l_t``:">
                                <field name="ATTR">val</field>
                                <field name="OID">shelly.0.SHSW-25#68D7BF#1.Relay0.Power</field>
                              </block>
                            </value>
                            <value name="B">
                              <block type="math_number" id="[Axp;3.ZdbPuc(pB~%.~">
                                <field name="NUM">1</field>
                              </block>
                            </value>
                          </block>
                        </value>
                        <statement name="DO0">
                          <block type="toggle" id="ii3x~(Xf=,CVhR}U;EGl">
                            <mutation delay_input="false"></mutation>
                            <field name="OID">shelly.0.SHSW-25#68D7BF#1.Relay0.Switch</field>
                            <field name="WITH_DELAY">FALSE</field>
                          </block>
                        </statement>
                      </block>
                    </next>
                  </block>
                </statement>
                <statement name="ELSE">
                  <block type="timeouts_settimeout" id="|/ueUjoWt{]4.D0f[L$Q">
                    <field name="NAME">LampeAus</field>
                    <field name="DELAY">3</field>
                    <field name="UNIT">min</field>
                    <statement name="STATEMENT">
                      <block type="controls_if" id="/H,K5TKW|:ec4D5.H.cL">
                        <value name="IF0">
                          <block type="logic_compare" id="2%nD=qnE3++1P4]4J#E~">
                            <field name="OP">GT</field>
                            <value name="A">
                              <block type="get_value" id="FXLl`($K:`h|y6bl~znF">
                                <field name="ATTR">val</field>
                                <field name="OID">shelly.0.SHSW-25#68D7BF#1.Relay0.Power</field>
                              </block>
                            </value>
                            <value name="B">
                              <block type="math_number" id="P+QcBu:3G/d@Hl.}psXK">
                                <field name="NUM">1</field>
                              </block>
                            </value>
                          </block>
                        </value>
                        <statement name="DO0">
                          <block type="toggle" id="XK$LoSmj%RVC)3VxNAB#">
                            <mutation delay_input="false"></mutation>
                            <field name="OID">shelly.0.SHSW-25#68D7BF#1.Relay0.Switch</field>
                            <field name="WITH_DELAY">FALSE</field>
                          </block>
                        </statement>
                      </block>
                    </statement>
                  </block>
                </statement>
              </block>
            </statement>
          </block>
        </xml>
        

        1 Reply Last reply Reply Quote 0
        • F
          freaktech last edited by

          danke Paul

          das teste ich morgen gleich

          was mich grad fragend anspringt ist die Variable "Sonnenaufgang" woher soll iobroker das wissen, wohin ist das verknüpft ?!?

          lg
          tom

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

            @freaktech sagte:

            wohin ist das verknüpft ?!?

            In der Konfiguration der Javascript-Instanz Deine Ortskoordinaten eingeben.

            1 Reply Last reply Reply Quote 0
            • F
              freaktech last edited by

              meinst du das hier

              sollte so passen oder?

              Bildschirmfoto 2019-12-29 um 00.16.22.png

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

                @freaktech sagte:

                sollte so passen oder?

                Nein, Breiten- und Längengrad in den Astroeinstellungen der Javascript-Instanz eingeben.

                js_astro.JPG

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

                Support us

                ioBroker
                Community Adapters
                Donate

                841
                Online

                31.9k
                Users

                80.3k
                Topics

                1.3m
                Posts

                2
                6
                481
                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