Covid19 threat indicator

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

Moderator: leecollings

Toulon7559
Posts: 843
Joined: Sunday 23 February 2014 17:56
Target OS: Raspberry Pi / ODroid
Domoticz version: mixed
Location: Hengelo(Ov)/NL
Contact:

Covid19 threat indicator

Post by Toulon7559 »

In a preview of a (dutch) statistical study they propose a kind of 'covid19 threat calculator' as element on a website:
see https://covid-19calculator.com/nl/ and https://covid-19calculator.com/en/
Based on calculation of absolute humidity this calculator provides a risc-level indication for the spread of the covid19-virus.
Now a semi-static calculator based on manual input of relative humidity and temperature, in 2 language versions (dutch & english).

After some short testing it seems that the example scriptlines need expansion to enable generation of results when embedded in a webpage.
Which of the clever programmers on this forum (as a next step) can turn the example scriptlines into a really online calculator?
First approach = link the calculator to devices in Domoticz giving temperature and relative humidity aiming at automatic feed of the calculator related to your local sensors
Second/Subsequent approach = translation of the indicator output into 'numeric & colorband' data enabling control of a related virtual device in Domoticz.

Disclaimer is deemed prudent & required:
this calculator (with implicit permission) has been borrowed from an upcoming statistical study.
No information is available about the selection of the indicated threat levels.
Considering the stage of the study and the nature of the corona-crisis,
an indication from this calculator at best is informative only and should never be applied for any decisions.
Last edited by Toulon7559 on Sunday 19 April 2020 12:44, edited 6 times in total.
Set1 = RPI-Zero+RFXCom433+S0PCM+Shield for BMP180/DS18B20/RS485+DDS238-1ZNs
Set2 = RPI-3A++RFLinkGTW+ESP8266s+PWS_WS7000
Common = KAKUs+3*PVLogger+PWS_TFA_Nexus
plus series of 'satellites' for dedicated interfacing, monitoring & control.
HFman
Posts: 82
Joined: Thursday 02 March 2017 20:28
Target OS: Linux
Domoticz version: V4.1174
Location: Netherlands
Contact:

Re: Covid19 threat indicator

Post by HFman »

Mm intresting .. no time yet, Nice one for dzvents or python .. let see if we can find some refernce scripts
Raspberry PI 3 - Opentherm Gateway + ESP8826 - EvoHome - ESPEasy CO2 + Fancontrol - RF-Link - zigbee2mqqt -
freijn
Posts: 536
Joined: Friday 23 December 2016 16:40
Target OS: Raspberry Pi / ODroid
Domoticz version: Stable
Location: Netherlands Purmerend
Contact:

Re: Covid19 threat indicator

Post by freijn »

I can't find the formula used.
Have I overlooked something?

Reading the js script there is a lot of Facebook shit in there...
Toulon7559
Posts: 843
Joined: Sunday 23 February 2014 17:56
Target OS: Raspberry Pi / ODroid
Domoticz version: mixed
Location: Hengelo(Ov)/NL
Contact:

Re: Covid19 threat indicator

Post by Toulon7559 »

@freijn

'No formula visible, nor explained' is exactly the reason that I set the disclaimer:
not the faintest idea how they come to their conclusions.
Has significant inherent risc, because they might be good statistians, but definitely not meteo-specialists, nor medical experts.
With reverse engineering the conclusion is that for the colourbands they have applied a link to certain levels of MixingRatio.

Considering the kind of organisation, Maurice de Hond probably has well hidden the access to the source-data & formula.

Addition June, 5th:
Without any change to the related text, the colorbands of the calculator have been changed:
perhaps 'due to development', but 'no explanation' is not a sign of stability/reliability .........
Last edited by Toulon7559 on Tuesday 07 July 2020 10:45, edited 4 times in total.
Set1 = RPI-Zero+RFXCom433+S0PCM+Shield for BMP180/DS18B20/RS485+DDS238-1ZNs
Set2 = RPI-3A++RFLinkGTW+ESP8266s+PWS_WS7000
Common = KAKUs+3*PVLogger+PWS_TFA_Nexus
plus series of 'satellites' for dedicated interfacing, monitoring & control.
freijn
Posts: 536
Joined: Friday 23 December 2016 16:40
Target OS: Raspberry Pi / ODroid
Domoticz version: Stable
Location: Netherlands Purmerend
Contact:

Re: Covid19 threat indicator

Post by freijn »

