Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Blockly
    5. [geloest] Ping via Blockly ohne ping.adapter auslesen

    NEWS

    • Wir empfehlen: Node.js 22.x

    • Neuer Blog: Fotos und Eindrücke aus Solingen

    • ioBroker goes Matter ... Matter Adapter in Stable

    [geloest] Ping via Blockly ohne ping.adapter auslesen

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

      @oberfragger sagte:

      woher bekomme cih das Objekt "error"?

      Du musst einen Variable mit dem Bezeichner error erstellen.

      Anstelle der URL steht immer noch ein Kommando !

      1 Reply Last reply Reply Quote 0
      • M
        MCU @oberfragger last edited by

        @oberfragger Du hattest doch vorher Exec genutzt, warum denn umgestellt auf request?

        Exec nutzt man für : sudo ping und andere Befehle, die man auf den Console ausführen kann

        request nutzt man für URL -> http-Abfragen oder Aufrufe

        Thomas Braun oberfragger 2 Replies Last reply Reply Quote 0
        • Thomas Braun
          Thomas Braun Most Active @MCU last edited by

          @MCU sagte in Ping via Blockly ohne ping.adapter auslesen:

          request nutzt man für URL -> http-Abfragen oder Aufrufe

          Besser nicht mehr. request gilt als deprecated.

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

            @oberfragger

            Verwende exec() ohne sudo (bei mir funktioniert es).

            Blockly_temp.JPG

            1 Reply Last reply Reply Quote 1
            • M
              MCU @Thomas Braun last edited by

              @Thomas-Braun Was nutzt man denn anstatt "request" in Blockly?

              Thomas Braun F 2 Replies Last reply Reply Quote 0
              • Thomas Braun
                Thomas Braun Most Active @MCU last edited by

                @MCU
                Keine Ahnung. Bin eher Blocky-Legastheniker. Muss vermutlich perspektivisch auf irgendwas anderes umgestellt werden.

                https://www.npmjs.com/package/request

                M 1 Reply Last reply Reply Quote 0
                • M
                  MCU @Thomas Braun last edited by

                  @Thomas-Braun Ok. Danke für die Info.

                  1 Reply Last reply Reply Quote 0
                  • F
                    fastfoot @MCU last edited by

                    @MCU sagte in Ping via Blockly ohne ping.adapter auslesen:

                    Was nutzt man denn anstatt "request" in Blockly?

                    solange request() noch in iobroker(und damit in Blockly) integriert ist, sehe ich keine Notwendigkeit da umzusteigen, innerhalb Blockly wäre das ja auch mit erheblichen Klimmzügen verbunden(JS-Funktion anstatt request-Block, laden einer Alternative in der JS-Instanz).

                    Für JS wird von Apollon77 wohl axios() empfohlen, welches auch recht einfach anzuwenden ist. Ich pers. nehme da nichts Anderes mehr.

                    M 1 Reply Last reply Reply Quote 0
                    • oberfragger
                      oberfragger @MCU last edited by

                      @MCU Deine 2. Antwort enthielt request im Screenshot.
                      @paul53 - Danke- so funktioniert es!

                      Danke @all für die Hilfe.

                      1 Reply Last reply Reply Quote 0
                      • M
                        MCU @fastfoot last edited by

                        @fastfoot Ok. Danke für die Info.

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

                        Support us

                        ioBroker
                        Community Adapters
                        Donate

                        857
                        Online

                        32.0k
                        Users

                        80.4k
                        Topics

                        1.3m
                        Posts

                        5
                        24
                        1696
                        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