Coronavirus Covid-19 statistics to Domoticz custom sensor using Node Red

Client tools or tools that can connect with Domoticz. Tools for Windows, iOS, Android, Linux etc.

Moderator: leecollings

freijn
Posts: 536
Joined: Friday 23 December 2016 16:40
Target OS: Raspberry Pi / ODroid
Domoticz version: Stable
Location: Netherlands Purmerend
Contact:

Re: Coronavirus Covid-19 statistics to Domoticz custom sensor using Node Red

Post by freijn »

THanks Mr. Fire

I like to stay on the previous one as it does give me graph's where I ( hopefully soon ) can see the line going down again.
With the text sensor there is no graph. But still MANY THANKS for the work !

b.t.w. I made it running every 15 min so my sensors do not go red...
User avatar
FireWizard
Posts: 1904
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: Coronavirus Covid-19 statistics to Domoticz custom sensor using Node Red

Post by FireWizard »

Hi,

@freijn,

As said, I made it quick, as you reported that the site was not working anymore.
Yes, and I put it in a simple text file, but you can easily combine the two solutions, if you want.

You wrote:
b.t.w. I made it running every 15 min so my sensors do not go red...
You can change that. See: Setup > Settings > Other > Sensor Timeout

Regards
xury
Posts: 48
Joined: Monday 10 December 2018 23:32
Target OS: Linux
Domoticz version:
Location: Poland
Contact:

Re: Coronavirus Covid-19 statistics to Domoticz custom sensor using Node Red

Post by xury »

freijn wrote: Friday 27 March 2020 22:02 I assume the site has changed again.. its not working anymore


27-3-2020 22:01:23node: parsefunction : (error)
"TypeError: Cannot read property 'replace' of undefined"
I think the webdeveloper does not want to read data from his site and maliciously changes the code. I suspect he was looking for references to https://www.worldometers.info/coronavirus/ and found this topic.
So I could maliciously improve the flow every time, but it doesn't make sense. There are alternative ways to obtain data as above.
User avatar
FireWizard
Posts: 1904
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: Coronavirus Covid-19 statistics to Domoticz custom sensor using Node Red

Post by FireWizard »

@xury

Your solution gave more info, which is not available at the URL I use.
If you want that extra information, you may use the following URL and collect the required JSON data.
https://coronavirus-19-api.herokuapp.co ... etherlands

Insert your own country at the end.

Regards
xury
Posts: 48
Joined: Monday 10 December 2018 23:32
Target OS: Linux
Domoticz version:
Location: Poland
Contact:

Re: Coronavirus Covid-19 statistics to Domoticz custom sensor using Node Red

Post by xury »

Thank you @FireWizard. I still scraping from this site, but not release a upgraded flow on public.
In comparison both sources showing the same data for my country.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest