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. HUUM Saunasteuerung

NEWS

  • Weihnachtsangebot 2025! 🎄
    BluefoxB
    Bluefox
    22
    1
    1.2k

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

  • Monatsrückblick – September 2025
    BluefoxB
    Bluefox
    14
    1
    2.4k

HUUM Saunasteuerung

Geplant Angeheftet Gesperrt Verschoben Skripten / Logik
28 Beiträge 6 Kommentatoren 4.2k Aufrufe 7 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.
  • ckossendeyC Offline
    ckossendeyC Offline
    ckossendey
    schrieb am zuletzt editiert von
    #1

    Hallo, ich bin neu hier und habe eine Frage / Bitte..

    Ich würde gerne meine Saunasteuerung in iobroker integrieren. Die Steuerung ist per API ansprechbar. In Nodered hatte ich es auch schonmal geschafft per Get Befehl geschafft. Nun will ich aber auf iobroker umsteigen. Ich vermute es geht nur per Skript - aber ich komme damit nicht zurecht.

    Kann mir jemand helfen? Hier die Infos zur API https://github.com/horemansp/HUUM

    Vielen Dank!

    1 Antwort Letzte Antwort
    0
    • GarganoG Offline
      GarganoG Offline
      Gargano
      schrieb am zuletzt editiert von
      #2

      @ckossendey Das wäre der erste Schritt :
      im Javascript Adapter unter zusätzlich NPM Module 'axios' eintragen

      username und passwort ins Script eintragen . Dann sollte schonmal ein JSON String zurück kommen

      const axios = require('axios');
      
      const url = 'https://api.huum.eu/action/home/status';
      
      
      async function getHuum () {
          const err = await axios
          .get(url, {
              auth: {
                  username: 'foo',
                  password: 'baz' 
              }
          })
          .then (function(response) {
          console.log(response.data);
          })
          .catch(function(error) {
          console.log('Error '+error);
          });
      }
      
      getHuum ();
      
      
                  
      
      ckossendeyC 1 Antwort Letzte Antwort
      0
      • GarganoG Gargano

        @ckossendey Das wäre der erste Schritt :
        im Javascript Adapter unter zusätzlich NPM Module 'axios' eintragen

        username und passwort ins Script eintragen . Dann sollte schonmal ein JSON String zurück kommen

        const axios = require('axios');
        
        const url = 'https://api.huum.eu/action/home/status';
        
        
        async function getHuum () {
            const err = await axios
            .get(url, {
                auth: {
                    username: 'foo',
                    password: 'baz' 
                }
            })
            .then (function(response) {
            console.log(response.data);
            })
            .catch(function(error) {
            console.log('Error '+error);
            });
        }
        
        getHuum ();
        
        
                    
        
        ckossendeyC Offline
        ckossendeyC Offline
        ckossendey
        schrieb am zuletzt editiert von
        #3

        @gargano

        Danke dir! Ich habe es ein wenig umgebaut und nun bekomme ich die Werte auch schon als Objekte angezeigt. Hier mein Code:

        '*/10 * * * *'
        "use strict"
        
        const axios = require('axios');
        
        const url = 'https://api.huum.eu/action/home/status';
        
        
        createState("huum.maxHeatingTime")
        createState("huum.statusCode")
        createState("huum.door")
        createState("huum.config")
        createState("huum.light")
        createState("huum.temperature")
        createState("huum.date")
        
        
        
        axios.get(url, { auth: {
                username: 'user',
                password: 'pass' 
            }
        })
        
         
            .then (function(response) {
           console.log(response.data);
            // console.log(response.data.statusCode);
           // console.log(response.data.config);
           // console.log(response.data.light);
           // console.log(response.data.paymentEndDate);
           // console.log(response.data.temperature);
        
        setState("huum.maxHeatingTime", response.data.maxHeatingTime);
        setState("huum.statusCode", response.data.statusCode);
        setState("huum.door", response.data.door);
        setState("huum.config", response.data.config);
        setState("huum.light", response.data.light);
        setState("huum.temperature", response.data.temperature);
        setState("huum.date", response.headers.date);
        
        
            })
        
            .catch(function(error) {
            console.log('Error '+error);
            
        });
        
        
        

        ISt das grundsätzlich in Ordnung so? Danke

        GarganoG 1 Antwort Letzte Antwort
        0
        • ckossendeyC ckossendey

          @gargano

          Danke dir! Ich habe es ein wenig umgebaut und nun bekomme ich die Werte auch schon als Objekte angezeigt. Hier mein Code:

          '*/10 * * * *'
          "use strict"
          
          const axios = require('axios');
          
          const url = 'https://api.huum.eu/action/home/status';
          
          
          createState("huum.maxHeatingTime")
          createState("huum.statusCode")
          createState("huum.door")
          createState("huum.config")
          createState("huum.light")
          createState("huum.temperature")
          createState("huum.date")
          
          
          
          axios.get(url, { auth: {
                  username: 'user',
                  password: 'pass' 
              }
          })
          
           
              .then (function(response) {
             console.log(response.data);
              // console.log(response.data.statusCode);
             // console.log(response.data.config);
             // console.log(response.data.light);
             // console.log(response.data.paymentEndDate);
             // console.log(response.data.temperature);
          
          setState("huum.maxHeatingTime", response.data.maxHeatingTime);
          setState("huum.statusCode", response.data.statusCode);
          setState("huum.door", response.data.door);
          setState("huum.config", response.data.config);
          setState("huum.light", response.data.light);
          setState("huum.temperature", response.data.temperature);
          setState("huum.date", response.headers.date);
          
          
              })
          
              .catch(function(error) {
              console.log('Error '+error);
              
          });
          
          
          

          ISt das grundsätzlich in Ordnung so? Danke

          GarganoG Offline
          GarganoG Offline
          Gargano
          schrieb am zuletzt editiert von
          #4

          @ckossendey Damit die Funktion periodisch aufgefufen wird braucht es noch ein Schedule. Außerdem sollten Userdata unter '0_userdata.0' gespeichert werden und bei createState Rolle und Typ angeben.

          
          "use strict"
           
          const axios = require('axios');
           
          const url = 'https://api.huum.eu/action/home/status';
          
          const mySchedule = '*/10 * * * *';
           
          createState("huum.maxHeatingTime")
          createState("huum.statusCode")
          createState("huum.door")
          createState("huum.config")
          createState("huum.light")
          createState("huum.temperature")
          createState("huum.date")
           
           
          function getHuum () { 
          	axios.get(url, 
          		{ auth: {
          			username: 'user',
          			password: 'pass' 
          			}
          		})
          		.then (function(response) {
          			   console.log(response.data);
          				// console.log(response.data.statusCode);
          			   // console.log(response.data.config);
          			   // console.log(response.data.light);
          			   // console.log(response.data.paymentEndDate);
          			   // console.log(response.data.temperature);
          			 
          			setState("huum.maxHeatingTime", response.data.maxHeatingTime);
          			setState("huum.statusCode", response.data.statusCode);
          			setState("huum.door", response.data.door);
          			setState("huum.config", response.data.config);
          			setState("huum.light", response.data.light);
          			setState("huum.temperature", response.data.temperature);
          			setState("huum.date", response.headers.date);
          
          		})
          	 
          		.catch(function(error) {
          		console.log('Error '+error);
          		
          	});
          };
          
          schedule(mySchedule, function () { // wird alle 10 min. ausgelöst
               getHuum();
          });
           
          
          
          ckossendeyC 1 Antwort Letzte Antwort
          0
          • GarganoG Gargano

            @ckossendey Damit die Funktion periodisch aufgefufen wird braucht es noch ein Schedule. Außerdem sollten Userdata unter '0_userdata.0' gespeichert werden und bei createState Rolle und Typ angeben.

            
            "use strict"
             
            const axios = require('axios');
             
            const url = 'https://api.huum.eu/action/home/status';
            
            const mySchedule = '*/10 * * * *';
             
            createState("huum.maxHeatingTime")
            createState("huum.statusCode")
            createState("huum.door")
            createState("huum.config")
            createState("huum.light")
            createState("huum.temperature")
            createState("huum.date")
             
             
            function getHuum () { 
            	axios.get(url, 
            		{ auth: {
            			username: 'user',
            			password: 'pass' 
            			}
            		})
            		.then (function(response) {
            			   console.log(response.data);
            				// console.log(response.data.statusCode);
            			   // console.log(response.data.config);
            			   // console.log(response.data.light);
            			   // console.log(response.data.paymentEndDate);
            			   // console.log(response.data.temperature);
            			 
            			setState("huum.maxHeatingTime", response.data.maxHeatingTime);
            			setState("huum.statusCode", response.data.statusCode);
            			setState("huum.door", response.data.door);
            			setState("huum.config", response.data.config);
            			setState("huum.light", response.data.light);
            			setState("huum.temperature", response.data.temperature);
            			setState("huum.date", response.headers.date);
            
            		})
            	 
            		.catch(function(error) {
            		console.log('Error '+error);
            		
            	});
            };
            
            schedule(mySchedule, function () { // wird alle 10 min. ausgelöst
                 getHuum();
            });
             
            
            
            ckossendeyC Offline
            ckossendeyC Offline
            ckossendey
            schrieb am zuletzt editiert von
            #5

            @gargano Danke! ich hab das mal umgesetzt!

            Nun noch eine Frage zum Post Befehl, ich habe das ganze wie unten aufgesetzt - bekomme aber immer die Meldung: data: 'Please enter username and password'

            Kannst du dir das erklären?

            "use strict"
            
            let temperature
            temperature = "50";
            
            const axios = require('axios');
             
            const urlstart = "https://api.huum.eu/action/home/start";
            
            axios.post(urlstart, 
                
                {auth:        {username: 'user',  password: 'pass' }, 
                params:    {targetTemperature: temperature}
                    
                })
            
            .then(function (response) {
                console.log(response.data);
              })
              .catch(function (error) {
                console.log(error);
              });
            

            Den get Befehl habe ich wie folgt umgebaut:

            "use strict"
             
            const axios = require('axios');
             
            const url = 'https://api.huum.eu/action/home/status';
             
            const mySchedule = '*/5 * * * *';
             
            createState("0_userdata.0.huum.maxHeatingTime" ,false)
            createState("0_userdata.0.huumstatusCode", false)
            createState("0_userdata.0.huum.door", false)
            createState("0_userdata.0.huum.config", false)
            createState("0_userdata.0.huum.light", false)
            createState("0_userdata.0.huum.temperature", false)
            createState("0_userdata.0.huum.date", false)
             
             
            function getHuum () { 
            	axios.get(url, 
            		{ auth: {
                        username: 'user',
                        password: 'pass' 
            			}
            		})
            		.then (function(response) {
            			   console.log(response.data);
            				// console.log(response.data.statusCode);
            			   // console.log(response.data.config);
            			   // console.log(response.data.light);
            			   // console.log(response.data.paymentEndDate);
            			   // console.log(response.data.temperature);
            			 
            			setState("0_userdata.0.huum.maxHeatingTime", response.data.maxHeatingTime);
            			setState("0_userdata.0.huum.statusCode", response.data.statusCode);
            			setState("0_userdata.0.huum.door", response.data.door);
            			setState("0_userdata.0.huum.config", response.data.config);
            			setState("0_userdata.0.huum.light", response.data.light);
            			setState("0_userdata.0.huum.temperature", response.data.temperature);
            			setState("0_userdata.0.huum.date", response.headers.date);
             
            		})
            	 
            		.catch(function(error) {
            		console.log('Error '+error);
            		
            	});
            };
            
                 getHuum();
            
             
             
            
            
            GarganoG 1 Antwort Letzte Antwort
            0
            • ckossendeyC ckossendey

              @gargano Danke! ich hab das mal umgesetzt!

              Nun noch eine Frage zum Post Befehl, ich habe das ganze wie unten aufgesetzt - bekomme aber immer die Meldung: data: 'Please enter username and password'

              Kannst du dir das erklären?

              "use strict"
              
              let temperature
              temperature = "50";
              
              const axios = require('axios');
               
              const urlstart = "https://api.huum.eu/action/home/start";
              
              axios.post(urlstart, 
                  
                  {auth:        {username: 'user',  password: 'pass' }, 
                  params:    {targetTemperature: temperature}
                      
                  })
              
              .then(function (response) {
                  console.log(response.data);
                })
                .catch(function (error) {
                  console.log(error);
                });
              

              Den get Befehl habe ich wie folgt umgebaut:

              "use strict"
               
              const axios = require('axios');
               
              const url = 'https://api.huum.eu/action/home/status';
               
              const mySchedule = '*/5 * * * *';
               
              createState("0_userdata.0.huum.maxHeatingTime" ,false)
              createState("0_userdata.0.huumstatusCode", false)
              createState("0_userdata.0.huum.door", false)
              createState("0_userdata.0.huum.config", false)
              createState("0_userdata.0.huum.light", false)
              createState("0_userdata.0.huum.temperature", false)
              createState("0_userdata.0.huum.date", false)
               
               
              function getHuum () { 
              	axios.get(url, 
              		{ auth: {
                          username: 'user',
                          password: 'pass' 
              			}
              		})
              		.then (function(response) {
              			   console.log(response.data);
              				// console.log(response.data.statusCode);
              			   // console.log(response.data.config);
              			   // console.log(response.data.light);
              			   // console.log(response.data.paymentEndDate);
              			   // console.log(response.data.temperature);
              			 
              			setState("0_userdata.0.huum.maxHeatingTime", response.data.maxHeatingTime);
              			setState("0_userdata.0.huum.statusCode", response.data.statusCode);
              			setState("0_userdata.0.huum.door", response.data.door);
              			setState("0_userdata.0.huum.config", response.data.config);
              			setState("0_userdata.0.huum.light", response.data.light);
              			setState("0_userdata.0.huum.temperature", response.data.temperature);
              			setState("0_userdata.0.huum.date", response.headers.date);
               
              		})
              	 
              		.catch(function(error) {
              		console.log('Error '+error);
              		
              	});
              };
              
                   getHuum();
              
               
               
              
              
              GarganoG Offline
              GarganoG Offline
              Gargano
              schrieb am zuletzt editiert von
              #6

              @ckossendey sagte in HUUM Saunasteuerung:

              Versuch mal
              Username und Passwort stimmt ?

              
              "use strict"
              
              let temperature
              temperature = "50";
              
              let data = {targetTemperature: temperature};
              
              const axios = require('axios');
              const urlstart = "https://api.huum.eu/action/home/start";
              
              axios.post(urlstart,data, 
                  {auth:        {username: 'user',  password: 'pass' }     
                  })
              
              .then(function (response) {
                  console.log(response.data);
                })
              
                .catch(function (error) {
                  console.log(error);
                });
              
              
              
              ckossendeyC 1 Antwort Letzte Antwort
              0
              • GarganoG Gargano

                @ckossendey sagte in HUUM Saunasteuerung:

                Versuch mal
                Username und Passwort stimmt ?

                
                "use strict"
                
                let temperature
                temperature = "50";
                
                let data = {targetTemperature: temperature};
                
                const axios = require('axios');
                const urlstart = "https://api.huum.eu/action/home/start";
                
                axios.post(urlstart,data, 
                    {auth:        {username: 'user',  password: 'pass' }     
                    })
                
                .then(function (response) {
                    console.log(response.data);
                  })
                
                  .catch(function (error) {
                    console.log(error);
                  });
                
                
                
                ckossendeyC Offline
                ckossendeyC Offline
                ckossendey
                schrieb am zuletzt editiert von
                #7

                @gargano

                ohne den Parameter "?targetTemperature=80" bzw. die url "api.huum.eu/action/home/start?targetTemperature=80"

                klappt es nicht - kann die übergabe der Temperatur als "Parameter" funktionieren?

                Danke

                ckossendeyC 1 Antwort Letzte Antwort
                0
                • ckossendeyC ckossendey

                  @gargano

                  ohne den Parameter "?targetTemperature=80" bzw. die url "api.huum.eu/action/home/start?targetTemperature=80"

                  klappt es nicht - kann die übergabe der Temperatur als "Parameter" funktionieren?

                  Danke

                  ckossendeyC Offline
                  ckossendeyC Offline
                  ckossendey
                  schrieb am zuletzt editiert von
                  #8

                  @ckossendey der Hersteller hatte mir diesen Aufruf empfohlen:

                  curl --user username:password https://api.huum.eu/action/home/start -d targetTemperature=70 -v
                   
                  
                  GarganoG 1 Antwort Letzte Antwort
                  0
                  • ckossendeyC ckossendey

                    @ckossendey der Hersteller hatte mir diesen Aufruf empfohlen:

                    curl --user username:password https://api.huum.eu/action/home/start -d targetTemperature=70 -v
                     
                    
                    GarganoG Offline
                    GarganoG Offline
                    Gargano
                    schrieb am zuletzt editiert von Gargano
                    #9

                    @ckossendey Das ist das curl Kommando , funktioniert das denn ?
                    Der Unterschied zu dem axios ist nur das eine, daß die Temperature beim Curl ohne Hochkomma ist
                    Zeig mal den Log vrom Script
                    Auch kann es sein, daß die Sauna kein JSON versteht. In dem Fall müßte dann data so aussehen (in Anlehnung an dem Curl Befehl) :

                    let data = 'targetTemperature='+temperature;
                    
                    ckossendeyC 1 Antwort Letzte Antwort
                    0
                    • GarganoG Gargano

                      @ckossendey Das ist das curl Kommando , funktioniert das denn ?
                      Der Unterschied zu dem axios ist nur das eine, daß die Temperature beim Curl ohne Hochkomma ist
                      Zeig mal den Log vrom Script
                      Auch kann es sein, daß die Sauna kein JSON versteht. In dem Fall müßte dann data so aussehen (in Anlehnung an dem Curl Befehl) :

                      let data = 'targetTemperature='+temperature;
                      
                      ckossendeyC Offline
                      ckossendeyC Offline
                      ckossendey
                      schrieb am zuletzt editiert von
                      #10

                      @gargano

                      cko@MacBook-Pro HUUM % node posthuum.js
                      Error: Request failed with status code 401
                          at createError (/Users/cko/Desktop/HUUM/node_modules/axios/lib/core/createError.js:16:15)
                          at settle (/Users/cko/Desktop/HUUM/node_modules/axios/lib/core/settle.js:17:12)
                          at IncomingMessage.handleStreamEnd (/Users/cko/Desktop/HUUM/node_modules/axios/lib/adapters/http.js:260:11)
                          at IncomingMessage.emit (node:events:381:22)
                          at endReadableNT (node:internal/streams/readable:1307:12)
                          at processTicksAndRejections (node:internal/process/task_queues:81:21) {
                        config: {
                          url: 'https://api.huum.eu/action/home/start',
                          method: 'post',
                          data: '{"auth":{"username":"user","password":"pass"},"params":{"targetTemperature":"50"}}',
                          headers: {
                            Accept: 'application/json, text/plain, */*',
                            'Content-Type': 'application/json;charset=utf-8',
                            'User-Agent': 'axios/0.21.1',
                            'Content-Length': 103
                          },
                          transformRequest: [ [Function: transformRequest] ],
                          transformResponse: [ [Function: transformResponse] ],
                          timeout: 0,
                          adapter: [Function: httpAdapter],
                          xsrfCookieName: 'XSRF-TOKEN',
                          xsrfHeaderName: 'X-XSRF-TOKEN',
                          maxContentLength: -1,
                          maxBodyLength: -1,
                          validateStatus: [Function: validateStatus]
                        },
                        request: <ref *1> ClientRequest {
                          _events: [Object: null prototype] {
                            abort: [Function (anonymous)],
                            aborted: [Function (anonymous)],
                            connect: [Function (anonymous)],
                            error: [Function (anonymous)],
                            socket: [Function (anonymous)],
                            timeout: [Function (anonymous)],
                            prefinish: [Function: requestOnPrefinish]
                          },
                          _eventsCount: 7,
                          _maxListeners: undefined,
                          outputData: [],
                          outputSize: 0,
                          writable: true,
                          destroyed: false,
                          _last: true,
                          chunkedEncoding: false,
                          shouldKeepAlive: false,
                          _defaultKeepAlive: true,
                          useChunkedEncodingByDefault: true,
                          sendDate: false,
                          _removedConnection: false,
                          _removedContLen: false,
                          _removedTE: false,
                          _contentLength: null,
                          _hasBody: true,
                          _trailer: '',
                          finished: true,
                          _headerSent: true,
                          _closed: false,
                          socket: TLSSocket {
                            _tlsOptions: [Object],
                            _secureEstablished: true,
                            _securePending: false,
                            _newSessionPending: false,
                            _controlReleased: true,
                            secureConnecting: false,
                            _SNICallback: null,
                            servername: 'api.huum.eu',
                            alpnProtocol: false,
                            authorized: true,
                            authorizationError: null,
                            encrypted: true,
                            _events: [Object: null prototype],
                            _eventsCount: 10,
                            connecting: false,
                            _hadError: false,
                            _parent: null,
                            _host: 'api.huum.eu',
                            _readableState: [ReadableState],
                            _maxListeners: undefined,
                            _writableState: [WritableState],
                            allowHalfOpen: false,
                            _sockname: null,
                            _pendingData: null,
                            _pendingEncoding: '',
                            server: undefined,
                            _server: null,
                            ssl: [TLSWrap],
                            _requestCert: true,
                            _rejectUnauthorized: true,
                            parser: null,
                            _httpMessage: [Circular *1],
                            [Symbol(res)]: [TLSWrap],
                            [Symbol(verified)]: true,
                            [Symbol(pendingSession)]: null,
                            [Symbol(async_id_symbol)]: 3,
                            [Symbol(kHandle)]: [TLSWrap],
                            [Symbol(kSetNoDelay)]: false,
                            [Symbol(lastWriteQueueSize)]: 0,
                            [Symbol(timeout)]: null,
                            [Symbol(kBuffer)]: null,
                            [Symbol(kBufferCb)]: null,
                            [Symbol(kBufferGen)]: null,
                            [Symbol(kCapture)]: false,
                            [Symbol(kBytesRead)]: 0,
                            [Symbol(kBytesWritten)]: 0,
                            [Symbol(connect-options)]: [Object],
                            [Symbol(RequestTimeout)]: undefined
                          },
                          _header: 'POST /action/home/start HTTP/1.1\r\n' +
                            'Accept: application/json, text/plain, */*\r\n' +
                            'Content-Type: application/json;charset=utf-8\r\n' +
                            'User-Agent: axios/0.21.1\r\n' +
                            'Content-Length: 103\r\n' +
                            'Host: api.huum.eu\r\n' +
                            'Connection: close\r\n' +
                            '\r\n',
                          _keepAliveTimeout: 0,
                          _onPendingData: {},
                          agent: Agent {
                            _events: [Object: null prototype],
                            _eventsCount: 2,
                            _maxListeners: undefined,
                            defaultPort: 443,
                            protocol: 'https:',
                            options: [Object],
                            requests: {},
                            sockets: [Object],
                            freeSockets: {},
                            keepAliveMsecs: 1000,
                            keepAlive: false,
                            maxSockets: Infinity,
                            maxFreeSockets: 256,
                            scheduling: 'lifo',
                            maxTotalSockets: Infinity,
                            totalSocketCount: 1,
                            maxCachedSessions: 100,
                            _sessionCache: [Object],
                            [Symbol(kCapture)]: false
                          },
                          socketPath: undefined,
                          method: 'POST',
                          maxHeaderSize: undefined,
                          insecureHTTPParser: undefined,
                          path: '/action/home/start',
                          _ended: true,
                          res: IncomingMessage {
                            _readableState: [ReadableState],
                            _events: [Object: null prototype],
                            _eventsCount: 3,
                            _maxListeners: undefined,
                            socket: [TLSSocket],
                            httpVersionMajor: 1,
                            httpVersionMinor: 1,
                            httpVersion: '1.1',
                            complete: true,
                            rawHeaders: [Array],
                            rawTrailers: [],
                            aborted: false,
                            upgrade: false,
                            url: '',
                            method: null,
                            statusCode: 401,
                            statusMessage: 'Unauthorized',
                            client: [TLSSocket],
                            _consuming: false,
                            _dumped: false,
                            req: [Circular *1],
                            responseUrl: 'https://api.huum.eu/action/home/start',
                            redirects: [],
                            [Symbol(kCapture)]: false,
                            [Symbol(kHeaders)]: [Object],
                            [Symbol(kHeadersCount)]: 16,
                            [Symbol(kTrailers)]: null,
                            [Symbol(kTrailersCount)]: 0,
                            [Symbol(RequestTimeout)]: undefined
                          },
                          aborted: false,
                          timeoutCb: null,
                          upgradeOrConnect: false,
                          parser: null,
                          maxHeadersCount: null,
                          reusedSocket: false,
                          host: 'api.huum.eu',
                          protocol: 'https:',
                          _redirectable: Writable {
                            _writableState: [WritableState],
                            _events: [Object: null prototype],
                            _eventsCount: 2,
                            _maxListeners: undefined,
                            _options: [Object],
                            _ended: true,
                            _ending: true,
                            _redirectCount: 0,
                            _redirects: [],
                            _requestBodyLength: 103,
                            _requestBodyBuffers: [],
                            _onNativeResponse: [Function (anonymous)],
                            _currentRequest: [Circular *1],
                            _currentUrl: 'https://api.huum.eu/action/home/start',
                            [Symbol(kCapture)]: false
                          },
                          [Symbol(kCapture)]: false,
                          [Symbol(kNeedDrain)]: false,
                          [Symbol(corked)]: 0,
                          [Symbol(kOutHeaders)]: [Object: null prototype] {
                            accept: [Array],
                            'content-type': [Array],
                            'user-agent': [Array],
                            'content-length': [Array],
                            host: [Array]
                          }
                        },
                        response: {
                          status: 401,
                          statusText: 'Unauthorized',
                          headers: {
                            server: 'nginx',
                            date: 'Mon, 12 Apr 2021 12:54:40 GMT',
                            'content-type': 'text/html; charset=UTF-8',
                            'transfer-encoding': 'chunked',
                            connection: 'close',
                            'x-powered-by': 'PHP/7.4.15',
                            'access-control-allow-origin': '*',
                            'www-authenticate': 'Basic realm="HUUM api"'
                          },
                          config: {
                            url: 'https://api.huum.eu/action/home/start',
                            method: 'post',
                            data: '{"auth":{"username":"user","password":"pass"},"params":{"targetTemperature":"50"}}',
                            headers: [Object],
                            transformRequest: [Array],
                            transformResponse: [Array],
                            timeout: 0,
                            adapter: [Function: httpAdapter],
                            xsrfCookieName: 'XSRF-TOKEN',
                            xsrfHeaderName: 'X-XSRF-TOKEN',
                            maxContentLength: -1,
                            maxBodyLength: -1,
                            validateStatus: [Function: validateStatus]
                          },
                          request: <ref *1> ClientRequest {
                            _events: [Object: null prototype],
                            _eventsCount: 7,
                            _maxListeners: undefined,
                            outputData: [],
                            outputSize: 0,
                            writable: true,
                            destroyed: false,
                            _last: true,
                            chunkedEncoding: false,
                            shouldKeepAlive: false,
                            _defaultKeepAlive: true,
                            useChunkedEncodingByDefault: true,
                            sendDate: false,
                            _removedConnection: false,
                            _removedContLen: false,
                            _removedTE: false,
                            _contentLength: null,
                            _hasBody: true,
                            _trailer: '',
                            finished: true,
                            _headerSent: true,
                            _closed: false,
                            socket: [TLSSocket],
                            _header: 'POST /action/home/start HTTP/1.1\r\n' +
                              'Accept: application/json, text/plain, */*\r\n' +
                              'Content-Type: application/json;charset=utf-8\r\n' +
                              'User-Agent: axios/0.21.1\r\n' +
                              'Content-Length: 103\r\n' +
                              'Host: api.huum.eu\r\n' +
                              'Connection: close\r\n' +
                              '\r\n',
                            _keepAliveTimeout: 0,
                            _onPendingData: {},
                            agent: [Agent],
                            socketPath: undefined,
                            method: 'POST',
                            maxHeaderSize: undefined,
                            insecureHTTPParser: undefined,
                            path: '/action/home/start',
                            _ended: true,
                            res: [IncomingMessage],
                            aborted: false,
                            timeoutCb: null,
                            upgradeOrConnect: false,
                            parser: null,
                            maxHeadersCount: null,
                            reusedSocket: false,
                            host: 'api.huum.eu',
                            protocol: 'https:',
                            _redirectable: [Writable],
                            [Symbol(kCapture)]: false,
                            [Symbol(kNeedDrain)]: false,
                            [Symbol(corked)]: 0,
                            [Symbol(kOutHeaders)]: [Object: null prototype]
                          },
                          data: 'Please enter username and password'
                        },
                        isAxiosError: true,
                        toJSON: [Function: toJSON]
                      }
                      cko@MacBook-Pro HUUM % 
                      
                      1 Antwort Letzte Antwort
                      0
                      • GarganoG Offline
                        GarganoG Offline
                        Gargano
                        schrieb am zuletzt editiert von
                        #11

                        @ckossendey sagte in HUUM Saunasteuerung:

                        statusCode: 401,
                        statusMessage: 'Unauthorized',

                        stimmt denn Dein Passwort und Username ?

                        ckossendeyC 1 Antwort Letzte Antwort
                        0
                        • GarganoG Gargano

                          @ckossendey sagte in HUUM Saunasteuerung:

                          statusCode: 401,
                          statusMessage: 'Unauthorized',

                          stimmt denn Dein Passwort und Username ?

                          ckossendeyC Offline
                          ckossendeyC Offline
                          ckossendey
                          schrieb am zuletzt editiert von
                          #12

                          @gargano

                          ja, die stimmen mit dem curl befehl im terminal klappt es auch mit den gleichen zugangsdaten. Kann man auch per javascript den curl request machen?

                          Danke!

                          1 Antwort Letzte Antwort
                          0
                          • GarganoG Offline
                            GarganoG Offline
                            Gargano
                            schrieb am zuletzt editiert von
                            #13

                            @ckossendey
                            Das ist jetzt die 1 zu1 Übersetzung des curl Befehls

                            
                            "use strict"
                            
                            let temperature
                            temperature = 50;
                            
                            let data = 'targetTemperature='+ temperature;
                            
                            const axios = require('axios');
                            const urlstart = "https://api.huum.eu/action/home/start";
                            
                            axios.post(urlstart,data, 
                                {auth:        {username: 'user',  password: 'pass' }     
                                })
                              .then(function (response) {
                                console.log(response.data);
                              })
                              .catch(function (error) {
                                console.log(error);
                              });
                            
                             
                            
                             
                            
                            
                            ckossendeyC K 2 Antworten Letzte Antwort
                            0
                            • GarganoG Gargano

                              @ckossendey
                              Das ist jetzt die 1 zu1 Übersetzung des curl Befehls

                              
                              "use strict"
                              
                              let temperature
                              temperature = 50;
                              
                              let data = 'targetTemperature='+ temperature;
                              
                              const axios = require('axios');
                              const urlstart = "https://api.huum.eu/action/home/start";
                              
                              axios.post(urlstart,data, 
                                  {auth:        {username: 'user',  password: 'pass' }     
                                  })
                                .then(function (response) {
                                  console.log(response.data);
                                })
                                .catch(function (error) {
                                  console.log(error);
                                });
                              
                               
                              
                               
                              
                              
                              ckossendeyC Offline
                              ckossendeyC Offline
                              ckossendey
                              schrieb am zuletzt editiert von
                              #14

                              @gargano

                              so klappt es!!

                              DANKE

                              1 Antwort Letzte Antwort
                              0
                              • B Offline
                                B Offline
                                bye08
                                schrieb am zuletzt editiert von
                                #15

                                @ckossendey
                                Hi, ich habe auch die Huum Saunasteuerung könntest du mal bitte das ganze Script Posten? Und eventuell ein kleinwenig beschreiben, wie und wo ich das Einbinden muss.
                                Gruß
                                Bye08

                                1 Antwort Letzte Antwort
                                0
                                • GarganoG Gargano

                                  @ckossendey
                                  Das ist jetzt die 1 zu1 Übersetzung des curl Befehls

                                  
                                  "use strict"
                                  
                                  let temperature
                                  temperature = 50;
                                  
                                  let data = 'targetTemperature='+ temperature;
                                  
                                  const axios = require('axios');
                                  const urlstart = "https://api.huum.eu/action/home/start";
                                  
                                  axios.post(urlstart,data, 
                                      {auth:        {username: 'user',  password: 'pass' }     
                                      })
                                    .then(function (response) {
                                      console.log(response.data);
                                    })
                                    .catch(function (error) {
                                      console.log(error);
                                    });
                                  
                                   
                                  
                                   
                                  
                                  
                                  K Offline
                                  K Offline
                                  kukoratsch
                                  schrieb am zuletzt editiert von
                                  #16

                                  @gargano sagte in HUUM Saunasteuerung:

                                  @ckossendey
                                  Das ist jetzt die 1 zu1 Übersetzung des curl Befehls

                                  
                                  "use strict"
                                  
                                  let temperature
                                  temperature = 50;
                                  
                                  let data = 'targetTemperature='+ temperature;
                                  
                                  const axios = require('axios');
                                  const urlstart = "https://api.huum.eu/action/home/start";
                                  
                                  axios.post(urlstart,data, 
                                      {auth:        {username: 'user',  password: 'pass' }     
                                      })
                                    .then(function (response) {
                                      console.log(response.data);
                                    })
                                    .catch(function (error) {
                                      console.log(error);
                                    });
                                  
                                   
                                  
                                   
                                  
                                  

                                  Hallo an alle. Ich biete um Hilfe
                                  Ich habe auch die Huum Saunasteuerung.
                                  curl Befehls von Gargano, funktioniert bei mir auch, danke dafür.
                                  wie kann ich denn eine Variable Datenpunkt Temperatur in curl Befehls schreiben lassen statt feste Zahl temperature = 50
                                  damit ich über Vis Temperatur angeben kann.

                                  1 Antwort Letzte Antwort
                                  0
                                  • K Offline
                                    K Offline
                                    kukoratsch
                                    schrieb am zuletzt editiert von
                                    #17

                                    Ich habe Versucht mit
                                    let temperature
                                    temperature = '0_userdata.0.huum.TempSauna';
                                    bekomme aber Fehlermeldung

                                    javascript.0 (9551) script.js.common.Sauna.Sauna_Start_plus_Temperatur_test: {'message':'Request failed with status code 400','name':'Error','stack':'Error: Request failed with status code 400\n at createError (/opt/iobroker/node_modules/iobroker.javascript/node_modules/axios/lib/core/createError.js:16:15)\n at settle (/opt/iobroker/node_modules/iobroker.javascript/node_modules/axios/lib/core/settle.js:17:12)\n at IncomingMessage.handleStreamEnd (/opt/iobroker/node_modules/iobroker.javascript/node_modules/axios/lib/adapters/http.js:269:11)\n at IncomingMessage.emit (events.js:412:35)\n at IncomingMessage.emit (domain.js:470:12)\n at endReadableNT (internal/streams/readable.js:1317:12)\n at processTicksAndRejections (internal/process/task_queues.js:82:21)','config':{'url':'https://api.huum.eu/action/home/start','method':'post','data':'targetTemperature=0_userdata.0.huum.TempSauna','headers':{'Accept':'application/json, text/plain, */*','Content-Type':'application/x-www-form-urlencoded','User-Agent':'axios/0.21.4','Content-Length':45},'auth':{'username':UN','password':'PW'},'transformRequest':[null],'transformResponse':[null],'timeout':0,'xsrfCookieName':'XSRF-TOKEN','xsrfHeaderName':'X-XSRF-TOKEN','maxContentLength':-1,'maxBodyLength':-1,'transitional':{'silentJSONParsing':true,'forcedJSONParsing':true,'clarifyTimeoutError':false}}}
                                    
                                    GarganoG 1 Antwort Letzte Antwort
                                    0
                                    • K kukoratsch

                                      Ich habe Versucht mit
                                      let temperature
                                      temperature = '0_userdata.0.huum.TempSauna';
                                      bekomme aber Fehlermeldung

                                      javascript.0 (9551) script.js.common.Sauna.Sauna_Start_plus_Temperatur_test: {'message':'Request failed with status code 400','name':'Error','stack':'Error: Request failed with status code 400\n at createError (/opt/iobroker/node_modules/iobroker.javascript/node_modules/axios/lib/core/createError.js:16:15)\n at settle (/opt/iobroker/node_modules/iobroker.javascript/node_modules/axios/lib/core/settle.js:17:12)\n at IncomingMessage.handleStreamEnd (/opt/iobroker/node_modules/iobroker.javascript/node_modules/axios/lib/adapters/http.js:269:11)\n at IncomingMessage.emit (events.js:412:35)\n at IncomingMessage.emit (domain.js:470:12)\n at endReadableNT (internal/streams/readable.js:1317:12)\n at processTicksAndRejections (internal/process/task_queues.js:82:21)','config':{'url':'https://api.huum.eu/action/home/start','method':'post','data':'targetTemperature=0_userdata.0.huum.TempSauna','headers':{'Accept':'application/json, text/plain, */*','Content-Type':'application/x-www-form-urlencoded','User-Agent':'axios/0.21.4','Content-Length':45},'auth':{'username':UN','password':'PW'},'transformRequest':[null],'transformResponse':[null],'timeout':0,'xsrfCookieName':'XSRF-TOKEN','xsrfHeaderName':'X-XSRF-TOKEN','maxContentLength':-1,'maxBodyLength':-1,'transitional':{'silentJSONParsing':true,'forcedJSONParsing':true,'clarifyTimeoutError':false}}}
                                      
                                      GarganoG Offline
                                      GarganoG Offline
                                      Gargano
                                      schrieb am zuletzt editiert von
                                      #18

                                      @kukoratsch temperature=getState('0_userdata.0.huum.TempSauna').val

                                      K 1 Antwort Letzte Antwort
                                      1
                                      • GarganoG Gargano

                                        @kukoratsch temperature=getState('0_userdata.0.huum.TempSauna').val

                                        K Offline
                                        K Offline
                                        kukoratsch
                                        schrieb am zuletzt editiert von
                                        #19

                                        @gargano
                                        danke jetzt funktioniert es englisch

                                        K 1 Antwort Letzte Antwort
                                        0
                                        • K kukoratsch

                                          @gargano
                                          danke jetzt funktioniert es englisch

                                          K Offline
                                          K Offline
                                          kukoratsch
                                          schrieb am zuletzt editiert von kukoratsch
                                          #20

                                          @Gargano Was muss ich noch verändern das bei aktualisierte Temperatur das curl Befehls noch ein Mal verschickt wird ohne Taster Heizung an zu drücken. Danke.

                                          function script1() {
                                          
                                          "use strict"
                                          
                                          let temperature
                                          temperature=getState('0_userdata.0.huum.TempSauna').val
                                          
                                          let data = 'targetTemperature='+ temperature; 
                                          const axios = require('axios');
                                          const urlstart = "https://api.huum.eu/action/home/start";
                                           
                                          axios.post(urlstart,data, 
                                              {auth:        {username: 'username',  password: 'password'}     
                                              })
                                            .then(function (response) {
                                              console.log(response.data);
                                            })
                                            .catch(function (error) {
                                              console.log(error);
                                            });
                                            }   
                                          on({id: '0_userdata.0.huum.HeizungAn', change: "ne"}, script1); // Triggert auf Wert true
                                          
                                          GarganoG 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

                                          692

                                          Online

                                          32.5k

                                          Benutzer

                                          81.7k

                                          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