Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Tester
    4. Test Coronavirus Statistics for ioBroker

    NEWS

    • ioBroker@Smart Living Forum Solingen, 14.06. - Agenda added

    • ioBroker goes Matter ... Matter Adapter in Stable

    • Monatsrückblick - April 2025

    Test Coronavirus Statistics for ioBroker

    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      stoepselinho last edited by

      hab mir den Quelltext von corona in zahlen genommen

      J 1 Reply Last reply Reply Quote 0
      • J
        jlssmt @stoepselinho last edited by jlssmt

        @stoepselinho
        ja das ist halt instabil.
        wie ich das sehe wird die inzidenz nur von deutschland getrackt. es ist schon schwer die 7-tage inzidenzen für bspw. UK zu googlen.
        Alles was ich so finde, beruht auf eigenen Berechnungen der Entwickler.

        Die Tabelle hier zu scrapen ist auch schwierig, da sie mehrere Seiten hat und die Daten asynchron lädt. Da brauchts dann mWn. wieder puppeteer usw... wenns überhaupt irgendwie stabil möglich ist.
        https://www.corona-in-zahlen.de/weltweit/
        man könnte den entwickler anfragen, ob er eine api bereitstellt. aber ich weiß nicht ob sein server dem load gewappnet ist.

        J 1 Reply Last reply Reply Quote 0
        • J
          jlssmt @jlssmt last edited by

          jhu liefert die inzidenz inkl. historie. damit könnte man die 7-tage-inzidenz einfach selbst berechnen.
          leider für deutschland, spanien und andere nur pro bundesland und nicht gesamt.
          bei manchen ländern würde uns das helfen, aber nicht bei den wichtigen.

          https://github.com/CSSEGISandData/COVID-19/tree/master/csse_covid_19_data/csse_covid_19_daily_reports

          1 Reply Last reply Reply Quote 0
          • Dutchman
            Dutchman Developer Most Active Administrators last edited by

            0.8.0-1 released, Umstellung von RKI data per Excel auf eine validierte API hoffentlich damit auch endlich diese werte unter Kontrolle 🙂

            Bitte teste, ich moechte die version gerne nach stable bringen wegen den Impfdaten und Fehler beim JS-ccontroller 3.x

            sigi234 1 Reply Last reply Reply Quote 0
            • sigi234
              sigi234 Forum Testing Most Active @Dutchman last edited by

              @dutchman

              coronavirus-statistics.0
              2021-08-11 12:03:17.170	warn	Cannot handle vaccination data for Hungary, if this error continues please report a bug to the developer! Totals: {"date":"2021-08-10","people_vaccinated":5658623,"people_fully_vaccinated":5497599,"people_vaccinated_per_hundred":58.58,"people_fully_vaccinated_per_hundred":56.91}
              
              coronavirus-statistics.0
              2021-08-11 12:03:00.026	warn	Got terminate signal. Checking desired PID: 0 vs own PID 13532
              
              coronavirus-statistics.0
              2021-08-11 12:02:57.295	warn	Cannot handle vaccination data for China, if this error continues please report a bug to the developer! Totals: {"date":"2021-08-10","total_vaccinations":1808092000,"daily_vaccinations_raw":25567000,"daily_vaccinations":14248000,"total_vaccinations_per_hundred":125.62,"daily_vaccinations_per_million":9899}
              
              J 1 Reply Last reply Reply Quote 0
              • J
                jlssmt @sigi234 last edited by jlssmt

                @Dutchman

                Das liegt daran, dass unsere Problemländer China und Ungarn die Daten unvollständig/ anders bereitstellen.
                Ungarn hat keine "total_vaccinations" und China splittet nicht auf Erst- und Zeitimpfung auf:

                [
                  {
                    "country": "China",
                    "iso_code": "CHN",
                    "data": [
                      {
                        "date": "2021-08-10",
                        "total_vaccinations": 1808092000,
                        "daily_vaccinations_raw": 25567000,
                        "daily_vaccinations": 14248000,
                        "total_vaccinations_per_hundred": 125.62,
                        "daily_vaccinations_per_million": 9899
                      }
                    ]
                  },
                  {
                    "country": "Hungary",
                    "iso_code": "HUN",
                    "data": [
                      {
                        "date": "2021-08-10",
                        "people_vaccinated": 5658623,
                        "people_fully_vaccinated": 5497599,
                        "people_vaccinated_per_hundred": 58.58,
                        "people_fully_vaccinated_per_hundred": 56.91
                      }
                    ]
                  }
                ]
                

                Muss hier angepasst werden:

                	async writeVaccinationDataForCountry(country, data) {
                		if (data
                			&& data.people_vaccinated
                			&& data.people_fully_vaccinated
                			&& data.total_vaccinations
                			&& data.people_vaccinated_per_hundred
                			&& data.people_fully_vaccinated_per_hundred) {
                
                			[...]
                		} else {
                			this.log.warn(`Cannot handle vaccination data for ${country}, if this error continues please report a bug to the developer! Totals: ${JSON.stringify(data)}`);
                		}
                	}
                
                J 1 Reply Last reply Reply Quote 0
                • J
                  jlssmt @jlssmt last edited by jlssmt

                  @sigi234
                  hast du alle Länder gezogen? Falls ja, wären das die einzigen Außnahmen bei der API

                  sigi234 1 Reply Last reply Reply Quote 0
                  • sigi234
                    sigi234 Forum Testing Most Active @jlssmt last edited by

                    @jlssmt sagte in Test Coronavirus Statistics for ioBroker:

                    @sigi234
                    hast du alle Länder gezogen? Falls ja, wären das die einzigen Außnahmen bei der API

                    Nein nur bestimmte.

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

                      @Dutchman
                      dann macht es vielleicht sinn einfach alle keys von den api objects einfach in die states von den ländern zu übertragen.
                      also gar nicht zu prüfen und zuzuordnen, was alles da ist und was nicht, sondern alles inkl. key namen aus der api zu übernehmen.
                      weißt du was ich mein?
                      ich kann das gerne übernehmen, aber nur, wenn wir die arbeit nicht doppelt machen 😉

                      Dutchman 1 Reply Last reply Reply Quote 0
                      • Dutchman
                        Dutchman Developer Most Active Administrators @jlssmt last edited by

                        @jlssmt sagte in Test Coronavirus Statistics for ioBroker:

                        ich kann das gerne übernehmen, aber nur, wenn wir die arbeit nicht doppelt machen

                        da waehre ich dir sehr dankbar, ich baue gerade am WLED und habe fuer corona heute die RKI daten umgestellt auf API wollte den corona adapter eigentlich in ruhe lassen 🐷

                        1 Reply Last reply Reply Quote 0
                        • J
                          jlssmt last edited by jlssmt

                          @dutchman said in Test Coronavirus Statistics for ioBroker:

                          @jlssmt sagte in Test Coronavirus Statistics for ioBroker:

                          ich kann das gerne übernehmen, aber nur, wenn wir die arbeit nicht doppelt machen

                          da waehre ich dir sehr dankbar, ich baue gerade am WLED und habe fuer corona heute die RKI daten umgestellt auf API wollte den corona adapter eigentlich in ruhe lassen 🐷

                          PR ist gestellt
                          habs für china und ungarn cross gecheckt

                          Dutchman 1 Reply Last reply Reply Quote 0
                          • Dutchman
                            Dutchman Developer Most Active Administrators @jlssmt last edited by

                            @jlssmt sagte in Test Coronavirus Statistics for ioBroker:

                            @dutchman said in Test Coronavirus Statistics for ioBroker:

                            @jlssmt sagte in Test Coronavirus Statistics for ioBroker:

                            ich kann das gerne übernehmen, aber nur, wenn wir die arbeit nicht doppelt machen

                            da waehre ich dir sehr dankbar, ich baue gerade am WLED und habe fuer corona heute die RKI daten umgestellt auf API wollte den corona adapter eigentlich in ruhe lassen 🐷

                            PR ist gestellt
                            habs für china und ungarn cross gecheckt

                            danke ! ich füge dan noch die neue state Definitionen hinzu und mache ne neue release:

                            	2021-08-11 14:23:33.078	warn	State attribute definition missing for daily_vaccinations_per_million
                            
                            coronavirus-statistics.0
                            2021-08-11 14:23:33.073	warn	State attribute definition missing for people_fully_vaccinated_per_hundred
                            
                            coronavirus-statistics.0
                            2021-08-11 14:23:33.068	warn	State attribute definition missing for people_vaccinated_per_hundred
                            
                            coronavirus-statistics.0
                            2021-08-11 14:23:33.062	warn	State attribute definition missing for total_vaccinations_per_hundred
                            
                            coronavirus-statistics.0
                            2021-08-11 14:23:33.057	warn	State attribute definition missing for daily_vaccinations
                            
                            coronavirus-statistics.0
                            2021-08-11 14:23:33.052	warn	State attribute definition missing for daily_vaccinations_raw
                            
                            coronavirus-statistics.0
                            2021-08-11 14:23:33.047	warn	State attribute definition missing for people_fully_vaccinated
                            
                            coronavirus-statistics.0
                            2021-08-11 14:23:33.042	warn	State attribute definition missing for people_vaccinated
                            
                            coronavirus-statistics.0
                            2021-08-11 14:23:33.035	warn	State attribute definition missing for total_vaccinations
                            
                            coronavirus-statistics.0
                            2021-08-11 14:23:33.028	warn	State attribute definition missing for date
                            
                            1 Reply Last reply Reply Quote 0
                            • Dutchman
                              Dutchman Developer Most Active Administrators last edited by Dutchman

                              @jlssmt

                              hmmm.... da passt aber was nicht 😕 🙂

                              Schermafbeelding 2021-08-11 om 14.26.18.png

                              ich glaube das wird versacht da nicht alle Länder daten haben also kan der Fehler auch von error nach debug ?

                              J 1 Reply Last reply Reply Quote 0
                              • J
                                jlssmt @Dutchman last edited by

                                @dutchman
                                jo grad nochmal nachgeschaut, was BLM ist. irgendwas französisches. und halt nicht in den werten der API.
                                weiß nicht ob error oder debug. was mich mehr nervt ist, dass die message so oft kommt.
                                ich schau dann nochmal rein, woran das liegt.

                                Dutchman 1 Reply Last reply Reply Quote 1
                                • Dutchman
                                  Dutchman Developer Most Active Administrators @jlssmt last edited by

                                  @jlssmt sagte in Test Coronavirus Statistics for ioBroker:

                                  @dutchman
                                  jo grad nochmal nachgeschaut, was BLM ist. irgendwas französisches. und halt nicht in den werten der API.
                                  weiß nicht ob error oder debug. was mich mehr nervt ist, dass die message so oft kommt.
                                  ich schau dann nochmal rein, woran das liegt.

                                  cool thanks dan warte ich darauf 🙂

                                  1 Reply Last reply Reply Quote 0
                                  • Dutchman
                                    Dutchman Developer Most Active Administrators last edited by Dutchman

                                    @jlssmt sagte in Test Coronavirus Statistics for ioBroker:

                                    weiß nicht ob error oder debug. was mich mehr nervt ist, dass die message so oft kommt.

                                    @jlssmt warte bitte habs schon gefunden ! 🙂

                                    1 Reply Last reply Reply Quote 0
                                    • Dutchman
                                      Dutchman Developer Most Active Administrators last edited by Dutchman

                                      @jlssmt problem gefunden, die Funktion ware eine loop zu tief und wurde fuer jeden state des landes aufgerufen anstatt einmal darum auch soviel log eintrage.

                                      Habe jetzt :

                                      • Den aufruf 1 niveau nach oben gezogen
                                      • Error handling/warning optimalisiert

                                      https://github.com/DrozmotiX/ioBroker.coronavirus-statistics/commit/0056e4041f98a5b59c42094eff3b1498ac024342

                                      Code auf git, magst mal drüber schauen bitte ob es so passt ? Wen ok nur noch die neue Attribute Definitionen und dan koennen wir wieder releasen

                                      ps, wen du eine await Funktion aufrufst immer n try/catch drum herum sonst knallt es when der Promis lehr bleibt.
                                      Im catch can man dan den feeler abfangen (siehe auch commit auf git wo ich das ergänzt habe)

                                      0 committed to DrozmotiX/ioBroker.coronavirus-statistics
                                      Fix incorrect loop to retrieve information
                                      J 1 Reply Last reply Reply Quote 0
                                      • J
                                        jlssmt @Dutchman last edited by jlssmt

                                        @dutchman

                                        sieht gut aus, also ist mmn. jetzt an der richtigen stelle.

                                        danke für die erinnerung bei await. benutze ich zu selten, da ich das meiste über promise chains mache und dort nen catch block hab.

                                        Dutchman 1 Reply Last reply Reply Quote 0
                                        • Dutchman
                                          Dutchman Developer Most Active Administrators @jlssmt last edited by

                                          @jlssmt sagte in Test Coronavirus Statistics for ioBroker:

                                          danke für die erinnerung bei await. benutze ich zu selten, da ich das meiste über promise chains mache und dort nen catch block hab.

                                          jup da macht es sin es weck zu lassen, danke fuer deine Hilfe und Bemühungen !

                                          1 Reply Last reply Reply Quote 0
                                          • Dutchman
                                            Dutchman Developer Most Active Administrators last edited by Dutchman

                                            0.8.0-2 released (auf git, ab morgen im admin!) happy testing

                                            0.8.0-2 (2021-08-11)

                                            (jlssmt) Added vaccination data for all countries
                                            (DutchmanNL) added definitions for vaccination states
                                            (DutchmanNL) Changeover to validated API for German vaccination data of Bundesländer

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

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate

                                            941
                                            Online

                                            31.7k
                                            Users

                                            79.7k
                                            Topics

                                            1.3m
                                            Posts

                                            adapter installation adapterentwicklung testen
                                            120
                                            1177
                                            268956
                                            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-2023
                                            logo