I created a Node-Red flow (based on someone else's for Rijksoverheid) to get JSON data off the Stichting NICE website that shows you the actual count of people in the IC's and the clinics. All data is for Netherlands.
Code: Select all
[{"id":"c6989b70.c480a","type":"tab","label":"Covid19_NL","disabled":false,"info":""},{"id":"aa05a70.10f70d8","type":"inject","z":"c6989b70.c480a","name":"Refresh timer","props":[{"p":"payload","v":"","vt":"date"},{"p":"topic","v":"","vt":"string"}],"repeat":"900","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":120,"y":260,"wires":[["fc7188f1.e9e2e","d7ecdabe.163e6","c4217a06.e1d4a"]]},{"id":"fc7188f1.e9e2e","type":"http request","z":"c6989b70.c480a","name":"","method":"GET","ret":"txt","paytoqs":"ignore","url":"https://coronadashboard.rijksoverheid.nl/json/NL.json","tls":"","persist":false,"proxy":"","authType":"","x":370,"y":460,"wires":[["b7c21c37.e370f8"]]},{"id":"b7c21c37.e370f8","type":"json","z":"c6989b70.c480a","name":"","property":"payload","action":"","pretty":true,"x":570,"y":460,"wires":[["543ea8ac.45b9c8"]]},{"id":"543ea8ac.45b9c8","type":"function","z":"c6989b70.c480a","name":"Split to interesting Covid-19 data","func":"var msg1 ={};\nvar msg2 ={};\nvar msg3 ={};\nvar msg4 ={};\nmsg1.payload = {\"command\":\"udevice\",\"idx\":261,\"nvalue\":0,\"svalue\":msg.payload.intake_intensivecare_ma.last_value.moving_average_ic.toString()};\nmsg2.payload = {\"command\":\"udevice\",\"idx\":262,\"nvalue\":0,\"svalue\":msg.payload.intake_hospital_ma.last_value.moving_average_hospital.toString()};\nmsg3.payload = {\"command\":\"udevice\",\"idx\":263,\"nvalue\":0,\"svalue\":msg.payload.infected_people_total.last_value.infected_daily_total.toString()};\nmsg4.payload = {\"command\":\"udevice\",\"idx\":264,\"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,"initialize":"","finalize":"","x":810,"y":460,"wires":[["f8ed6323.cc534","77a7d517.acc9d4"]]},{"id":"f8ed6323.cc534","type":"mqtt out","z":"c6989b70.c480a","name":"","topic":"domoticz/in","qos":"2","retain":"false","broker":"8890d2f7.52ddc8","x":1190,"y":360,"wires":[]},{"id":"163e22f.23d14dd","type":"comment","z":"c6989b70.c480a","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":780,"y":500,"wires":[]},{"id":"77a7d517.acc9d4","type":"debug","z":"c6989b70.c480a","name":"","active":false,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":990,"y":560,"wires":[]},{"id":"d7ecdabe.163e6","type":"http request","z":"c6989b70.c480a","name":"","method":"GET","ret":"txt","paytoqs":"ignore","url":"https://stichting-nice.nl/covid-19/public/global","tls":"","persist":false,"proxy":"","authType":"","x":370,"y":200,"wires":[["c2b4c5ee.951d78"]]},{"id":"c2b4c5ee.951d78","type":"json","z":"c6989b70.c480a","name":"","property":"payload","action":"","pretty":true,"x":550,"y":200,"wires":[["3cdcb202.fd8e8e"]]},{"id":"3cdcb202.fd8e8e","type":"function","z":"c6989b70.c480a","name":"Momenteel op IC","func":"var msg5 ={};\nmsg5.payload = {\"command\":\"udevice\",\"idx\":317,\"nvalue\":0,\"svalue\":msg.payload.countCurrent.toString()};\nreturn [[msg5]]","outputs":1,"noerr":0,"initialize":"","finalize":"","x":750,"y":200,"wires":[["f8ed6323.cc534","7b7a2e44.b8564"]]},{"id":"7b7a2e44.b8564","type":"debug","z":"c6989b70.c480a","name":"","active":false,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":990,"y":180,"wires":[]},{"id":"c4217a06.e1d4a","type":"http request","z":"c6989b70.c480a","name":"","method":"GET","ret":"txt","paytoqs":"ignore","url":"https://stichting-nice.nl/covid-19/public/zkh/global","tls":"","persist":false,"proxy":"","authType":"","x":380,"y":320,"wires":[["612787b6.db018"]]},{"id":"612787b6.db018","type":"json","z":"c6989b70.c480a","name":"","property":"payload","action":"","pretty":true,"x":560,"y":320,"wires":[["fcf83210.03199"]]},{"id":"fcf83210.03199","type":"function","z":"c6989b70.c480a","name":"Momenteel op Verpleegafd.","func":"var msg6 ={};\nmsg6.payload = {\"command\":\"udevice\",\"idx\":318,\"nvalue\":0,\"svalue\":msg.payload.countCurrent.toString()};\nreturn [[msg6]]","outputs":1,"noerr":0,"initialize":"","finalize":"","x":780,"y":320,"wires":[["f8ed6323.cc534","67989026.f5114"]]},{"id":"67989026.f5114","type":"debug","z":"c6989b70.c480a","name":"","active":false,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":910,"y":380,"wires":[]},{"id":"8890d2f7.52ddc8","type":"mqtt-broker","z":"","name":"Domoticz Master","broker":"10.0.2.15","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closePayload":"","willTopic":"","willQos":"0","willPayload":""}]