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. JavaScript
  5. Hilfe bei Skripte von request auf httpGet umbauen

NEWS

  • Monatsrückblick Januar/Februar 2026 ist online!
    BluefoxB
    Bluefox
    16
    1
    339

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

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

Hilfe bei Skripte von request auf httpGet umbauen

Scheduled Pinned Locked Moved JavaScript
132 Posts 16 Posters 19.0k Views 12 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.
  • liv-in-skyL liv-in-sky

    @negalein

    also : der zugriff funktioniert, aber das auslesen kann nicht funktionieren - weißt du noch, wo du das script her hast - und lief das schon mal ?

    das script von @latzi verstehe ich un dkann es auch nachvollziehen - dein script schau ich mir morgen früh nochmal an

    der unterschied ist der - dein script versucht die linken daten zu bekommen (was nicht wirklich funktioniert, weil das über ein internes script angezeigt wird

    das von latzi liest die rechten werte aus (schwarzer hintergrund)

    Image 001.png

    LatziL Offline
    LatziL Offline
    Latzi
    wrote on last edited by
    #62

    @liv-in-sky
    das Script funktionierte und kommt von hier

    liv-in-skyL 2 Replies Last reply
    0
    • LatziL Latzi

      @liv-in-sky
      das Script funktionierte und kommt von hier

      liv-in-skyL Offline
      liv-in-skyL Offline
      liv-in-sky
      wrote on last edited by
      #63

      @latzi

      ich kucke morgen nochmal - braucht etwas hirnpower

      nach einem gelösten Thread wäre es sinnvoll dies in der Überschrift des ersten Posts einzutragen [gelöst]-... Bitte benutzt das Voting rechts unten im Beitrag wenn er euch geholfen hat. Forum-Tools: PicPick https://picpick.app/en/download/ und ScreenToGif https://www.screentogif.com/downloads.html

      1 Reply Last reply
      1
      • LatziL Latzi

        @liv-in-sky
        das Script funktionierte und kommt von hier

        liv-in-skyL Offline
        liv-in-skyL Offline
        liv-in-sky
        wrote on last edited by
        #64

        @latzi @Negalein @OliverIO

        vielleicht hat der ersteller lust, da nochmal draufzuschauen

        https://forum.iobroker.net/post/907470

        nach einem gelösten Thread wäre es sinnvoll dies in der Überschrift des ersten Posts einzutragen [gelöst]-... Bitte benutzt das Voting rechts unten im Beitrag wenn er euch geholfen hat. Forum-Tools: PicPick https://picpick.app/en/download/ und ScreenToGif https://www.screentogif.com/downloads.html

        NegaleinN OliverIOO 2 Replies Last reply
        0
        • liv-in-skyL liv-in-sky

          @latzi @Negalein @OliverIO

          vielleicht hat der ersteller lust, da nochmal draufzuschauen

          https://forum.iobroker.net/post/907470

          NegaleinN Offline
          NegaleinN Offline
          Negalein
          Global Moderator
          wrote on last edited by
          #65

          @liv-in-sky sagte in Hilfe bei Skripte von request auf httpGet umbauen:

          vielleicht hat der ersteller lust, da nochmal draufzuschauen

          Hab Oliver im Ursprungsthread geschrieben.

          Ah, seh gerade, dass du ihn eh verlinkt hast.

          ° Node.js & System Update ---> sudo apt update, iob stop, sudo apt full-upgrade
          ° Node.js Fixer ---> iob nodejs-update
          ° Fixer ---> iob fix

          liv-in-skyL 1 Reply Last reply
          0
          • NegaleinN Negalein

            @liv-in-sky sagte in Hilfe bei Skripte von request auf httpGet umbauen:

            vielleicht hat der ersteller lust, da nochmal draufzuschauen

            Hab Oliver im Ursprungsthread geschrieben.

            Ah, seh gerade, dass du ihn eh verlinkt hast.

            liv-in-skyL Offline
            liv-in-skyL Offline
            liv-in-sky
            wrote on last edited by
            #66

            @negalein

            wäre cool, wenn er hilft, er hat def mehr ahnung von solchen abfragen :-)

            nach einem gelösten Thread wäre es sinnvoll dies in der Überschrift des ersten Posts einzutragen [gelöst]-... Bitte benutzt das Voting rechts unten im Beitrag wenn er euch geholfen hat. Forum-Tools: PicPick https://picpick.app/en/download/ und ScreenToGif https://www.screentogif.com/downloads.html

            1 Reply Last reply
            0
            • liv-in-skyL liv-in-sky

              @negalein

              wenn du testen magst - sendet alle 15 sek den wert an iob - kannste dann ein blockly machen und dir einen alarm geben, wenn der wert mal über 1 (sek) ist.

              mache alles auf der console unter /usr/local/bin

              • kopiere datei curl-format.txt ins verzeichnis /usr/local/bin
              • erstelle datei httptest (sudo nano httptest) im verzeichnis mit inhalt und ändere den datenpukt in allen zeilen - den dp musst du anlegen (number)
              • die url musst du auch anpassen

              
              #!/bin/bash
              dauer=`curl -w "@curl-format.txt"  -s 'http://192.168.178.159/cm?cmnd=Dimmer%2010' | grep time_total -m 1 | awk '{print $2}' | sed -e 's/s//'`
              #curl "http://192.168.178.59:8087/set/0_userdata.0.CONTROL-OWN.htttpget-test?value=$dauer"
              iobroker state set 0_userdata.0.CONTROL-OWN.htttpget-test $dauer
              echo Temp:  $dauer
              sleep 15
              tempi=`curl -w "@curl-format.txt"  -s 'http://192.168.178.159/cm?cmnd=Dimmer%2010' | grep time_total -m 1 | awk '{print $2}' | sed -e 's/s//'`
              iobroker state set 0_userdata.0.CONTROL-OWN.htttpget-test $tempi
              sleep 15
              tempi=`curl -w "@curl-format.txt"  -s 'http://192.168.178.159/cm?cmnd=Dimmer%2010' | grep time_total -m 1 | awk '{print $2}' | sed -e 's/s//'`
              iobroker state set 0_userdata.0.CONTROL-OWN.htttpget-test $tempi
              sleep 15
              tempi=`curl -w "@curl-format.txt"  -s 'http://192.168.178.159/cm?cmnd=Dimmer%2010' | grep time_total -m 1 | awk '{print $2}' | sed -e 's/s//'`
              iobroker state set 0_userdata.0.CONTROL-OWN.htttpget-test $tempi
              
              

              • sichern und befehl sudo chmod +x httptest ausführen
              • dann sudo crontab -e öffnen und folgenden eintrag eingeben: */1 * * * * /usr/local/bin/httptest

              Image 048.png

              NegaleinN Offline
              NegaleinN Offline
              Negalein
              Global Moderator
              wrote on last edited by
              #67

              @liv-in-sky sagte in Hilfe bei Skripte von request auf httpGet umbauen:

              dann sudo crontab -e öffnen und folgenden eintrag eingeben: */1 * * * * /usr/local/bin/httptest

              muss danach rebootet werden, oder läuft der Cron gleich los?

              ° Node.js & System Update ---> sudo apt update, iob stop, sudo apt full-upgrade
              ° Node.js Fixer ---> iob nodejs-update
              ° Fixer ---> iob fix

              liv-in-skyL 2 Replies Last reply
              0
              • NegaleinN Negalein

                @liv-in-sky sagte in Hilfe bei Skripte von request auf httpGet umbauen:

                dann sudo crontab -e öffnen und folgenden eintrag eingeben: */1 * * * * /usr/local/bin/httptest

                muss danach rebootet werden, oder läuft der Cron gleich los?

                liv-in-skyL Offline
                liv-in-skyL Offline
                liv-in-sky
                wrote on last edited by
                #68

                @negalein
                Läuft sofort los

                nach einem gelösten Thread wäre es sinnvoll dies in der Überschrift des ersten Posts einzutragen [gelöst]-... Bitte benutzt das Voting rechts unten im Beitrag wenn er euch geholfen hat. Forum-Tools: PicPick https://picpick.app/en/download/ und ScreenToGif https://www.screentogif.com/downloads.html

                NegaleinN 1 Reply Last reply
                1
                • NegaleinN Negalein

                  @liv-in-sky sagte in Hilfe bei Skripte von request auf httpGet umbauen:

                  dann sudo crontab -e öffnen und folgenden eintrag eingeben: */1 * * * * /usr/local/bin/httptest

                  muss danach rebootet werden, oder läuft der Cron gleich los?

                  liv-in-skyL Offline
                  liv-in-skyL Offline
                  liv-in-sky
                  wrote on last edited by
                  #69

                  @negalein
                  Ob alles richtig ist stellst du am besten so fest
                  Gehe ins Verzeichnis und rufe einfach httptest auf, dann siehst du was passiert

                  nach einem gelösten Thread wäre es sinnvoll dies in der Überschrift des ersten Posts einzutragen [gelöst]-... Bitte benutzt das Voting rechts unten im Beitrag wenn er euch geholfen hat. Forum-Tools: PicPick https://picpick.app/en/download/ und ScreenToGif https://www.screentogif.com/downloads.html

                  NegaleinN 1 Reply Last reply
                  1
                  • liv-in-skyL liv-in-sky

                    @negalein
                    Läuft sofort los

                    NegaleinN Offline
                    NegaleinN Offline
                    Negalein
                    Global Moderator
                    wrote on last edited by
                    #70

                    @liv-in-sky sagte in Hilfe bei Skripte von request auf httpGet umbauen:

                    Läuft sofort los

                    Ok, DP ändert sich nicht.

                    der Port bei der ioB-IP ist eh der normale (8081 in meinem Fall)?

                    ° Node.js & System Update ---> sudo apt update, iob stop, sudo apt full-upgrade
                    ° Node.js Fixer ---> iob nodejs-update
                    ° Fixer ---> iob fix

                    1 Reply Last reply
                    0
                    • liv-in-skyL liv-in-sky

                      @negalein
                      Ob alles richtig ist stellst du am besten so fest
                      Gehe ins Verzeichnis und rufe einfach httptest auf, dann siehst du was passiert

                      NegaleinN Offline
                      NegaleinN Offline
                      Negalein
                      Global Moderator
                      wrote on last edited by Negalein
                      #71

                      @liv-in-sky sagte in Hilfe bei Skripte von request auf httpGet umbauen:

                      Gehe ins Verzeichnis und rufe einfach httptest auf, dann siehst du was passiert

                      pi@raspberrypi:~ $ cd /usr/local/bin/
                      pi@raspberrypi:/usr/local/bin $ httptest
                      Warning: Failed to read curl-format.txt/usr/local/bin/httptest: command substitution: Zeile 4: Syntaxfehler beim unerwarteten Wort `|'
                      /usr/local/bin/httptest: command substitution: Zeile 4: `| awk '{print $2}' | sed -e 's/s//''
                      Warning: Failed to read curl-format.txtcurl: no URL specified!
                      curl: try 'curl --help' or 'curl --manual' for more information
                      /usr/local/bin/httptest: Zeile 6: http://10.0.1.93/middleware.php/data.json?from=now&uuid[]=bc3edcd0-24c4-11ea-b257-bdbd9553c516&uuid[]=deda8550-24c4-11ea-b402-275ee0956365: Datei oder Verzeichnis nicht gefunden
                      /usr/local/bin/httptest: Zeile 5: iobroker: Kommando nicht gefunden.
                      Warning: Failed to read curl-format.txtcurl: no URL specified!
                      curl: try 'curl --help' or 'curl --manual' for more information
                      /usr/local/bin/httptest: Zeile 8: http://10.0.1.93/middleware.php/data.json?from=now&uuid[]=bc3edcd0-24c4-11ea-b257-bdbd9553c516&uuid[]=deda8550-24c4-11ea-b402-275ee0956365: Datei oder Verzeichnis nicht gefunden
                      /usr/local/bin/httptest: Zeile 7: iobroker: Kommando nicht gefunden.
                      Warning: Failed to read curl-format.txtcurl: no URL specified!
                      curl: try 'curl --help' or 'curl --manual' for more information
                      /usr/local/bin/httptest: Zeile 10: http://10.0.1.93/middleware.php/data.json?from=now&uuid[]=bc3edcd0-24c4-11ea-b257-bdbd9553c516&uuid[]=deda8550-24c4-11ea-b402-275ee0956365: Datei oder Verzeichnis nicht gefunden
                      /usr/local/bin/httptest: Zeile 9: iobroker: Kommando nicht gefunden.
                      /usr/local/bin/httptest: Zeile 11: iobroker: Kommando nicht gefunden.
                      pi@raspberrypi:/usr/local/bin $
                      
                      

                      ° Node.js & System Update ---> sudo apt update, iob stop, sudo apt full-upgrade
                      ° Node.js Fixer ---> iob nodejs-update
                      ° Fixer ---> iob fix

                      liv-in-skyL 1 Reply Last reply
                      0
                      • liv-in-skyL liv-in-sky

                        @latzi @Negalein @OliverIO

                        vielleicht hat der ersteller lust, da nochmal draufzuschauen

                        https://forum.iobroker.net/post/907470

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

                        @liv-in-sky

                        Ich schau einmal.
                        Allerdings gelten die erwähnten Herausforderungen im Post
                        https://forum.iobroker.net/topic/60747/daten-aus-pw-geschützte-website/20?_=1716846281603

                        Request kann das alles in der vorliegenden Form.
                        Axios nur mit diversen zusatzbibliotheken. (Stichwort cookie jar und automatischer redirect), bzw mit relativ viel zusätzlichem code.

                        Request ist immer noch keine schlechte Bibliothek
                        Sie ist depecated, da der maintainer keine neuen Features mehr hinzufügen möchte.
                        Vgl. auch diesen post

                        https://github.com/request/request/issues/3142

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

                        liv-in-skyL 1 Reply Last reply
                        1
                        • NegaleinN Negalein

                          @liv-in-sky sagte in Hilfe bei Skripte von request auf httpGet umbauen:

                          Gehe ins Verzeichnis und rufe einfach httptest auf, dann siehst du was passiert

                          pi@raspberrypi:~ $ cd /usr/local/bin/
                          pi@raspberrypi:/usr/local/bin $ httptest
                          Warning: Failed to read curl-format.txt/usr/local/bin/httptest: command substitution: Zeile 4: Syntaxfehler beim unerwarteten Wort `|'
                          /usr/local/bin/httptest: command substitution: Zeile 4: `| awk '{print $2}' | sed -e 's/s//''
                          Warning: Failed to read curl-format.txtcurl: no URL specified!
                          curl: try 'curl --help' or 'curl --manual' for more information
                          /usr/local/bin/httptest: Zeile 6: http://10.0.1.93/middleware.php/data.json?from=now&uuid[]=bc3edcd0-24c4-11ea-b257-bdbd9553c516&uuid[]=deda8550-24c4-11ea-b402-275ee0956365: Datei oder Verzeichnis nicht gefunden
                          /usr/local/bin/httptest: Zeile 5: iobroker: Kommando nicht gefunden.
                          Warning: Failed to read curl-format.txtcurl: no URL specified!
                          curl: try 'curl --help' or 'curl --manual' for more information
                          /usr/local/bin/httptest: Zeile 8: http://10.0.1.93/middleware.php/data.json?from=now&uuid[]=bc3edcd0-24c4-11ea-b257-bdbd9553c516&uuid[]=deda8550-24c4-11ea-b402-275ee0956365: Datei oder Verzeichnis nicht gefunden
                          /usr/local/bin/httptest: Zeile 7: iobroker: Kommando nicht gefunden.
                          Warning: Failed to read curl-format.txtcurl: no URL specified!
                          curl: try 'curl --help' or 'curl --manual' for more information
                          /usr/local/bin/httptest: Zeile 10: http://10.0.1.93/middleware.php/data.json?from=now&uuid[]=bc3edcd0-24c4-11ea-b257-bdbd9553c516&uuid[]=deda8550-24c4-11ea-b402-275ee0956365: Datei oder Verzeichnis nicht gefunden
                          /usr/local/bin/httptest: Zeile 9: iobroker: Kommando nicht gefunden.
                          /usr/local/bin/httptest: Zeile 11: iobroker: Kommando nicht gefunden.
                          pi@raspberrypi:/usr/local/bin $
                          
                          
                          liv-in-skyL Offline
                          liv-in-skyL Offline
                          liv-in-sky
                          wrote on last edited by
                          #73

                          @negalein poste doch mal deine httptest datei - da ist noch der wurm drin

                          nach einem gelösten Thread wäre es sinnvoll dies in der Überschrift des ersten Posts einzutragen [gelöst]-... Bitte benutzt das Voting rechts unten im Beitrag wenn er euch geholfen hat. Forum-Tools: PicPick https://picpick.app/en/download/ und ScreenToGif https://www.screentogif.com/downloads.html

                          NegaleinN 1 Reply Last reply
                          0
                          • OliverIOO OliverIO

                            @liv-in-sky

                            Ich schau einmal.
                            Allerdings gelten die erwähnten Herausforderungen im Post
                            https://forum.iobroker.net/topic/60747/daten-aus-pw-geschützte-website/20?_=1716846281603

                            Request kann das alles in der vorliegenden Form.
                            Axios nur mit diversen zusatzbibliotheken. (Stichwort cookie jar und automatischer redirect), bzw mit relativ viel zusätzlichem code.

                            Request ist immer noch keine schlechte Bibliothek
                            Sie ist depecated, da der maintainer keine neuen Features mehr hinzufügen möchte.
                            Vgl. auch diesen post

                            https://github.com/request/request/issues/3142

                            liv-in-skyL Offline
                            liv-in-skyL Offline
                            liv-in-sky
                            wrote on last edited by liv-in-sky
                            #74

                            @oliverio

                            damit scheine ich erfolg zu haben - wie gefällt dir diese lösung

                            //ab hier nix verändern
                            const axios = require('axios');
                            const cheerio = require("cheerio");
                            const tough = require('tough-cookie');
                            const { wrapper } = require('axios-cookiejar-support');
                            
                            const cookieJar = new tough.CookieJar();
                            const client = wrapper(axios.create({
                              jar: cookieJar,
                              withCredentials: true,
                            }));
                             
                            let $;
                            async function main() {
                             
                            const optionsLogin = {
                              method: 'POST',
                              url: 'https://netservice.iqcard.at/de/login',
                              data: `BENUID=${user}&PASSWT=${pass}&login-form-submit=login`,
                              headers: {
                                'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9',
                                'Accept-Encoding': 'gzip, deflate, br',
                                'Accept-Language': 'de-DE,de;q=0.9,en-US;q=0.8,en;q=0.7',
                                'Cache-Control': 'no-cache',
                                'Content-Type': 'application/x-www-form-urlencoded',
                                'DNT': '1',
                                'Origin': 'https://netservice.iqcard.at',
                                'Pragma': 'no-cache',
                                'Sec-CH-UA': '"Not?A_Brand";v="8", "Chromium";v="108", "Google Chrome";v="108"',
                                'Sec-CH-UA-Mobile': '?0',
                                'Sec-CH-UA-Platform': '"Windows"',
                                'Sec-Fetch-Dest': 'empty',
                                'Sec-Fetch-Mode': 'cors',
                                'Sec-Fetch-Site': 'same-origin',
                                'Upgrade-Insecure-Requests': '1',
                                'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36',
                                'Cookie': 'cAccept=true; NETSERVICE=true; IQCARDPASSWT=; IQCARDBENUID= ',
                                'Referer': 'https://netservice.iqcard.at/de/kunden'
                              },
                              maxRedirects: 5, // Anzahl der zu folgenden Redirects
                              withCredentials: true // für das Cookie-Handling
                            };
                            
                            const optionsPriceinfo = {
                              method: 'GET',
                              url: 'https://netservice.iqcard.at/de/netservice_preisinfo',
                              headers: {
                                'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9',
                                'Accept-Encoding': 'gzip, deflate, br',
                                'Accept-Language': 'de-DE,de;q=0.9,en-US;q=0.8,en;q=0.7',
                                'Cache-Control': 'no-cache',
                                'DNT': '1',
                                'Origin': 'https://netservice.iqcard.at',
                                'Pragma': 'no-cache',
                                'Sec-CH-UA': '"Not?A_Brand";v="8", "Chromium";v="108", "Google Chrome";v="108"',
                                'Sec-CH-UA-Mobile': '?0',
                                'Sec-CH-UA-Platform': '"Windows"',
                                'Sec-Fetch-Dest': 'empty',
                                'Sec-Fetch-Mode': 'cors',
                                'Sec-Fetch-Site': 'same-origin',
                                'Sec-Fetch-User': '?1',
                                'Upgrade-Insecure-Requests': '1',
                                'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36',
                                'Referer': 'https://netservice.iqcard.at/de/netservice'
                              },
                              maxRedirects: 5, // Anzahl der zu folgenden Redirects
                              withCredentials: true // für das Cookie-Handling
                            };
                            
                            // Anmeldung mit POST-Request
                            client(optionsLogin)
                              .then(() => {
                                // Erfolgreiche Anmeldung, jetzt GET-Request für Preisinfo
                                return client(optionsPriceinfo);
                              })
                              .then(response => {
                                // Verarbeitung der Antwort
                                const data = analyze(response.data);
                                log(data);
                                writeDatapoint(data);
                              })
                              .catch(error => {
                                console.error('Error making the request:', error);
                              });
                            

                            output

                            {
                               "ÖSTERREICH": {
                               	"services": {
                               		"Super Plus": [
                               			{
                               				"date": "27.05.2024-02.06.2024:",
                               				"price": "1,721 EUR"
                               			},
                               			{
                               				"date": "20.05.2024-26.05.2024:",
                               				"price": "1,731 EUR"
                               			},
                               			{
                               				"date": "13.05.2024-19.05.2024:",
                               				"price": "1,737 EUR"
                               			}
                               		],
                               		"Super": [
                               			{
                               				"date": "27.05.2024-02.06.2024:",
                               				"price": "1,595 EUR"
                               			},
                               			{
                               				"date": "20.05.2024-26.05.2024:",
                               				"price": "1,611 EUR"
                               			},
                               			{
                               				"date": "13.05.2024-19.05.2024:",
                               				"price": "1,617 EUR"
                               			}
                               		],
                               		"Normal": [
                               			{
                               				"date": "27.05.2024-02.06.2024:",
                               				"price": "1,595 EUR"
                               			},
                               			{
                               				"date": "20.05.2024-26.05.2024:",
                               				"price": "1,611 EUR"
                               			},
                               			{
                               				"date": "13.05.2024-19.05.2024:",
                               				"price": "1,617 EUR"
                               			}
                               		],
                               		"Diesel": [
                               			{
                               				"date": "27.05.2024-02.06.2024:",
                               				"price": "1,559 EUR"
                               			},
                               			{
                               				"date": "20.05.2024-26.05.2024:",
                               				"price": "1,571 EUR"
                               			},
                               			{
                               				"date": "13.05.2024-19.05.2024:",
                               				"price": "1,571 EUR"
                               			}
                               		],
                               		"Premium Diesel": [
                               			{
                               				"date": "27.05.2024-02.06.2024:",
                               				"price": "1,781 EUR"
                               			},
                               			{
                               				"date": "20.05.2024-26.05.2024:",
                               				"price": "1,781 EUR"
                               			},
                               			{
                               				"date": "13.05.2024-19.05.2024:",
                               				"price": "1,787 EUR"
                               			}
                               		],
                               		"IQ Motoröle und Chemie": "10 % Rabatt",
                               		"Autowäsche": "10 % Rabatt"
                               	},
                               	"info": "",
                               	"countryname": "ÖSTERREICH"
                               },
                               "BOSNIEN UND HERZEGOWINA": {
                               	"services": {},
                               	"info": "Sie tanken zum aktuellen Pumpenabgabepreis",
                               	"countryname": "BOSNIEN UND HERZEGOWINA"
                               },
                               "BELGIEN": {
                               	"services": {},
                               	"info": "Sie tanken zum aktuellen Pumpenabgabepreis",
                               	"countryname": "BELGIEN"
                               },
                               "BULGARIEN": {
                               	"services": {},
                               	"info": "Sie tanken zum aktuellen Pumpenabgabepreis",
                               	"countryname": "BULGARIEN"
                               },
                               "TSCHECHIEN": {
                               	"services": {
                               		"Diesel": [
                               			{
                               				"date": "27.05.2024-02.06.2024:",
                               				"price": "34,122 CZK"
                               			},
                               			{
                               				"date": "20.05.2024-26.05.2024:",
                               				"price": "34,122 CZK"
                               			},
                               			{
                               				"date": "13.05.2024-19.05.2024:",
                               				"price": "34,606 CZK"
                               			}
                               		]
                               	},
                               	"info": "",
                               	"countryname": "TSCHECHIEN"
                               },
                               "DEUTSCHLAND": {
                               	"services": {},
                               	"info": "Sie tanken zum aktuellen Pumpenabgabepreis",
                               	"countryname": "DEUTSCHLAND"
                               },
                               "DÄNEMARK": {
                               	"services": {},
                               	"info": "Sie tanken zum aktuellen Pumpenabgabepreis",
                               	"countryname": "DÄNEMARK"
                               },
                               "SPANIEN": {
                               	"services": {},
                               	"info": "Sie tanken zum aktuellen Pumpenabgabepreis",
                               	"countryname": "SPANIEN"
                               },
                               "FRANKREICH": {
                               	"services": {},
                               	"info": "Sie tanken zum aktuellen Pumpenabgabepreis",
                               	"countryname": "FRANKREICH"
                               },
                               "GROßBRITANNIEN": {
                               	"services": {},
                               	"info": "Sie tanken zum aktuellen Pumpenabgabepreis",
                               	"countryname": "GROßBRITANNIEN"
                               },
                               "UNGARN": {
                               	"services": {},
                               	"info": "Sie tanken zum aktuellen Pumpenabgabepreis",
                               	"countryname": "UNGARN"
                               },
                               "ITALIEN": {
                               	"services": {},
                               	"info": "Sie tanken zum aktuellen Pumpenabgabepreis",
                               	"countryname": "ITALIEN"
                               },
                               "LITAUEN": {
                               	"services": {},
                               	"info": "Sie tanken zum aktuellen Pumpenabgabepreis",
                               	"countryname": "LITAUEN"
                               },
                               "LUXEMBURG": {
                               	"services": {},
                               	"info": "Sie tanken zum aktuellen Pumpenabgabepreis",
                               	"countryname": "LUXEMBURG"
                               },
                               "NIEDERLANDE": {
                               	"services": {},
                               	"info": "Sie tanken zum aktuellen Pumpenabgabepreis",
                               	"countryname": "NIEDERLANDE"
                               },
                               "NORWEGEN": {
                               	"services": {},
                               	"info": "Sie tanken zum aktuellen Pumpenabgabepreis",
                               	"countryname": "NORWEGEN"
                               },
                               "POLEN": {
                               	"services": {},
                               	"info": "Sie tanken zum aktuellen Pumpenabgabepreis",
                               	"countryname": "POLEN"
                               },
                               "RUMÄNIEN": {
                               	"services": {},
                               	"info": "Sie tanken zum aktuellen Pumpenabgabepreis",
                               	"countryname": "RUMÄNIEN"
                               },
                               "SCHWEDEN": {
                               	"services": {},
                               	"info": "Sie tanken zum aktuellen Pumpenabgabepreis",
                               	"countryname": "SCHWEDEN"
                               },
                               "SLOWENIEN": {
                               	"services": {},
                               	"info": "Sie tanken zum aktuellen Pumpenabgabepreis",
                               	"countryname": "SLOWENIEN"
                               }
                            }
                            

                            nach einem gelösten Thread wäre es sinnvoll dies in der Überschrift des ersten Posts einzutragen [gelöst]-... Bitte benutzt das Voting rechts unten im Beitrag wenn er euch geholfen hat. Forum-Tools: PicPick https://picpick.app/en/download/ und ScreenToGif https://www.screentogif.com/downloads.html

                            OliverIOO 1 Reply Last reply
                            0
                            • liv-in-skyL liv-in-sky

                              @negalein poste doch mal deine httptest datei - da ist noch der wurm drin

                              NegaleinN Offline
                              NegaleinN Offline
                              Negalein
                              Global Moderator
                              wrote on last edited by
                              #75

                              @liv-in-sky sagte in Hilfe bei Skripte von request auf httpGet umbauen:

                              poste doch mal deine httptest datei - da ist noch der wurm drin

                              #!/bin/bash
                              dauer=`curl -w "@curl-format.txt" -s 'http://10.0.1.93/middleware.php/data.json?from=now&uuid[]=bc3edcd0-24c4-11ea-b257-bdbd9553c516&uuid[]=deda8550-24c4-11ea-b402-275ee0956365' | grep time_total -m 1 
                              | awk '{print $2}' | sed -e 's/s//'`
                              #curl "http://10.0.1.202:8081/set/0_userdata.0.Tests.htttpget-test?value=$dauer"
                              iobroker state set 0_userdata.0.Tests.htttpget-test $dauer echo Temp: $dauer sleep 15 tempi=`curl -w "@curl-format.txt" -s 
                              'http://10.0.1.93/middleware.php/data.json?from=now&uuid[]=bc3edcd0-24c4-11ea-b257-bdbd9553c516&uuid[]=deda8550-24c4-11ea-b402-275ee0956365' | grep time_total -m 1 | awk '{print $2}' | sed -e 's/s//'` 
                              iobroker state set 0_userdata.0.Tests.htttpget-test $tempi sleep 15 tempi=`curl -w "@curl-format.txt" -s 
                              'http://10.0.1.93/middleware.php/data.json?from=now&uuid[]=bc3edcd0-24c4-11ea-b257-bdbd9553c516&uuid[]=deda8550-24c4-11ea-b402-275ee0956365' | grep time_total -m 1 | awk '{print $2}' | sed -e 's/s//'` 
                              iobroker state set 0_userdata.0.Tests.htttpget-test $tempi sleep 15 tempi=`curl -w "@curl-format.txt" -s 
                              'http://10.0.1.93/middleware.php/data.json?from=now&uuid[]=bc3edcd0-24c4-11ea-b257-bdbd9553c516&uuid[]=deda8550-24c4-11ea-b402-275ee0956365' | grep time_total -m 1 | awk '{print $2}' | sed -e 's/s//'`
                              iobroker state set 0_userdata.0.Tests.htttpget-test $tempi
                              

                              ° Node.js & System Update ---> sudo apt update, iob stop, sudo apt full-upgrade
                              ° Node.js Fixer ---> iob nodejs-update
                              ° Fixer ---> iob fix

                              liv-in-skyL 1 Reply Last reply
                              0
                              • NegaleinN Negalein

                                @liv-in-sky sagte in Hilfe bei Skripte von request auf httpGet umbauen:

                                poste doch mal deine httptest datei - da ist noch der wurm drin

                                #!/bin/bash
                                dauer=`curl -w "@curl-format.txt" -s 'http://10.0.1.93/middleware.php/data.json?from=now&uuid[]=bc3edcd0-24c4-11ea-b257-bdbd9553c516&uuid[]=deda8550-24c4-11ea-b402-275ee0956365' | grep time_total -m 1 
                                | awk '{print $2}' | sed -e 's/s//'`
                                #curl "http://10.0.1.202:8081/set/0_userdata.0.Tests.htttpget-test?value=$dauer"
                                iobroker state set 0_userdata.0.Tests.htttpget-test $dauer echo Temp: $dauer sleep 15 tempi=`curl -w "@curl-format.txt" -s 
                                'http://10.0.1.93/middleware.php/data.json?from=now&uuid[]=bc3edcd0-24c4-11ea-b257-bdbd9553c516&uuid[]=deda8550-24c4-11ea-b402-275ee0956365' | grep time_total -m 1 | awk '{print $2}' | sed -e 's/s//'` 
                                iobroker state set 0_userdata.0.Tests.htttpget-test $tempi sleep 15 tempi=`curl -w "@curl-format.txt" -s 
                                'http://10.0.1.93/middleware.php/data.json?from=now&uuid[]=bc3edcd0-24c4-11ea-b257-bdbd9553c516&uuid[]=deda8550-24c4-11ea-b402-275ee0956365' | grep time_total -m 1 | awk '{print $2}' | sed -e 's/s//'` 
                                iobroker state set 0_userdata.0.Tests.htttpget-test $tempi sleep 15 tempi=`curl -w "@curl-format.txt" -s 
                                'http://10.0.1.93/middleware.php/data.json?from=now&uuid[]=bc3edcd0-24c4-11ea-b257-bdbd9553c516&uuid[]=deda8550-24c4-11ea-b402-275ee0956365' | grep time_total -m 1 | awk '{print $2}' | sed -e 's/s//'`
                                iobroker state set 0_userdata.0.Tests.htttpget-test $tempi
                                
                                liv-in-skyL Offline
                                liv-in-skyL Offline
                                liv-in-sky
                                wrote on last edited by
                                #76

                                @negalein

                                die datei curl-format.txt hast du ins verzeichnis kopiert ?

                                nach einem gelösten Thread wäre es sinnvoll dies in der Überschrift des ersten Posts einzutragen [gelöst]-... Bitte benutzt das Voting rechts unten im Beitrag wenn er euch geholfen hat. Forum-Tools: PicPick https://picpick.app/en/download/ und ScreenToGif https://www.screentogif.com/downloads.html

                                NegaleinN 1 Reply Last reply
                                0
                                • liv-in-skyL liv-in-sky

                                  @negalein

                                  die datei curl-format.txt hast du ins verzeichnis kopiert ?

                                  NegaleinN Offline
                                  NegaleinN Offline
                                  Negalein
                                  Global Moderator
                                  wrote on last edited by
                                  #77

                                  @liv-in-sky sagte in Hilfe bei Skripte von request auf httpGet umbauen:

                                  die datei curl-format.txt hast du ins verzeichnis kopiert ?

                                  yes

                                  45c40654-48f6-477c-b7ba-190bc4f2b5fd-image.png

                                  ° Node.js & System Update ---> sudo apt update, iob stop, sudo apt full-upgrade
                                  ° Node.js Fixer ---> iob nodejs-update
                                  ° Fixer ---> iob fix

                                  liv-in-skyL 2 Replies Last reply
                                  0
                                  • NegaleinN Negalein

                                    @liv-in-sky sagte in Hilfe bei Skripte von request auf httpGet umbauen:

                                    die datei curl-format.txt hast du ins verzeichnis kopiert ?

                                    yes

                                    45c40654-48f6-477c-b7ba-190bc4f2b5fd-image.png

                                    liv-in-skyL Offline
                                    liv-in-skyL Offline
                                    liv-in-sky
                                    wrote on last edited by
                                    #78

                                    @negalein

                                    in der ersten zeile dauer=......

                                    ist da ein zeilenumbruch vor | awk '{print $2}' | sed -e 's/s/ - das muss in einer zeile stehen

                                    nach einem gelösten Thread wäre es sinnvoll dies in der Überschrift des ersten Posts einzutragen [gelöst]-... Bitte benutzt das Voting rechts unten im Beitrag wenn er euch geholfen hat. Forum-Tools: PicPick https://picpick.app/en/download/ und ScreenToGif https://www.screentogif.com/downloads.html

                                    NegaleinN 1 Reply Last reply
                                    0
                                    • NegaleinN Negalein

                                      @liv-in-sky sagte in Hilfe bei Skripte von request auf httpGet umbauen:

                                      die datei curl-format.txt hast du ins verzeichnis kopiert ?

                                      yes

                                      45c40654-48f6-477c-b7ba-190bc4f2b5fd-image.png

                                      liv-in-skyL Offline
                                      liv-in-skyL Offline
                                      liv-in-sky
                                      wrote on last edited by liv-in-sky
                                      #79

                                      @negalein

                                      kopiere das in die datei

                                      #!/bin/bash
                                      dauer=`curl -w "@curl-format.txt" -s 'http://10.0.1.93/middleware.php/data.json?from=now&uuid[]=bc3edcd0-24c4-11ea-b257-bdbd9553c516&uuid[]=deda8550-24c4-11ea-b402-275ee0956365' | grep time_total -m 1 | awk '{print $2}' | sed -e 's/s//'`
                                      iobroker state set 0_userdata.0.Tests.htttpget-test $dauer 
                                      sleep 15 
                                      tempi=`curl -w "@curl-format.txt" -s 'http://10.0.1.93/middleware.php/data.json?from=now&uuid[]=bc3edcd0-24c4-11ea-b257-bdbd9553c516&uuid[]=deda8550-24c4-11ea-b402-275ee0956365' | grep time_total -m 1 | awk '{print $2}' | sed -e 's/s//'` 
                                      iobroker state set 0_userdata.0.Tests.htttpget-test $tempi
                                      sleep 15
                                      tempi=`curl -w "@curl-format.txt" -s 'http://10.0.1.93/middleware.php/data.json?from=now&uuid[]=bc3edcd0-24c4-11ea-b257-bdbd9553c516&uuid[]=deda8550-24c4-11ea-b402-275ee0956365' | grep time_total -m 1 | awk '{print $2}' | sed -e 's/s//'` 
                                      iobroker state set 0_userdata.0.Tests.htttpget-test $tempi
                                      sleep 15
                                      tempi=`curl -w "@curl-format.txt" -s 'http://10.0.1.93/middleware.php/data.json?from=now&uuid[]=bc3edcd0-24c4-11ea-b257-bdbd9553c516&uuid[]=deda8550-24c4-11ea-b402-275ee0956365' | grep time_total -m 1 | awk '{print $2}' | sed -e 's/s//'`
                                      iobroker state set 0_userdata.0.Tests.htttpget-test $tempi
                                      

                                      es dürfen keine zeilenumbrüche in den befehlen drin sein

                                      nach einem gelösten Thread wäre es sinnvoll dies in der Überschrift des ersten Posts einzutragen [gelöst]-... Bitte benutzt das Voting rechts unten im Beitrag wenn er euch geholfen hat. Forum-Tools: PicPick https://picpick.app/en/download/ und ScreenToGif https://www.screentogif.com/downloads.html

                                      NegaleinN 1 Reply Last reply
                                      0
                                      • liv-in-skyL liv-in-sky

                                        @negalein

                                        in der ersten zeile dauer=......

                                        ist da ein zeilenumbruch vor | awk '{print $2}' | sed -e 's/s/ - das muss in einer zeile stehen

                                        NegaleinN Offline
                                        NegaleinN Offline
                                        Negalein
                                        Global Moderator
                                        wrote on last edited by
                                        #80

                                        @liv-in-sky sagte in Hilfe bei Skripte von request auf httpGet umbauen:

                                        ist da ein zeilenumbruch vor | awk '{print $2}' | sed -e 's/s/ - das muss in einer zeile stehen

                                        stimmt, da hats einen Zeilenumbruch reingehaun.

                                        Aber auch ohne kommt nur:

                                        pi@raspberrypi:/usr/local/bin $ httptest
                                        Warning: Failed to read curl-format.txtWarning: Failed to read curl-format.txtcurl: no URL specified!
                                        curl: try 'curl --help' or 'curl --manual' for more information
                                        /usr/local/bin/httptest: Zeile 5: http://10.0.1.93/middleware.php/data.json?from=now&uuid[]=bc3edcd0-24c4-11ea-b257-bdbd9553c516&uuid[]=deda8550-24c4-11ea-b402-275ee0956365: Datei oder Verzeichnis nicht gefunden
                                        /usr/local/bin/httptest: Zeile 4: iobroker: Kommando nicht gefunden.
                                        Warning: Failed to read curl-format.txtcurl: no URL specified!
                                        curl: try 'curl --help' or 'curl --manual' for more information
                                        /usr/local/bin/httptest: Zeile 7: http://10.0.1.93/middleware.php/data.json?from=now&uuid[]=bc3edcd0-24c4-11ea-b257-bdbd9553c516&uuid[]=deda8550-24c4-11ea-b402-275ee0956365: Datei oder Verzeichnis nicht gefunden
                                        /usr/local/bin/httptest: Zeile 6: iobroker: Kommando nicht gefunden.
                                        Warning: Failed to read curl-format.txtcurl: no URL specified!
                                        curl: try 'curl --help' or 'curl --manual' for more information
                                        /usr/local/bin/httptest: Zeile 9: http://10.0.1.93/middleware.php/data.json?from=now&uuid[]=bc3edcd0-24c4-11ea-b257-bdbd9553c516&uuid[]=deda8550-24c4-11ea-b402-275ee0956365: Datei oder Verzeichnis nicht gefunden
                                        /usr/local/bin/httptest: Zeile 8: iobroker: Kommando nicht gefunden.
                                        /usr/local/bin/httptest: Zeile 10: iobroker: Kommando nicht gefunden.
                                        
                                        

                                        ° Node.js & System Update ---> sudo apt update, iob stop, sudo apt full-upgrade
                                        ° Node.js Fixer ---> iob nodejs-update
                                        ° Fixer ---> iob fix

                                        liv-in-skyL 1 Reply Last reply
                                        0
                                        • NegaleinN Negalein

                                          @liv-in-sky sagte in Hilfe bei Skripte von request auf httpGet umbauen:

                                          ist da ein zeilenumbruch vor | awk '{print $2}' | sed -e 's/s/ - das muss in einer zeile stehen

                                          stimmt, da hats einen Zeilenumbruch reingehaun.

                                          Aber auch ohne kommt nur:

                                          pi@raspberrypi:/usr/local/bin $ httptest
                                          Warning: Failed to read curl-format.txtWarning: Failed to read curl-format.txtcurl: no URL specified!
                                          curl: try 'curl --help' or 'curl --manual' for more information
                                          /usr/local/bin/httptest: Zeile 5: http://10.0.1.93/middleware.php/data.json?from=now&uuid[]=bc3edcd0-24c4-11ea-b257-bdbd9553c516&uuid[]=deda8550-24c4-11ea-b402-275ee0956365: Datei oder Verzeichnis nicht gefunden
                                          /usr/local/bin/httptest: Zeile 4: iobroker: Kommando nicht gefunden.
                                          Warning: Failed to read curl-format.txtcurl: no URL specified!
                                          curl: try 'curl --help' or 'curl --manual' for more information
                                          /usr/local/bin/httptest: Zeile 7: http://10.0.1.93/middleware.php/data.json?from=now&uuid[]=bc3edcd0-24c4-11ea-b257-bdbd9553c516&uuid[]=deda8550-24c4-11ea-b402-275ee0956365: Datei oder Verzeichnis nicht gefunden
                                          /usr/local/bin/httptest: Zeile 6: iobroker: Kommando nicht gefunden.
                                          Warning: Failed to read curl-format.txtcurl: no URL specified!
                                          curl: try 'curl --help' or 'curl --manual' for more information
                                          /usr/local/bin/httptest: Zeile 9: http://10.0.1.93/middleware.php/data.json?from=now&uuid[]=bc3edcd0-24c4-11ea-b257-bdbd9553c516&uuid[]=deda8550-24c4-11ea-b402-275ee0956365: Datei oder Verzeichnis nicht gefunden
                                          /usr/local/bin/httptest: Zeile 8: iobroker: Kommando nicht gefunden.
                                          /usr/local/bin/httptest: Zeile 10: iobroker: Kommando nicht gefunden.
                                          
                                          
                                          liv-in-skyL Offline
                                          liv-in-skyL Offline
                                          liv-in-sky
                                          wrote on last edited by
                                          #81

                                          @negalein

                                          funktioniert der befehl in der console allein

                                          curl -w "@curl-format.txt" -s 'http://10.0.1.93/middleware.php/data.json?from=now&uuid[]=bc3edcd0-24c4-11ea-b257-bdbd9553c516&uuid[]=deda8550-24c4-11ea-b402-275ee0956365' | grep time_total -m 1 | awk '{print $2}' | sed -e 's/s//'
                                          

                                          nach einem gelösten Thread wäre es sinnvoll dies in der Überschrift des ersten Posts einzutragen [gelöst]-... Bitte benutzt das Voting rechts unten im Beitrag wenn er euch geholfen hat. Forum-Tools: PicPick https://picpick.app/en/download/ und ScreenToGif https://www.screentogif.com/downloads.html

                                          NegaleinN 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

                                          672

                                          Online

                                          32.7k

                                          Users

                                          82.5k

                                          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