Anybody worked already on the new durch dashboard???
elmortero
Posts: 247
Joined: Sunday 29 November 2015 20:46
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.9639
Location: Spain
Contact:

Re: Covid19 threat indicator

Post by elmortero »

Please be aware that the domain covid-19calculator.com has been blacklisted by various security websites, among them us-cert.cov, managedsentinel.com
EddyG
Posts: 1042
Joined: Monday 02 November 2015 5:54
Target OS: -
Domoticz version:

Re: Covid19 threat indicator

Post by EddyG »

Sorry, but this quote on the website says enough.

Code: Select all

Please appreciate that the article is based on hypotheses
freijn
Posts: 536
Joined: Friday 23 December 2016 16:40
Target OS: Raspberry Pi / ODroid
Domoticz version: Stable
Location: Netherlands Purmerend
Contact:

Re: Covid19 threat indicator

Post by freijn »

freijn wrote: Friday 05 June 2020 13:32 Anybody worked already on the new durch dashboard???
Sorry for my typo's

Was refering to this:

https://coronadashboard.rijksoverheid.nl/
User avatar
FireWizard
Posts: 1745
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: Covid19 threat indicator

Post by FireWizard »

Hi,

If someone likes to implement some data from the new Dutch Dashboard in his/her application, see:
https://coronadashboard.rijksoverheid.nl/json/NL.json

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

Re: Covid19 threat indicator

Post by freijn »

And here is the Node Red flow to get the NL Covid data.

Code: Select all

[{"id":"63188193.62ff48","type":"tab","label":"Covid19_NL","disabled":false,"info":""},{"id":"d6ecff61.4213d","type":"inject","z":"63188193.62ff48","name":"Refresh timer","topic":"","payload":"","payloadType":"date","repeat":"900","crontab":"","once":false,"onceDelay":0.1,"x":180,"y":160,"wires":[["bf4840d1.a55768"]]},{"id":"bf4840d1.a55768","type":"http request","z":"63188193.62ff48","name":"","method":"GET","ret":"txt","paytoqs":false,"url":"https://coronadashboard.rijksoverheid.nl/json/NL.json","tls":"","persist":false,"proxy":"","authType":"","x":170,"y":240,"wires":[["b77f63bd.8951e8"]]},{"id":"b77f63bd.8951e8","type":"json","z":"63188193.62ff48","name":"","property":"payload","action":"","pretty":false,"x":150,"y":300,"wires":[["9e2e88f2.dcac3","24738a63.b06e16"]]},{"id":"9e2e88f2.dcac3","type":"function","z":"63188193.62ff48","name":"Split to interesting Covid-19 data","func":"var msg1 ={};\nvar msg2 ={};\nvar msg3 ={};\nvar msg4 ={};\nmsg1.payload = {\"command\":\"udevice\",\"idx\":2414,\"nvalue\":0,\"svalue\":msg.payload.intake_intensivecare_ma.value.toString()};\nmsg2.payload = {\"command\":\"udevice\",\"idx\":2415,\"nvalue\":0,\"svalue\":msg.payload.intake_hospital_ma.value.toString()};\nmsg3.payload = {\"command\":\"udevice\",\"idx\":2416,\"nvalue\":0,\"svalue\":msg.payload.infected_people_total.value.toString()};\nmsg4.payload = {\"command\":\"udevice\",\"idx\":2417,\"nvalue\":0,\"svalue\":msg.payload.reproduction_index.value.toString()};\nreturn [[msg1,msg2,msg3,msg4]]","outputs":1,"noerr":0,"x":240,"y":360,"wires":[["abece6f0.b6da1","c96f43e1.b60c3"]]},{"id":"c96f43e1.b60c3","type":"mqtt out","z":"63188193.62ff48","name":"","topic":"domoticz/in","qos":"2","retain":"false","broker":"bd507d3a.85126","x":570,"y":360,"wires":[]},{"id":"abece6f0.b6da1","type":"debug","z":"63188193.62ff48","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":570,"y":280,"wires":[]},{"id":"24738a63.b06e16","type":"debug","z":"63188193.62ff48","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":570,"y":220,"wires":[]},{"id":"4c1521d0.c0fb2","type":"comment","z":"63188193.62ff48","name":"Please open me for Sensor text information","info":"msg1 = Intensive care-opnames per dag\nAantal opnames per dag, gemiddeld over de afgelopen 3 dage\n\nmsg2 = Ziekenhuisopnames per dag\nAantal opnames per dag, gemiddeld over de afgelopen 3 dagen.\n\nmsg3 = Total infected People\n\nmsg4 = Reproductiegetal\nAantal mensen dat besmet wordt door één besmettelijke persoon.","x":270,"y":400,"wires":[]},{"id":"bd507d3a.85126","type":"mqtt-broker","z":"","broker":"localhost","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","willTopic":"","willQos":"0","willPayload":""}]
akamming
Posts: 338
Joined: Friday 17 August 2018 14:03
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Covid19 threat indicator

