Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. ioBroker Allgemein
    4. Corona-Ampel Österreich in VIS anzeigen

    NEWS

    • Bestätigt/Acknowledged-Flag Bedeutung - ein Mysterium ;-)

    • Update js-controller 4.0.24 (Stable)

    • Fehler 25 oder 217 bei Adapter-Install/Update mit npm8

    Corona-Ampel Österreich in VIS anzeigen

    This topic has been deleted. Only users with topic management privileges can see it.
    • jackblackson
      jackblackson @paul53 last edited by

      @paul53 Version 4.6.17

      paul53 1 Reply Last reply Reply Quote 0
      • paul53
        paul53 @jackblackson last edited by

        @jackblackson sagte:

        Version 4.6.17

        Dann versuche es mal mit Version 4.6.26 (erst latest 4.7.3, dann zurück auf 4.6.26).

        jackblackson 1 Reply Last reply Reply Quote 0
        • jackblackson
          jackblackson @paul53 last edited by

          @paul53 Bin jetzt auf 4.6.26, leider keine Veränderung.

          paul53 1 Reply Last reply Reply Quote 0
          • paul53
            paul53 @jackblackson last edited by paul53

            @jackblackson sagte:

            4.6.26, leider keine Veränderung.

            Habe hier etwas gefunden. Versuche es deshalb mal so:

            const url = 'https://corona-ampel.gv.at/sites/corona-ampel.gv.at/files/assets/Warnstufen_Corona_Ampel_aktuell.json';
             
            schedule('* * * * *', function() {
                request({url: url, agent: new Agent({ rejectUnauthorized: false })}, function(err, response, json) {
                    let arr = JSON.parse(json).warnstufen;
                    let msg = '';
                    for(let i = 0; i < arr.length; i++) {
                       if(arr[i].name == 'Graz (Stadt)') msg = 'Graz Warnstufe: ' + arr[i].warnstufe;
                    }
                    if(msg) log(msg);
                    else log('Graz Warnstufe: 1');
                });
            });
            
            sigi234 liv-in-sky 2 Replies Last reply Reply Quote 0
            • sigi234
              sigi234 Forum Testing Most Active @paul53 last edited by

              @paul53

              javascript.0	2020-09-08 19:52:00.357	error	(14676) at processTimers (internal/timers.js:492:7)
              javascript.0	2020-09-08 19:52:00.357	error	(14676) at listOnTimeout (internal/timers.js:549:17)
              javascript.0	2020-09-08 19:52:00.357	error	(14676) at Timeout._onTimeout (C:\Program Files\iobroker\Test\node_modules\node-schedule\lib\schedule.js:510:7)
              javascript.0	2020-09-08 19:52:00.356	error	(14676) at C:\Program Files\iobroker\Test\node_modules\node-schedule\lib\schedule.js:552:11
              javascript.0	2020-09-08 19:52:00.356	error	(14676) at Job.invoke (C:\Program Files\iobroker\Test\node_modules\node-schedule\lib\schedule.js:173:10)
              javascript.0	2020-09-08 19:52:00.356	error	(14676) at Job.job (C:\Program Files\iobroker\Test\node_modules\iobroker.javascript\lib\sandbox.js:1260:34)
              javascript.0	2020-09-08 19:52:00.356	error	(14676) at Object.<anonymous> (script.js.Sigi.Corona_Ampel:4:35)
              javascript.0	2020-09-08 19:52:00.356	error	(14676) Error in callback: ReferenceError: Agent is not defined
              javascript.0	2020-09-08 19:51:00.007	error	(14676) at processTimers (internal/timers.js:492:7)
              javascript.0	2020-09-08 19:51:00.007	error	(14676) at listOnTimeout (internal/timers.js:549:17)
              javascript.0	2020-09-08 19:51:00.007	error	(14676) at Timeout._onTimeout (C:\Program Files\iobroker\Test\node_modules\node-schedule\lib\schedule.js:510:7)
              javascript.0	2020-09-08 19:51:00.007	error	(14676) at C:\Program Files\iobroker\Test\node_modules\node-schedule\lib\schedule.js:552:11
              javascript.0	2020-09-08 19:51:00.007	error	(14676) at Job.invoke (C:\Program Files\iobroker\Test\node_modules\node-schedule\lib\schedule.js:173:10)
              javascript.0	2020-09-08 19:51:00.007	error	(14676) at Job.job (C:\Program Files\iobroker\Test\node_modules\iobroker.javascript\lib\sandbox.js:1260:34)
              javascript.0	2020-09-08 19:51:00.007	error	(14676) at Object.<anonymous> (script.js.Sigi.Corona_Ampel:4:35)
              javascript.0	2020-09-08 19:51:00.006	error	(14676) Error in callback: ReferenceError: Agent is not defined
              javascript.0	2020-09-08 19:50:40.953	info	(14676) script.js.Sigi.Corona_Ampel: registered 0 subscriptions and 1 schedule
              javascript.0	2020-09-08 19:50:40.953	info	(14676) script.js.Sigi.Corona_Ampel: Österreich gkz : 0 warnstufe: 1
              javascript.0	2020-09-08 19:50:40.952	info	(14676) script.js.Sigi.Corona_Ampel: Wien gkz : 9 warnstufe: 2
              javascript.0	2020-09-08 19:50:40.952	info	(14676) script.js.Sigi.Corona_Ampel: Vorarlberg gkz : 8 warnstufe: 1
              javascript.0	2020-09-08 19:50:40.952	info	(14676) script.js.Sigi.Corona_Ampel: Tirol gkz : 7 warnstufe: 1
              javascript.0	2020-09-08 19:50:40.952	info	(14676) script.js.Sigi.Corona_Ampel: Steiermark gkz : 6 warnstufe: 1
              javascript.0	2020-09-08 19:50:40.952	info	(14676) script.js.Sigi.Corona_Ampel: Salzburg gkz : 5 warnstufe: 1
              javascript.0	2020-09-08 19:50:40.952	info	(14676) script.js.Sigi.Corona_Ampel: Oberösterreich gkz : 4 warnstufe: 1
              javascript.0	2020-09-08 19:50:40.952	info	(14676) script.js.Sigi.Corona_Ampel: Niederösterreich gkz : 3 warnstufe: 1
              javascript.0	2020-09-08 19:50:40.952	info	(14676) script.js.Sigi.Corona_Ampel: Kärnten gkz : 2 warnstufe: 1
              javascript.0	2020-09-08 19:50:40.952	info	(14676) script.js.Sigi.Corona_Ampel: Burgenland gkz : 1 warnstufe: 1
              javascript.0	2020-09-08 19:50:40.952	info	(14676) script.js.Sigi.Corona_Ampel: Kufstein gkz : 705 warnstufe: 2
              javascript.0	2020-09-08 19:50:40.952	info	(14676) script.js.Sigi.Corona_Ampel: Innsbruck (Stadt) gkz : 701 warnstufe: 1
              javascript.0	2020-09-08 19:50:40.952	info	(14676) script.js.Sigi.Corona_Ampel: Graz (Stadt) gkz : 601 warnstufe: 2
              javascript.0	2020-09-08 19:50:40.952	info	(14676) script.js.Sigi.Corona_Ampel: Linz-Land gkz : 410 warnstufe: 1
              javascript.0	2020-09-08 19:50:40.952	info	(14676) script.js.Sigi.Corona_Ampel: Wels (Stadt) gkz : 403 warnstufe: 1
              javascript.0	2020-09-08 19:50:40.952	info	(14676) script.js.Sigi.Corona_Ampel: Linz (Stadt) gkz : 401 warnstufe: 2
              javascript.0	2020-09-08 19:50:40.952	info	(14676) script.js.Sigi.Corona_Ampel: Wr. Neustadt (Stadt) gkz : 304 warnstufe: 1
              javascript.0	2020-09-08 19:50:40.952	info	(14676) script.js.Sigi.Corona_Ampel: Eisenstadt-Umg. gkz : 103 warnstufe: 1
              javascript.0	2020-09-08 19:50:40.951	info	(14676) script.js.Sigi.Corona_Ampel: 18
              javascript.0	2020-09-08 19:50:40.950	info	(14676) Start javascript script.js.Sigi.Corona_Ampel
              
              1 Reply Last reply Reply Quote 0
              • liv-in-sky
                liv-in-sky @paul53 last edited by

                @paul53

                ReferenceError: Agent is not defined

                paul53 1 Reply Last reply Reply Quote 0
                • paul53
                  paul53 @liv-in-sky last edited by paul53

                  @liv-in-sky sagte:

                  Agent is not defined

                  Neuer Versuch ohne Fehlermeldung (funktioniert bei mir allerdings auch ohne Option agent):

                  const url = 'https://corona-ampel.gv.at/sites/corona-ampel.gv.at/files/assets/Warnstufen_Corona_Ampel_aktuell.json';
                  const https = require('https');
                   
                  schedule('* * * * *', function() {
                      request({url: url, agent: new https.Agent({ rejectUnauthorized: false })}, function(err, response, json) {
                          let arr = JSON.parse(json).warnstufen;
                          let msg = '';
                          for(let i = 0; i < arr.length; i++) {
                             if(arr[i].name == 'Graz (Stadt)') msg = 'Graz Warnstufe: ' + arr[i].warnstufe;
                          }
                          if(msg) log(msg);
                          else log('Graz Warnstufe: 1');
                      });
                  });
                  

                  Das Modul "https" muss in der Konfiguration der JS-Instanz eingetragen werden.

                  liv-in-sky 1 Reply Last reply Reply Quote 0
                  • liv-in-sky
                    liv-in-sky @paul53 last edited by liv-in-sky

                    @paul53 das mit https hatte ich schon drin
                    jetzt:
                    agent wird erkannt - aber fehler ist immer noch

                    habe einiges probiert auch mal mit axios

                    const axios=require('axios');
                    
                    
                    const url = 'https://corona-ampel.gv.at/sites/corona-ampel.gv.at/files/assets/Warnstufen_Corona_Ampel_aktuell.json';
                    
                    async function holen () {
                      try {
                       const response = await axios.get(url)
                    log(JSON.stringify(response.data))
                         
                         
                            } catch (error) {
                        
                          console.log(error );
                     }
                    
                    }
                    

                    • auch hier kommt der selbe fehler

                    in einigen forum redet man von system einstellungen in node - leider habe ich das nicht richtig verstanden

                    paul53 1 Reply Last reply Reply Quote 0
                    • paul53
                      paul53 @liv-in-sky last edited by

                      @liv-in-sky sagte:

                      einstellungen in node

                      Welche Node-Version ? Meine ist 12.18.3.

                      liv-in-sky 1 Reply Last reply Reply Quote 0
                      • liv-in-sky
                        liv-in-sky @paul53 last edited by

                        @paul53 bei mir auch 12.18.3

                        habe es mal mit curl versucht - selber fehler - das einzige, was funktioniert (auf der console) ist:

                        wget 'https://corona-ampel.gv.at/sites/corona-ampel.gv.at/files/assets/Warnstufen_Corona_Ampel_aktuell.json' && cat Warnstufen_Corona_Ampel_aktuell.json
                        

                        https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=907788

                        1 Reply Last reply Reply Quote 0
                        • jackblackson
                          jackblackson last edited by

                          Meint ihr es liegt einfach an der Seite und man könnte sie kontaktieren und über den Fehlrr informieren? Weil es ja nicht generell mit Request von Json Probleme macht

                          sigi234 liv-in-sky 2 Replies Last reply Reply Quote 0
                          • sigi234
                            sigi234 Forum Testing Most Active @jackblackson last edited by

                            @jackblackson sagte in Corona-Ampel Österreich in VIS anzeigen:

                            Meint ihr es liegt einfach an der Seite und man könnte sie kontaktieren und über den Fehlrr informieren? Weil es ja nicht generell mit Request von Json Probleme macht

                            Würde hier mal fragen:

                            https://www.data.gv.at/katalog/dataset/52abfc2b-031c-4875-b838-653abbfccf4e

                            jackblackson 1 Reply Last reply Reply Quote 0
                            • jackblackson
                              jackblackson @sigi234 last edited by

                              @sigi234 Ich schreib da mal am Abend hin, vielleicht sind sie ja motiviert da was zu machen 🙂

                              1 Reply Last reply Reply Quote 1
                              • liv-in-sky
                                liv-in-sky @jackblackson last edited by

                                @paul53

                                @jackblackson (ist kein problem der seite)

                                also bei mir läuft es, wenn ich eine änderung in der /etc/ssl/openssl.cnf mache

                                smart87.gif

                                leider weiß ich nicht, was diese änderung insgesamt für weitere sicherheits-relevante kommunikation hat

                                die änderung bringt das sicherheitslevel von ssl um eine stufe tiefer - letzte zeile in "/etc/ssl/openssl.cnf "

                                standard wäre 2 bei CipherString -

                                Image 1.png

                                @Thomas-Braun hast du da ahnung davon, ob das ok ist ? das level runterzusetzen

                                PS: es braucht einen restart des iobroker servers

                                paul53 Thomas Braun 2 Replies Last reply Reply Quote 0
                                • liv-in-sky
                                  liv-in-sky last edited by liv-in-sky

                                  @paul53

                                  kann man das cipher..=1 auch nur für einen bestimmten request nutzen/definieren - ohne das ssl-conf file zu ändern ?

                                  1 Reply Last reply Reply Quote 0
                                  • paul53
                                    paul53 @liv-in-sky last edited by

                                    @liv-in-sky sagte:

                                    "/etc/ssl/openssl.cnf " standard wäre 2 bei CipherString -

                                    Meine "/etc/ssl/openssl.cnf " (Ubuntu 18.04) hat diese beiden Einträge nicht.

                                    liv-in-sky 2 Replies Last reply Reply Quote 0
                                    • liv-in-sky
                                      liv-in-sky @paul53 last edited by

                                      @paul53

                                      ich nutze debian 10

                                      ubuntu nutze ich nicht

                                      evtl findet sich das in ubuntu an anderer stelle

                                      https://askubuntu.com/questions/1233186/ubuntu-20-04-how-to-set-lower-ssl-security-level

                                      paul53 1 Reply Last reply Reply Quote 0
                                      • liv-in-sky
                                        liv-in-sky @paul53 last edited by

                                        @paul53

                                        anscheinend einfach einfügen ?

                                        sigi234 1 Reply Last reply Reply Quote 0
                                        • liv-in-sky
                                          liv-in-sky last edited by

                                          muss leider weg bzw. "handwerkerarbeiten " - bin später wieder da

                                          1 Reply Last reply Reply Quote 0
                                          • paul53
                                            paul53 @liv-in-sky last edited by paul53

                                            @liv-in-sky
                                            Dieser Teil am Ende ist in meiner Datei nicht vorhanden:

                                            [default_conf]
                                            ssl_conf = ssl_sect
                                            
                                            [ssl_sect]
                                            system_default = system_default_sect
                                            
                                            [system_default_sect]
                                            MinProtocol = TLSv1.2
                                            CipherString = DEFAULT@SECLEVEL=2
                                            

                                            Wahrscheinlich funktioniert deshalb request auf die Seite bei mir von Anfang an ?

                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate
                                            FAQ Cloud / IOT
                                            HowTo: Node.js-Update
                                            HowTo: Backup/Restore
                                            Downloads
                                            BLOG

                                            1.4k
                                            Online

                                            27.9k
                                            Users

                                            61.7k
                                            Topics

                                            936.2k
                                            Posts

                                            corona vis
                                            10
                                            217
                                            2895
                                            Loading More Posts
                                            • Oldest to Newest
                                            • Newest to Oldest
                                            • Most Votes
                                            Reply
                                            • Reply as topic
                                            Log in to reply
                                            Community
                                            Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen
                                            The ioBroker Community 2014-2021
                                            logo