NEWS
Test Coronavirus Statistics for ioBroker
-
@Uli977 sagte in Test Coronavirus Statistics for ioBroker:
@sigi234 kannst du das exportieren?
-
Sorry hab leider in dem Skript echt nen Schnitzer drin gehabt - bei North / South America ist ein Leerzeichen drin, was bei Ids nicht empfohlen ist.
Bitte nehmt das folgende Skript und löscht alle DPs von North / South America.const countryJs = require("country-list-js"); let selector = `[id=coronavirus-statistics.0.*.cases]` let allCountries = $(selector); // Fehlermeldung ausgeben, wenn selector kein result liefert if (allCountries.length === 0) { console.error(`no result for selector '${selector}'`) } on({ id: 'coronavirus-statistics.0.global_totals.updated', change: 'any' }, statsForContinents); function statsForContinents() { setTimeout(function () { console.log('Corona Statistik für Kontinente wird erstellt'); let countryTranslator = { // https://github.com/i-rocky/country-list-js/blob/master/data/names.json "Vatican_City": "Vatican", "USA": "United States", "UK": "United Kingdom", "UAE": "United Arab Emirates", "US_Virgin_Islands": "U.S. Virgin Islands", "St_Vincent_Grenadines": "Saint Vincent and the Grenadines", "St_Barth": "Saint Barthelemy", "S_Korea": "South Korea", "Palestine": "Palestinian Territory", "North_Macedonia": "Macedonia", "Faeroe_Islands": "Faroe Islands", "Eswatini": "Swaziland", "Czechia": "Czech Republic", "Congo": "Republic of the Congo", "CAR": "Central African Republic", "DRC": "Democratic Republic of the Congo", "Channel_Islands": "France" // gehört zu Europa, deshalb Frankreich einfach vergeben } var continentsStats = {}; countryJs.continents().forEach(function (continent, index) { continentsStats[continent.replace(" ", "_")] = { cases: 0, critical: 0, deaths: 0, recovered: 0, todayCases: 0, todayDeaths: 0, } }); continentsStats['America'] = { cases: 0, critical: 0, deaths: 0, recovered: 0, todayCases: 0, todayDeaths: 0, }; continentsStats['World'] = { critical: 0, todayCases: 0, todayDeaths: 0, }; for (var i = 0; i <= allCountries.length - 1; i++) { let idCases = allCountries[i]; let idCritical = idCases.replace('.cases', '.critical'); let idDeaths = idCases.replace('.cases', '.deaths'); let idRecovered = idCases.replace('.cases', '.recovered'); let idTodayCases = idCases.replace('.cases', '.todayCases'); let idTodayDeaths = idCases.replace('.cases', '.todayDeaths'); let countryName = idCases.split('.')[2]; let country = countryJs.findByName(countryName.replace(/_/g, ' ').replace('é', 'e').replace('ç', 'c')); if (country) { calcStats(country); } else { country = countryJs.findByName(countryTranslator[countryName]); if (country) { calcStats(country); } else { if (countryName !== 'global_totals' && countryName !== 'Diamond_Princess') { console.warn(`${countryName} nicht in gefunden. Korrekter Name muss im skript manuell hinzugefügt werden!`); } } } function calcStats(country) { if (country.continent) { let continent = country.continent.replace(" ", "_"); continentsStats[continent].cases = continentsStats[continent].cases + getState(idCases).val; continentsStats[continent].critical = continentsStats[continent].critical + getState(idCritical).val; continentsStats[continent].deaths = continentsStats[continent].deaths + getState(idDeaths).val; continentsStats[continent].recovered = continentsStats[continent].recovered + getState(idRecovered).val; continentsStats[continent].todayCases = continentsStats[continent].todayCases + getState(idTodayCases).val; continentsStats[continent].todayDeaths = continentsStats[continent].todayDeaths + getState(idTodayDeaths).val; if (country.continent === 'South America' || country.continent === 'North America') { continentsStats['America'].cases = continentsStats['America'].cases + getState(idCases).val; continentsStats['America'].critical = continentsStats['America'].critical + getState(idCritical).val; continentsStats['America'].deaths = continentsStats['America'].deaths + getState(idDeaths).val; continentsStats['America'].recovered = continentsStats['America'].recovered + getState(idRecovered).val; continentsStats['America'].todayCases = continentsStats['America'].todayCases + getState(idTodayCases).val; continentsStats['America'].todayDeaths = continentsStats['America'].todayDeaths + getState(idTodayDeaths).val; } continentsStats['World'].critical = continentsStats['World'].critical + getState(idCritical).val; continentsStats['World'].todayCases = continentsStats['World'].todayCases + getState(idTodayCases).val; continentsStats['World'].todayDeaths = continentsStats['World'].todayDeaths + getState(idTodayDeaths).val; } else { console.warn(`Für ${countryName} existiert kein Kontinent!`); } } } for (var continent in continentsStats) { for (var prop in continentsStats[continent]) { let dpId = `corona.continents.${continent}.${prop}` if (existsState(dpId)) { setState(dpId, continentsStats[continent][prop], true); } else { createState(dpId, continentsStats[continent][prop], { name: `${continent} ${prop}`, read: true, write: false, desc: `${continent} ${prop}`, type: "number", def: 0, }); } } } }, 30000); } // Bei JS Start ausführen statsForContinents(); -
@Uli977 sagte in Test Coronavirus Statistics for ioBroker:
@sigi234 kannst du das exportieren?
-
was ist mir hier passiert...

