Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Blockly: Garagentor-Status mit HM MP3 Funkgong Ansagen und LEDs

    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

    Blockly: Garagentor-Status mit HM MP3 Funkgong Ansagen und LEDs

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

      Moin Moin,

      ich wollte mal mein Blockly Garagentor Script vorstellen.

      Vielleicht kann es jemand gebrauchen, oder möchte es aber auch erweitern und verbessern… 😄

      Garagentorantrieb: Chamberlain Garagentorantrieb Premium von Amazon.

      Der kann so nur: Auf, Stop, Zu, Stop, etc. und hat keine direkte IOBroker Schnittstelle.

      Steuern tue ich das Teil mit den beigelegten Funksendern und neuerdings auch auch mit dem HM-LC-Sw1-Pl-CT (Funkschaltaktor/Zwischensteckdose).

      Dieser ist allerdings nicht im Script implementiert, da dieses Script nur den jeweiligen Status des Garagentors über den HM MP3 Funkgong (HM-OU-CFM-TW) ansagen und anzeigen soll.

      Für die beiden jeweiligen Endlagen/Endlagendetektierung des Garagentors, kann man einfach per Neodymmagnete zwei optische HM-Sec-SCo Tür-/Fensterkontakte an die Führungsschiene des Garagentors "anheften". Diese detektieren ohne zusätzliches Geraffel zuverlässig den in der Führungsschiene laufenden Führungsarm, der mit dem Garagentor verbunden ist.

      Wollte das vor einigen Wochen noch mit einem Sonoff Basic I/O und zusätzlichen Read-Kontakten realisieren, habe nun aber der Einfachheit halber auf Homematic aufgerüstet 😉

      Das Blockly Script im Code zum importieren:

      ! <xml 1999/xmlns="<URL url=" http:/www.w3.org/xhtml"="">http://www.w3.org/1999/xhtml">
      ! <block type="on" id="|88^48jG%[yq[DeMWKB" x="-588" y="-612"><field name="OID">hm-rpc.0.OEQ0707718.1.STATE</field>
      ! <field name="CONDITION">ne</field>
      ! <statement name="STATEMENT"><block type="comment" id="2K8}f3#]cj-{Jd[+if1s"><field name="COMMENT">Triggert auf den HM Türkontakt "ZU"</field>
      ! <next><block type="controls_if" id="jZE.=KVj}NQWdh6A-a.C"><mutation elseif="1"></mutation>
      ! <value name="IF0"><block type="logic_compare" id="1UYWI(esl9gaT~Sv3o01"><field name="OP">EQ</field>
      ! <value name="A"><block type="get_value" id=":|5ON3UECn|o7|RgUkyw"><field name="ATTR">val</field>
      ! <field name="OID">hm-rpc.0.OEQ0707718.1.STATE</field></block></value>
      ! <value name="B"><block type="logic_boolean" id="p^jHXuHc8eT9OST[|aYz"><field name="BOOL">FALSE</field></block></value></block></value>
      ! <statement name="DO0"><block type="control" id="Sg]PV(9yj=uLsTu7xH~W"><mutation delay_input="true"></mutation>
      ! <field name="OID">hm-rpc.0.NEQ0772378.1.SUBMIT</field>
      ! <field name="WITH_DELAY">TRUE</field>
      ! <field name="DELAY_MS">1</field>
      ! <field name="UNIT">sec</field>
      ! <field name="CLEAR_RUNNING">FALSE</field>
      ! <value name="VALUE"><block type="text" id="85lrAAemtp(%n1D9U#ml"><field name="TEXT">1,4,108000,18</field></block></value>
      ! <next><block type="comment" id="}H0E.K7{A%!iBqrGQ0)_"><field name="COMMENT">MP3-Funkgong, 4x rote LED blinken</field>
      ! <next><block type="comment" id="[86^gZI3/sB(TQ-M%K}M"><field name="COMMENT">17 = Rot kurz, 18 = Rot lang, 33 = Grün kurz</field>
      ! <next><block type="comment" id=":N^O2NR9Pg[~}gw)6m^G"><field name="COMMENT">34 = Grün lang, 49 = Orange kurz, 50 = Orange lang</field>
      ! <next><block type="control" id="W(I[skr,gS,6rWpsyJ=3"><mutation delay_input="true"></mutation>
      ! <field name="OID">hm-rpc.0.NEQ0772378.2.SUBMIT</field>
      ! <field name="WITH_DELAY">TRUE</field>
      ! <field name="DELAY_MS">2</field>
      ! <field name="UNIT">sec</field>
      ! <field name="CLEAR_RUNNING">FALSE</field>
      ! <value name="VALUE"><block type="text" id="QS;)
      ,z2dfrDfrdcQplf"><field name="TEXT">1,1,108000,030</field></block></value>
      ! <next><block type="comment" id=":tal+BBk6UBIr)93aN^"><field name="COMMENT">Funkgong, Meldung: Das Garagentor öffnet sich jetzt</field> ! <next><block type="timeouts_settimeout" id="2~n5EVDB%NTm9/~z.7o"><field name="NAME">timeout</field>
      ! <field name="DELAY">23</field>
      ! <field name="UNIT">sec</field>
      ! <statement name="STATEMENT"><block type="controls_if" id="w80QZmcmuB}P0!T:/1:n"><value name="IF0"><block type="logic_operation" id="^G7xtHCV~UN1bK]hfkQ^"><field name="OP">AND</field>
      ! <value name="A"><block type="logic_compare" id="2dXngVOHDx}#{~SqQS}"><field name="OP">EQ</field> ! <value name="A"><block type="get_value" id="~I0:,=|=Z%e{Te)NYw"><field name="ATTR">val</field> ! <field name="OID">hm-rpc.0.OEQ0707718.1.STATE</field></block></value> ! <value name="B"><block type="logic_boolean" id="VAtqK.rfy*cdU8TSq-;X"><field name="BOOL">FALSE</field></block></value></block></value> ! <value name="B"><block type="logic_compare" id="54c.ns@W(_gTk;)m^x82"><field name="OP">EQ</field> ! <value name="A"><block type="get_value" id="OUm6i=(Z)96tKYn{wtUd"><field name="ATTR">val</field> ! <field name="OID">hm-rpc.0.OEQ0707751.1.STATE</field></block></value> ! <value name="B"><block type="logic_boolean" id="gM?i#Fr|5LbLH7P}e0+6"><field name="BOOL">FALSE</field></block></value></block></value></block></value> ! <statement name="DO0"><block type="comment" id="E)qK}0Gi0(/][*WX:@K["><field name="COMMENT">Falls Tor nicht innerhalb von 23 Sek. öffnet:</field> ! <next><block type="comment" id="UwpNDv[aU|!Q+Io(D,AC"><field name="COMMENT">Meldung: Garagentor nicht in Endposition, oder blockiert</field> ! <next><block type="comment" id="%DL2sE3{=uaeN*H73hjy"><field name="COMMENT">und LED blinkt 4x Rot</field> ! <next><block type="control" id="Gc}9O^o.hUDgg?{|^ma="><mutation delay_input="true"></mutation> ! <field name="OID">hm-rpc.0.NEQ0772378.1.SUBMIT</field> ! <field name="WITH_DELAY">TRUE</field> ! <field name="DELAY_MS">1</field> ! <field name="UNIT">sec</field> ! <field name="CLEAR_RUNNING">FALSE</field> ! <value name="VALUE"><block type="text" id="@R:]}?T/^(P%2#@Vt8/"><field name="TEXT">1,4,108000,18</field></block></value>
      ! <next><block type="control" id="fy~RT|Pt_(o8Erq[d1Jx"><mutation delay_input="true"></mutation>
      ! <field name="OID">hm-rpc.0.NEQ0772378.2.SUBMIT</field>
      ! <field name="WITH_DELAY">TRUE</field>
      ! <field name="DELAY_MS">2</field>
      ! <field name="UNIT">sec</field>
      ! <field name="CLEAR_RUNNING">FALSE</field>
      ! <value name="VALUE"><block type="text" id="_)nKi{V@7z:.E#nDHTid"><field name="TEXT">1,1,108000,022</field></block></value></block></next></block></next></block></next></block></next></block></statement></block></statement></block></next></block></next></block></next></block></next></block></next></block></next></block></statement>
      ! <value name="IF1"><block type="logic_compare" id="|VSQwx1vA+DbJkA^k!7"><field name="OP">EQ</field> ! <value name="A"><block type="get_value" id="{{]Dk@RooIA3|5t/ojtK"><field name="ATTR">val</field> ! <field name="OID">hm-rpc.0.OEQ0707718.1.STATE</field></block></value> ! <value name="B"><block type="logic_boolean" id="_N;%jao|YfM]HfwhcgHQ"><field name="BOOL">TRUE</field></block></value></block></value> ! <statement name="DO1"><block type="timeouts_cleartimeout" id="wjxNa:@ad*i4xP2kon18"><field name="NAME">timeout</field> ! <next><block type="comment" id="a@;LbC3p{j15VAbp.XhS"><field name="COMMENT">Stop Timeout verhindert Falschmeldungen</field> ! <next><block type="control" id="[-5NU7y5_+uNb46/]cY"><mutation delay_input="true"></mutation>
      ! <field name="OID">hm-rpc.0.NEQ0772378.1.SUBMIT</field>
      ! <field name="WITH_DELAY">TRUE</field>
      ! <field name="DELAY_MS">1</field>
      ! <field name="UNIT">sec</field>
      ! <field name="CLEAR_RUNNING">FALSE</field>
      ! <value name="VALUE"><block type="text" id="WFY6}Sd5Qk5@vbZrrm73"><field name="TEXT">1,4,108000,34</field></block></value>
      ! <next><block type="control" id="}BQ~FD/NVV%1)-KhPNM"><mutation delay_input="true"></mutation> ! <field name="OID">hm-rpc.0.NEQ0772378.2.SUBMIT</field> ! <field name="WITH_DELAY">TRUE</field> ! <field name="DELAY_MS">2</field> ! <field name="UNIT">sec</field> ! <field name="CLEAR_RUNNING">FALSE</field> ! <value name="VALUE"><block type="text" id="hqobrt+3J?-Ik7uF;n(="><field name="TEXT">1,1,108000,031</field></block></value> ! <next><block type="comment" id="K{l=7j~/;JPU=o_t!-#8"><field name="COMMENT">Sonst Falls "True": 4x Grüne LED und</field> ! <next><block type="comment" id="6]QHSmU+jTQ|[T/DX6"><field name="COMMENT">Meldung: Das Garagentor ist geschlossen</field></block></next></block></next></block></next></block></next></block></next></block></statement></block></next></block></statement> ! <next><block type="on" id="^nktFMq16pAu4kUF+Ml"><field name="OID">hm-rpc.0.OEQ0707751.1.STATE</field>
      ! <field name="CONDITION">ne</field>
      ! <statement name="STATEMENT"><block type="comment" id="PfO6LD=-f@r_8s]U)@1S"><field name="COMMENT">Triggert auf HM Türkontakt "Auf"</field>
      ! <next><block type="controls_if" id="8eWHocuU_G}nnRdLr]"><mutation elseif="1"></mutation> ! <value name="IF0"><block type="logic_compare" id="JHc7%]1Z@cD?i)BjhfJ"><field name="OP">EQ</field>
      ! <value name="A"><block type="get_value" id="W+7VOfcvNWvwrt:pP2O"><field name="ATTR">val</field> ! <field name="OID">hm-rpc.0.OEQ0707751.1.STATE</field></block></value> ! <value name="B"><block type="logic_boolean" id="T2Zf[d4sMsn_saQ?Es%0"><field name="BOOL">TRUE</field></block></value></block></value> ! <statement name="DO0"><block type="timeouts_cleartimeout" id="GtDh0[PIs^~es7Ip#.g"><field name="NAME">timeout2</field>
      ! <next><block type="comment" id="TUpT0GK@}lPKk)~rqESu"><field name="COMMENT">Stop Timeout verhindert Falschmeldungen</field>
      ! <next><block type="control" id="o,SRM^W!GjaSxhkmdLO."><mutation delay_input="true"></mutation>
      ! <field name="OID">hm-rpc.0.NEQ0772378.1.SUBMIT</field>
      ! <field name="WITH_DELAY">TRUE</field>
      ! <field name="DELAY_MS">1</field>
      ! <field name="UNIT">sec</field>
      ! <field name="CLEAR_RUNNING">FALSE</field>
      ! <value name="VALUE"><block type="text" id="ue4tXj!r3K5Veer9[B)"><field name="TEXT">1,4,108000,34</field></block></value> ! <next><block type="control" id="yyyzH]j@D)JbrMNf8qt;"><mutation delay_input="true"></mutation> ! <field name="OID">hm-rpc.0.NEQ0772378.2.SUBMIT</field> ! <field name="WITH_DELAY">TRUE</field> ! <field name="DELAY_MS">2</field> ! <field name="UNIT">sec</field> ! <field name="CLEAR_RUNNING">FALSE</field> ! <value name="VALUE"><block type="text" id="#UMAb%M_[K50Z[BU2uJr"><field name="TEXT">1,1,108000,029</field></block></value> ! <next><block type="comment" id="v_7LRBhfi@YV_JIoGvV"><field name="COMMENT">4x Grüne Led und Meldung:</field>
      ! <next><block type="comment" id="ZpJ!#=MZkKaN~SNtvGT5"><field name="COMMENT">Das Garagentor ist geöffnet</field></block></next></block></next></block></next></block></next></block></next></block></statement>
      ! <value name="IF1"><block type="logic_compare" id="))pa~;~y8V.Fd
      n8X/+H"><field name="OP">EQ</field>
      ! <value name="A"><block type="get_value" id=":TRy{mdhkuyg]cA2+i7L"><field name="ATTR">val</field>
      ! <field name="OID">hm-rpc.0.OEQ0707751.1.STATE</field></block></value>
      ! <value name="B"><block type="logic_boolean" id="B2uk?Vx2+%#VHHuwJ;Du"><field name="BOOL">FALSE</field></block></value></block></value>
      ! <statement name="DO1"><block type="control" id="h=h|NT:b??u/zc9jXD!]"><mutation delay_input="true"></mutation>
      ! <field name="OID">hm-rpc.0.NEQ0772378.1.SUBMIT</field>
      ! <field name="WITH_DELAY">TRUE</field>
      ! <field name="DELAY_MS">1</field>
      ! <field name="UNIT">sec</field>
      ! <field name="CLEAR_RUNNING">FALSE</field>
      ! <value name="VALUE"><block type="text" id="sO*e]jJ_K:*ii]Nds9Hl"><field name="TEXT">1,4,108000,18</field></block></value>
      ! <next><block type="control" id="#iRC6d9{yX_Bj-nJNHh"><mutation delay_input="true"></mutation> ! <field name="OID">hm-rpc.0.NEQ0772378.2.SUBMIT</field> ! <field name="WITH_DELAY">TRUE</field> ! <field name="DELAY_MS">2</field> ! <field name="UNIT">sec</field> ! <field name="CLEAR_RUNNING">FALSE</field> ! <value name="VALUE"><block type="text" id="CKH=yTQO]%wHgV-d-Z7a"><field name="TEXT">1,1,108000,032</field></block></value> ! <next><block type="comment" id="3CfSQ8}b4a.mZ?M:yC@j"><field name="COMMENT">Sonst Falls "False": 4x Rote LED und Meldung:</field> ! <next><block type="comment" id="2zdaw-sW,-%xX?Ax083V"><field name="COMMENT">Das Garagentor schliesst jetzt</field> ! <next><block type="timeouts_settimeout" id="8;D3y_7;lY@E(.x3FDqk"><field name="NAME">timeout2</field> ! <field name="DELAY">23</field> ! <field name="UNIT">sec</field> ! <statement name="STATEMENT"><block type="controls_if" id="?v[LGrUH!7YM2jg+.Xy0"><value name="IF0"><block type="logic_operation" id="k)VSSgU:p,al9KOamK@C"><field name="OP">AND</field> ! <value name="A"><block type="logic_compare" id="XHd1,~c91S30xM:.tTS0"><field name="OP">EQ</field> ! <value name="A"><block type="get_value" id="1e;S*;7CrfK6LFbR=+#:"><field name="ATTR">val</field> ! <field name="OID">hm-rpc.0.OEQ0707718.1.STATE</field></block></value> ! <value name="B"><block type="logic_boolean" id="fC6~5D]3;2ANpiKwe]Ej"><field name="BOOL">FALSE</field></block></value></block></value> ! <value name="B"><block type="logic_compare" id="Ij}]|ftyU:b?%]7CzSEj"><field name="OP">EQ</field> ! <value name="A"><block type="get_value" id="F6Tfv1:B+,GjdKYOGzAe"><field name="ATTR">val</field> ! <field name="OID">hm-rpc.0.OEQ0707751.1.STATE</field></block></value> ! <value name="B"><block type="logic_boolean" id="Vu!Gf|]_eY,xN^P{OJbd"><field name="BOOL">FALSE</field></block></value></block></value></block></value> ! <statement name="DO0"><block type="comment" id="E5goE4t4n8@SW2RZD~GB"><field name="COMMENT">Falls Tor nicht innerhalb von 23 Sek. schliesst,</field> ! <next><block type="comment" id="{!*7d^F5u-^^6~d]u+N"><field name="COMMENT">Meldung: Garagentor nicht in Endposition, oder blockiert</field>
      ! <next><block type="comment" id="xs1Oj^7g5nAE3zw5~l"><field name="COMMENT">und LED blinkt 4x Rot</field>
      ! <next><block type="control" id="N3p#iF;TD^(d5svu;S(9"><mutation delay_input="true"></mutation>
      ! <field name="OID">hm-rpc.0.NEQ0772378.1.SUBMIT</field>
      ! <field name="WITH_DELAY">TRUE</field>
      ! <field name="DELAY_MS">1</field>
      ! <field name="UNIT">sec</field>
      ! <field name="CLEAR_RUNNING">FALSE</field>
      ! <value name="VALUE"><block type="text" id="z17#5HfSL6HQ:~68~`vC"><field name="TEXT">1,4,108000,18</field></block></value>
      ! <next><block type="control" id="vt0j=O=)7m%t0wI3k=]9"><mutation delay_input="true"></mutation>
      ! <field name="OID">hm-rpc.0.NEQ0772378.2.SUBMIT</field>
      ! <field name="WITH_DELAY">TRUE</field>
      ! <field name="DELAY_MS">2</field>
      ! <field name="UNIT">sec</field>
      ! <field name="CLEAR_RUNNING">FALSE</field>
      ! <value name="VALUE"><block type="text" id="=h)ocAYOqKZ=E)P5IYn}"><field name="TEXT">1,1,108000,022</field></block></value></block></next></block></next></block></next></block></next></block></statement></block></statement></block></next></block></next></block></next></block></next></block></statement></block></next></block></statement></block></next></block></xml>

      Das Script als Solches:

      2257_1.jpg
      2257_2.jpg

      Eine nette Seite, auf der man mal schnell die MP3 Sounddateien für den MP3-Funkgong erstellen und downloaden kann:

      2257_text2mp3.jpg

      Die MP3 Sounddateien als Zip-File, die ich über das Script auf dem Funkgong ansteuere:

      2257_ansagen.zip

      Irgendwann werde ich das Script vielleicht nochmal um eine Meldung erweitern, die regelmässig Alarm gibt, sobald das Garagentor eine längere Zeit offen steht.

      Aus Sicherheitsgründen habe ich keine "automatische Schließung" nach Zeit XXX mit eingebaut.

      Bin noch am Anfang mich in Blockly und den entsprechenden Logiken einzuarbeiten - sicherlich geht da im Script Einiges abzukürzen, oder zu vereinfachen…?

      Gruß,

      Matthias

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

      Support us

      ioBroker
      Community Adapters
      Donate

      944
      Online

      31.9k
      Users

      80.2k
      Topics

      1.3m
      Posts

      1
      1
      793
      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