Page 2 of 2
Re: Coronavirus Covid-19 statistics to Domoticz custom sensor using Node Red
Posted: Saturday 28 March 2020 16:38
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...
Re: Coronavirus Covid-19 statistics to Domoticz custom sensor using Node Red
Posted: Saturday 28 March 2020 16:52
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
Re: Coronavirus Covid-19 statistics to Domoticz custom sensor using Node Red
Posted: Saturday 28 March 2020 22:41
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.
Re: Coronavirus Covid-19 statistics to Domoticz custom sensor using Node Red
Posted: Sunday 29 March 2020 15:14
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
Re: Coronavirus Covid-19 statistics to Domoticz custom sensor using Node Red
Posted: Sunday 29 March 2020 18:34
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.