updateWeatherSensors (yet another buienradar script)  [SOLVED]

Moderator: leecollings

DannyG
Posts: 3
Joined: Tuesday 17 April 2018 22:43
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: updateWeatherSensors (yet another buienradar script)

Post by DannyG »

just one request
barometer without decimals ;)
User avatar
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)

Post by waaren »

DannyG wrote: Monday 30 April 2018 23:39 just one request
barometer without decimals ;)
Done. Made it with a user controlled amount of decimals for display and a separate amount of decimals for sending it to the database to keep the graph as smooth as possible.

Updated zip in first post
Last edited by waaren on Tuesday 01 May 2018 10:33, 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
EddyG
Posts: 1042
Joined: Monday 02 November 2015 5:54
Target OS: -
Domoticz version:

Re: updateWeatherSensors (yet another buienradar script)

Post by EddyG »

waaren wrote: Monday 30 April 2018 21:43 Hi EddyG,

not quite sure what you propose. The "wind" device is already shown on both the temperature and the weather tab. If I mis-interpret your suggestion please let me know.
What I mean is that there exists a "wind temp chill" device in your case "wind Rotterdam"
These produce a device a in the Weather tab and a device in the Temperature tab, AND they both have the same name, AND the temp is a double with the Temp device already created.
It might be better to have a "Wind" device, a "Temp" device and a "Chill" (eg. Temp device wit the name Chill temp.)
So separate the Wind and Chill in 2 devices.
EddyG
Posts: 1042
Joined: Monday 02 November 2015 5:54
Target OS: -
Domoticz version:

Re: updateWeatherSensors (yet another buienradar script)

Post by EddyG »

EddyG wrote: Friday 27 April 2018 19:14 I can not figure out why this does NOT work.

Code: Select all

    local function getUservars()
       require ('weatherSettings')
    end

    if not(pcall(getUservars)) then
But only this WORKS!

Code: Select all

require ('weatherSettings')
Anybody any idea :?:
Funny thing!
"if not(pcall(getUservars)) then" does NOT work, but "if pcall(getUservars) then" WORKS!
EddyG
Posts: 1042
Joined: Monday 02 November 2015 5:54
Target OS: -
Domoticz version:

Re: updateWeatherSensors (yet another buienradar script)

Post by EddyG »

DannyG wrote: Monday 30 April 2018 23:39 just one request
barometer without decimals ;)
Rounded to 1 decimal, because that is the way it is used in the graphs.
DannyG
Posts: 3
Joined: Tuesday 17 April 2018 22:43
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: updateWeatherSensors (yet another buienradar script)

Post by DannyG »

EddyG wrote: Tuesday 01 May 2018 11:04
Rounded to 1 decimal, because that is the way it is used in the graphs.
signDecimalsBaroDatabase = 2; -- Use significant decimals in barometer value (in database)
signDecimalsBaroDisplay = 0; -- Use significant decimals in barometer display


it's up to us ;)
User avatar
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)

Post by waaren »

EddyG wrote: Tuesday 01 May 2018 10:17


It might be better to have a "Wind" device, a "Temp" device and a "Chill" (eg. Temp device wit the name Chill temp.)
So separate the Wind and Chill in 2 devices.
Sent you a PM with a link to a test version that adds the requested option.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
EddyG
Posts: 1042
Joined: Monday 02 November 2015 5:54
Target OS: -
Domoticz version:

Re: updateWeatherSensors (yet another buienradar script)

Post by EddyG »

I tested the seperate Chill temp and it works fine.
B.t.w. I changed in the database the wind/chill device from subtype 4 to subtype 1
Then you get a Wind only device, but domoticz is fine with the fact that the script is still sending the the extra temp values.
So now I got a converted (from Wind/Chill to Wind) device with the correct wind values and no extra Wind/Chill device in the Temperature tab.
And I got an extra Chill temperature device in the Temperature tab with only the Chill temperature next to the Temp/Hum device from Buienradar.

Perfect thanks. But please add some description to the scripts so Noobs can understand it too.

As for speed, it takes about 1,5 seconds to complete the scripts and processing the output from Buienradar.
User avatar
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)

Post by waaren »

Thanks for testing,

i will post the updated version later today.

If you comment out the devices you don't need/want, the script will not try to update those. And just delete the device you don't want anymore.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
User avatar
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)

Post by waaren »

New versions posted here Latest version 0.20180502

Use of setting file mandatory now.
Please find detailed information / explanation in files

History since last posting
======================
20180427 Added 5 and 10 day forecast device and information
20180429 Setting file mandatory now
20180429 Finished translations
20180429 Added location retrieval from domoticz settings
20180430 Adjusted Lux calculation
20180501 Get domoticzurl from system no longer required to give IP / Port in setting
20180502 Add option to separate windchill from wind device

Have Fun !
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: updateWeatherSensors (yet another buienradar script)

Post by EdwinK »

Are JustWind and Windchill text devices or wind+temp+chill 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: updateWeatherSensors (yet another buienradar script)

Post by waaren »

justwind is just a wind only device :D
windchil is just a temp only device
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
EddyG
Posts: 1042
Joined: Monday 02 November 2015 5:54
Target OS: -
Domoticz version:

Re: updateWeatherSensors (yet another buienradar script)

Post by EddyG »

I get this error a few times a day.

Code: Select all

2018-05-02 22:40:03.477 Error: Error opening url: https://gadgets.buienradar.nl/data/raintext?lat=51.96&lon=5.56
2018-05-02 22:40:04.139 Error: dzVents: Error (2.4.5): WUS: Problem with trigger (not OK). Check it outError: 7103862
It seems that buienrader does not respond.
Do others get this error too, or is it my Internet connection?
User avatar
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)

Post by EdwinK »

waaren wrote: Wednesday 02 May 2018 22:45 justwind is just a wind only device :D
windchil is just a temp only device
Thanks.
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: updateWeatherSensors (yet another buienradar script)

Post by waaren »

EddyG wrote: Thursday 03 May 2018 6:58 I get this error a few times a day.

Code: Select all

2018-05-02 22:40:03.477 Error: Error opening url: https://gadgets.buienradar.nl/data/raintext?lat=51.96&lon=5.56
2018-05-02 22:40:04.139 Error: dzVents: Error (2.4.5): WUS: Problem with trigger (not OK). Check it outError: 7103862
It seems that buienrader does not respond.
Do others get this error too, or is it my Internet connection?
I see the same sometimes but luckily not very often.

Code: Select all

2018-04-30 23:45:04.724  Error: Error opening url: https://gadgets.buienradar.nl/data/raintext?lat=51.xx&lon=4.xx
2018-05-01 11:22:20.232  Error: Error opening url: https://gadgets.buienradar.nl/data/raintext?lat=51.xx&lon=4.xx
2018-05-01 11:31:08.313  Error: Error opening url: https://gadgets.buienradar.nl/data/raintext?lat=51.xx&lon=4.xx
2018-05-01 13:17:04.420  Error: Error opening url: https://gadgets.buienradar.nl/data/raintext?lat=51.xx&lon=4.xx
2018-05-01 21:05:08.098  Error: Error opening url: https://gadgets.buienradar.nl/data/raintext?lat=51.xx&lon=4.xx
2018-05-02 08:00:14.741  Error: Error opening url: https://gadgets.buienradar.nl/data/raintext?lat=51.xx&lon=4.xx
2018-05-02 14:00:15.068  Error: Error opening url: https://gadgets.buienradar.nl/data/raintext?lat=51.xx&lon=4.xx
Debian buster, bullseye on RPI-4, Intel NUC.
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)

Post by poudenes »

Can you also post the new scripts in the first post between "" :)
download zip, unzip, copy, paste instead of copy paste ... last option is faster hehe
RPi3 B+, Debain Stretch, Domoticz, Homebridge, Dashticz, RFLink, Milight, Z-Wave, Fibaro, Nanoleaf, Nest, Harmony Hub, Now try to understand pass2php
User avatar
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)

Post by waaren »

poudenes wrote: Thursday 03 May 2018 23:12 Can you also post the new scripts in the first post between "" :)
download zip, unzip, copy, paste instead of copy paste ... last option is faster hehe
Unfortunately the script is now too big to post it like that. The Forum rules do not allow it
Debian buster, bullseye on RPI-4, Intel NUC.
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)

Post by poudenes »

aha thats why :D ok thanks!

(offtopic: new email with log files lux/solar send also this morning)
RPi3 B+, Debain Stretch, Domoticz, Homebridge, Dashticz, RFLink, Milight, Z-Wave, Fibaro, Nanoleaf, Nest, Harmony Hub, Now try to understand pass2php
User avatar
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)

Post by EdwinK »

Code: Select all

dzVents: Error (2.4.5): WUS: Problem with trigger (not OK). Check it outError: 28
What's going on?
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: updateWeatherSensors (yet another buienradar script)

Post by waaren »

Hi Edwink,

Error 28 points in the direction of a server timeout.
Do you encounter this error very often or once in a while ?

If more then once, I would appreciate it if you could collect them (including time / date) and report back.

Thanks in advance.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest