lux calculation via lua

Moderator: leecollings

Post Reply
tiga
Posts: 159
Joined: Friday 27 May 2016 20:15
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: nederland
Contact:

lux calculation via lua

Post by tiga »

hello
yesterday i found this super cool script to calculate the lux value at a location.

https://www.domoticz.com/wiki/Real-time ... Lux_sensor...

they use the weatherunderground api for this and they warn you to not run the script to mutch, so you wont go over your free limit.
the standard runtime is every 5 minutes.

i raised it up to 15 minutes to test the program.

but within minutes i got a warning from weather underground that i made 76 calls within !!one minute!!
and the limit is 10 per minute

is there any way to get this working with a free weater underground account??

thanks
User avatar
jvdz
Posts: 2269
Joined: Tuesday 30 December 2014 19:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.107
Location: Netherlands
Contact:

Re: lux calculation via lua

Post by jvdz »

How is the script ran to retrieve the weather information? The linkied page is pretty empty.

Jos
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
tiga
Posts: 159
Joined: Friday 27 May 2016 20:15
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: nederland
Contact:

Re: lux calculation via lua

Post by tiga »

Nautilus
Posts: 722
Joined: Friday 02 October 2015 12:12
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Finland
Contact:

Re: lux calculation via lua

Post by Nautilus »

tiga wrote:hello
yesterday i found this super cool script to calculate the lux value at a location.

https://www.domoticz.com/wiki/Real-time ... Lux_sensor...

they use the weatherunderground api for this and they warn you to not run the script to mutch, so you wont go over your free limit.
the standard runtime is every 5 minutes.

i raised it up to 15 minutes to test the program.

but within minutes i got a warning from weather underground that i made 76 calls within !!one minute!!
and the limit is 10 per minute

is there any way to get this working with a free weater underground account??

thanks
When a lua script runs more often than intended, the first thing to check is that the "type" is correct. This script must be defined as time script so check the drop down menu below script name if you use the built-in script editor, or make sure the name is beginning with "script_time_" if it saved in the Domoticz script directory in the file system. There's quite a lot of discussion of the usage of this script already here: viewtopic.php?f=23&t=10077

In any case, it works perfectly fine with the free wunderground account as long as you have it running with the intended interval...:)
tiga
Posts: 159
Joined: Friday 27 May 2016 20:15
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: nederland
Contact:

Re: lux calculation via lua

Post by tiga »

thanks that slipt my mind..... i had it on "all" now i changed it to "time".......i will run it again thanks
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest