Skip to content
  • Home
  • Aktuell
  • Tags
  • 0 Ungelesen 0
  • Kategorien
  • Unreplied
  • Beliebt
  • 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

  • Standard: (Kein Skin)
  • Kein Skin
Einklappen
ioBroker Logo

Community Forum

donate donate
  1. ioBroker Community Home
  2. Deutsch
  3. Skripten / Logik
  4. [gelöst] Wert (JSON) an URL senden

NEWS

  • Neuer Blogbeitrag: Monatsrückblick - Dezember 2025 🎄
    BluefoxB
    Bluefox
    11
    1
    351

  • Weihnachtsangebot 2025! 🎄
    BluefoxB
    Bluefox
    24
    1
    1.6k

  • UPDATE 31.10.: Amazon Alexa - ioBroker Skill läuft aus ?
    apollon77A
    apollon77
    48
    3
    9.5k

[gelöst] Wert (JSON) an URL senden

Geplant Angeheftet Gesperrt Verschoben Skripten / Logik
82 Beiträge 6 Kommentatoren 7.4k Aufrufe 4 Watching
  • Älteste zuerst
  • Neuste zuerst
  • Meiste Stimmen
Antworten
  • In einem neuen Thema antworten
Anmelden zum Antworten
Dieses Thema wurde gelöscht. Nur Nutzer mit entsprechenden Rechten können es sehen.
  • T tofriedrich

    @mcu das setzt der burn_level wert auch auf 0

    M Online
    M Online
    MCU
    schrieb am zuletzt editiert von
    #73

    @tofriedrich

    on('0_userdata.0.Kamin.Set_Level', function(dp) {
        request({
            method: 'POST',
            url: 'http://192.168.178.24/set_burn_level',
            body: {"level":dp.state.val}
        }, function(error, respnse, body) {
            if(error) log(error, 'warn');
        });
    });
    
    

    NUC i7 64GB mit Proxmox ---- Jarvis Infos Aktualisierungen der Doku auf Instagram verfolgen -> mcuiobroker Instagram
    Wenn Euch mein Vorschlag geholfen hat, bitte rechts "^" klicken.

    M paul53P 2 Antworten Letzte Antwort
    0
    • M MCU

      @tofriedrich

      on('0_userdata.0.Kamin.Set_Level', function(dp) {
          request({
              method: 'POST',
              url: 'http://192.168.178.24/set_burn_level',
              body: {"level":dp.state.val}
          }, function(error, respnse, body) {
              if(error) log(error, 'warn');
          });
      });
      
      
      M Online
      M Online
      MCU
      schrieb am zuletzt editiert von
      #74

      @tofriedrich Wie bekommst du das JSON?
      Auch per http-Abfrage?

      NUC i7 64GB mit Proxmox ---- Jarvis Infos Aktualisierungen der Doku auf Instagram verfolgen -> mcuiobroker Instagram
      Wenn Euch mein Vorschlag geholfen hat, bitte rechts "^" klicken.

      M T 2 Antworten Letzte Antwort
      0
      • M MCU

        @tofriedrich Wie bekommst du das JSON?
        Auch per http-Abfrage?

        M Online
        M Online
        MCU
        schrieb am zuletzt editiert von MCU
        #75

        @mcu Kann es sein das die Nachtabsenkung den Wert immer wieder auf 0 stellt:
        Nachtabsenkung stellt das System automatisch auf „Level 0“
        https://www.hwam.de/pub/media/hwam/manuals/smartcontrol/53-1102_App_IHS_gen2_DE.pdf

        NUC i7 64GB mit Proxmox ---- Jarvis Infos Aktualisierungen der Doku auf Instagram verfolgen -> mcuiobroker Instagram
        Wenn Euch mein Vorschlag geholfen hat, bitte rechts "^" klicken.

        T 1 Antwort Letzte Antwort
        0
        • M MCU

          @mcu Kann es sein das die Nachtabsenkung den Wert immer wieder auf 0 stellt:
          Nachtabsenkung stellt das System automatisch auf „Level 0“
          https://www.hwam.de/pub/media/hwam/manuals/smartcontrol/53-1102_App_IHS_gen2_DE.pdf

          T Offline
          T Offline
          tofriedrich
          schrieb am zuletzt editiert von
          #76

          @mcu die Nachtabsenkung ist bei mir deaktiviert und wird nur selten genutzt. Normalerweise bleibt der Kamin immer auf dem zuletzt genutzten Level stehen.

          1 Antwort Letzte Antwort
          0
          • M MCU

            @tofriedrich Wie bekommst du das JSON?
            Auch per http-Abfrage?

            T Offline
            T Offline
            tofriedrich
            schrieb am zuletzt editiert von tofriedrich
            #77

            @mcu so hole ich mir die Daten und schreibe sie in die Datenpunkte:

            1D9B527E-359B-4CEA-8E82-8B86B83B6EC4.png

            1 Antwort Letzte Antwort
            0
            • M Offline
              M Offline
              mvn23
              schrieb am zuletzt editiert von
              #78

              My German isn't great, so I'll type in English instead.
              I'm the developer of the Home Assistant hwam_stove integration (https://github.com/mvn23/hwam_stove) and the pystove library it depends on (https://github.com/mvn23/pystove). All information required for the development of these projects was obtained by sniffing the HTTP traffic to and from the stove (it's completely unencrypted) and by disassembling the official Android app.

              First of all, while going through this thread, I saw a few attempts with "{'level':5}" as payload. Please note that JSON is very picky with the type of quotes being used. All strings - and thus dictionary keys - must be enclosed in double quotes, i.e. '{"level":5}'.

              To mimic the Android app and my pystove library, the following header should be included in your request: "Accept: application/json". This is present in all requests sent by pystove. If I remember correctly (it's been a while since I coded that) it was required to make the stove respond correctly. I can't think of another reason why I would have included it in pystove at the time ;)

              1 Antwort Letzte Antwort
              2
              • M MCU

                @tofriedrich

                on('0_userdata.0.Kamin.Set_Level', function(dp) {
                    request({
                        method: 'POST',
                        url: 'http://192.168.178.24/set_burn_level',
                        body: {"level":dp.state.val}
                    }, function(error, respnse, body) {
                        if(error) log(error, 'warn');
                    });
                });
                
                
                paul53P Offline
                paul53P Offline
                paul53
                schrieb am zuletzt editiert von paul53
                #79

                @mcu
                Oder so?

                on('0_userdata.0.Kamin.Set_Level', function(dp) {
                    request({
                        method: 'POST',
                        url: 'http://192.168.178.24/set_burn_level',
                        json: true,
                        body: {level: dp.state.val}
                    }, function(error, response, body) {
                        if(error) log(error, 'warn');
                    });
                });
                

                Laut Doku:

                body - entity body for PATCH, POST and PUT requests. Must be a Buffer, String or ReadStream. If json is true, then body must be a JSON-serializable object.
                json - sets body to JSON representation of value and adds Content-type: application/json header. Additionally, parses the response body as JSON.

                Bitte verzichtet auf Chat-Nachrichten, denn die Handhabung ist grauenhaft !
                Produktiv: RPi 2 mit S.USV, HM-MOD-RPI und SLC-USB-Stick mit root fs

                T 1 Antwort Letzte Antwort
                2
                • paul53P paul53

                  @mcu
                  Oder so?

                  on('0_userdata.0.Kamin.Set_Level', function(dp) {
                      request({
                          method: 'POST',
                          url: 'http://192.168.178.24/set_burn_level',
                          json: true,
                          body: {level: dp.state.val}
                      }, function(error, response, body) {
                          if(error) log(error, 'warn');
                      });
                  });
                  

                  Laut Doku:

                  body - entity body for PATCH, POST and PUT requests. Must be a Buffer, String or ReadStream. If json is true, then body must be a JSON-serializable object.
                  json - sets body to JSON representation of value and adds Content-type: application/json header. Additionally, parses the response body as JSON.

                  T Offline
                  T Offline
                  tofriedrich
                  schrieb am zuletzt editiert von
                  #80

                  @paul53 kaum zu glauben… es funktioniert! Vielen vielen Dank euch allen für die Hilfe 🙏

                  paul53P 1 Antwort Letzte Antwort
                  0
                  • T tofriedrich

                    @paul53 kaum zu glauben… es funktioniert! Vielen vielen Dank euch allen für die Hilfe 🙏

                    paul53P Offline
                    paul53P Offline
                    paul53
                    schrieb am zuletzt editiert von paul53
                    #81

                    @tofriedrich sagte: es funktioniert!

                    Dann markiere bitte das Thema in der Überschrift des ersten Beitrags als [Gelöst].

                    @tofriedrich sagte in Wert (JSON) an URL senden:

                    so hole ich mir die Daten und schreibe sie in die Datenpunkte:

                    Die Wandlungen "nach Zahl" und "nach Logikwert" bei "doorOpen" kann man weglassen.

                    Bitte verzichtet auf Chat-Nachrichten, denn die Handhabung ist grauenhaft !
                    Produktiv: RPi 2 mit S.USV, HM-MOD-RPI und SLC-USB-Stick mit root fs

                    K 1 Antwort Letzte Antwort
                    0
                    • paul53P paul53

                      @tofriedrich sagte: es funktioniert!

                      Dann markiere bitte das Thema in der Überschrift des ersten Beitrags als [Gelöst].

                      @tofriedrich sagte in Wert (JSON) an URL senden:

                      so hole ich mir die Daten und schreibe sie in die Datenpunkte:

                      Die Wandlungen "nach Zahl" und "nach Logikwert" bei "doorOpen" kann man weglassen.

                      K Offline
                      K Offline
                      Kusi
                      schrieb am zuletzt editiert von Kusi
                      #82

                      @paul53 anderes Gerät, aber auch JSON an URL senden.

                      c4419a2c-f3bf-4d87-ae92-d6ea05ddda91-image.png
                      Der Befehl ist wie folgt :

                      curl -i -d '{"method": "getSystemInformation","id": 65,"params": [],"version": "1.4"}' http://192.168.1.254:10000/sony/system
                      

                      Eine Antwort erhalte ich, somit funktioniert die Kommunikation.

                      Nun versuche ich aber, einen anderen Befehl zu senden, welche ich auf folgender Seite finde:
                      API reference

                      Als Beispiel folgender JSON:

                      {
                       "method":"notifyPowerStatus",
                       "params":[
                        {
                         "status":"standby"
                        }
                       ],
                       "version":"1.0"
                      }
                      

                      Nun habe ich folgenden exec-Befehl probiert:

                      curl -i -d '{"method": "notifyPowerStatus","params":[{"status":"standby"}],"version": "1.0" }' http://192.168.1.254:10000/sony/system
                      

                      Folgender Fehler erscheint jetzt:

                      HTTP/1.1 200 OK Connection: close Content-Length: 28 Content-Type: application/json {"error":[5,"Illegal JSON"]}
                      

                      Kann mir jemand weiterhelfen?

                      1 Antwort Letzte Antwort
                      0
                      Antworten
                      • In einem neuen Thema antworten
                      Anmelden zum Antworten
                      • Älteste zuerst
                      • Neuste zuerst
                      • Meiste Stimmen


                      Support us

                      ioBroker
                      Community Adapters
                      Donate

                      555

                      Online

                      32.5k

                      Benutzer

                      81.8k

                      Themen

                      1.3m

                      Beiträge
                      Community
                      Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen | Einwilligungseinstellungen
                      ioBroker Community 2014-2025
                      logo
                      • Anmelden

                      • Du hast noch kein Konto? Registrieren

                      • Anmelden oder registrieren, um zu suchen
                      • Erster Beitrag
                        Letzter Beitrag
                      0
                      • Home
                      • Aktuell
                      • Tags
                      • Ungelesen 0
                      • Kategorien
                      • Unreplied
                      • Beliebt
                      • GitHub
                      • Docu
                      • Hilfe