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. [gelöst] Wert (JSON) an URL senden

NEWS

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

  • Neuer Blogbeitrag: Monatsrückblick - Dezember 2025 🎄
    BluefoxB
    Bluefox
    13
    1
    927

  • Weihnachtsangebot 2025! 🎄
    BluefoxB
    Bluefox
    25
    1
    2.2k

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

Scheduled Pinned Locked Moved Skripten / Logik
82 Posts 6 Posters 7.7k Views 4 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.
  • M MCU

    @tofriedrich
    Sonst versuch mal das Script von paul und nimm ein javascript
    9b7556f2-3aa1-43e1-950c-e9d435cfcaad-image.png
    Kopier es rein und lass es laufen.
    Dies reagiert dann wieder auf Änderung von Set_Level.

    T Offline
    T Offline
    tofriedrich
    wrote on last edited by
    #72

    @mcu das setzt der burn_level wert auch auf 0

    M 1 Reply Last reply
    0
    • T tofriedrich

      @mcu das setzt der burn_level wert auch auf 0

      M Online
      M Online
      MCU
      wrote on last edited by
      #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 Replies Last reply
      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
        wrote on last edited by
        #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 Replies Last reply
        0
        • M MCU

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

          M Online
          M Online
          MCU
          wrote on last edited by 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 Reply Last reply
          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
            wrote on last edited by
            #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 Reply Last reply
            0
            • M MCU

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

              T Offline
              T Offline
              tofriedrich
              wrote on last edited by tofriedrich
              #77

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

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

              1 Reply Last reply
              0
              • M Offline
                M Offline
                mvn23
                wrote on last edited by
                #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 Reply Last reply
                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
                  wrote on last edited by 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 Reply Last reply
                  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
                    wrote on last edited by
                    #80

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

                    paul53P 1 Reply Last reply
                    0
                    • T tofriedrich

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

                      paul53P Offline
                      paul53P Offline
                      paul53
                      wrote on last edited by 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 Reply Last reply
                      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
                        wrote on last edited by 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 Reply Last reply
                        0
                        Reply
                        • Reply as topic
                        Log in to reply
                        • Oldest to Newest
                        • Newest to Oldest
                        • Most Votes


                        Support us

                        ioBroker
                        Community Adapters
                        Donate

                        583

                        Online

                        32.6k

                        Users

                        82.2k

                        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