updateWeatherSensors (yet another buienradar script) [SOLVED]
Moderator: leecollings
- EdwinK
- Posts: 1820
- Joined: Sunday 22 January 2017 21:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version: BETA
- Location: Rhoon
- Contact:
Re: updateWeatherSensors (yet another buienradar script)
It's once in a while. So not really a concern. Just something i noticed between the thousands of Toon-errors
Running latest BETA on a Pi-3 | Toon® Thermostat (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Typo in script, causing temp+hum not being updated
[Edited] I will post an updated version later this week where this typo will be corrected but until then please look at line 568 and 573 (Version 0.20180502) and change the string
HUMCOMFORATBLE
to HUMCOMFORTABLE
thanks.
HUMCOMFORATBLE
to HUMCOMFORTABLE
thanks.
Last edited by waaren on Sunday 06 May 2018 15:50, edited 1 time in total.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
-
poudenes
- Posts: 667
- Joined: Wednesday 08 March 2017 9:42
- Target OS: Linux
- Domoticz version: 3.8993
- Location: Amsterdam
- Contact:
Re: updateWeatherSensors (yet another buienradar script)
do you mean :
HUMCOMFORATBLE = INF_HUMCOMFORTABLE
to
HUMCOMFORTABLE = INF_HUMCOMFORTABLE
and
HUMCOMFORATBLE = dz.HUM_COMFORTABLE
to
HUMCOMFORTABLE = dz.HUM_COMFORTABLE
because INF_HUMCOMFORTABLE and dz.HUM_COMFORTABLE is correct already
HUMCOMFORATBLE = INF_HUMCOMFORTABLE
to
HUMCOMFORTABLE = INF_HUMCOMFORTABLE
and
HUMCOMFORATBLE = dz.HUM_COMFORTABLE
to
HUMCOMFORTABLE = dz.HUM_COMFORTABLE
because INF_HUMCOMFORTABLE and dz.HUM_COMFORTABLE is correct already
RPi3 B+, Debain Stretch, Domoticz, Homebridge, Dashticz, RFLink, Milight, Z-Wave, Fibaro, Nanoleaf, Nest, Harmony Hub, Now try to understand pass2php
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: updateWeatherSensors (yet another buienradar script)
You are correct thanks.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
-
Joep123
- Posts: 56
- Joined: Monday 26 March 2018 18:44
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Contact:
Re: updateWeatherSensors (yet another buienradar script)
Since this afternoon (13.30 pm) I get this error:
Edit: problem solved with changing line 568 and 573 
Code: Select all
2018-05-06 18:05:01.650 dzVents: Error (2.4.5): WUS: No status provided. Temperature + humidity not set
2018-05-06 18:05:01.650 dzVents: Error (2.4.5): WUS: An error occured when calling event handler BuienRadar
2018-05-06 18:05:01.650 dzVents: Error (2.4.5): WUS: ...cripts/dzVents/generated_scripts/BuienRadar.lua:831: attempt to concatenate a nil value-
poudenes
- Posts: 667
- Joined: Wednesday 08 March 2017 9:42
- Target OS: Linux
- Domoticz version: 3.8993
- Location: Amsterdam
- Contact:
Re: updateWeatherSensors (yet another buienradar script)
Maybe you can add also the "Muggenradar", "Luchtkwaliteit", "pollen en Hooikoorts", "UV Radar" from Buienradar as well into your script?
Then you have everything from Buienradar into Domoticz
Then you have everything from Buienradar into Domoticz
RPi3 B+, Debain Stretch, Domoticz, Homebridge, Dashticz, RFLink, Milight, Z-Wave, Fibaro, Nanoleaf, Nest, Harmony Hub, Now try to understand pass2php
-
Joep123
- Posts: 56
- Joined: Monday 26 March 2018 18:44
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Contact:
Re: updateWeatherSensors (yet another buienradar script)
Code: Select all
2018-05-06 23:40:01.137 dzVents: Error (2.4.5): WUS: An error occured when calling event handler BuienRadar
2018-05-06 23:40:01.137 dzVents: Error (2.4.5): WUS: ...cripts/dzVents/generated_scripts/BuienRadar.lua:752: attempt to compare nil with number-
poudenes
- Posts: 667
- Joined: Wednesday 08 March 2017 9:42
- Target OS: Linux
- Domoticz version: 3.8993
- Location: Amsterdam
- Contact:
Re: updateWeatherSensors (yet another buienradar script)
I see many times that the "rain rate" sensor type rain showing a red banner. now its 17:44 last update on this device is 12:21
I don't know if this error is linked to this device:
I don't know if this error is linked to this device:
Code: Select all
2018-05-07 12:20:05.641 Error: Error opening url: http://www.ogimet.com/cgi-bin/getsynop?block=06240&begin=201805070901
2018-05-07 14:20:05.769 Error: Error opening url: http://www.ogimet.com/cgi-bin/getsynop?block=06240&begin=201805071101
2018-05-07 14:25:05.828 Error: Error opening url: http://www.ogimet.com/cgi-bin/getsynop?block=06240&begin=201805071101
2018-05-07 17:06:03.110 Error: Error opening url: https://gadgets.buienradar.nl/data/raintext?lat=52.37&lon=4.90
2018-05-07 17:06:03.367 Error: dzVents: Error (2.4.5): WUS: Problem with trigger (not OK). Check it outError: 7103862
2018-05-07 17:20:05.811 Error: Error opening url: http://www.ogimet.com/cgi-bin/getsynop?block=06240&begin=201805071401RPi3 B+, Debain Stretch, Domoticz, Homebridge, Dashticz, RFLink, Milight, Z-Wave, Fibaro, Nanoleaf, Nest, Harmony Hub, Now try to understand pass2php
-
Joep123
- Posts: 56
- Joined: Monday 26 March 2018 18:44
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Contact:
Re: updateWeatherSensors (yet another buienradar script)
I think a sensor will only be updated if there is any change.poudenes wrote: Monday 07 May 2018 17:46 I see many times that the "rain rate" sensor type rain showing a red banner. now its 17:44 last update on this device is 12:21
These days there's no rain expected, so the sensor won't be updated and turns red.
To prevent sensors turning red go to SETUP > SETTINGS > OTHER. Set Sensor Timeout to (for example) 10,000.
-
poudenes
- Posts: 667
- Joined: Wednesday 08 March 2017 9:42
- Target OS: Linux
- Domoticz version: 3.8993
- Location: Amsterdam
- Contact:
Re: updateWeatherSensors (yet another buienradar script)
thanks for the answer 
RPi3 B+, Debain Stretch, Domoticz, Homebridge, Dashticz, RFLink, Milight, Z-Wave, Fibaro, Nanoleaf, Nest, Harmony Hub, Now try to understand pass2php
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: updateWeatherSensors (yet another buienradar script)
The setting for forced updates (update the sensordevice even when no change) is in the settingfile. Look for "forcedUpdateMinutes" defaults to 360 minutes but can be set to other valuespoudenes wrote: Monday 07 May 2018 17:46 I see many times that the "rain rate" sensor type rain showing a red banner. now its 17:44 last update on this device is 12:21
I don't know if this error is linked to this device:
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
- felix63
- Posts: 244
- Joined: Monday 07 December 2015 9:30
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2020.1
- Location: Gouda
- Contact:
Re: updateWeatherSensors (yet another buienradar script)
Great script, thanks!
Occasionally see these lines:
Any idea what the error is?
Cheers!
Occasionally see these lines:
Code: Select all
2018-05-07 23:00:02.367 dzVents: Info: WUS: -------------------------------------------------------------------------------------------------------------------------------------------------
2018-05-07 23:00:02.368 dzVents: Info: WUS: Luchtdruk ==>> 1015 HPa, Voorspelling: stabiel ==>> apparaat 667 (Barometer) ==>> (sub)Type: Barometer
2018-05-07 23:00:02.368 dzVents: Info: WUS: Wind ==>> 4 graden (N), Temperatuur: 15.1�C
2018-05-07 23:00:02.368 dzVents: Info: WUS: Wind ==>> Kracht: 1 Bf, Windstoten: 2.1 m/s (2 Bf) ==>> apparaat 668 (Wind) ==>> (sub)Type: Wind
2018-05-07 23:00:02.368 dzVents: Info: WUS: Zichtmeters ==>> 35.1 km ==>> apparaat 670 (Zicht) ==>> (sub)Type: Visibility
2018-05-07 23:00:02.368 dzVents: Error (2.4.5): WUS: An error occured when calling event handler status meteo
2018-05-07 23:00:02.368 dzVents: Error (2.4.5): WUS: ...oticz/scripts/dzVents/generated_scripts/status meteo.lua:752: attempt to compare nil with number
2018-05-07 23:00:02.368 dzVents: Info: WUS: ------ Finished status meteo
Cheers!
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: updateWeatherSensors (yet another buienradar script)
@felix63, glad you like it.
if you are using the latest uploaded version and did not add anything before this line, it should read
This will result in an error if the tonumber returns 0 which is the case when the weatherstation gives a "-" as value for zonintensiteitWM2.
It is / will be fixed in the next version. I expect to upload that somewhere this week but in the meantime you could try modifying the if line to
if you are using the latest uploaded version and did not add anything before this line, it should read
Code: Select all
if tonumber(rt[i].zonintensiteitWM2) < 4 then It is / will be fixed in the next version. I expect to upload that somewhere this week but in the meantime you could try modifying the if line to
Code: Select all
if tonumber(rt[i].zonintensiteitWM2) ~= nil and tonumber(rt[i].zonintensiteitWM2) < 4 then Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: updateWeatherSensors (yet another buienradar script)
New versions posted here Latest version 0.20180512
Use of setting and function file mandatory.
Please find detailed information / explanation in files and leesmij.txt
settings in wusSettings.lua
functions in wusFunctions.lua
URL errorMessages in wusErrors.lua
History since last posting
======================
20180429 Added location retrieval from domoticz settings
20180430 Adjusted Lux calculation
20180430 Fixed bug in Barometer setting (wrong dz.constants) and
20180430 Add setting for significant decimals in barometer
20180501 Get domoticzurl from system no longer required to give IP / Port in setting
20180502 Add option to separate windchill from wind device
20180504 More adjustments to Lux calculation based on SolarPower (thanks to poudeness)
20180504 Add file with Curle errors (Will be loaded in debug mode only)
20180505 Set weatherstation is now optional. Script gets nearby weatherstation based on longitude / latitude from domoticz
20180505 Script will get home address based on longitude / latitude from domoticz
20180506 Script will dump json Returns to file on request, -significant errors and when dz.LOG_DEBUG is active.
20180506 Script will load data from files in test-mode
20180507 Add option to get data from other nearby stations when getting specific data from initial station failed
20180508 Moved local vars to tables.
20180510 Moved functions to separate file
20180511 Made load data from files in test mode and dump json Returns to file mutual exclusive
20180512 Loglevel now in settings
Have Fun !
Use of setting and function file mandatory.
Please find detailed information / explanation in files and leesmij.txt
settings in wusSettings.lua
functions in wusFunctions.lua
URL errorMessages in wusErrors.lua
History since last posting
======================
20180429 Added location retrieval from domoticz settings
20180430 Adjusted Lux calculation
20180430 Fixed bug in Barometer setting (wrong dz.constants) and
20180430 Add setting for significant decimals in barometer
20180501 Get domoticzurl from system no longer required to give IP / Port in setting
20180502 Add option to separate windchill from wind device
20180504 More adjustments to Lux calculation based on SolarPower (thanks to poudeness)
20180504 Add file with Curle errors (Will be loaded in debug mode only)
20180505 Set weatherstation is now optional. Script gets nearby weatherstation based on longitude / latitude from domoticz
20180505 Script will get home address based on longitude / latitude from domoticz
20180506 Script will dump json Returns to file on request, -significant errors and when dz.LOG_DEBUG is active.
20180506 Script will load data from files in test-mode
20180507 Add option to get data from other nearby stations when getting specific data from initial station failed
20180508 Moved local vars to tables.
20180510 Moved functions to separate file
20180511 Made load data from files in test mode and dump json Returns to file mutual exclusive
20180512 Loglevel now in settings
Have Fun !
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: updateWeatherSensors (yet another buienradar script)
I had a quick look but I do not see any HTTP site that I can use and receive data in json or flat text format.poudenes wrote: Sunday 06 May 2018 23:40 Maybe you can add also the "Muggenradar", "Luchtkwaliteit", "pollen en Hooikoorts", "UV Radar" from Buienradar as well into your script?
Then you have everything from Buienradar into Domoticz![]()
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
-
poudenes
- Posts: 667
- Joined: Wednesday 08 March 2017 9:42
- Target OS: Linux
- Domoticz version: 3.8993
- Location: Amsterdam
- Contact:
Re: updateWeatherSensors (yet another buienradar script)
Ok. i saw those information on the Buienradar site.waaren wrote: Saturday 12 May 2018 23:04I had a quick look but I do not see any HTTP site that I can use and receive data in json or flat text format.poudenes wrote: Sunday 06 May 2018 23:40 Maybe you can add also the "Muggenradar", "Luchtkwaliteit", "pollen en Hooikoorts", "UV Radar" from Buienradar as well into your script?
Then you have everything from Buienradar into Domoticz![]()
RPi3 B+, Debain Stretch, Domoticz, Homebridge, Dashticz, RFLink, Milight, Z-Wave, Fibaro, Nanoleaf, Nest, Harmony Hub, Now try to understand pass2php
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: updateWeatherSensors (yet another buienradar script)
Found a bug in last uploaded version. For people already downloaded version 20180512; please download again and replace wusFunctions.lua and updateWeatherSensors.lua with latest ones.
Although I tested quite extensively, I would not be surprised to find another couple of bugs as this version has a large number of changes compared to previous one,
Please bare with me and if you find one. Please report so I can correct and re upload
Although I tested quite extensively, I would not be surprised to find another couple of bugs as this version has a large number of changes compared to previous one,
Please bare with me and if you find one. Please report so I can correct and re upload
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
- EdwinK
- Posts: 1820
- Joined: Sunday 22 January 2017 21:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version: BETA
- Location: Rhoon
- Contact:
Re: updateWeatherSensors (yet another buienradar script)
For 'pollen' I use https://www.weeronline.nl/Europa/Nederl ... on/4057944 as an iframe within Dashticz. Not sure if it has a json or other output.poudenes wrote: Sunday 13 May 2018 6:29Ok. i saw those information on the Buienradar site.waaren wrote: Saturday 12 May 2018 23:04I had a quick look but I do not see any HTTP site that I can use and receive data in json or flat text format.poudenes wrote: Sunday 06 May 2018 23:40 Maybe you can add also the "Muggenradar", "Luchtkwaliteit", "pollen en Hooikoorts", "UV Radar" from Buienradar as well into your script?
Then you have everything from Buienradar into Domoticz![]()
maybe you can't get the info ...
Running latest BETA on a Pi-3 | Toon® Thermostat (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: updateWeatherSensors (yet another buienradar script)
@Edwink,EdwinK wrote: Sunday 13 May 2018 12:50 [For 'pollen' I use https://www.weeronline.nl/Europa/Nederl ... on/4057944 as an iframe within Dashticz. Not sure if it has a json or other output.
thx but I don't know how to process the information from that site given the format it is presented in. For now I only process data that is presented in JSON or plain text format. If required I probably could also add some functions to process XML but processing HTML to get the required information is more than 1 bridge too far for my programming skills.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
-
Joep123
- Posts: 56
- Joined: Monday 26 March 2018 18:44
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Contact:
Re: updateWeatherSensors (yet another buienradar script)
No free JSON/XML, starts from 1,000 EUR/year (weeronline.nl = MeteoVista)EdwinK wrote: Sunday 13 May 2018 12:50
For 'pollen' I use https://www.weeronline.nl/Europa/Nederl ... on/4057944 as an iframe within Dashticz. Not sure if it has a json or other output.
http://www.weatheronyoursite.nl/index.p ... nt&item=15
Who is online
Users browsing this forum: No registered users and 0 guests