Post by akamming »

i managed to the the data into domoticz by creating a small python script/plugin : https://github.com/akamming/domoticz-coronadashboard

it is very basic, so feel free to improve …..
freijn
Posts: 536
Joined: Friday 23 December 2016 16:40
Target OS: Raspberry Pi / ODroid
Domoticz version: Stable
Location: Netherlands Purmerend
Contact:

Re: Covid19 threat indicator

Post by freijn »

akamming wrote: Sunday 07 June 2020 8:58 i managed to the the data into domoticz by creating a small python script/plugin : https://github.com/akamming/domoticz-coronadashboard

it is very basic, so feel free to improve …..
What I like on your solution is the auto creation of sensors :-)
HomeSimpson
Posts: 1
Joined: Sunday 07 June 2020 15:18
Target OS: Linux
Domoticz version:
Contact:

Re: Covid19 threat indicator

Post by HomeSimpson »

Seeing the name of Maurice de Hond says it all... Maybe the forum admin can label this threat as untrustworthy since this can be an health issue if people trust the data.
akamming
Posts: 338
Joined: Friday 17 August 2018 14:03
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Covid19 threat indicator

Post by akamming »

HomeSimpson wrote: Sunday 07 June 2020 15:30 Seeing the name of Maurice de Hond says it all... Maybe the forum admin can label this threat as untrustworthy since this can be an health issue if people trust the data.
covid19-calculator.com might be untrustworthy, but this thread is now also on the coronadashboard from rijksoverheid which (i hope ;-)) is trustworthy
akamming
Posts: 338
Joined: Friday 17 August 2018 14:03
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Covid19 threat indicator

Post by akamming »

FireWizard wrote: Friday 05 June 2020 22:09 Hi,

If someone likes to implement some data from the new Dutch Dashboard in his/her application, see:
https://coronadashboard.rijksoverheid.nl/json/NL.json

Regards
i used this in the plugin i mentioned in this thread. I just found out the local region data can also be accessed. If you monitor network activity in chrome (ctrl-shift-i) you can find the underlying URL's. This way i found out that the url https://coronadashboard.rijksoverheid.nl/json/VRxx.json retrieves this data. you have to replace the xx with the actual region code. You can find this region code when you access the dashboard the normal way.

e.g. if you browse to the regional data of Groningen, the url which shows Groningen is https://coronadashboard.rijksoverheid.n ... regio=VR01. The last 2 numbers (01) tell the region code, so this way you can construct the url for the groningen region data in json format: https://coronadashboard.rijksoverheid.nl/json/VR01.json

would be nice if someone can find out the full table with the relation between region and the id
User avatar
FireWizard
Posts: 1745
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: Covid19 threat indicator

Post by FireWizard »

Hi,

Finding the full table for the "Veiligheids Regio" (Safety Region), is not so difficult.
It is on Wikipedia. See: https://nl.m.wikipedia.org/wiki/Veiligheidsregio.

Regards
akamming
Posts: 338
Joined: Friday 17 August 2018 14:03
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Covid19 threat indicator

Post by akamming »

FireWizard wrote: Sunday 07 June 2020 18:04 Hi,

Finding the full table for the "Veiligheids Regio" (Safety Region), is not so difficult.
It is on Wikipedia. See: https://nl.m.wikipedia.org/wiki/Veiligheidsregio.

Regards
tx.. when i have time i'll update the plugin, to specify the regions you want to see as well... (referring to this page for the numbers)

UPDATE: I just updated my plugin (https://github.com/akamming/domoticz-coronadashboard) so it now also converts the Safety Region counters at the dashboard to domoticz sensors, which is quite interesting, cause this is quite local data

I made this just for my programming experience (learning python) and i think it is good to maintain awareness for how things are progressing on the corona front, and having these sensors in a home dashboard can contribute to that… but I would be interested if people could share their use cases on how they use these sensors here...
freijn
Posts: 536
Joined: Friday 23 December 2016 16:40
Target OS: Raspberry Pi / ODroid
Domoticz version: Stable
Location: Netherlands Purmerend
Contact:

Re: Covid19 threat indicator

Post by freijn »

A new working NL code

Code: Select all

[{"id":"63188193.62ff48","type":"tab","label":"Covid19_NL","disabled":false,"info":""},{"id":"d6ecff61.4213d","type":"inject","z":"63188193.62ff48","name":"Refresh timer","topic":"","payload":"","payloadType":"date","repeat":"900","crontab":"","once":false,"onceDelay":0.1,"x":180,"y":160,"wires":[["bf4840d1.a55768"]]},{"id":"bf4840d1.a55768","type":"http request","z":"63188193.62ff48","name":"","method":"GET","ret":"txt","paytoqs":false,"url":"https://coronadashboard.rijksoverheid.nl/json/NL.json","tls":"","persist":false,"proxy":"","authType":"","x":170,"y":240,"wires":[["b77f63bd.8951e8"]]},{"id":"b77f63bd.8951e8","type":"json","z":"63188193.62ff48","name":"","property":"payload","action":"","pretty":true,"x":150,"y":300,"wires":[["9e2e88f2.dcac3"]]},{"id":"9e2e88f2.dcac3","type":"function","z":"63188193.62ff48","name":"Split to interesting Covid-19 data","func":"var msg1 ={};\nvar msg2 ={};\nvar msg3 ={};\nvar msg4 ={};\nmsg1.payload = {\"command\":\"udevice\",\"idx\":2426,\"nvalue\":0,\"svalue\":msg.payload.intake_intensivecare_ma.last_value.moving_average_ic.toString()};\nmsg2.payload = {\"command\":\"udevice\",\"idx\":2427,\"nvalue\":0,\"svalue\":msg.payload.intake_hospital_ma.last_value.moving_average_hospital.toString()};\nmsg3.payload = {\"command\":\"udevice\",\"idx\":2428,\"nvalue\":0,\"svalue\":msg.payload.infected_people_total.last_value.infected_daily_total.toString()};\nmsg4.payload = {\"command\":\"udevice\",\"idx\":2429,\"nvalue\":0,\"svalue\":msg.payload.reproduction_index_last_known_average.last_value.reproduction_index_avg.toString()};\nreturn [[msg1,msg2,msg3,msg4]]","outputs":1,"noerr":0,"x":240,"y":360,"wires":[["c96f43e1.b60c3","40e622bd.3d54bc"]]},{"id":"c96f43e1.b60c3","type":"mqtt out","z":"63188193.62ff48","name":"","topic":"domoticz/in","qos":"2","retain":"false","broker":"bd507d3a.85126","x":570,"y":360,"wires":[]},{"id":"4c1521d0.c0fb2","type":"comment","z":"63188193.62ff48","name":"Please open me for Sensor text information","info":"msg1 = Intensive care-opnames per dag\nAantal opnames per dag, gemiddeld over de afgelopen 3 dage\n\nmsg2 = Ziekenhuisopnames per dag\nAantal opnames per dag, gemiddeld over de afgelopen 3 dagen.\n\nmsg3 = Total infected People\n\nmsg4 = Reproductiegetal\nAantal mensen dat besmet wordt door één besmettelijke persoon.","x":270,"y":400,"wires":[]},{"id":"40e622bd.3d54bc","type":"debug","z":"63188193.62ff48","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":540,"y":260,"wires":[]},{"id":"bd507d3a.85126","type":"mqtt-broker","z":"","broker":"localhost","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","willTopic":"","willQos":"0","willPayload":""}]
Alain
Posts: 164
Joined: Sunday 26 April 2020 5:27
Target OS: Linux
Domoticz version: 2022.1
Location: Netherlands
Contact:

Re: Covid19 threat indicator

Post by Alain »

Both the discussed flows give you text values in your dummy devices. That means you can't generate graphs. How would you go about getting the values as integers in a "custom sensor" dummy device?
Hue | Zigbee2Mqtt | MQTT | P1 | Xiaomi | RFXCom | Modbus | Qlima | Solaredge
TP-Link | Plugwise | Thermosmart | Node-Red | Grafana | Master and 5 remote servers
freijn
Posts: 536
Joined: Friday 23 December 2016 16:40
Target OS: Raspberry Pi / ODroid
Domoticz version: Stable
Location: Netherlands Purmerend
Contact:

Re: Covid19 threat indicator

Post by freijn »

I am using "general custom sensor"

This is the output
Capture.JPG
Capture.JPG (85.4 KiB) Viewed 1931 times
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest