updateWeatherSensors (yet another buienradar script)

User avatar
EdwinK
Posts: 1379
Joined: Sunday 22 January 2017 22:46
Target OS: Raspberry Pi
Domoticz version: BETA
Location: Rhoon
Contact:

Re: updateWeatherSensors (yet another buienradar script)

Post by EdwinK » Friday 04 May 2018 16:57

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) | RFxcom | Dashticz V2

User avatar
waaren
Posts: 1209
Joined: Tuesday 03 January 2017 15:18
Target OS: Raspberry Pi
Domoticz version: Beta
Location: Netherlands
Contact:

Typo in script, causing temp+hum not being updated

Post by waaren » Sunday 06 May 2018 15:01

[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.
Last edited by waaren on Sunday 06 May 2018 15:50, edited 1 time in total.
Raspberry (debian stretch via berryboot on Synology DS916+) , Domoticz (almost) latest Beta, , dzVents 2.6, RFLink, RFXtrx433e, P1, Youless, Harmony, Hue, Yeelight, Xiaomi, HomeWizard, Zwave, Amazon echo

poudenes
Posts: 592
Joined: Wednesday 08 March 2017 10:42
Target OS: Linux
Domoticz version: 3.8993
Location: Amsterdam
Contact:

Re: updateWeatherSensors (yet another buienradar script)

Post by poudenes » Sunday 06 May 2018 15:04

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
RPi3 with OSMC - RPi3 with Domoticz - Dashticz - MiLight - Nanolead Aurora - KaKu - Logitech Hamony - Nest - RFLink

User avatar
waaren
Posts: 1209
Joined: Tuesday 03 January 2017 15:18
Target OS: Raspberry Pi
Domoticz version: Beta
Location: Netherlands
Contact:

Re: updateWeatherSensors (yet another buienradar script)

Post by waaren » Sunday 06 May 2018 15:49

You are correct thanks.
Raspberry (debian stretch via berryboot on Synology DS916+) , Domoticz (almost) latest Beta, , dzVents 2.6, RFLink, RFXtrx433e, P1, Youless, Harmony, Hue, Yeelight, Xiaomi, HomeWizard, Zwave, Amazon echo

Joep123
Posts: 26
Joined: Monday 26 March 2018 18:44
Target OS: Raspberry Pi
Domoticz version: Beta
Contact:

Re: updateWeatherSensors (yet another buienradar script)

Post by Joep123 » Sunday 06 May 2018 18:09

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-)

poudenes
Posts: 592
Joined: Wednesday 08 March 2017 10:42
Target OS: Linux
Domoticz version: 3.8993
Location: Amsterdam
Contact:

Re: updateWeatherSensors (yet another buienradar script)

Post by poudenes » 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 with OSMC - RPi3 with Domoticz - Dashticz - MiLight - Nanolead Aurora - KaKu - Logitech Hamony - Nest - RFLink

Joep123
Posts: 26
Joined: Monday 26 March 2018 18:44
Target OS: Raspberry Pi
Domoticz version: Beta
Contact:

Re: updateWeatherSensors (yet another buienradar script)

Post by Joep123 » Sunday 06 May 2018 23:43

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: 592
Joined: Wednesday 08 March 2017 10:42
Target OS: Linux
Domoticz version: 3.8993
Location: Amsterdam
Contact:

Re: updateWeatherSensors (yet another buienradar script)

Post by poudenes » 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:

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
RPi3 with OSMC - RPi3 with Domoticz - Dashticz - MiLight - Nanolead Aurora - KaKu - Logitech Hamony - Nest - RFLink

Joep123
Posts: 26
Joined: Monday 26 March 2018 18:44
Target OS: Raspberry Pi
Domoticz version: Beta
Contact:

Re: updateWeatherSensors (yet another buienradar script)

Post by Joep123 » Monday 07 May 2018 18:03

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.

poudenes
Posts: 592
Joined: Wednesday 08 March 2017 10:42
Target OS: Linux
Domoticz version: 3.8993
Location: Amsterdam
Contact:

Re: updateWeatherSensors (yet another buienradar script)

Post by poudenes » Monday 07 May 2018 18:43

thanks for the answer :)
RPi3 with OSMC - RPi3 with Domoticz - Dashticz - MiLight - Nanolead Aurora - KaKu - Logitech Hamony - Nest - RFLink

User avatar
waaren
Posts: 1209
Joined: Tuesday 03 January 2017 15:18
Target OS: Raspberry Pi
Domoticz version: Beta
Location: Netherlands
Contact:

Re: updateWeatherSensors (yet another buienradar script)

