Dutch local covid-19 figures

Moderator: leecollings

User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Dutch local covid-19 figures

Post by waaren »

Xenomes wrote: Friday 21 August 2020 9:07 Tested your new script. The same error exits :oops: but now some counters are populated.
Thx for testing. really appreciated. 👍

Almost there. Updated version in top post. Total number for today will only be available after around 15:00 until then it is shown as 0
Numbers you see on your other counters / text device are from yesterday morning when script is executed before RIVM has updated their data.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
User avatar
Xenomes
Posts: 379
Joined: Tuesday 27 November 2018 19:05
Target OS: Linux
Domoticz version: 2024.7
Location: Netherlands
Contact:

Re: Dutch local covid-19 figures

Post by Xenomes »

waaren wrote: Friday 21 August 2020 10:16 ]
Thx for testing. really appreciated. 👍

Almost there. Updated version in top post. Total number for today will only be available after around 15:00 until then it is shown as 0
Numbers you see on your other counters / text device are from yesterday morning when script is executed before RIVM has updated their data.
Run the new version, no problem testing :D.

Code: Select all

2020-08-21 11:27:19.838 Error: dzVents: Error: (3.0.2) covidTrigger: Error parsing json to LUA table: /home/pi/domoticz/scripts/dzVents/../lua/JSON.lua:808: expected string argument to JSON:decode(), got table
2020-08-21 11:27:19.838 Error: dzVents: Error: (3.0.2) covidTrigger: An error occurred when calling event handler covidTrigger
2020-08-21 11:27:19.838 Error: dzVents: Error: (3.0.2) covidTrigger: ...oticz/scripts/dzVents/generated_scripts/covidTrigger.lua:216: attempt to index a nil value (local 't')
Log:
Spoiler: show

Code: Select all