warum fehlen die daten der länderHabe das View auch nochmal neu importiert... trotzdem so....
-
@Uli977
API liefert aktuell keine Daten https://coronavirus-19-api.herokuapp.com/countries@Scrounger Ah ok... also nicht mein Fehler..
-
@Uli977 sagte in Test Coronavirus Statistics for ioBroker:
@sigi234 wieso habe ich keine Icons?
Musst du @stimezo fragen, vielleicht stellt er sie Online.
-
@Uli977
API liefert aktuell keine Daten https://coronavirus-19-api.herokuapp.com/countries@Scrounger Jetzt haben sich gerade die Anzahl der Fälle in Deutschland halbiert.... sehr merkwürdig alles
-
Laut Livestream sind die 14.000 schon erreicht
-
@Scrounger kannst du mir (uns allen) die Icons zur Verfügung stellen?
-
@Scrounger kannst du mir (uns allen) die Icons zur Verfügung stellen?
Das geht leider nicht ganz so einfach, weil das eine Schriftart ist, die im Material Design Widgets Adapter implementiert ist. Am einfachsten ist es die Widgets von meinem Adapter zu nutzen.
Alterntiv könnt ihr Euch die icons auf https://materialdesignicons.com/ heraussuchen und herunterladen.

Namen der verwendeten icons von links nach rechts:
- biohazard
- heart-pulse
- seat-flat
- grave-stone
- hospital-box
- skull-crossbones
-
@Scrounger kannst du mir (uns allen) die Icons zur Verfügung stellen?
@norman1991 sagte in Test Coronavirus Statistics for ioBroker:
@Scrounger kannst du mir (uns allen) die Icons zur Verfügung stellen?

-
Moin, ich hab leider das Problem das ich mit dem ipad2 leider keine Schrift oder Symbole angezeigt bekomme.
Auf meinem MediaTab T3 klappt es ohne Probleme. Ich lasse mir die Vis via iqontrol per Safari anzeigen.
Gibts da evtl noch jemanden der n ipad2 nutzt und es gegen testen könnte?
Oder evtl eine kleine Anpassung damit auch ein altes ipad es anzeigen kann?
-
Aktuelle Test Version 0.6.9 Veröffentlichungsdatum 22-03-2021 Github Link https://github.com/iobroker-community-adapters/ioBroker.coronavirus-statistics/blob/master/README.md NPM npm i ioBroker.coronavirus-statistics@latestAdapter to show Global Corona Virus information and current reports
Coronavirus Live Statistics adapter for ioBroker
Adapter to show Global Corona Virus information and current reports
There is no configuration required, after installation it will :
- Receive global information world-wide and write it to "global_totals"
- Create a folder for each country with all relevant information regarding COVID-19
- Update the information every 15 minutes
The following information is available :
Datapoint Details active Amount of current infected people cases Amount of totally known cases casesPerOneMillion Amount of totally known cases per million citizen critical Amount of critical situation (Hospitalized) deaths Amount of current registered deaths deathsPerOneMillion Amount of current registered deaths per million citizen recovered Amount of totally known recovered cases todayCases New Cases by Today todayDeaths Amount of totally known people died today test Total number of covid-19 tests taken globally tests per one million counties Total number of covid-19 tests taken globally per one million Please be aware this adapter uses as much as possible up-to-date information but there can be an delay of several hours depending on the country's report.
German Federal States : https://npgeo-corona-npgeo-de.hub.arcgis.com/ s
Generic Source : https://coronavirus-19-api.herokuapp.comAdvanced settings
Option Description All Countries Get data for all countries World-Wide (Default: false) Continents Group total amounts by continent in seperate state (Default: false) Delete unused States Delete data when countries are deselected (Default: false) German counties Get counties data for Germany (Selected only, Default false) German federal states Get federal state data for Germany (Selected only, Default false) Get all German federal states Get federal state data for Germany (Default false) Get all German counties Get all counties data for Germany (Default false) For Germany only
It's possible to get data for federal states (Bundesländer) and counties (Landeskreise).
You can choose to recieve all data or just select specific regions in advanced settings.Please note : After activation the the adapter must run 1 time to get all federal states and counties before table loads !
Add missing countries
It may happen that countries are not recognized correctly because the API delivers some country names not ISO conform. In such a case you will get a warning message in the log, which looks like this
coronavirus-statistics.0 2020-03-21 09:05:31.328 warn (22937) Timor-Leste not found in lib! Must be added to the country name translator.Using the datapoint
coronavirus-statistics.0.countryTranslatoryou can assign a country yourself. Look for the name of the corresponding country here:With the selected country name you have to create a JSON string and enter it in the datapoint
coronavirus-statistics.0.countryTranslator.
The JSON string then looks like this, for example:{ "Cabo_Verde": "Cape Verde", "Timor-Leste": "East Timor" }As first value the name from the warning message must be taken from the log. The name of the country from the List with country names is then assigned to this.
Changelog
https://github.com/iobroker-community-adapters/ioBroker.coronavirus-statistics/blob/master/README.md
@Dutchman
Seit heute morgen diese Warnung:coronavirus-statistics.0 2020-03-19 07:30:47.800 warn (31245) State attribute definition missing for + casesPerOneMillion coronavirus-statistics.0 2020-03-19 07:30:47.677 warn (31245) State attribute definition missing for + casesPerOneMillion coronavirus-statistics.0 2020-03-19 07:30:47.543 warn (31245) State attribute definition missing for + casesPerOneMillion coronavirus-statistics.0 2020-03-19 07:30:47.362 warn (31245) State attribute definition missing for + casesPerOneMillion coronavirus-statistics.0 2020-03-19 07:30:47.102 warn (31245) State attribute definition missing for + casesPerOneMillion coronavirus-statistics.0 2020-03-19 07:30:46.955 warn (31245) State attribute definition missing for + casesPerOneMillion -
Das geht leider nicht ganz so einfach, weil das eine Schriftart ist, die im Material Design Widgets Adapter implementiert ist. Am einfachsten ist es die Widgets von meinem Adapter zu nutzen.
Alterntiv könnt ihr Euch die icons auf https://materialdesignicons.com/ heraussuchen und herunterladen.

