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. Umstellung auf "axios"

NEWS

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

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

  • Weihnachtsangebot 2025! 🎄
    BluefoxB
    Bluefox
    25
    1
    2.2k

Umstellung auf "axios"

Scheduled Pinned Locked Moved Skripten / Logik
33 Posts 9 Posters 3.2k Views 7 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.
  • OliverIOO OliverIO

    @tombox
    und wenn es aus iobroker entfernt wird, dann lädt man es selbst nach.
    es ist ja nicht so das es da sicherheitsbedenken gibt, sonder das die bibliothekt zu ende entwickelt ist.

    T Offline
    T Offline
    tombox
    wrote on last edited by
    #21

    @oliverio Korrekt solange es kein security problem gibt wäre es auch ziemlich gemein es aus der iobroker skript default package rauszunehmen

    1 Reply Last reply
    0
    • T tombox

      @thomas-braun Ich denke auch mit 50.000 Dependents wird es wohl nie entfernt werden können. Also kann der kleine ioBroker Skripter sich mit der Umstellung noch zeit lassen.
      @glitzi
      der schedule wird nicht richtig aufgemacht

      schedule("*/5 * * * * *", function(){
      	axios.post('http://xx.xx.xx.xx/daqdata.cgi?key=xxxx', {
      		responseEncoding: 'latin1'
      	})
      	.then(function(response) {
      			//console.log(response);
               })
      })
      
      G Offline
      G Offline
      glitzi
      wrote on last edited by
      #22

      @tombox

      SUPER, vielen Dank! jetzt läuft es !!!

      :+1:

      1 Reply Last reply
      0
      • AlCalzoneA AlCalzone

        @oliverio sagte in Umstellung auf "axios":

        Ob latin ein gültiger Wert ist weiß ich nicht.

        Laut https://nodejs.org/api/buffer.html#buffers-and-character-encodings müsste das latin1 sein (mit 1 am Ende).

        G Offline
        G Offline
        glitzi
        wrote on last edited by
        #23

        @alcalzone

        Leider scheint das Encoding nicht zu funktionieren, ist hier etwas falsch?

        const axios=require('axios');
        
        schedule("*/5 * * * * *", function(){
        
        	axios.post('http://xx.xx.xx.xx/daqdata.cgi?key=abcde', {
        		responseEncoding: 'utf-8'
        	})
        
        	.then(function(response) {
        		
        			if (response.data) {
        
        				var parts = response.data.split('\n');
        
        				var parts_Guntamatic = parts[0];
        				setState('Guntamatic_Betrieb_0', parts_Guntamatic, true);
        
        
        OliverIOO 2 Replies Last reply
        0
        • G glitzi

          @alcalzone

          Leider scheint das Encoding nicht zu funktionieren, ist hier etwas falsch?

          const axios=require('axios');
          
          schedule("*/5 * * * * *", function(){
          
          	axios.post('http://xx.xx.xx.xx/daqdata.cgi?key=abcde', {
          		responseEncoding: 'utf-8'
          	})
          
          	.then(function(response) {
          		
          			if (response.data) {
          
          				var parts = response.data.split('\n');
          
          				var parts_Guntamatic = parts[0];
          				setState('Guntamatic_Betrieb_0', parts_Guntamatic, true);
          
          
          OliverIOO Offline
          OliverIOO Offline
          OliverIO
          wrote on last edited by
          #24

          @glitzi

          das sind zu wenig informationen.
          in was ist den die quelle encodiert?
          utf8 scheint es ja nicht zu sein.
          woran erkennst du es das das encoding nicht funktioniert?

          Meine Adapter und Widgets
          TVProgram, SqueezeboxRPC, OpenLiga, RSSFeed, MyTime,, pi-hole2, vis-json-template, skiinfo, vis-mapwidgets, vis-2-widgets-rssfeed
          Links im Profil

          G 1 Reply Last reply
          0
          • OliverIOO OliverIO

            @glitzi

            das sind zu wenig informationen.
            in was ist den die quelle encodiert?
            utf8 scheint es ja nicht zu sein.
            woran erkennst du es das das encoding nicht funktioniert?

            G Offline
            G Offline
            glitzi
            wrote on last edited by glitzi
            #25

            @oliverio
            Laut Hersteller utf8, in meinem alten Skript mit request und latin hat es funktioniert.

            var request= require('request');
            request.post({
              url:     'http://xx.xx.xx.xx/daqdata.cgi?key=xxx...xxx',
              encoding: 'latin1'
            
            1 Reply Last reply
            0
            • G glitzi

              @alcalzone

              Leider scheint das Encoding nicht zu funktionieren, ist hier etwas falsch?

              const axios=require('axios');
              
              schedule("*/5 * * * * *", function(){
              
              	axios.post('http://xx.xx.xx.xx/daqdata.cgi?key=abcde', {
              		responseEncoding: 'utf-8'
              	})
              
              	.then(function(response) {
              		
              			if (response.data) {
              
              				var parts = response.data.split('\n');
              
              				var parts_Guntamatic = parts[0];
              				setState('Guntamatic_Betrieb_0', parts_Guntamatic, true);
              
              
              OliverIOO Offline
              OliverIOO Offline
              OliverIO
              wrote on last edited by
              #26

              @glitzi sagte in Umstellung auf "axios":

              Guntamatic

              hat es damit etwas zu tun
              https://next.openhab.org/addons/bindings/guntamatic/?
              da steht dann was von
              windows-1252

              Meine Adapter und Widgets
              TVProgram, SqueezeboxRPC, OpenLiga, RSSFeed, MyTime,, pi-hole2, vis-json-template, skiinfo, vis-mapwidgets, vis-2-widgets-rssfeed
              Links im Profil

              G 1 Reply Last reply
              0
              • OliverIOO OliverIO

                @glitzi sagte in Umstellung auf "axios":

                Guntamatic

                hat es damit etwas zu tun
                https://next.openhab.org/addons/bindings/guntamatic/?
                da steht dann was von
                windows-1252

                G Offline
                G Offline
                glitzi
                wrote on last edited by
                #27

                @oliverio

                z.B. Steht bei Zündung dann Z?ndung

                OliverIOO 1 Reply Last reply
                0
                • G glitzi

                  @oliverio

                  z.B. Steht bei Zündung dann Z?ndung

                  OliverIOO Offline
                  OliverIOO Offline
                  OliverIO
                  wrote on last edited by OliverIO
                  #28

                  @glitzi
                  dann trag latin1 ein
                  da steht doch jetzt utf-8
                  zeile 6

                  Meine Adapter und Widgets
                  TVProgram, SqueezeboxRPC, OpenLiga, RSSFeed, MyTime,, pi-hole2, vis-json-template, skiinfo, vis-mapwidgets, vis-2-widgets-rssfeed
                  Links im Profil

                  G 1 Reply Last reply
                  0
                  • OliverIOO OliverIO

                    @glitzi
                    dann trag latin1 ein
                    da steht doch jetzt utf-8
                    zeile 6

                    G Offline
                    G Offline
                    glitzi
                    wrote on last edited by glitzi
                    #29

                    @oliverio

                    oh.. ja das kommt von meinen versuchen, da es mit latin1 nicht funktionier hat.

                    Ist denn mein Skript fehlerfrei?

                    OliverIOO 1 Reply Last reply
                    0
                    • G glitzi

                      @oliverio

                      oh.. ja das kommt von meinen versuchen, da es mit latin1 nicht funktionier hat.

                      Ist denn mein Skript fehlerfrei?

                      OliverIOO Offline
                      OliverIOO Offline
                      OliverIO
                      wrote on last edited by
                      #30

                      @glitzi

                      nein, es fehlen diverse schließende klammern.
                      kommt aber auch evtl davon das du dein skript nicht komplett kopiert hast

                      Meine Adapter und Widgets
                      TVProgram, SqueezeboxRPC, OpenLiga, RSSFeed, MyTime,, pi-hole2, vis-json-template, skiinfo, vis-mapwidgets, vis-2-widgets-rssfeed
                      Links im Profil

                      G 1 Reply Last reply
                      0
                      • OliverIOO OliverIO

                        @glitzi

                        nein, es fehlen diverse schließende klammern.
                        kommt aber auch evtl davon das du dein skript nicht komplett kopiert hast

                        G Offline
                        G Offline
                        glitzi
                        wrote on last edited by glitzi
                        #31

                        @oliverio

                        so eben noch einmal alles probiert, ich habe alle möglichen Encodings ausprobiert, es ändert sich nichts, habe das Gefühl es wird überhaupt nicht berücksichtigt.

                        Bei umlauten kommt immer das �

                        Hier noch einmal das gesamte Skript

                        const axios=require('axios');
                        
                        schedule("*/5 * * * * *", function(){
                        
                        	axios.post('http://xx.xx.xx.x/daqdata.cgi?key=abcxyz', {
                        		responseEncoding: 'latin1'
                        	})
                        
                        	.then(function(response) {
                        		
                        			if (response.data) {
                                        //console.log(response.data);
                        				var parts = response.data.split('\n');
                        
                        				var parts_Guntamatic = parts[0];
                        				setState('Guntamatic_Betrieb_0', parts_Guntamatic, true);
                        
                        				var parts_Guntamatic = parts[1];
                        				setState('Guntamatic_Aussentemperatur_1', parts_Guntamatic, true);
                        
                        				var parts_Guntamatic = parts[3];
                        				setState('Guntamatic_Kesseltemperatur_3', parts_Guntamatic, true);
                        
                        				var parts_Guntamatic = parts[5];
                        				setState('Guntamatic_Leistung_5', parts_Guntamatic, true);
                        
                        				var parts_Guntamatic = parts[6];
                        				setState('Guntamatic_Rücklauf_6', parts_Guntamatic, true);
                        
                        				var parts_Guntamatic = parts[8];
                        				setState('Guntamatic_CO2_Gehalt_8', parts_Guntamatic, true);
                        
                        				var parts_Guntamatic = parts[17];
                        				setState('Guntamatic_Puffer_oben_17', parts_Guntamatic, true);
                        
                        				var parts_Guntamatic = parts[19];
                        				setState('Guntamatic_Puffer_unten_19', parts_Guntamatic, true);
                        
                        				var parts_Guntamatic = parts[20];
                        				setState('Guntamatic_Pumpe_HP0_20', parts_Guntamatic, true);
                        
                        				var parts_Guntamatic = parts[21];
                        				setState('Guntamatic_Warmwasser_21', parts_Guntamatic, true);
                        
                        				var parts_Guntamatic = parts[31];
                        				setState('Guntamatic_Vorlauf_31', parts_Guntamatic, true);
                        
                        				var parts_Guntamatic = parts[65];
                        				setState('Guntamatic_Füllstand_65', parts_Guntamatic, true);
                        
                        				var parts_Guntamatic = parts[68];
                        				setState('Guntamatic_Kesselfreigabe_68', parts_Guntamatic, true);
                        
                        				var parts_Guntamatic = parts[69];
                        				setState('Guntamatic_Programm_69', parts_Guntamatic, true);
                        
                        				var parts_Guntamatic = parts[71];
                        				setState('Guntamatic_Programm_HK1_71', parts_Guntamatic, true);
                        
                        				var parts_Guntamatic = parts[79];
                        				setState('Guntamatic_Stoer0_79', parts_Guntamatic, true);
                        
                        				var parts_Guntamatic = parts[80];
                        				setState('Guntamatic_Stoer1_80', parts_Guntamatic, true);
                        
                        				var parts_Guntamatic = parts[85];
                        				setState('Guntamatic_Asche_entleeren_85', parts_Guntamatic, true);
                        
                        				var parts_Guntamatic = parts[89];
                        				setState('Guntamatic_Brennstoffzähler_89', parts_Guntamatic, true);
                        
                        				var parts_Guntamatic = parts[90];
                        				setState('Guntamatic_Pufferladung_90', parts_Guntamatic, true);
                        
                        				/*
                        				CO2 Korrigieren da der Wert im Leerlauf teils 18.00 annimmt.
                        				parts[5] = Leistung parts[8] = CO2 Gehalt
                        				*/
                        
                        				if (parts[5] == 0) {
                        					setState("Guntamatic_CO2_Gehalt_korrigiert", 0, true);
                        				} else {
                        					setState("Guntamatic_CO2_Gehalt_korrigiert", parts[8], true);
                        				}
                        
                        			}
                        
                        
                        
                            })
                        
                        })
                        
                        G 1 Reply Last reply
                        0
                        • G glitzi

                          @oliverio

                          so eben noch einmal alles probiert, ich habe alle möglichen Encodings ausprobiert, es ändert sich nichts, habe das Gefühl es wird überhaupt nicht berücksichtigt.

                          Bei umlauten kommt immer das �

                          Hier noch einmal das gesamte Skript

                          const axios=require('axios');
                          
                          schedule("*/5 * * * * *", function(){
                          
                          	axios.post('http://xx.xx.xx.x/daqdata.cgi?key=abcxyz', {
                          		responseEncoding: 'latin1'
                          	})
                          
                          	.then(function(response) {
                          		
                          			if (response.data) {
                                          //console.log(response.data);
                          				var parts = response.data.split('\n');
                          
                          				var parts_Guntamatic = parts[0];
                          				setState('Guntamatic_Betrieb_0', parts_Guntamatic, true);
                          
                          				var parts_Guntamatic = parts[1];
                          				setState('Guntamatic_Aussentemperatur_1', parts_Guntamatic, true);
                          
                          				var parts_Guntamatic = parts[3];
                          				setState('Guntamatic_Kesseltemperatur_3', parts_Guntamatic, true);
                          
                          				var parts_Guntamatic = parts[5];
                          				setState('Guntamatic_Leistung_5', parts_Guntamatic, true);
                          
                          				var parts_Guntamatic = parts[6];
                          				setState('Guntamatic_Rücklauf_6', parts_Guntamatic, true);
                          
                          				var parts_Guntamatic = parts[8];
                          				setState('Guntamatic_CO2_Gehalt_8', parts_Guntamatic, true);
                          
                          				var parts_Guntamatic = parts[17];
                          				setState('Guntamatic_Puffer_oben_17', parts_Guntamatic, true);
                          
                          				var parts_Guntamatic = parts[19];
                          				setState('Guntamatic_Puffer_unten_19', parts_Guntamatic, true);
                          
                          				var parts_Guntamatic = parts[20];
                          				setState('Guntamatic_Pumpe_HP0_20', parts_Guntamatic, true);
                          
                          				var parts_Guntamatic = parts[21];
                          				setState('Guntamatic_Warmwasser_21', parts_Guntamatic, true);
                          
                          				var parts_Guntamatic = parts[31];
                          				setState('Guntamatic_Vorlauf_31', parts_Guntamatic, true);
                          
                          				var parts_Guntamatic = parts[65];
                          				setState('Guntamatic_Füllstand_65', parts_Guntamatic, true);
                          
                          				var parts_Guntamatic = parts[68];
                          				setState('Guntamatic_Kesselfreigabe_68', parts_Guntamatic, true);
                          
                          				var parts_Guntamatic = parts[69];
                          				setState('Guntamatic_Programm_69', parts_Guntamatic, true);
                          
                          				var parts_Guntamatic = parts[71];
                          				setState('Guntamatic_Programm_HK1_71', parts_Guntamatic, true);
                          
                          				var parts_Guntamatic = parts[79];
                          				setState('Guntamatic_Stoer0_79', parts_Guntamatic, true);
                          
                          				var parts_Guntamatic = parts[80];
                          				setState('Guntamatic_Stoer1_80', parts_Guntamatic, true);
                          
                          				var parts_Guntamatic = parts[85];
                          				setState('Guntamatic_Asche_entleeren_85', parts_Guntamatic, true);
                          
                          				var parts_Guntamatic = parts[89];
                          				setState('Guntamatic_Brennstoffzähler_89', parts_Guntamatic, true);
                          
                          				var parts_Guntamatic = parts[90];
                          				setState('Guntamatic_Pufferladung_90', parts_Guntamatic, true);
                          
                          				/*
                          				CO2 Korrigieren da der Wert im Leerlauf teils 18.00 annimmt.
                          				parts[5] = Leistung parts[8] = CO2 Gehalt
                          				*/
                          
                          				if (parts[5] == 0) {
                          					setState("Guntamatic_CO2_Gehalt_korrigiert", 0, true);
                          				} else {
                          					setState("Guntamatic_CO2_Gehalt_korrigiert", parts[8], true);
                          				}
                          
                          			}
                          
                          
                          
                              })
                          
                          })
                          
                          G Offline
                          G Offline
                          glitzi
                          wrote on last edited by
                          #32

                          @glitzi
                          Ergänzung,

                          mit

                          axios.get('http://xx.xx.xx.x/daqdata.cgi?key=abcxyz', {
                          		responseEncoding: 'latin1'
                          	})
                          

                          wird der Eintrag bei Encoding berücksichtigt, ich gehe wieder in den Test

                          OliverIOO 1 Reply Last reply
                          0
                          • G glitzi

                            @glitzi
                            Ergänzung,

                            mit

                            axios.get('http://xx.xx.xx.x/daqdata.cgi?key=abcxyz', {
                            		responseEncoding: 'latin1'
                            	})
                            

                            wird der Eintrag bei Encoding berücksichtigt, ich gehe wieder in den Test

                            OliverIOO Offline
                            OliverIOO Offline
                            OliverIO
                            wrote on last edited by
                            #33

                            @glitzi

                            ob get oder post dürfte da kein unterschied machen.
                            aber gut wenn es funktioniert

                            Meine Adapter und Widgets
                            TVProgram, SqueezeboxRPC, OpenLiga, RSSFeed, MyTime,, pi-hole2, vis-json-template, skiinfo, vis-mapwidgets, vis-2-widgets-rssfeed
                            Links im Profil

                            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

                            367

                            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