Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Blockly
    5. [gelöst]Script blocky für shelly 1xtasten/2xtasten

    NEWS

    • ioBroker@Smart Living Forum Solingen, 14.06. - Agenda added

    • ioBroker goes Matter ... Matter Adapter in Stable

    • Monatsrückblick - April 2025

    [gelöst]Script blocky für shelly 1xtasten/2xtasten

    This topic has been deleted. Only users with topic management privileges can see it.
    • E
      e-s @Lacoste9 last edited by

      @Lacoste9
      Statt 2 mal drücken würde ich lange drücken nutzen.
      Longpush ist auch teilweise jetzt schon nutzbar und als eigener datenpunkt vorhanden. Leider nur nicht perfekt. Für dich sollte es aber genau passend sein.
      Alternativ suche mal den longpush Thread von mir.

      L 1 Reply Last reply Reply Quote 0
      • L
        Lacoste9 @e-s last edited by

        @e-s kann man das nur mit mqtt realisieren?

        E 1 Reply Last reply Reply Quote 0
        • E
          e-s @Lacoste9 last edited by

          @Lacoste9
          kann ich dir nicht genau sagen, longpush geht glaub ich nicht im coap modus. ich nutze nur den mqtt modus, dieser läuft im iobroker mit dem shelly adapter auch super.

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

            ja mqtt wollte ich eigentlich nicht nutzen, da ich das eine relais nur über die app bedienen möchte.
            mqtt hab ich sowas voll null plan von

            E 1 Reply Last reply Reply Quote 0
            • E
              e-s @Lacoste9 last edited by

              @Lacoste9
              Also in der Shelly App kann ich trotzdem die Lampen schalten. Nutze aber nicht die Shelly cloud, nur lokal.

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

                @Lacoste9 sagte:

                1x drücken = rolladen runter
                2x drücken = Rolladen runter + garagentor auf.

                Prinzip:

                Blockly_temp.JPG

                <xml xmlns="http://www.w3.org/1999/xhtml">
                 <variables>
                   <variable type="undefined" id="timeout">timeout</variable>
                 </variables>
                 <block type="on_ext" id="]c%n~j}NI-fZa`kSMKR2" x="63" y="13">
                   <mutation items="1"></mutation>
                   <field name="CONDITION">true</field>
                   <field name="ACK_CONDITION"></field>
                   <value name="OID0">
                     <shadow type="field_oid" id="_mB2klXZVI6,0OL)`/c#">
                       <field name="oid">default</field>
                     </shadow>
                   </value>
                   <statement name="STATEMENT">
                     <block type="controls_if" id="(8wZWs|,K9XyTBxAn#67">
                       <mutation else="1"></mutation>
                       <value name="IF0">
                         <block type="variables_get" id="t5u`#xq#/3#i84jY!h!3">
                           <field name="VAR" id="timeout" variabletype="undefined">timeout</field>
                         </block>
                       </value>
                       <statement name="DO0">
                         <block type="comment" id="{kUMzXT@nDv:L+Vngk]3">
                           <field name="COMMENT">2. Tastendruck</field>
                           <next>
                             <block type="control" id="854%n(u[5+EoF%.(qD,C">
                               <mutation delay_input="false"></mutation>
                               <field name="OID">Object ID</field>
                               <field name="WITH_DELAY">FALSE</field>
                             </block>
                           </next>
                         </block>
                       </statement>
                       <statement name="ELSE">
                         <block type="control" id="/^`pHum-k)qToe^h0=P@">
                           <mutation delay_input="false"></mutation>
                           <field name="OID">Object ID</field>
                           <field name="WITH_DELAY">FALSE</field>
                           <next>
                             <block type="timeouts_settimeout" id="ETVlGdyYeBCnt}{%sD+J">
                               <field name="NAME">timeout</field>
                               <field name="DELAY">800</field>
                               <field name="UNIT">ms</field>
                               <statement name="STATEMENT">
                                 <block type="variables_set" id="s3^y50^jdCKum{gT)0GK">
                                   <field name="VAR" id="timeout" variabletype="undefined">timeout</field>
                                   <value name="VALUE">
                                     <block type="logic_null" id="*SaX63=PL-w~XO-]rkSS"></block>
                                   </value>
                                 </block>
                               </statement>
                             </block>
                           </next>
                         </block>
                       </statement>
                     </block>
                   </statement>
                 </block>
                </xml>
                

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

                  @paul53 said in Script blocky für shelly 1x tasten / 2x tasten:

                  <xml xmlns="http://www.w3.org/1999/xhtml">

                  das sieht ja schon mal vielversprechend aus. Danke schon mal.
                  Aberwo muss ich denn jetzt den shelly (Tor) und die shellys (Rolladen)eintragen?

                  Sorry aber ich bin total frisch in dem Segment.

                  ist das schon das script mit 1 und 2 tastendruck?

                  mich irretiert das mit dem (mache und sonst) baustein

                  MFG

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

                    @Lacoste9 sagte:

                    Aberwo muss ich denn jetzt den shelly (Tor) und die shellys (Rolladen)eintragen?

                    Dss Tor muss muss der Object ID des oberen steuere-Blocks zugewiesen werden, Rolladen der Object ID des unteren steuere-Blocks.

                    @Lacoste9 sagte in Script blocky für shelly 1x tasten / 2x tasten:

                    ist das schon das script mit 1 und 2 tastendruck?

                    Der mache-Zweig wird bei 2. Tastendruck innerhalb der Verzögerungszeit ausgeführt, der sonst-Zweig bei 1. Tastendruck.

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

                      Script Taster.jpg

                      Ist das so richtig?

                      Wie läuft das script denn?
                      wo muss ich das denn abspeichern?
                      Ist mein erstes script 😖

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

                        @Lacoste9 sagte:

                        Ist das so richtig?

                        Nein, dem Trigger muss die ID des Tasters zugewiesen werden, dem oberen "steuere" die ID des Garagentores, dem unteren "steuere" die ID der Rollo runter Szene. Außerdem muss ein Wert übergeben werden. Ich habe es freigelassen, da ich nicht weiss, ob der richtige Wert wahr, falsch, 0, oder 100 ist.

                        Blockly_temp.JPG

                        Doku zu Blockly

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

                          Script Taster.jpg

                          Geil. 👏 👏 👏
                          Hat geklappt. Tausend Dank

                          Und das ohne mqtt. Sauber

                          Respekt 👍 👍 👍 Da weiss ich ja an wen ich wenden muss 😊 😊

                          und das haste mal eben zusammen gebastelt? oder hattest du schon sowas ähnliches fertig?

                          Danke nochmal

                          paul53 L 2 Replies Last reply Reply Quote 0
                          • paul53
                            paul53 @Lacoste9 last edited by

                            @Lacoste9 sagte:

                            das haste mal eben zusammen gebastelt?

                            Ist doch simple.

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

                              ist ja hammer

                              danke nochmal

                              kann man das beliebig weiter führen 3x, 4x .... ?

                              mfg

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

                                @Lacoste9 sagte:

                                kann man das beliebig weiter führen 3x, 4x .... ?

                                Ja, eine Zählvariable auswerten. Prinzip:

                                Blockly_temp.JPG

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

                                  Cool danke

                                  1 Reply Last reply Reply Quote 0
                                  • L
                                    Lacoste9 @Lacoste9 last edited by

                                    @paul53

                                    moin

                                    ich habe den neuen java installiert. dort stand drin das evtl einige skripte überarbeitet werden müssen.
                                    ich habe sonst nix geändert.
                                    Der 2 tastendruck (Garage) funzt nicht mehr 😞

                                    Weisst du evtl woran es liegen kann

                                    MFG
                                    Alexander

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

                                      @Lacoste9 sagte:

                                      Der 2 tastendruck (Garage) funzt nicht mehr
                                      Weisst du evtl woran es liegen kann

                                      Nein, das muss unabhängig von der Version des JS-Adapters funktionieren.

                                      @Lacoste9 sagte in [gelöst]Script blocky für shelly 1xtasten/2xtasten:

                                      dort stand drin das evtl einige skripte überarbeitet werden müssen.

                                      ??

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

                                        Moin

                                        ich bin jetzt nochmal dazu gekommen um zu schauen.
                                        Klappt aber irgendwie nicht mehr dem 2te Tastendruck. Der erste klappt das die Rolladen runter fahren.
                                        Ich habe anstelle des Garagentor mal ein anderen Switch genommen, das gleiche Phänomen

                                        Keine Ahnung woran es liegen könnte @paul53

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

                                          @Lacoste9 sagte:

                                          Klappt aber irgendwie nicht mehr dem 2te Tastendruck.

                                          Wenn es schon mal funktioniert hat und jetzt nicht mehr, muss sich das Verhalten des Tasters geändert haben. Logge mal den Taster in einem Testskript:

                                          Blockly_temp.JPG

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

                                            sieht so aus...

                                            1mal getastet
                                            27.1.2020, 17:23:58.829 [info ]: javascript.0 (26032) script.js.Shelly.Logskript: Tastertrue
                                            27.1.2020, 17:24:00.836 [info ]: javascript.0 (26032) script.js.Shelly.Logskript: Tasterfalse

                                            2x getastet
                                            27.1.2020, 17:25:18.678 [info ]: javascript.0 (26032) script.js.Shelly.Logskript: Tastertrue
                                            27.1.2020, 17:25:19.217 [info ]: javascript.0 (26032) script.js.Shelly.Logskript: Tasterfalse

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

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate

                                            951
                                            Online

                                            31.7k
                                            Users

                                            79.7k
                                            Topics

                                            1.3m
                                            Posts

                                            blockly
                                            3
                                            30
                                            3620
                                            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