2020-08-21 11:26:00.368 Status: dzVents: Write file: /home/pi/domoticz/scripts/dzVents/generated_scripts/covidTrigger.lua
2020-08-21 11:26:00.468 Status: dzVents: Info: covidTrigger: ------ Start internal script: covidTrigger:, trigger: "at 11:26"
2020-08-21 11:26:00.487 Status: dzVents: Debug: covidTrigger: Processing device-adapter for covid-19 in Steenbergen: Text device
2020-08-21 11:26:00.489 Status: dzVents: Debug: covidTrigger: Processing device-adapter for Reported covid-19 in Steenbergen: Counter device adapter
2020-08-21 11:26:00.490 Status: dzVents: Debug: covidTrigger: Processing device-adapter for Deceased covid-19 in Steenbergen: Counter device adapter
2020-08-21 11:26:00.491 Status: dzVents: Debug: covidTrigger: Processing device-adapter for Hospitalized covid-19 in Steenbergen: Counter device adapter
2020-08-21 11:26:00.492 Status: dzVents: Debug: covidTrigger: Processing device-adapter for Reported covid-19 in Netherlands: Counter device adapter
2020-08-21 11:26:00.493 Status: dzVents: Debug: covidTrigger: dzVents version is 3.0.2. Must use base64 encoding
2020-08-21 11:26:00.507 Status: dzVents: Debug: covidTrigger: curl -o /tmp/rivmDataCumulative https://data.rivm.nl/covid-19/COVID-19_aantallen_gemeente_cumulatief.json &
2020-08-21 11:26:00.507 Status: dzVents: Info: covidTrigger: ------ Finished covidTrigger
2020-08-21 11:27:06.082 Status: dzVents: Info: Handling Domoticz custom event for: "covidTrigger_curlReady"
2020-08-21 11:27:06.082 Status: dzVents: Info: covidTrigger: ------ Start internal script: covidTrigger: Custom event: "covidTrigger_curlReady"
2020-08-21 11:27:06.084 Status: dzVents: Debug: covidTrigger: Processing device-adapter for covid-19 in Steenbergen: Text device
2020-08-21 11:27:06.085 Status: dzVents: Debug: covidTrigger: Processing device-adapter for Reported covid-19 in Steenbergen: Counter device adapter
2020-08-21 11:27:06.086 Status: dzVents: Debug: covidTrigger: Processing device-adapter for Deceased covid-19 in Steenbergen: Counter device adapter
2020-08-21 11:27:06.087 Status: dzVents: Debug: covidTrigger: Processing device-adapter for Hospitalized covid-19 in Steenbergen: Counter device adapter
2020-08-21 11:27:06.088 Status: dzVents: Debug: covidTrigger: Processing device-adapter for Reported covid-19 in Netherlands: Counter device adapter
2020-08-21 11:27:06.088 Status: dzVents: Debug: covidTrigger: dzVents version is 3.0.2. Must use base64 encoding
2020-08-21 11:27:06.132 Status: dzVents: Debug: covidTrigger: preProcessorCommand: not needed for Steenbergen
2020-08-21 11:27:06.132 Status: dzVents: Debug: covidTrigger: jqFilterCommand: jq ' .[] | select (.Municipality_name == "Steenbergen" )' /tmp/rivmDataCumulative | jq -s '.[-1] | @base64' > /tmp/rivmFiltered &
2020-08-21 11:27:06.132 Status: dzVents: Debug: covidTrigger: jqTotalCommand: jq ' .[] | select ( .Date_of_report > "2020-08-21" and .Municipality_name != null ) ' /tmp/rivmDataCumulative | jq -s 'map(.Total_reported) | add ' > /tmp/rivmTotal &
2020-08-21 11:27:06.132 Status: dzVents: Info: covidTrigger: ------ Finished covidTrigger
2020-08-21 11:27:19.278 Status: dzVents: Info: Handling Domoticz custom event for: "covidTrigger_jqReturn"
2020-08-21 11:27:19.279 Status: dzVents: Info: covidTrigger: ------ Start internal script: covidTrigger: Custom event: "covidTrigger_jqReturn"
2020-08-21 11:27:19.314 Status: dzVents: Debug: covidTrigger: Processing device-adapter for covid-19 in Steenbergen: Text device
2020-08-21 11:27:19.315 Status: dzVents: Debug: covidTrigger: Processing device-adapter for Reported covid-19 in Steenbergen: Counter device adapter
2020-08-21 11:27:19.316 Status: dzVents: Debug: covidTrigger: Processing device-adapter for Deceased covid-19 in Steenbergen: Counter device adapter
2020-08-21 11:27:19.318 Status: dzVents: Debug: covidTrigger: Processing device-adapter for Hospitalized covid-19 in Steenbergen: Counter device adapter
2020-08-21 11:27:19.319 Status: dzVents: Debug: covidTrigger: Processing device-adapter for Reported covid-19 in Netherlands: Counter device adapter
2020-08-21 11:27:19.319 Status: dzVents: Debug: covidTrigger: dzVents version is 3.0.2. Must use base64 encoding
2020-08-21 11:27:19.378 Status: dzVents: Debug: covidTrigger: getFilteredDataCommand: curl "http://127.0.0.1:8085/json.htm?type=command&param=customevent&event=covidTrigger_jqFilterReady&data=$(cat /tmp/rivmFiltered)"
2020-08-21 11:27:19.378 Status: dzVents: Info: covidTrigger: ------ Finished covidTrigger
2020-08-21 11:27:19.491 Status: dzVents: Info: Handling Domoticz custom event for: "covidTrigger_jqFilterReady"
2020-08-21 11:27:19.491 Status: dzVents: Info: covidTrigger: ------ Start internal script: covidTrigger: Custom event: "covidTrigger_jqFilterReady"
2020-08-21 11:27:19.511 Status: dzVents: Debug: covidTrigger: Processing device-adapter for covid-19 in Steenbergen: Text device
2020-08-21 11:27:19.512 Status: dzVents: Debug: covidTrigger: Processing device-adapter for Reported covid-19 in Steenbergen: Counter device adapter
2020-08-21 11:27:19.514 Status: dzVents: Debug: covidTrigger: Processing device-adapter for Deceased covid-19 in Steenbergen: Counter device adapter
2020-08-21 11:27:19.515 Status: dzVents: Debug: covidTrigger: Processing device-adapter for Hospitalized covid-19 in Steenbergen: Counter device adapter
2020-08-21 11:27:19.517 Status: dzVents: Debug: covidTrigger: Processing device-adapter for Reported covid-19 in Netherlands: Counter device adapter
2020-08-21 11:27:19.517 Status: dzVents: Debug: covidTrigger: dzVents version is 3.0.2. Must use base64 encoding
2020-08-21 11:27:19.524 Status: dzVents: Debug: covidTrigger: updateCounterDevices: {["Municipality_name"]="Steenbergen", ["Municipality_code"]="GM0851", ["Deceased"]=13, ["Province"]="Noord-Brabant", ["Total_reported"]=105, ["Hospital_admission"]=13, ["Date_of_report"]="2020-08-20 10:00:00"}
2020-08-21 11:27:19.527 Status: dzVents: Info: covidTrigger: ------ Finished covidTrigger
2020-08-21 11:27:19.834 Status: dzVents: Info: Handling Domoticz custom event for: "covidTrigger_updateText"
2020-08-21 11:27:19.835 Status: dzVents: Info: covidTrigger: ------ Start internal script: covidTrigger: Custom event: "covidTrigger_updateText"
2020-08-21 11:27:19.836 Status: dzVents: Debug: covidTrigger: Processing device-adapter for covid-19 in Steenbergen: Text device
2020-08-21 11:27:19.838 Status: dzVents: Debug: covidTrigger: Processing device-adapter for Reported covid-19 in Steenbergen: Counter device adapter
2020-08-21 11:27:19.838 Status: dzVents: Debug: covidTrigger: dzVents version is 3.0.2. Must use base64 encoding
2020-08-21 11:27:19.838 Status: dzVents: Debug: covidTrigger: updateTextDevice: nil
2020-08-21 11:27:19.838 Status: dzVents: Info: covidTrigger: ------ Finished covidTrigger
2020-08-21 11:27:19.838 Error: dzVents: Error: (3.0.2) covidTrigger: Error parsing json to LUA table: /home/pi/domoticz/scripts/dzVents/../lua/JSON.lua:808: expected string argument to JSON:decode(), got table
2020-08-21 11:27:19.838 Error: dzVents: Error: (3.0.2) covidTrigger: An error occurred when calling event handler covidTrigger
2020-08-21 11:27:19.838 Error: dzVents: Error: (3.0.2) covidTrigger: ...oticz/scripts/dzVents/generated_scripts/covidTrigger.lua:216: attempt to index a nil value (local 't')
HP T630 (32GB SSD/8GB Mem) - Ubuntu 22.04.4 LTS (64Bit) - Domoticz 2024.7 with Machinon theme - RFLink - KaKu - Sonoff - Tasmota - Shelly - MQTT2Zigbee - OpenTherm Gateway - Tinytuya - IR Blaster - P1 Smart Meter - NPN Watermeter - Google Assistant
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Dutch local covid-19 figures

Post by waaren »

Xenomes wrote: Friday 21 August 2020 11:48

Code: Select all

/home/pi/domoticz/scripts/dzVents/../lua/JSON.lua:808: expected string argument to JSON:decode(), got table
Switching method to parse data between script executions
Now use dzVents persistent data . Should be handled correctly by all dzVents versions >= 3.0

history:
20200816 Start coding
20200817 Initial release on forum
20200818 Fixed jq output redirection from stdout to file for version < 1.6
20200818 Only select last date from records
20200818 Add total for the Netherlands (based on all Municipalities)
20200819 Add description how to populate history table
20200819 Fixed unwanted end of comment block
20200820 Update text device in separate execution to collect latest counters
20200820 Add lodash debug lines
20200820 Fixed unexpected behavior with city names containing special chars
20200820 Add latest report time to text sensor
20200820 Make filterdelay configurable and fixed typo
20200821 Use base64 string as data for dzVents < 3.0.9 (curl POST cannot be used to trigger customEvents in these versions)
20200821 Use persistent data to parse filtered data between script executions
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
User avatar
Xenomes
Posts: 379
Joined: Tuesday 27 November 2018 19:05
Target OS: Linux
Domoticz version: 2024.7
Location: Netherlands
Contact:

Re: Dutch local covid-19 figures

Post by Xenomes »

🎉🎉🎉

The text.device is populated! i will check later so for the total in Netherlands. Tnhx very much!
2020-08-21 13_30_39-Window.png
2020-08-21 13_30_39-Window.png (38.94 KiB) Viewed 3108 times
Update 14:30:
Total in Netherlands updated!
2020-08-21 14_30_22-Window.png
2020-08-21 14_30_22-Window.png (9.18 KiB) Viewed 3104 times
HP T630 (32GB SSD/8GB Mem) - Ubuntu 22.04.4 LTS (64Bit) - Domoticz 2024.7 with Machinon theme - RFLink - KaKu - Sonoff - Tasmota - Shelly - MQTT2Zigbee - OpenTherm Gateway - Tinytuya - IR Blaster - P1 Smart Meter - NPN Watermeter - Google Assistant
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Dutch local covid-19 figures

Post by waaren »

Updated version in top post:

