Page 5 of 8

Re: updateWeatherSensors (yet another buienradar script)

Posted: Friday 04 May 2018 16:57
by EdwinK
It's once in a while. So not really a concern. Just something i noticed between the thousands of Toon-errors

Typo in script, causing temp+hum not being updated

Posted: Sunday 06 May 2018 15:01
by waaren
[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.

Re: updateWeatherSensors (yet another buienradar script)

Posted: Sunday 06 May 2018 15:04
by poudenes
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

Re: updateWeatherSensors (yet another buienradar script)

Posted: Sunday 06 May 2018 15:49
by waaren
You are correct thanks.

Re: updateWeatherSensors (yet another buienradar script)

Posted: Sunday 06 May 2018 18:09
by Joep123
Since this afternoon (13.30 pm) I get this error:

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
Edit: problem solved with changing line 568 and 573 8-)

Re: updateWeatherSensors (yet another buienradar script)

Posted: Sunday 06 May 2018 23:40
by poudenes
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 :)

Re: updateWeatherSensors (yet another buienradar script)

Posted: Sunday 06 May 2018 23:43
by Joep123

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

Re: updateWeatherSensors (yet another buienradar script)

Posted: Monday 07 May 2018 17:46
by poudenes
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:

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=201805071401

Re: updateWeatherSensors (yet another buienradar script)

Posted: Monday 07 May 2018 18:03
by Joep123
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
I think a sensor will only be updated if there is any change.
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.

Re: updateWeatherSensors (yet another buienradar script)

Posted: Monday 07 May 2018 18:43
by poudenes
thanks for the answer :)

Re: updateWeatherSensors (yet another buienradar script)

Posted: Monday 07 May 2018 21:54
by waaren
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

I don't know if this error is linked to this device:
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 values

Re: updateWeatherSensors (yet another buienradar script)

Posted: Monday 07 May 2018 23:22
by felix63
Great script, thanks!

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
Any idea what the error is?

Cheers!

Re: updateWeatherSensors (yet another buienradar script)

Posted: Tuesday 08 May 2018 0:11
by waaren
@felix63, glad you like it.
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 
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

Code: Select all

if tonumber(rt[i].zonintensiteitWM2) ~= nil and tonumber(rt[i].zonintensiteitWM2) < 4 then 

Re: updateWeatherSensors (yet another buienradar script)

Posted: Saturday 12 May 2018 22:58
by waaren
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 !

Re: updateWeatherSensors (yet another buienradar script)

Posted: Saturday 12 May 2018 23:04
by waaren
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 :)
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.

Re: updateWeatherSensors (yet another buienradar script)

Posted: Sunday 13 May 2018 6:29
by poudenes
waaren wrote: Saturday 12 May 2018 23:04
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 :)
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.
Ok. i saw those information on the Buienradar site. :) maybe you can't get the info ...

Re: updateWeatherSensors (yet another buienradar script)

Posted: Sunday 13 May 2018 8:39
by waaren
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

Re: updateWeatherSensors (yet another buienradar script)

Posted: Sunday 13 May 2018 12:50
by EdwinK
poudenes wrote: Sunday 13 May 2018 6:29
waaren wrote: Saturday 12 May 2018 23:04
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 :)
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.
Ok. i saw those information on the Buienradar site. :) maybe you can't get the info ...
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.

Re: updateWeatherSensors (yet another buienradar script)

Posted: Sunday 13 May 2018 13:39
by waaren
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.
@Edwink,

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.

Re: updateWeatherSensors (yet another buienradar script)

Posted: Sunday 13 May 2018 13:49
by Joep123
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.
No free JSON/XML, starts from 1,000 EUR/year (weeronline.nl = MeteoVista)
http://www.weatheronyoursite.nl/index.p ... nt&item=15