Post by waaren » Monday 07 May 2018 21:54

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
Raspberry (debian stretch via berryboot on Synology DS916+) , Domoticz (almost) latest Beta, , dzVents 2.6, RFLink, RFXtrx433e, P1, Youless, Harmony, Hue, Yeelight, Xiaomi, HomeWizard, Zwave, Amazon echo

User avatar
felix63
Posts: 164
Joined: Monday 07 December 2015 10:30
Target OS: Raspberry Pi
Domoticz version: 3.8275
Location: Gouda
Contact:

Re: updateWeatherSensors (yet another buienradar script)

Post by felix63 » Monday 07 May 2018 23:22

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!

User avatar
waaren
Posts: 1209
Joined: Tuesday 03 January 2017 15:18
Target OS: Raspberry Pi
Domoticz version: Beta
Location: Netherlands
Contact:

Re: updateWeatherSensors (yet another buienradar script)

Post by waaren » Tuesday 08 May 2018 0:11

@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 
Raspberry (debian stretch via berryboot on Synology DS916+) , Domoticz (almost) latest Beta, , dzVents 2.6, RFLink, RFXtrx433e, P1, Youless, Harmony, Hue, Yeelight, Xiaomi, HomeWizard, Zwave, Amazon echo

User avatar
waaren
Posts: 1209
Joined: Tuesday 03 January 2017 15:18
Target OS: Raspberry Pi
Domoticz version: Beta
Location: Netherlands
Contact:

Re: updateWeatherSensors (yet another buienradar script)

Post by waaren » Saturday 12 May 2018 22:58

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 !
Raspberry (debian stretch via berryboot on Synology DS916+) , Domoticz (almost) latest Beta, , dzVents 2.6, RFLink, RFXtrx433e, P1, Youless, Harmony, Hue, Yeelight, Xiaomi, HomeWizard, Zwave, Amazon echo

User avatar
waaren
Posts: 1209
Joined: Tuesday 03 January 2017 15:18
Target OS: Raspberry Pi
Domoticz version: Beta
Location: Netherlands
Contact:

Re: updateWeatherSensors (yet another buienradar script)

Post by waaren » 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.
Raspberry (debian stretch via berryboot on Synology DS916+) , Domoticz (almost) latest Beta, , dzVents 2.6, RFLink, RFXtrx433e, P1, Youless, Harmony, Hue, Yeelight, Xiaomi, HomeWizard, Zwave, Amazon echo

poudenes
Posts: 592
Joined: Wednesday 08 March 2017 10:42
Target OS: Linux
Domoticz version: 3.8993
Location: Amsterdam
Contact:

Re: updateWeatherSensors (yet another buienradar script)

Post by poudenes » 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 ...
RPi3 with OSMC - RPi3 with Domoticz - Dashticz - MiLight - Nanolead Aurora - KaKu - Logitech Hamony - Nest - RFLink

User avatar
waaren
Posts: 1209
Joined: Tuesday 03 January 2017 15:18
Target OS: Raspberry Pi
Domoticz version: Beta
Location: Netherlands
Contact:

Re: updateWeatherSensors (yet another buienradar script)

Post by waaren » Sunday 13 May 2018 8:39

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
Raspberry (debian stretch via berryboot on Synology DS916+) , Domoticz (almost) latest Beta, , dzVents 2.6, RFLink, RFXtrx433e, P1, Youless, Harmony, Hue, Yeelight, Xiaomi, HomeWizard, Zwave, Amazon echo

User avatar
EdwinK
Posts: 1379
Joined: Sunday 22 January 2017 22:46
Target OS: Raspberry Pi
Domoticz version: BETA
Location: Rhoon
Contact:

Re: updateWeatherSensors (yet another buienradar script)

Post by EdwinK » Sunday 13 May 2018 12:50

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.
Running latest BETA on a Pi-3 | Toon® Thermostat (rooted) | RFxcom | Dashticz V2

User avatar
waaren
Posts: 1209
Joined: Tuesday 03 January 2017 15:18
Target OS: Raspberry Pi
Domoticz version: Beta
Location: Netherlands
Contact:

Re: updateWeatherSensors (yet another buienradar script)

Post by waaren » Sunday 13 May 2018 13:39

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.
Raspberry (debian stretch via berryboot on Synology DS916+) , Domoticz (almost) latest Beta, , dzVents 2.6, RFLink, RFXtrx433e, P1, Youless, Harmony, Hue, Yeelight, Xiaomi, HomeWizard, Zwave, Amazon echo

Joep123
Posts: 26
Joined: Monday 26 March 2018 18:44
Target OS: Raspberry Pi
Domoticz version: Beta
Contact:

Re: updateWeatherSensors (yet another buienradar script)

Post by Joep123 » Sunday 13 May 2018 13:49

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

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest