Skip to content
  • Home
  • Recent
  • Tags
  • 0 Unread 0
  • Categories
  • Unreplied
  • Popular
  • GitHub
  • Docu
  • Hilfe
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
ioBroker Logo

Community Forum

donate donate
  1. ioBroker Community Home
  2. Deutsch
  3. Skripten / Logik
  4. Blockly und nächste Zeile

NEWS

  • Verwendung von KI bitte immer deutlich kennzeichnen
    HomoranH
    Homoran
    5
    1
    67

  • Monatsrückblick Januar/Februar 2026 ist online!
    BluefoxB
    Bluefox
    18
    1
    839

  • Jahresrückblick 2025 – unser neuer Blogbeitrag ist online! ✨
    BluefoxB
    Bluefox
    18
    1
    6.4k

Blockly und nächste Zeile

Scheduled Pinned Locked Moved Skripten / Logik
81 Posts 21 Posters 18.3k Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Online
    R Online
    Ritter
    wrote on last edited by
    #44

    Hallo,

    bei mir funktioniert es jetzt seit einiger Zeit. Man muss das Blockly aber nocheinmal neu anlegen sonst gings nicht.

    1 Reply Last reply
    0
    • MatzebhvM Offline
      MatzebhvM Offline
      Matzebhv
      wrote on last edited by
      #45

      @Ritter:

      Hallo,

      bei mir funktioniert es jetzt seit einiger Zeit. Man muss das Blockly aber nocheinmal neu anlegen sonst gings nicht. `

      Moin,

      wie hast du denn das gemacht?

      Gerade nochmal probiert, geht nicht.

      Matze

      1 Reply Last reply
      0
      • D Offline
        D Offline
        dodi666
        wrote on last edited by
        #46

        @Matzebhv:

        @Ritter:

        Hallo,

        bei mir funktioniert es jetzt seit einiger Zeit. Man muss das Blockly aber nocheinmal neu anlegen sonst gings nicht. `

        Moin,

        wie hast du denn das gemacht?

        Gerade nochmal probiert, geht nicht.

        Matze `

        Das würde mich auch interessieren…

        Grüße

        Sascha

        1 Reply Last reply
        0
        • R Online
          R Online
          Ritter
          wrote on last edited by
          #47

          Hallo,

          so:
          1026_wetterwarnung.jpg
          1026_wetterwarnung2.jpg

          1 Reply Last reply
          0
          • DutchmanD Offline
            DutchmanD Offline
            Dutchman
            Developer Most Active Administrators
            wrote on last edited by
            #48

            also "\n" als tekstblock sorgt fuer die neue zeile ?

            1 Reply Last reply
            0
            • R Online
              R Online
              Ritter
              wrote on last edited by
              #49

              Ja, so hats zumindest funktioniert.

              Javascript Version 3.5.0

              1 Reply Last reply
              0
              • D Offline
                D Offline
                dodi666
                wrote on last edited by
                #50

                @Ritter:

                Ja, so hats zumindest funktioniert.

                Javascript Version 3.5.0 `

                Wenn ich mich nicht irre, ist 3.4.0 die aktuelle stable Version, oder?

                1 Reply Last reply
                0
                • DutchmanD Offline
                  DutchmanD Offline
                  Dutchman
                  Developer Most Active Administrators
                  wrote on last edited by
                  #51

                  @dodi666:

                  Wenn ich mich nicht irre, ist 3.4.0 die aktuelle stable Version, oder? `

                  jup und 3.5.1 im latest: http://download.iobroker.net/list.html# … lter=logic

                  979_js-version.jpg

                  1 Reply Last reply
                  0
                  • rantanplanR Offline
                    rantanplanR Offline
                    rantanplan
                    wrote on last edited by
                    #52

                    Nur bloß nicht die 3.6.0 runterladen !!!!!

                    Da geht mit Blockly fast gar nichts.

                    Grüße

                    Rantanplan

                    CCU3 / MS Server 2019(VM) / Scripten mit Blockly

                    1 Reply Last reply
                    0
                    • D Offline
                      D Offline
                      dodi666
                      wrote on last edited by
                      #53

                      Ok,

                      ich warte auf die nächste stable :D

                      1 Reply Last reply
                      0
                      • MatzebhvM Offline
                        MatzebhvM Offline
                        Matzebhv
                        wrote on last edited by
                        #54

                        @Ritter:

                        Hallo,

                        so:

                        Wetterwarnung.jpg

                        Wetterwarnung2.JPG `

                        Hm,

                        hier mit Version 3.51:

                        3514_blockly.png

                        Und als Ergebnis:

                        sendTo("telegram", "send", {

                        text: (String('Test') + String('\n'))

                        });

                        1 Reply Last reply
                        0
                        • rantanplanR Offline
                          rantanplanR Offline
                          rantanplan
                          wrote on last edited by
                          #55

                          Also bei mir klappt es nicht. (v3.5.1)
                          147_beispiel.png

                          sendTo("telegram.0", "send", {
                              text: (['Test neue Zeile','\\n','NEUE ZEILE'].join(''))
                          });
                          

                          Bei Telegram kommt "Test neue Zeile\nNEUE ZEILE" an.

                          Grüße

                          Rantanplan

                          CCU3 / MS Server 2019(VM) / Scripten mit Blockly

                          1 Reply Last reply
                          0
                          • MatzebhvM Offline
                            MatzebhvM Offline
                            Matzebhv
                            wrote on last edited by
                            #56

                            @rantanplan:

                            Also bei mir klappt es nicht. (v3.5.1)

                            Beispiel.png

                            sendTo("telegram.0", "send", {
                                text: (['Test neue Zeile','\\n','NEUE ZEILE'].join(''))
                            });
                            

                            Bei Telegram kommt "Test neue Zeile\nNEUE ZEILE" an.

                            Grüße `

                            Ja genau. Der \ wird im Code escaped -> \n

                            1 Reply Last reply
                            0
                            • R Online
                              R Online
                              Ritter
                              wrote on last edited by
                              #57

                              Hallo,

                              Beim Enigma Receiver mit dem Request Baustein gehts, auch mit //, aber nur wenn ich das Blockly neu anlege, ein altes Blockly mit gleichem Inhalt das ich nur deaktiviert habe und wieder gestartet habe gings nicht.
                              1026_wetterstation.jpg
                              1026_wetterstation1.jpg

                              on({id: 'hm-rpc.0.JEQ0157625.1.TEMPERATURE', change: "any"}, function (obj) {

                              var value = obj.state.val;

                              var oldValue = obj.oldState.val;

                              try {

                              require("request")((['http://192.168.1.111/web/message?text=Aussentemperatur: ',getState("hm-rpc.0.JEQ0157625.1.TEMPERATURE").val,' °C','\n','Windgeschwindigkeit: ',getState("hm-rpc.0.JEQ0157625.1.WIND_SPEED").val,' km/h','\n','Regen: ',getState("hm-rpc.0.JEQ0157625.1.RAINING").val,'&type=1&timeout=15'].join(''))).on("error", function (e) {console.error(e);});

                              } catch (e) { console.error(e); }

                              });

                              Bei Telegram, Pushover und Email gehts nicht.

                              1 Reply Last reply
                              0
                              • MatzebhvM Offline
                                MatzebhvM Offline
                                Matzebhv
                                wrote on last edited by
                                #58

                                @Ritter:

                                Hallo,

                                Beim Enigma Receiver mit dem Request Baustein gehts, auch mit //, aber nur wenn ich das Blockly neu anlege, ein altes Blockly mit gleichem Inhalt das ich nur deaktiviert habe und wieder gestartet habe gings nicht.

                                Wetterstation.jpg

                                Wetterstation1.jpg

                                on({id: 'hm-rpc.0.JEQ0157625.1.TEMPERATURE', change: "any"}, function (obj) {

                                var value = obj.state.val;

                                var oldValue = obj.oldState.val;

                                try {

                                require("request")((['http://192.168.1.111/web/message?text=Aussentemperatur: ',getState("hm-rpc.0.JEQ0157625.1.TEMPERATURE").val,' °C','\n','Windgeschwindigkeit: ',getState("hm-rpc.0.JEQ0157625.1.WIND_SPEED").val,' km/h','\n','Regen: ',getState("hm-rpc.0.JEQ0157625.1.RAINING").val,'&type=1&timeout=15'].join(''))).on("error", function (e) {console.error(e);});

                                } catch (e) { console.error(e); }

                                });

                                Bei Telegram, Pushover und Email gehts nicht. `

                                Naja, du siehst ja aber im Quelltext überall -> \n anstatt \n.

                                Anscheinend ignoiert dein Receiver das Escape.

                                Matze

                                1 Reply Last reply
                                0
                                • D Offline
                                  D Offline
                                  dodi666
                                  wrote on last edited by
                                  #59

                                  Hallo zusammen,

                                  habe heute die 3.5.1 installiert. Leider funktioniert der Zeilenumbruch mit "\n" noch nicht.

                                  Grüße

                                  Sascha

                                  1 Reply Last reply
                                  0
                                  • R Offline
                                    R Offline
                                    randomUser001267
                                    wrote on last edited by
                                    #60

                                    Hi

                                    Mit einem kleinen Trick kann man sich eine Variable erstellen in der man das '\n' speichert (ohne zusätzliches Escape-Zeichen):

                                    Ich habe den Baustein "JavaScript-Funktion" genommen und dort den folgenden Code eingefügt:

                                    nextline = '\n';
                                    
                                    

                                    und dann kann man mit dem "erstelle Text aus"-Baustein diese Variable verwenden um zwei Zeilen zu trennen.

                                    Screenshots im Anhang, hier der generierte JavaCode:

                                    var nextline;
                                    
                                    /**
                                     * Beschreibe diese Funktion …
                                     */
                                    
                                    function newline() {
                                        nextline = '\n';
                                    }
                                    
                                    sendTo("telegram", "send", {
                                        text: (['Zeile 1',nextline,'Zeile 2'].join(''))
                                    });
                                    
                                    

                                    Gebt gerne eine kurze Rückmeldung ob es auch bei euch funktioniert.

                                    Ich hoffe es hilft euch.

                                    Liebe Grüße, RandomUser
                                    6453_2018-03-15_21-45-26-start.png
                                    6453_2018-03-15_21-46-08-start.png

                                    1 Reply Last reply
                                    0
                                    • R Offline
                                      R Offline
                                      RoLei
                                      wrote on last edited by
                                      #61

                                      Bei mir funktioniert es leider nicht. Im generierten Code wird keine Variable angelegt. Die definierten Variablen sind aus anderen Blockly Elementen.
                                      6842_ca8f6e4f-a9dc-476a-9c50-d2ba0d644a1a.jpeg

                                      1 Reply Last reply
                                      0
                                      • BluefoxB Offline
                                        BluefoxB Offline
                                        Bluefox
                                        wrote on last edited by
                                        #62

                                        Auf dem git liegt so was:
                                        48_newline.png

                                        1 Reply Last reply
                                        0
                                        • R Online
                                          R Online
                                          Ritter
                                          wrote on last edited by
                                          #63

                                          Ich kanns nicht finden.

                                          1 Reply Last reply
                                          0

                                          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                                          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                                          With your input, this post could be even better 💗

                                          Register Login
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          Support us

                                          ioBroker
                                          Community Adapters
                                          Donate

                                          318

                                          Online

                                          32.8k

                                          Users

                                          82.7k

                                          Topics

                                          1.3m

                                          Posts
                                          Community
                                          Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen | Einwilligungseinstellungen
                                          ioBroker Community 2014-2025
                                          logo
                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Home
                                          • Recent
                                          • Tags
                                          • Unread 0
                                          • Categories
                                          • Unreplied
                                          • Popular
                                          • GitHub
                                          • Docu
                                          • Hilfe