Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. [gelöst] Wert (JSON) an URL senden

    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] Wert (JSON) an URL senden

    This topic has been deleted. Only users with topic management privileges can see it.
    • T
      tofriedrich @MCU last edited by

      @mcu 895880E5-2BD2-4DCB-ACDD-6C9CAA24F2D8.png

      1 Reply Last reply Reply Quote 0
      • T
        tofriedrich last edited by tofriedrich

        Der Wert wird nicht geändert egal ob ich mit Level arbeite oder wie in meinem Screenshot. Die Instanz wird sogar deaktiviert.

        1 Reply Last reply Reply Quote 0
        • T
          tofriedrich last edited by

          
          javascript.0
          2021-09-12 00:46:43.219	error	TypeError [ERR_INVALID_ARG_TYPE]: The first argument must be of type string or an instance of Buffer or Uint8Array. Received an instance of Object at write_ (_http_outgoing.js:665:11) at ClientRequest.write (_http_outgoing.js:633:15) at Request.write (/opt/iobroker/node_modules/request/request.js:1494:27) at end (/opt/iobroker/node_modules/request/request.js:549:18) at Immediate._onImmediate (/opt/iobroker/node_modules/request/request.js:578:7) at processImmediate (internal/timers.js:461:21)
          
          javascript.0
          2021-09-12 00:46:43.218	error	Error: The first argument must be of type string or an instance of Buffer or Uint8Array. Received an instance of Object
          
          javascript.0
          2021-09-12 00:46:43.218	error	An error happened which is most likely from one of your scripts, but the originating script could not be detected.
          
          javascript.0
          2021-09-12 00:46:43.212	error	Request error: Error: Argument error, options.body.
          
          javascript.0
          2021-09-12 00:46:43.211	warn	script.js.Kamin_Set: {}
          
          
          1 Reply Last reply Reply Quote 0
          • M
            MCU last edited by

            @tofriedrich Wie ist denn Set_level definiert als String oder als number?

            T 1 Reply Last reply Reply Quote 0
            • T
              tofriedrich @MCU last edited by

              @mcu als number

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

                @tofriedrich Mach mal aus dem Set_level ein String.

                T 1 Reply Last reply Reply Quote 0
                • T
                  tofriedrich @MCU last edited by

                  @mcu habe ich. Der Fehler bleibt.

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

                    @tofriedrich
                    Versuchen wir es mal anders:
                    23d3eaaa-84ce-46c9-b31d-2a71dcada904-image.png
                    Erstmal nur so ohne Objektabhängigkeit.

                    curl --data "{'level'=5}" http://192.168.178.24/set_burn_level
                    Alternative:
                    curl --data {'level'=5} http://192.168.178.24/set_burn_level
                    

                    Mit Ergebnissen anklicken

                    2cc1a263-c2ca-4096-b0b3-bf8b12c0e7c3-image.png

                    T 1 Reply Last reply Reply Quote 0
                    • T
                      tofriedrich @MCU last edited by

                      @mcu der Wert geht auf 0

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

                        @tofriedrich Welcher Wert? Was hast du jetzt versucht?

                        T 1 Reply Last reply Reply Quote 0
                        • T
                          tofriedrich @MCU last edited by tofriedrich

                          @mcu C96DB283-E67B-485B-9340-C202BBF521CD.png

                          Wenn es ausgeführt wird, ändert sich der Wert Level auf 0.

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

                            @tofriedrich Du musst eine Variable anlegen mit Namen : result und die zuordnen.
                            Du meinst Deinen Set_level - Wert?
                            79adced5-d1de-48d3-a03d-6453f42503ca-image.png

                            T 2 Replies Last reply Reply Quote 0
                            • T
                              tofriedrich @MCU last edited by

                              @mcu habe ich jetzt. Sieht aus wie bei dir.

                              1 Reply Last reply Reply Quote 0
                              • T
                                tofriedrich @MCU last edited by

                                @mcu der Wert Level der vom Kamin abgerufen wird geht auf 0

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

                                  @tofriedrich Der burn_level aus dem JSON?

                                  DA MUSS EIN DOPPELPUNKT HIN,

                                  curl --data "{'level':5}" http://192.168.178.24/set_burn_level
                                  
                                  T 1 Reply Last reply Reply Quote 0
                                  • T
                                    tofriedrich @MCU last edited by

                                    @mcu es passiert gar nichts 😩 ich habe den trigger auf aktualisiert gesetzt.

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

                                      @tofriedrich Hast du jetzt den Doppelpunkt?
                                      Zeig Bitte Dein aktuelles Blocky.

                                      T 1 Reply Last reply Reply Quote 0
                                      • T
                                        tofriedrich @MCU last edited by

                                        @mcu 52EE8C0E-2A47-4C51-9CB2-737A4A6F9BAF.png

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

                                          @tofriedrich Exec kannst du aus dem Trigger raus ziehen. Dann wird bei jeden Script Neustart die Funktion ausgeführt.
                                          Was kommt denn im LOG?

                                          T 2 Replies Last reply Reply Quote 0
                                          • T
                                            tofriedrich @MCU last edited by

                                            @mcu 20014E09-A44C-497D-8680-B5A6701443CC.png so?

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

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate

                                            880
                                            Online

                                            31.8k
                                            Users

                                            79.9k
                                            Topics

                                            1.3m
                                            Posts

                                            6
                                            82
                                            4255
                                            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