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

    • Neuer Blog: Fotos und Eindrücke aus Solingen

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

    • ioBroker goes Matter ... Matter Adapter in Stable

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

    This topic has been deleted. Only users with topic management privileges can see it.
    • 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
                                  • paul53
                                    paul53 @Lacoste9 last edited by

                                    @Lacoste9 sagte:

                                    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

                                    Er hätte 2 mal true liefern müssen.

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

                                      Das habe ich gesehen.

                                      Ich muss doch innerhalb der 800ms 2x drücken oder?

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

                                        @Lacoste9 sagte:

                                        Ich muss doch innerhalb der 800ms 2x drücken oder?

                                        Ja genau, dann muss 2x true im Log erscheinen. Hast Du die Taster umkonfiguriert, so dass sie jetzt nach 2 s (1x Tastendruck) auf false gehen ?

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

                                          ohman

                                          ne umkonfiguriert habe ich nix. habe in den einstellungen eben reingeschaut. da war eine Auto Off time gesetzt. (ich war es nicht) und der Button Type war falsch eingestellt. das war glaube ich weil ich was getestet habe 😕

                                          ALLES funzt wieder

                                          mal wieder ein ganz dickes DANKE

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

                                            shelly.0	2020-01-27 17:46:53.106	error	(2880) Error handling Shelly data: SyntaxError: Unexpected token ` in JSON at position 311 for JSON {"blk":[{"I":0,"D":"Relay0"},{"I":1,"D":"Sensors"}],"sen":[{"I":111,"T":"W","R":"0/3500","L":0},{"I
                                            
                                            shelly.0	2020-01-27 19:01:38.996	error	(2880) Error handling Shelly data: SyntaxError: Unexpected token ` in JSON at position 536 for JSON {"blk":[{"I":0,"D":"Relay0"},{"I":1,"D":"Relay1"},{"I":2,"D":"Device"}],"sen":[{"I":112,"T":"S","D":
                                            
                                            shelly.0	2020-01-27 18:59:26.550	error	(2880) Error handling Shelly data: SyntaxError: Unexpected token ` in JSON at position 368 for JSON {"blk":[{"I":0,"D":"Relay0"},{"I":1,"D":"Relay1"},{"I":2,"D":"Device"},{"I":118,"T":"S","D":"Inp
                                            

                                            und die 3 Zeilen kommen im Log im Bezug auf das Skript

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

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate

                                            396
                                            Online

                                            31.9k
                                            Users

                                            80.1k
                                            Topics

                                            1.3m
                                            Posts

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