history:
20200816 Start coding
20200817 Initial release on forum
20200818 Fixed jq output redirection from stdout to file for version < 1.6
20200818 Only select last date from records
20200818 Add total for the Netherlands (based on all Municipalities)
20200819 Add description how to populate history table
20200819 Fixed unwanted end of comment block
20200820 Update text device in separate execution to collect latest counters
20200820 Add lodash debug lines
20200820 Fixed unexpected behavior with city names containing special chars
20200820 Add latest report time to text sensor
20200820 Make filterdelay configurable and fixed typo
20200821 Use base64 string as data for dzVents < 3.0.9 (curl POST cannot be used to trigger customEvents in these versions)
20200821 Use persistent data to parse filtered data between script executions
20200822 Add total deceased and total hospitalized for the country (2 additional counterdevices)
20200822 Use external bash script to populate history table for all counters (Only needed once)
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
User avatar
EdwinK
Posts: 1820
Joined: Sunday 22 January 2017 21:46
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Rhoon
Contact:

Re: Dutch local covid-19 figures

Post by EdwinK »

Would it be possible to send the data from one of the text-sensors to Facebook and/or Twitter? Or would this involve IFTT and such? There is no 'notification'-settings for utility devices.
Running latest BETA on a Pi-3 | Toon® Thermostat (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Dutch local covid-19 figures

Post by waaren »

EdwinK wrote: Monday 28 September 2020 11:58 Would it be possible to send the data from one of the text-sensors to Facebook and/or Twitter? Or would this involve IFTT and such? There is no 'notification'-settings for utility devices.
Using IFTTT it is possible but I don't know if Facebook / Twitter allow to post data using a URL.
If the do dzVents can send the data using its openURL command.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
User avatar
EdwinK
Posts: 1820
Joined: Sunday 22 January 2017 21:46
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Rhoon
Contact:

Re: Dutch local covid-19 figures

Post by EdwinK »

I found this page https://developers.facebook.com/docs/gr ... ence/post/

It all sounds very technical for me.
Running latest BETA on a Pi-3 | Toon® Thermostat (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Dutch local covid-19 figures

Post by waaren »

Updated the version in the first post.
When data from RIVM does not have today's data yet the script will reschedule itself after appr. 30 minutes.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
User avatar
Xenomes
Posts: 379
Joined: Tuesday 27 November 2018 19:05
Target OS: Linux
Domoticz version: 2024.7
Location: Netherlands
Contact:

Re: Dutch local covid-19 figures

Post by Xenomes »

waaren, nice job! Updated my script with yours.
HP T630 (32GB SSD/8GB Mem) - Ubuntu 22.04.4 LTS (64Bit) - Domoticz 2024.7 with Machinon theme - RFLink - KaKu - Sonoff - Tasmota - Shelly - MQTT2Zigbee - OpenTherm Gateway - Tinytuya - IR Blaster - P1 Smart Meter - NPN Watermeter - Google Assistant
JeroenG
Posts: 27
Joined: Monday 06 January 2020 20:57
Target OS: Raspberry Pi / ODroid
Domoticz version: 20231
Contact:

Re: Dutch local covid-19 figures

Post by JeroenG »

Hi Warren,

trying to use the bash script to import the history ran into issue that my city (Alphen aan den Rijn) contains space which is no fun on linux.

Fixed it by changing the following 4 lines (placed quotes around $city.json):

sudo jq " .[] | select (.Municipality_name == \"$city\" )" $tmpDir/"$prefix"_Complete.json | jq . -s > "$tmpDir"/"$prefix"_"$city.json"
sudo cat $tmpDir/"$prefix"_"$city.json" | jq -r '. | map([ env.deceased, 0, .Deceased, .Date_of_report[:10] ] | @csv)| join("\n")' > "$tmpDir"/"$prefix"_deceased.csv
sudo cat $tmpDir/"$prefix"_"$city.json" | jq -r '. | map([ env.reported, 0, .Total_reported, .Date_of_report[:10] ] | @csv)| join("\n")' > "$tmpDir"/"$prefix"_reported.csv
sudo cat $tmpDir/"$prefix"_"$city.json" | jq -r '. | map([ env.hospitalized, 0, .Hospital_admission, .Date_of_report[:10] ] | @csv)| join("\n")' > "$tmpDir"/"$prefix"_hospitalized.csv


Kind regards,

Jeroen
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Dutch local covid-19 figures

Post by waaren »

JeroenG wrote: Tuesday 20 October 2020 20:56 trying to use the bash script to import the history ran into issue that my city (Alphen aan den Rijn) contains space which is no fun on linux.
Fixed it by changing the following 4 lines (placed quotes around $city.json):
Thx for reporting and the fix. I will update the posted script with your mod.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
yvonnehx1
Posts: 5
Joined: Monday 13 April 2020 0:34
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Contact:

Re: Dutch local covid-19 figures

Post by yvonnehx1 »

Unfortunately the number of reported Covid-19 people in the Netherlands has grown over a million. That number is now represented as 1.08483e+06 on the "Reported covid-19 in the Netherlands" switch in the Domoticz dashboard. How to fix this?
Thanks in advance.
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Dutch local covid-19 figures

Post by waaren »

yvonnehx1 wrote: Sunday 28 February 2021 23:45 Unfortunately the number of reported Covid-19 people in the Netherlands has grown over a million. That number is now represented as 1.08483e+06 on the "Reported covid-19 in the Netherlands" switch in the Domoticz dashboard. How to fix this?
Thanks in advance.
If you need the number displayed in a none scientific (better human readable) way you will need to display it in a virtual text sensor.
I updated the script in the first post to add this as an option.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
yvonnehx1
Posts: 5
Joined: Monday 13 April 2020 0:34
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Contact:

Re: Dutch local covid-19 figures

Post by yvonnehx1 »

Thanks Waaren, for your quick solution. I'll give it a try.
Kind regards
User avatar
Xenomes
Posts: 379
Joined: Tuesday 27 November 2018 19:05
Target OS: Linux
Domoticz version: 2024.7
Location: Netherlands
Contact:

Re: Dutch local covid-19 figures

Post by Xenomes »

My 'Reported covid-19 in' is 7 days not updated? Do anyone have this issue to?
HP T630 (32GB SSD/8GB Mem) - Ubuntu 22.04.4 LTS (64Bit) - Domoticz 2024.7 with Machinon theme - RFLink - KaKu - Sonoff - Tasmota - Shelly - MQTT2Zigbee - OpenTherm Gateway - Tinytuya - IR Blaster - P1 Smart Meter - NPN Watermeter - Google Assistant
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Dutch local covid-19 figures

Post by waaren »

Xenomes wrote: Monday 07 June 2021 22:44 My 'Reported covid-19 in' is 7 days not updated? Do anyone have this issue to?
covid script is still working for me. (see below)

Do you see anything in the log?

covid.png
covid.png (139.88 KiB) Viewed 2522 times
covidC.png
covidC.png (262.79 KiB) Viewed 2522 times
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
User avatar
Xenomes
Posts: 379
Joined: Tuesday 27 November 2018 19:05
Target OS: Linux
Domoticz version: 2024.7
Location: Netherlands
Contact:

Re: Dutch local covid-19 figures

Post by Xenomes »

I change the script 2 days a go to the latest version, before that is was running for months.

In the log it show this:

Code: Select all

2021-06-08 16:16:06.129  Status: dzVents: Info: Handling Domoticz custom event for: "CovidTrigger_checkDate"
2021-06-08 16:16:09.379  Status: dzVents: Info: Handling Domoticz custom event for: "CovidTrigger_curlReady"
2021-06-08 16:16:40.803  Status: dzVents: Info: Handling Domoticz custom event for: "CovidTrigger_jqReturn"
2021-06-08 16:16:41.271  Status: dzVents: Info: Handling Domoticz custom event for: "CovidTrigger_jqFilterReady"
2021-06-08 16:16:41.856  Status: dzVents: Info: Handling Domoticz custom event for: "CovidTrigger_updateText"
2021-06-08 16_21_28-Domoticz - Overige.png
2021-06-08 16_21_28-Domoticz - Overige.png (276.81 KiB) Viewed 2510 times
2021-06-08 16_26_16-Domoticz - Devices_638_Log.png
2021-06-08 16_26_16-Domoticz - Devices_638_Log.png (231.24 KiB) Viewed 2510 times
HP T630 (32GB SSD/8GB Mem) - Ubuntu 22.04.4 LTS (64Bit) - Domoticz 2024.7 with Machinon theme - RFLink - KaKu - Sonoff - Tasmota - Shelly - MQTT2Zigbee - OpenTherm Gateway - Tinytuya - IR Blaster - P1 Smart Meter - NPN Watermeter - Google Assistant
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Dutch local covid-19 figures

Post by waaren »

Xenomes wrote: Tuesday 08 June 2021 16:28 I change the script 2 days a go to the latest version, before that is was running for months.
if you change line

Code: Select all

        level = domoticz.LOG_ERROR, -- change to domoticz.LOG_ERROR when all ok.
to

Code: Select all

        level = domoticz.LOG_DEBUG, -- change to domoticz.LOG_ERROR when all ok.
You should see much more relevant information
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
User avatar
Xenomes
Posts: 379
Joined: Tuesday 27 November 2018 19:05
Target OS: Linux
Domoticz version: 2024.7
Location: Netherlands
Contact:

Re: Dutch local covid-19 figures

Post by Xenomes »

Here is the extended log.

Code: Select all

2021-06-08 20:11:51.775  Status: dzVents: Write file: /home/pi/domoticz/scripts/dzVents/generated_scripts/CovidTrigger.lua
2021-06-08 20:12:00.298  Status: dzVents: Info: CovidTrigger: ------ Start internal script: CovidTrigger:, trigger: "at 20:12"
2021-06-08 20:12:00.345  Status: dzVents: Debug: CovidTrigger: Processing device-adapter for covid-19 in Steenbergen: Text device
2021-06-08 20:12:00.350  Status: dzVents: Debug: CovidTrigger: Processing device-adapter for Reported covid-19 in Steenbergen: Counter device adapter
2021-06-08 20:12:00.352  Status: dzVents: Debug: CovidTrigger: Processing device-adapter for Deceased covid-19 in Steenbergen: Counter device adapter
2021-06-08 20:12:00.353  Status: dzVents: Debug: CovidTrigger: Processing device-adapter for Hospitalized covid-19 in Steenbergen: Counter device adapter
2021-06-08 20:12:00.355  Status: dzVents: Debug: CovidTrigger: Processing device-adapter for Reported covid-19 in Netherlands: Counter device adapter
2021-06-08 20:12:00.357  Status: dzVents: Debug: CovidTrigger: Processing device-adapter for Deceased covid-19 in Netherlands: Counter device adapter
2021-06-08 20:12:00.360  Status: dzVents: Debug: CovidTrigger: Processing device-adapter for Hospitalized covid-19 in Netherlands: Counter device adapter
2021-06-08 20:12:00.363  Status: dzVents: Debug: CovidTrigger: Processing device-adapter for covid-19 in Netherlands: Text device
2021-06-08 20:12:00.397  Status: dzVents: Debug: CovidTrigger: curl -o /tmp/rivmDataCumulative https://data.rivm.nl/covid-19/COVID-19_aantallen_gemeente_cumulatief.json &
2021-06-08 20:12:00.402  Status: dzVents: Info: CovidTrigger: ------ Finished CovidTrigger
2021-06-08 20:13:07.570  Status: dzVents: Info: Handling Domoticz custom event for: "CovidTrigger_checkDate"
2021-06-08 20:13:07.571  Status: dzVents: Info: CovidTrigger: ------ Start internal script: CovidTrigger: Custom event: "CovidTrigger_checkDate"
2021-06-08 20:13:07.592  Status: dzVents: Debug: CovidTrigger: Processing device-adapter for covid-19 in Steenbergen: Text device
2021-06-08 20:13:07.594  Status: dzVents: Debug: CovidTrigger: Processing device-adapter for Reported covid-19 in Steenbergen: Counter device adapter
2021-06-08 20:13:07.595  Status: dzVents: Debug: CovidTrigger: Processing device-adapter for Deceased covid-19 in Steenbergen: Counter device adapter
2021-06-08 20:13:07.597  Status: dzVents: Debug: CovidTrigger: Processing device-adapter for Hospitalized covid-19 in Steenbergen: Counter device adapter
2021-06-08 20:13:07.599  Status: dzVents: Debug: CovidTrigger: Processing device-adapter for Reported covid-19 in Netherlands: Counter device adapter
2021-06-08 20:13:07.601  Status: dzVents: Debug: CovidTrigger: Processing device-adapter for Deceased covid-19 in Netherlands: Counter device adapter
2021-06-08 20:13:07.603  Status: dzVents: Debug: CovidTrigger: Processing device-adapter for Hospitalized covid-19 in Netherlands: Counter device adapter
2021-06-08 20:13:07.605  Status: dzVents: Debug: CovidTrigger: Processing device-adapter for covid-19 in Netherlands: Text device
2021-06-08 20:13:07.660  Status: dzVents: Debug: CovidTrigger: Today is available (3
2021-06-08 20:13:07.661  Status: dzVents: Info: CovidTrigger: ------ Finished CovidTrigger
2021-06-08 20:13:10.853  Status: dzVents: Info: Handling Domoticz custom event for: "CovidTrigger_curlReady"
2021-06-08 20:13:10.855  Status: dzVents: Info: CovidTrigger: ------ Start internal script: CovidTrigger: Custom event: "CovidTrigger_curlReady"
2021-06-08 20:13:10.876  Status: dzVents: Debug: CovidTrigger: Processing device-adapter for covid-19 in Steenbergen: Text device
2021-06-08 20:13:10.878  Status: dzVents: Debug: CovidTrigger: Processing device-adapter for Reported covid-19 in Steenbergen: Counter device adapter
2021-06-08 20:13:10.881  Status: dzVents: Debug: CovidTrigger: Processing device-adapter for Deceased covid-19 in Steenbergen: Counter device adapter
2021-06-08 20:13:10.882  Status: dzVents: Debug: CovidTrigger: Processing device-adapter for Hospitalized covid-19 in Steenbergen: Counter device adapter
2021-06-08 20:13:10.884  Status: dzVents: Debug: CovidTrigger: Processing device-adapter for Reported covid-19 in Netherlands: Counter device adapter
2021-06-08 20:13:10.888  Status: dzVents: Debug: CovidTrigger: Processing device-adapter for Deceased covid-19 in Netherlands: Counter device adapter
2021-06-08 20:13:10.891  Status: dzVents: Debug: CovidTrigger: Processing device-adapter for Hospitalized covid-19 in Netherlands: Counter device adapter
2021-06-08 20:13:10.892  Status: dzVents: Debug: CovidTrigger: Processing device-adapter for covid-19 in Netherlands: Text device
2021-06-08 20:13:11.065  Status: dzVents: Debug: CovidTrigger: preProcessorCommand: not needed for Steenbergen
2021-06-08 20:13:11.069  Status: dzVents: Debug: CovidTrigger: jqFilterCommand: jq ' .[] | select (.Municipality_name == "Steenbergen" )' /tmp/rivmDataCumulative | jq .[-1] -s > /tmp/rivmFiltered &
2021-06-08 20:13:11.070  Status: dzVents: Debug: CovidTrigger: jqTotalReportedCommand: jq ' .[] | select ( .Date_of_report > "2021-06-08" and .Municipality_name != null ) ' /tmp/rivmDataCumulative | jq -s 'map(.Total_reported) | add ' > /tmp/rivmTotalReported &
2021-06-08 20:13:11.077  Status: dzVents: Info: CovidTrigger: ------ Finished CovidTrigger
2021-06-08 20:13:42.616  Status: dzVents: Info: Handling Domoticz custom event for: "CovidTrigger_jqReturn"
2021-06-08 20:13:42.617  Status: dzVents: Info: CovidTrigger: ------ Start internal script: CovidTrigger: Custom event: "CovidTrigger_jqReturn"
2021-06-08 20:13:42.622  Status: dzVents: Debug: CovidTrigger: Processing device-adapter for covid-19 in Steenbergen: Text device
2021-06-08 20:13:42.623  Status: dzVents: Debug: CovidTrigger: Processing device-adapter for Reported covid-19 in Steenbergen: Counter device adapter
2021-06-08 20:13:42.625  Status: dzVents: Debug: CovidTrigger: Processing device-adapter for Deceased covid-19 in Steenbergen: Counter device adapter
2021-06-08 20:13:42.630  Status: dzVents: Debug: CovidTrigger: Processing device-adapter for Hospitalized covid-19 in Steenbergen: Counter device adapter
2021-06-08 20:13:42.632  Status: dzVents: Debug: CovidTrigger: Processing device-adapter for Reported covid-19 in Netherlands: Counter device adapter
2021-06-08 20:13:42.634  Status: dzVents: Debug: CovidTrigger: Processing device-adapter for Deceased covid-19 in Netherlands: Counter device adapter
2021-06-08 20:13:42.636  Status: dzVents: Debug: CovidTrigger: Processing device-adapter for Hospitalized covid-19 in Netherlands: Counter device adapter
2021-06-08 20:13:42.639  Status: dzVents: Debug: CovidTrigger: Processing device-adapter for covid-19 in Netherlands: Text device
2021-06-08 20:13:42.901  Status: dzVents: Debug: CovidTrigger: getFilteredDataCommand: curl -d '@/tmp/rivmFiltered' 'http://127.0.0.1:8085/json.htm?type=command&param=customevent&event=CovidTrigger_jqFilterReady'
2021-06-08 20:13:42.903  Status: dzVents: Info: CovidTrigger: ------ Finished CovidTrigger
2021-06-08 20:13:43.259  Status: dzVents: Info: Handling Domoticz custom event for: "CovidTrigger_jqFilterReady"
2021-06-08 20:13:43.259  Status: dzVents: Info: CovidTrigger: ------ Start internal script: CovidTrigger: Custom event: "CovidTrigger_jqFilterReady"
2021-06-08 20:13:43.262  Status: dzVents: Debug: CovidTrigger: Processing device-adapter for covid-19 in Steenbergen: Text device
2021-06-08 20:13:43.264  Status: dzVents: Debug: CovidTrigger: Processing device-adapter for Reported covid-19 in Steenbergen: Counter device adapter
2021-06-08 20:13:43.284  Status: dzVents: Debug: CovidTrigger: Processing device-adapter for Deceased covid-19 in Steenbergen: Counter device adapter
2021-06-08 20:13:43.290  Status: dzVents: Debug: CovidTrigger: Processing device-adapter for Hospitalized covid-19 in Steenbergen: Counter device adapter
2021-06-08 20:13:43.296  Status: dzVents: Debug: CovidTrigger: Processing device-adapter for Reported covid-19 in Netherlands: Counter device adapter
2021-06-08 20:13:43.311  Status: dzVents: Debug: CovidTrigger: Processing device-adapter for Deceased covid-19 in Netherlands: Counter device adapter
2021-06-08 20:13:43.315  Status: dzVents: Debug: CovidTrigger: Processing device-adapter for Hospitalized covid-19 in Netherlands: Counter device adapter
2021-06-08 20:13:43.320  Status: dzVents: Debug: CovidTrigger: Processing device-adapter for covid-19 in Netherlands: Text device
2021-06-08 20:13:43.321  Status: dzVents: Debug: CovidTrigger: updateCounterDevices: {["Date_of_report"]="2021-06-08 10:00:00", ["Municipality_name"]="Steenbergen", ["Total_reported"]=2278, ["Province"]="Noord-Brabant", ["Municipality_code"]="GM0851", ["Deceased"]=19, ["Hospital_admission"]=33}
2021-06-08 20:13:43.323  Status: dzVents: Info: CovidTrigger: nil
2021-06-08 20:13:43.324  Status: dzVents: Info: CovidTrigger: nil
2021-06-08 20:13:43.324  Status: dzVents: Info: CovidTrigger: nil
2021-06-08 20:13:43.328  Status: dzVents: Info: CovidTrigger: ------ Finished CovidTrigger
2021-06-08 20:13:43.904  Status: dzVents: Info: Handling Domoticz custom event for: "CovidTrigger_updateText"
2021-06-08 20:13:43.905  Status: dzVents: Info: CovidTrigger: ------ Start internal script: CovidTrigger: Custom event: "CovidTrigger_updateText"
2021-06-08 20:13:43.908  Status: dzVents: Debug: CovidTrigger: Processing device-adapter for covid-19 in Steenbergen: Text device
2021-06-08 20:13:43.910  Status: dzVents: Debug: CovidTrigger: Processing device-adapter for Reported covid-19 in Steenbergen: Counter device adapter
2021-06-08 20:13:43.912  Status: dzVents: Debug: CovidTrigger: Processing device-adapter for Deceased covid-19 in Steenbergen: Counter device adapter
2021-06-08 20:13:43.914  Status: dzVents: Debug: CovidTrigger: Processing device-adapter for Hospitalized covid-19 in Steenbergen: Counter device adapter
2021-06-08 20:13:43.916  Status: dzVents: Debug: CovidTrigger: Processing device-adapter for covid-19 in Netherlands: Text device
2021-06-08 20:13:43.917  Status: dzVents: Debug: CovidTrigger: updateTextDevice: {["Date_of_report"]="2021-06-08 10:00:00", ["Municipality_name"]="Steenbergen", ["Total_reported"]=2278, ["Province"]="Noord-Brabant", ["Municipality_code"]="GM0851", ["Deceased"]=19, ["Hospital_admission"]=33}
2021-06-08 20:13:43.920  Status: dzVents: Info: CovidTrigger: ------ Finished CovidTrigger
HP T630 (32GB SSD/8GB Mem) - Ubuntu 22.04.4 LTS (64Bit) - Domoticz 2024.7 with Machinon theme - RFLink - KaKu - Sonoff - Tasmota - Shelly - MQTT2Zigbee - OpenTherm Gateway - Tinytuya - IR Blaster - P1 Smart Meter - NPN Watermeter - Google Assistant
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest