Read the statement by Michael Teeuw here.
MMM-COVID19
-
Nice job! Looking good and thank you for the additions.
To add to that ordering of countries by name… allowing the ‘countries’ list to set the order. It looks like ‘orderCountriesbyName’ alphabetizes them, but I wasn’t able to figure out how to have them list in any other way.
Great job getting this going so quickly and appreciate it. Always like to have current information showing.
My Sample Code:
{ module: 'MMM-COVID19', position: 'top_left', config: { updateInterval: 300000, orderCountriesByName: true, worldStats: true, countries: [ "Canada", "Italy", "USA", "Mexico" ], headerRowClass: "medium", infoRowClass: "small", rapidapiKey : “xxxxxxxxxxx ADD YOUR OWN API KEY xxxxxxxxx” \ } },
-
I have no output in my MagicMirror and no error in log file. I tried a curl and the output it’s ok.
curl -H "x-rapidapi-host: coronavirus-monitor.p.rapidapi.com" -H "x-rapidapi-key: mykey" 'https://coronavirus-monitor.p.rapidapi.com/coronavirus/cases_by_country.php'
This is my config:
{ module: 'MMM-COVID19', config: { position: 'top_center', updateInterval: 300000, worldStats: true, countries: [ "Italy" ], headerRowClass: "small", rapidapiKey : "my api key" } },
Any suggestion ?
-
@fireport
i suggest you, in the config, to put the " position" before “config”{ module: "MMM-COVID19", position: "top_center", config: { updateInterval: 300000, worldStats: true, countries: [ "France", "China", "Italy", "Spain" ], headerRowClass: "small", rapidapiKey : "xxxxxxxxxxxxxxxxxx" } },
-
@almostgithub
First you need to add the module “twice” into your config: MagicMirrorFolder/config/config.jsmodules: [ { module: 'MMM-COVID19' }, etc ...
afterwards you need to enter your preferred settings & variables
{ module: 'MMM-COVID19', position: "bottom_bar", config: { header: "COVID-19 Stats", worldStats: true, rapidapiKey: "yourverylongapikey", orderCountriesByName: "false", countries: [ "Austria", "Germany", "Italy" ], updateInterval: 10000000, lastUpdateInfo: "true", headerRowClass: "small", infoRowClass: "medium", } },
Let me know if this solves your problem
-
@totof60 Thank you. Now it works.
-
@fireport :winking_face:
-
@bibaldo checked all that, was all working fine. Ended up rebooting my PI and it came up flawlessly!
Thank you
-
Hello,
First of all thanks for the exact status.
How can I rename “Confirmed, Deaths, …”, since older people live in the house and only speak your mother tongue?
This is not meant to be evil or racist.
So, once again, our heartfelt thanks to the Forum. -
This is awesome! Anyway to add individual States in the United States? For instance California, Michigan, New York?
-
@Lordy Hello, you can change this in the MMM-COVID19.js (you find it in /MagicMirror/modules/MMM-COVID19) .
....... headerconfirmedCell.innerHTML = 'Confirmed' ..... headerNewConfirmedCell.innerHTML = 'New Cases' ..... headerdeathsCell.innerHTML = 'Deaths' ...... headerNewDeathsCell.innerHTML = 'New Deaths' ...... header.recoveredCell.innerHTML = 'Recovered' ...... headeractiveCell.innerHTML = 'Active' ....
Just type in the “” the text you would like to see on the module.
i have translated it into german
headerCountryNameCell.innerHTML = '' headerconfirmedCell.className = 'number confirmed ' + this.config.headerRowClass headerconfirmedCell.innerHTML = 'Bestätigt' headerNewConfirmedCell.className = 'number confirmed ' + this.config.headerRowClass headerNewConfirmedCell.innerHTML = 'Neue Fälle' headerdeathsCell.className = 'number deaths ' + this.config.headerRowClass headerdeathsCell.innerHTML = 'Tote' headerNewDeathsCell.className = 'number deaths ' + this.config.headerRowClass headerNewDeathsCell.innerHTML = 'Neue Tote' headerrecoveredCell.className = 'number recovered ' + this.config.headerRowClass headerrecoveredCell.innerHTML = 'Erholt' headeractiveCell.className = 'number active ' + this.config.headerRowClass headeractiveCell.innerHTML = 'Aktiv'
Just replace the part.
Ersetze einfach die Stelle