Namen der verwendeten icons von links nach rechts:
- biohazard
- heart-pulse
- seat-flat
- grave-stone
- hospital-box
- skull-crossbones
-
Wie formatiere ich denn denn DP, wann das letzte mal die Daten aktualisiert wurden. Da kommt bei mir ein Linux Zahlenwert. Also der unter „Global“
@dos1973 sagte in Test Coronavirus Statistics for ioBroker:
Wie formatiere ich denn denn DP, wann das letzte mal die Daten aktualisiert wurden. Da kommt bei mir ein Linux Zahlenwert. Also der unter „Global“
Nimm das Widget Timestamp
-
@dos1973 sagte in Test Coronavirus Statistics for ioBroker:
Wie formatiere ich denn denn DP, wann das letzte mal die Daten aktualisiert wurden. Da kommt bei mir ein Linux Zahlenwert. Also der unter „Global“
Nimm das Widget Timestamp
-
@Dutchman
Seit heute morgen diese Warnung:coronavirus-statistics.0 2020-03-19 07:30:47.800 warn (31245) State attribute definition missing for + casesPerOneMillion coronavirus-statistics.0 2020-03-19 07:30:47.677 warn (31245) State attribute definition missing for + casesPerOneMillion coronavirus-statistics.0 2020-03-19 07:30:47.543 warn (31245) State attribute definition missing for + casesPerOneMillion coronavirus-statistics.0 2020-03-19 07:30:47.362 warn (31245) State attribute definition missing for + casesPerOneMillion coronavirus-statistics.0 2020-03-19 07:30:47.102 warn (31245) State attribute definition missing for + casesPerOneMillion coronavirus-statistics.0 2020-03-19 07:30:46.955 warn (31245) State attribute definition missing for + casesPerOneMillion@Chaot sagte in Test Coronavirus Statistics for ioBroker:
@Dutchman
Seit heute morgen diese Warnung:coronavirus-statistics.0 2020-03-19 07:30:47.800 warn (31245) State attribute definition missing for + casesPerOneMillion coronavirus-statistics.0 2020-03-19 07:30:47.677 warn (31245) State attribute definition missing for + casesPerOneMillion coronavirus-statistics.0 2020-03-19 07:30:47.543 warn (31245) State attribute definition missing for + casesPerOneMillion coronavirus-statistics.0 2020-03-19 07:30:47.362 warn (31245) State attribute definition missing for + casesPerOneMillion coronavirus-statistics.0 2020-03-19 07:30:47.102 warn (31245) State attribute definition missing for + casesPerOneMillion coronavirus-statistics.0 2020-03-19 07:30:46.955 warn (31245) State attribute definition missing for + casesPerOneMillionKann ich bestätigen, ist bei mir seit heute auch so.
-
@Dutchman
Seit heute morgen diese Warnung:coronavirus-statistics.0 2020-03-19 07:30:47.800 warn (31245) State attribute definition missing for + casesPerOneMillion coronavirus-statistics.0 2020-03-19 07:30:47.677 warn (31245) State attribute definition missing for + casesPerOneMillion coronavirus-statistics.0 2020-03-19 07:30:47.543 warn (31245) State attribute definition missing for + casesPerOneMillion coronavirus-statistics.0 2020-03-19 07:30:47.362 warn (31245) State attribute definition missing for + casesPerOneMillion coronavirus-statistics.0 2020-03-19 07:30:47.102 warn (31245) State attribute definition missing for + casesPerOneMillion coronavirus-statistics.0 2020-03-19 07:30:46.955 warn (31245) State attribute definition missing for + casesPerOneMillion@Chaot sagte in Test Coronavirus Statistics for ioBroker:
@Dutchman
Seit heute morgen diese Warnung:coronavirus-statistics.0 2020-03-19 07:30:47.800 warn (31245) State attribute definition missing for + casesPerOneMillionBei mir auch