Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Blockly
    5. [erledigt] Frage zu Blockly, Warnung bei Regen über Alexa bei geöffnete Fenster und Türen

    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

    [erledigt] Frage zu Blockly, Warnung bei Regen über Alexa bei geöffnete Fenster und Türen

    This topic has been deleted. Only users with topic management privileges can see it.
    • StM47
      StM47 @thewhobox last edited by

      @thewhobox

      Danke, habs abgeändert!

      thewhobox sigi234 2 Replies Last reply Reply Quote 0
      • thewhobox
        thewhobox @StM47 last edited by

        @StM47 @BBTown deswegen dachte ich auch lieber auf den Regen DP triggern:
        d3983500-719c-46be-9eb2-e829300b7be6-grafik.png

        BBTown 1 Reply Last reply Reply Quote 0
        • BBTown
          BBTown @thewhobox last edited by

          @thewhobox ja, ich wollte in die selbe Kerbe schlagen 😉

          1 Reply Last reply Reply Quote 0
          • StM47
            StM47 @BBTown last edited by

            @BBTown

            Der Sinn des Ganzen soll doch sein, dass ich nicht vergesse, Fenster im Winter (unter 16°C) nach 10 Minuten zu schließen. Und wenn es in dieser Zeit anfängt zu regnen, bekomme ich ebenfalls eine Meldung. So lange sind die Fenster ja nie auf. bei 10 Minuten wird 3Mal abgefragt, ob es regnet.

            Oder wie würdest du das Ganze aufbauen?

            1 Reply Last reply Reply Quote 0
            • sigi234
              sigi234 Forum Testing Most Active @StM47 last edited by

              @StM47
              Kannst du dann das fertige Skript nochmal reinstellen. Habe es bei mir angepasst aber funktionierte nicht so Richtig....☺

              1 Reply Last reply Reply Quote 0
              • L
                lesiflo Most Active last edited by lesiflo

                Hi,
                hier auch noch mal meine Lösung. Für die West und Ostfenster habe ich so was auch . Da
                wird auch noch die Windrichtung mit einbezogen.
                Wenn es zu kalt oder zu warm ist habe separate Abfragen erstellt.

                Ansage_Fenster.JPG

                1 Reply Last reply Reply Quote 1
                • StM47
                  StM47 last edited by

                  ☝ Na klar, es geht natürlich auch ohne Intervall!
                  Manchmal sieht man den Wald vor lauter Bäumen nicht.

                  So sollte es programmiertechnisch richtig sein, oder?

                  Bildschirmfoto 2019-05-06 um 13.53.22.png

                  L 1 Reply Last reply Reply Quote 0
                  • L
                    lesiflo Most Active @StM47 last edited by

                    @StM47
                    Bei deiner Lösung kommt die Ansage aber nur wenn das Fenster aufgemacht wird und es schon
                    regnet. Wenn das Fenster schon auf ist und es dann anfängt zu regnen kommt keine Ansage.
                    Du solltest noch auf "Regen" triggern.

                    StM47 1 Reply Last reply Reply Quote 0
                    • StM47
                      StM47 @lesiflo last edited by

                      @lesiflo

                      Stimmt! 🤔

                      L 1 Reply Last reply Reply Quote 0
                      • L
                        lesiflo Most Active @StM47 last edited by lesiflo

                        @StM47 Schau dir mal meinen Ansatz an, dort mache ich das über den Trigger "Weather State" und "Anwesenheit". Nur so als Anregung.

                        1 Reply Last reply Reply Quote 0
                        • StM47
                          StM47 last edited by StM47

                          So?

                          Bildschirmfoto 2019-05-06 um 14.01.04.png'

                          oder so?

                          Bildschirmfoto 2019-05-06 um 14.04.01.png

                          L 1 Reply Last reply Reply Quote 0
                          • StM47
                            StM47 last edited by

                            Gerade getestet und Nr. 2 läuft perfekt!

                            Danke an alle für die Tips!

                            Und hier der gewünschte Export:

                            <xml xmlns="http://www.w3.org/1999/xhtml">
                              <variables>
                                <variable type="undefined" id="timeout">timeout</variable>
                              </variables>
                              <block type="on_ext" id="CQC;{=jg+V-{lh0eV`E[" x="-1237" y="-1612">
                                <mutation items="2"></mutation>
                                <field name="CONDITION">ne</field>
                                <field name="ACK_CONDITION"></field>
                                <value name="OID0">
                                  <shadow type="field_oid" id="Ii?[Ge~U7Qx+TSkkHcB:">
                                    <field name="oid">lupusec.0.devices.RF:03039a10.status_ex</field>
                                  </shadow>
                                </value>
                                <value name="OID1">
                                  <shadow type="field_oid" id="v._lLtzDMhGRZF{antpi">
                                    <field name="oid">zuhause.0.wetter.regen</field>
                                  </shadow>
                                </value>
                                <statement name="STATEMENT">
                                  <block type="controls_if" id="-Ev9T`,Vx@u]6M$fKi(-">
                                    <value name="IF0">
                                      <block type="time_compare_ex" id="D|xtf%.Chhx1,ccZt-YF">
                                        <mutation end_time="true" actual_time="true"></mutation>
                                        <field name="USE_ACTUAL_TIME">TRUE</field>
                                        <field name="OPTION">between</field>
                                        <value name="START_TIME">
                                          <shadow type="text" id="?K*{/r.QRytF2$0s,m9Y">
                                            <field name="TEXT">09:00</field>
                                          </shadow>
                                        </value>
                                        <value name="END_TIME">
                                          <shadow type="text" id="#{wT.1r/IJr{Rs79ka.$">
                                            <field name="TEXT">22:00</field>
                                          </shadow>
                                        </value>
                                      </block>
                                    </value>
                                    <statement name="DO0">
                                      <block type="controls_if" id="D~e_w`$/A(cmpweqdm2u">
                                        <mutation else="1"></mutation>
                                        <value name="IF0">
                                          <block type="logic_operation" id="!5f8={J7ZXc2tvwcPK=*">
                                            <field name="OP">AND</field>
                                            <value name="A">
                                              <block type="logic_compare" id="Ep6.0Bhd),(KYdNYG,,9">
                                                <field name="OP">LTE</field>
                                                <value name="A">
                                                  <block type="get_value" id="N(If_xhK88`D{1@57YSP">
                                                    <field name="ATTR">val</field>
                                                    <field name="OID">viessmannapi.0.heating.sensors.temperature.outside.value</field>
                                                  </block>
                                                </value>
                                                <value name="B">
                                                  <block type="text" id="@~/6uJtdmhvwz_#E4o(.">
                                                    <field name="TEXT">16</field>
                                                  </block>
                                                </value>
                                              </block>
                                            </value>
                                            <value name="B">
                                              <block type="logic_compare" id="nmN)kUs##*)+4~8P}CXC">
                                                <field name="OP">EQ</field>
                                                <value name="A">
                                                  <block type="get_value" id="G68Le1WbHbv-*p.WAtjq">
                                                    <field name="ATTR">val</field>
                                                    <field name="OID">lupusec.0.devices.RF:03039a10.status_ex</field>
                                                  </block>
                                                </value>
                                                <value name="B">
                                                  <block type="logic_boolean" id="G:%|DKA]_7%HF.:AmMbF">
                                                    <field name="BOOL">TRUE</field>
                                                  </block>
                                                </value>
                                              </block>
                                            </value>
                                          </block>
                                        </value>
                                        <statement name="DO0">
                                          <block type="debug" id="@]yJPY-nJ7/,7H)KdWT:">
                                            <field name="Severity">warn</field>
                                            <value name="TEXT">
                                              <shadow type="text" id="V|ek53FGIFTyiQo-,PZ4">
                                                <field name="TEXT">Terrassentüre auf!</field>
                                              </shadow>
                                            </value>
                                            <next>
                                              <block type="timeouts_settimeout" id="]}WWtlQ]|4eT-%sK_]sh">
                                                <field name="NAME">timeout</field>
                                                <field name="DELAY">30</field>
                                                <field name="UNIT">sec</field>
                                                <statement name="STATEMENT">
                                                  <block type="control" id="D_P9nzAd!abD6}+@P4tv">
                                                    <mutation delay_input="false"></mutation>
                                                    <field name="OID">alexa2.0.Echo-Devices.G090U50984811V0M.Commands.speak-volume</field>
                                                    <field name="WITH_DELAY">FALSE</field>
                                                    <value name="VALUE">
                                                      <block type="math_number" id="K_Z]Cve^2-(:@v;-SFn_">
                                                        <field name="NUM">60</field>
                                                      </block>
                                                    </value>
                                                    <next>
                                                      <block type="control" id="=;Yj|xq4Q/P+1LATu[]D">
                                                        <mutation delay_input="false"></mutation>
                                                        <field name="OID">alexa2.0.Echo-Devices.G090U50984811V0M.Commands.speak</field>
                                                        <field name="WITH_DELAY">FALSE</field>
                                                        <value name="VALUE">
                                                          <block type="text_join" id="OT.(b,`lmC#]/F5LP2E/">
                                                            <mutation items="7"></mutation>
                                                            <value name="ADD0">
                                                              <block type="text" id="=4ry)=r64B=7#69CpP,m">
                                                                <field name="TEXT">Hallo Bewohner, Draußen sind es</field>
                                                              </block>
                                                            </value>
                                                            <value name="ADD1">
                                                              <block type="math_round" id="r,x~a%n#:30k|%e,Pi7~">
                                                                <field name="OP">ROUND</field>
                                                                <value name="NUM">
                                                                  <shadow type="math_number" id="*iWC~ZLZ/?tc6L^oVCkY">
                                                                    <field name="NUM">3.1</field>
                                                                  </shadow>
                                                                  <block type="get_value" id="K*w(W:7b?*LW^wJ~^MbQ">
                                                                    <field name="ATTR">val</field>
                                                                    <field name="OID">viessmannapi.0.heating.sensors.temperature.outside.value</field>
                                                                  </block>
                                                                </value>
                                                              </block>
                                                            </value>
                                                            <value name="ADD2">
                                                              <block type="text" id="|Mfti7/}/h9*Y!%N=Dp+">
                                                                <field name="TEXT">Grad, und die Terrassentüre ist noch offen, Aktuell sind im Wohnzimmer</field>
                                                              </block>
                                                            </value>
                                                            <value name="ADD3">
                                                              <block type="math_round" id="2rhM59Jg_bWaC.r_|Z7Q">
                                                                <field name="OP">ROUND</field>
                                                                <value name="NUM">
                                                                  <shadow type="math_number" id="lsdbW.f([y^fl/jA,m_p">
                                                                    <field name="NUM">3.1</field>
                                                                  </shadow>
                                                                  <block type="get_value" id="^fQ!oB*7sqx7C{**HGB5">
                                                                    <field name="ATTR">val</field>
                                                                    <field name="OID">zigbee.0.00158d0002b537d2.temperature</field>
                                                                  </block>
                                                                </value>
                                                              </block>
                                                            </value>
                                                            <value name="ADD4">
                                                              <block type="text" id="e~59-.]ySQWa+u2,U-9J">
                                                                <field name="TEXT">Grad, und die Luftfeuchtigkeit liegt bei </field>
                                                              </block>
                                                            </value>
                                                            <value name="ADD5">
                                                              <block type="math_round" id="Qd7I5RtULhKOz%Ll5nxF">
                                                                <field name="OP">ROUND</field>
                                                                <value name="NUM">
                                                                  <shadow type="math_number" id=":xbFKZ44tPFyXa.Dy*[#">
                                                                    <field name="NUM">3.1</field>
                                                                  </shadow>
                                                                  <block type="get_value" id="9d+x@6]Y~.vZM=ErH6ri">
                                                                    <field name="ATTR">val</field>
                                                                    <field name="OID">zigbee.0.00158d0002b537d2.humidity</field>
                                                                  </block>
                                                                </value>
                                                              </block>
                                                            </value>
                                                            <value name="ADD6">
                                                              <block type="text" id="st3i0f9CeDYIXh,!AT7G">
                                                                <field name="TEXT">Prozent</field>
                                                              </block>
                                                            </value>
                                                          </block>
                                                        </value>
                                                        <next>
                                                          <block type="control" id="+NY=E1}/qdP%6+mx``Xk">
                                                            <mutation delay_input="false"></mutation>
                                                            <field name="OID">alexa2.0.Echo-Devices.G090U50984811V0M.Commands.speak-volume</field>
                                                            <field name="WITH_DELAY">FALSE</field>
                                                            <value name="VALUE">
                                                              <block type="math_number" id="4tOi@}jwB{1lY!^APj(8">
                                                                <field name="NUM">50</field>
                                                              </block>
                                                            </value>
                                                            <next>
                                                              <block type="debug" id="t!6~qp$[^^gxyp^Cq#gQ">
                                                                <field name="Severity">warn</field>
                                                                <value name="TEXT">
                                                                  <shadow type="text" id="EMd|_xS`krtmvKmNZVWM">
                                                                    <field name="TEXT">Terrassentüre seit 10 Minuten auf!</field>
                                                                  </shadow>
                                                                </value>
                                                              </block>
                                                            </next>
                                                          </block>
                                                        </next>
                                                      </block>
                                                    </next>
                                                  </block>
                                                </statement>
                                              </block>
                                            </next>
                                          </block>
                                        </statement>
                                        <statement name="ELSE">
                                          <block type="timeouts_cleartimeout" id="GtcBk0X^|;!5iSD_86S|">
                                            <field name="NAME">timeout</field>
                                          </block>
                                        </statement>
                                        <next>
                                          <block type="controls_if" id="o5B}^!IbLC0w|x*C2i;W">
                                            <value name="IF0">
                                              <block type="logic_operation" id="X)g9t`YR`yyi%`YZvb?i">
                                                <field name="OP">AND</field>
                                                <value name="A">
                                                  <block type="logic_compare" id="P0c6=LnNSCpP8FiIr^HP">
                                                    <field name="OP">EQ</field>
                                                    <value name="A">
                                                      <block type="logic_boolean" id="wK-=eaEsa6G[]Q3!/vx+">
                                                        <field name="BOOL">TRUE</field>
                                                      </block>
                                                    </value>
                                                    <value name="B">
                                                      <block type="get_value" id="*dK$*jO$Us`*uXsujX;*">
                                                        <field name="ATTR">val</field>
                                                        <field name="OID">lupusec.0.devices.RF:03039a10.status_ex</field>
                                                      </block>
                                                    </value>
                                                  </block>
                                                </value>
                                                <value name="B">
                                                  <block type="logic_compare" id="le3X~dv^;9dCaS},j]?n">
                                                    <field name="OP">EQ</field>
                                                    <value name="A">
                                                      <block type="logic_boolean" id="YsC:~_j6zK1Eg52]TciC">
                                                        <field name="BOOL">TRUE</field>
                                                      </block>
                                                    </value>
                                                    <value name="B">
                                                      <block type="get_value" id="Ct4PLzts6}3N9My$^PvV">
                                                        <field name="ATTR">val</field>
                                                        <field name="OID">zuhause.0.wetter.regen</field>
                                                      </block>
                                                    </value>
                                                  </block>
                                                </value>
                                              </block>
                                            </value>
                                            <statement name="DO0">
                                              <block type="control" id="7x!upuL$UJ=#~a[Pe/=z">
                                                <mutation delay_input="false"></mutation>
                                                <field name="OID">alexa2.0.Echo-Devices.G090U50984811V0M.Commands.speak-volume</field>
                                                <field name="WITH_DELAY">FALSE</field>
                                                <value name="VALUE">
                                                  <block type="math_number" id="q(LXi%QX+og`[6F!YPM3">
                                                    <field name="NUM">60</field>
                                                  </block>
                                                </value>
                                                <next>
                                                  <block type="control" id="KU32~=CCIp.GQa7Tpla0">
                                                    <mutation delay_input="true"></mutation>
                                                    <field name="OID">alexa2.0.Echo-Devices.G090U50984811V0M.Commands.speak</field>
                                                    <field name="WITH_DELAY">TRUE</field>
                                                    <field name="DELAY_MS">5</field>
                                                    <field name="UNIT">sec</field>
                                                    <field name="CLEAR_RUNNING">FALSE</field>
                                                    <value name="VALUE">
                                                      <block type="text_join" id="mz++/`8dP7KRg.j7{C[/">
                                                        <mutation items="1"></mutation>
                                                        <value name="ADD0">
                                                          <block type="text" id="7dZG$]BM6ir`)ghdq2m+">
                                                            <field name="TEXT">Achtung, es regnet, und im Erdgeschoß sind noch Fenster oder Türen geöffnet</field>
                                                          </block>
                                                        </value>
                                                      </block>
                                                    </value>
                                                    <next>
                                                      <block type="control" id="Q5VW6?FmWtJSt(lFqnUv">
                                                        <mutation delay_input="false"></mutation>
                                                        <field name="OID">alexa2.0.Echo-Devices.G090U50984811V0M.Commands.speak-volume</field>
                                                        <field name="WITH_DELAY">FALSE</field>
                                                        <value name="VALUE">
                                                          <block type="math_number" id="1QzIvf{,/bQmD}dOLv-1">
                                                            <field name="NUM">50</field>
                                                          </block>
                                                        </value>
                                                        <next>
                                                          <block type="debug" id="pP3glP([pR=)9r}eul}G">
                                                            <field name="Severity">warn</field>
                                                            <value name="TEXT">
                                                              <shadow type="text" id="_):)uG2%haxBj@uC0DA-">
                                                                <field name="TEXT">Regenwarnung Erdgeschoß</field>
                                                              </shadow>
                                                            </value>
                                                          </block>
                                                        </next>
                                                      </block>
                                                    </next>
                                                  </block>
                                                </next>
                                              </block>
                                            </statement>
                                          </block>
                                        </next>
                                      </block>
                                    </statement>
                                  </block>
                                </statement>
                              </block>
                            </xml>
                            
                            1 Reply Last reply Reply Quote 0
                            • L
                              lesiflo Most Active @StM47 last edited by

                              @StM47 Ja, Lösung 2 sollte so klappen. Ich würde dir aber empfehlen die Abfragen zu trennen. Eine für Regen und eine weitere für Temperatur. So kannst du beide wenn nötig einzeln deaktivieren. Und du solltest noch auf die Temperatur triggern. Wenn sie während die Tür offen ist fällt, kommt auch keine Ansage.

                              1 Reply Last reply Reply Quote 1
                              • rantanplan
                                rantanplan @StM47 last edited by

                                @StM47 sagte in Frage zu Blockly, Warnung bei Regen über Alexa bei geöffnete Fenster und Türen:

                                Mit deinem Skript bringt Alexa leider keine Warnung.

                                DAS ist nicht mein Script!
                                Finde ich schon merkwürdig, ein Script bekommen, darin rumfummeln und dann behaupten, dass mein Script nicht funktioniert.
                                Auch aus dem restlichen Fred sehe ich, dass Du nicht wirklich zuhörst. Die Jungs geben sich redlich Mühe.

                                StM47 1 Reply Last reply Reply Quote 0
                                • StM47
                                  StM47 @rantanplan last edited by

                                  @rantanplan sagte in Frage zu Blockly, Warnung bei Regen über Alexa bei geöffnete Fenster und Türen:

                                  Mit deinem Skript bringt Alexa leider keine Warnung.

                                  Sorry, mit deinem Skript habe ich wirklich keine Ausgabe von Alexa bekommen.
                                  Habe dann versucht es umzubauen und dann dummerweise das Falsche gepostet.
                                  Sorry nochmal und auch dir ein Danke für deine Hilfe!

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

                                  Support us

                                  ioBroker
                                  Community Adapters
                                  Donate

                                  657
                                  Online

                                  31.9k
                                  Users

                                  80.1k
                                  Topics

                                  1.3m
                                  Posts

                                  7
                                  43
                                  2903
                                  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