Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. LONG PRESS und Toggle per Blockly

    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

    LONG PRESS und Toggle per Blockly

    This topic has been deleted. Only users with topic management privileges can see it.
    • Homoran
      Homoran Global Moderator Administrators @paul53 last edited by

      @paul53 sagte in LONG PRESS und Toggle per Blockly:

      Zeichne bitte mal die beiden PRESS-Datenpunkte per History auf, damit wir alle schlauer werden.

      mach ich!

      @paul53 sagte in LONG PRESS und Toggle per Blockly:

      Ich würde eine Sperrvariable verwenden, die beim ersten Trigger auf true und wenn true, auf false gesetzt wird.

      und da habe ich einiges versucht, hat aber nicht geklappt.

      Da kommen wir an meine Grenzen, ich weiß anscheinend nicht genau, wo ich sie starten und wo beenden muss.
      Eine oder zwei Sekunden müssten reichen

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

        @Homoran sagte in LONG PRESS und Toggle per Blockly:

        Da kommen wir an meine Grenzen, ich weiß anscheinend nicht genau, wo ich sie starten und wo beenden muss.

        Blockly_Doppeltrigger_Sperre.JPG

        Homoran 1 Reply Last reply Reply Quote 1
        • Homoran
          Homoran Global Moderator Administrators @paul53 last edited by

          @paul53
          Danke!
          Mach ich gleich.

          Doch zuerst die letzten Studien.
          log :

          2019-02-13 11:51:20.996  - info: javascript.0 script.js.Licht.Badlicht_repair: oben lang!
          2019-02-13 11:51:20.997  - info: javascript.0 script.js.Licht.Badlicht_repair: nicht hell
          2019-02-13 11:51:21.556  - info: javascript.0 script.js.Licht.Badlicht_repair: oben lang!
          2019-02-13 11:51:21.556  - info: javascript.0 script.js.Licht.Badlicht_repair: nicht hell
          2019-02-13 11:51:34.487  - info: javascript.0 script.js.Licht.Badlicht_repair: oben lang!
          2019-02-13 11:51:34.487  - info: javascript.0 script.js.Licht.Badlicht_repair: hell
          2019-02-13 11:51:34.919  - info: javascript.0 script.js.Licht.Badlicht_repair: oben lang!
          2019-02-13 11:51:34.919  - info: javascript.0 script.js.Licht.Badlicht_repair: hell
          2019-02-13 11:51:40.389  - info: javascript.0 script.js.Licht.Badlicht_repair: oben lang!
          2019-02-13 11:51:40.389  - info: javascript.0 script.js.Licht.Badlicht_repair: nicht hell
          2019-02-13 11:51:40.931  - info: javascript.0 script.js.Licht.Badlicht_repair: oben lang!
          2019-02-13 11:51:40.931  - info: javascript.0 script.js.Licht.Badlicht_repair: nicht hell
          2019-02-13 11:51:42.652  - info: javascript.0 script.js.Licht.Badlicht_repair: oben lang!
          2019-02-13 11:51:42.652  - info: javascript.0 script.js.Licht.Badlicht_repair: hell
          2019-02-13 11:51:42.898  - info: javascript.0 script.js.Licht.Badlicht_repair: oben lang!
          2019-02-13 11:51:42.898  - info: javascript.0 script.js.Licht.Badlicht_repair: hell
          2019-02-13 11:51:44.408  - info: javascript.0 script.js.Licht.Badlicht_repair: oben lang!
          2019-02-13 11:51:44.408  - info: javascript.0 script.js.Licht.Badlicht_repair: nicht hell
          2019-02-13 11:51:44.653  - info: javascript.0 script.js.Licht.Badlicht_repair: oben lang!
          2019-02-13 11:51:44.653  - info: javascript.0 script.js.Licht.Badlicht_repair: nicht hell
          

          History:

          true	true		2019-02-13 11:51:44.652	
          true	true		2019-02-13 11:51:44.407	
          true	true		2019-02-13 11:51:42.897	
          true	true		2019-02-13 11:51:42.651	
          true	true		2019-02-13 11:51:40.930	
          true	true		2019-02-13 11:51:40.388	
          true	true		2019-02-13 11:51:34.918	
          true	true		2019-02-13 11:51:34.486	
          true	true		2019-02-13 11:51:21.556	
          true	true		2019-02-13 11:51:20.995	
          true	true		2019-02-13 11:48:44.555	
          true	true		2019-02-13 11:48:43.520	
          true	true		2019-02-13 11:48:40.226	
          true	true		2019-02-13 11:48:39.925	
          true	true		2019-02-13 11:48:37.540	
          true	true		2019-02-13 11:48:36.601	
          true	true		2019-02-13 11:48:34.290	
          true	true		2019-02-13 11:48:33.352	
          true	true		2019-02-13 11:48:30.586	
          true	true		2019-02-13 11:48:29.662	
          true	true		2019-02-13 11:48:24.156	
          true	true		2019-02-13 11:48:23.196	
          null	true		2019-02-13 11:44:52.355	
          
          
          paul53 1 Reply Last reply Reply Quote 0
          • paul53
            paul53 @Homoran last edited by

            @Homoran sagte in LONG PRESS und Toggle per Blockly:

            History:

            Danke.
            Der Vergleich mit PRESS_SHORT wäre noch interessant: Kommt der erste PRESS_LONG-Trigger vor dem PRESS_SHORT-Trigger (beim Drücken) oder gleichzeitig ? Kennst Du die Zeitspanne für PRESS_SHORT ?

            1 Reply Last reply Reply Quote 0
            • Homoran
              Homoran Global Moderator Administrators last edited by Homoran

              @paul53 sagte in LONG PRESS und Toggle per Blockly:

              Der Vergleich mit PRESS_SHORT wäre noch interessant:

              Hab ich natürlich nicht geloggt 😳

              @paul53 sagte in LONG PRESS und Toggle per Blockly:

              Kennst Du die Zeitspanne für PRESS_SHORT ?

              Natürlich, habe sie ja selbst auf 0.3 gesetzt

              Habe das Blockly aber jetzt geändert.
              ist das so mit dem zusätzlich falls/sonst block ok?
              Badlicht_manuell_02.png

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

                @Homoran sagte in LONG PRESS und Toggle per Blockly:

                st das so mit dem zusätzlich falls/sonst block ok?

                Nein, Du hast wahr und unwahr vertauscht bei setze Sperre auf.

                Homoran 2 Replies Last reply Reply Quote 0
                • Homoran
                  Homoran Global Moderator Administrators @paul53 last edited by

                  @paul53
                  Ooops, tatsächlich!

                  Hat auch nicht geklappt - welch Wunder 😉

                  Habe aber was anderes festgestellt.
                  Wenn ich nur einen "kurzen LONG_PRESS" mache klappt alles wie ich will, warte ich jedoch mit dem loslassen bis die Lampe die Helligkeit gewechselt hat, springt sie wieder zurück.

                  Melde mich gleich wieder

                  Homoran 1 Reply Last reply Reply Quote 0
                  • foxriver76
                    foxriver76 Developer @Homoran last edited by foxriver76

                    @Homoran sagte in LONG PRESS und Toggle per Blockly:

                    @foxriver76
                    Hier die Send...

                    Ist gefixt und zukünftig werden beim neuanlegen von Geräten mit einem MAX von 1.005 dieser automatisch auf 1 korrigiert, da das Problem schon häufiger vorgekommen ist und man nicht bei jedem Gerät auf die manuelle Korrektur warten möchte. --> RPC 1.9.7

                    1 Reply Last reply Reply Quote 0
                    • Homoran
                      Homoran Global Moderator Administrators @Homoran last edited by

                      @paul53

                      Jetzt klappt es wie gewollt, egal wie lange ich drücke.
                      Danke!

                      2019-02-13 12:08:37.422  - info: javascript.0 script.js.Licht.Badlicht_repair: registered 2 subscriptions and 0 schedules
                      2019-02-13 12:08:54.848  - info: javascript.0 script.js.Licht.Badlicht_repair: oben lang!
                      2019-02-13 12:08:54.848  - info: javascript.0 script.js.Licht.Badlicht_repair: nicht hell
                      2019-02-13 12:09:16.885  - info: javascript.0 script.js.Licht.Badlicht_repair: oben lang!
                      2019-02-13 12:09:16.885  - info: javascript.0 script.js.Licht.Badlicht_repair: hell
                      2019-02-13 12:09:19.730  - info: javascript.0 script.js.Licht.Badlicht_repair: oben lang!
                      2019-02-13 12:09:19.731  - info: javascript.0 script.js.Licht.Badlicht_repair: nicht hell
                      2019-02-13 12:09:21.906  - info: javascript.0 script.js.Licht.Badlicht_repair: oben lang!
                      2019-02-13 12:09:21.906  - info: javascript.0 script.js.Licht.Badlicht_repair: hell
                      2019-02-13 12:09:25.893  - info: javascript.0 script.js.Licht.Badlicht_repair: oben lang!
                      2019-02-13 12:09:25.893  - info: javascript.0 script.js.Licht.Badlicht_repair: nicht hell
                      2019-02-13 12:09:37.176  - info: javascript.0 script.js.Licht.Badlicht_repair: oben lang!
                      2019-02-13 12:09:37.177  - info: javascript.0 script.js.Licht.Badlicht_repair: hell
                      

                      Willst du noch die history von short und long?

                      Gruß
                      Rainer

                      paul53 1 Reply Last reply Reply Quote 0
                      • Homoran
                        Homoran Global Moderator Administrators @paul53 last edited by

                        @paul53

                        Hier long:

                        true	true		2019-02-13 12:09:38.769	
                        true	true		2019-02-13 12:09:37.175	
                        true	true		2019-02-13 12:09:26.628	
                        true	true		2019-02-13 12:09:25.892	
                        true	true		2019-02-13 12:09:23.829	
                        true	true		2019-02-13 12:09:21.905	
                        true	true		2019-02-13 12:09:20.187	
                        true	true		2019-02-13 12:09:19.729	
                        true	true		2019-02-13 12:09:17.525	
                        true	true		2019-02-13 12:09:16.884	
                        true	true		2019-02-13 12:08:55.963	
                        true	true		2019-02-13 12:08:54.846	
                        true	true		2019-02-13 12:03:30.208	
                        true	true		2019-02-13 12:03:29.844	
                        true	true		2019-02-13 12:03:27.559	
                        true	true		2019-02-13 12:03:27.381	
                        true	true		2019-02-13 12:03:21.084	
                        true	true		2019-02-13 12:03:20.083	
                        true	true		2019-02-13 12:03:18.024	
                        true	true		2019-02-13 12:03:17.743	
                        true	true		2019-02-13 12:03:15.460	
                        true	true		2019-02-13 12:03:15.062	
                        true	true		2019-02-13 12:03:11.751	
                        true	true		2019-02-13 12:03:10.763	
                        true	true		2019-02-13 12:03:07.513	
                        true	true		2019-02-13 12:03:07.370	
                        true	true		2019-02-13 12:03:05.054	
                        true	true		2019-02-13 12:03:03.683	
                        true	true		2019-02-13 12:03:00.947	
                        true	true		2019-02-13 12:02:59.797
                        

                        und hier short:

                        true	true		2019-02-13 12:09:29.817	
                        true	true		2019-02-13 12:09:28.582	
                        null	true		2019-02-13 12:01:11.854
                        

                        kann aber sein, dass die auch entstanden sind, als ich irrtümlich beim testen mal zu kurz getippt hatte

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

                          @Homoran sagte in LONG PRESS und Toggle per Blockly:

                          Willst du noch die history von short und long?

                          Da ja entweder ein PRESS_SHORT -Trigger oder 2 PRESS_LONG-Trigger erfolgen, nutzt es wenig.

                          Homoran 1 Reply Last reply Reply Quote 0
                          • Homoran
                            Homoran Global Moderator Administrators @paul53 last edited by Homoran

                            @paul53 sagte in LONG PRESS und Toggle per Blockly:

                            nutzt es wenig.

                            sehe ich auch so - schade.

                            Aber deine Sperrvariable nutzt.

                            Danke nochmals
                            Rainer

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

                              @Homoran sagte in LONG PRESS und Toggle per Blockly:

                              Wie man jetzt am log schon sieht, haben anscheinend die IP Taster nicht nur einen LONG PRESS Impuls, sondern bekommen die ganze Zeit, während gedrückt wird weitere Impulse.

                              Kommen da wirklich mehrere Impulse, mit long_press true?
                              Zu bedenken sind Kommunikationsdauer ioBroker-> Taster -> ioBroker und asynchrone Abarbeitung JavaScript. Zumal Du Verzögerungen einsetzt.

                              Grüße

                              Homoran paul53 2 Replies Last reply Reply Quote 0
                              • Homoran
                                Homoran Global Moderator Administrators @rantanplan last edited by

                                @rantanplan sagte in LONG PRESS und Toggle per Blockly:

                                Kommen da wirklich mehrere Impulse, mit long_press true?

                                wie erkenne ich das "wirklich"?

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

                                  @rantanplan sagte in LONG PRESS und Toggle per Blockly:

                                  Kommen da wirklich mehrere Impulse, mit long_press true?

                                  Laut History-Daten für PRESS_LONG: Ja.

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

                                  Support us

                                  ioBroker
                                  Community Adapters
                                  Donate

                                  817
                                  Online

                                  31.8k
                                  Users

                                  79.9k
                                  Topics

                                  1.3m
                                  Posts

                                  blockly
                                  5
                                  36
                                  3768
                                  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