Page 1 of 1

lux calculation via lua

Posted: Saturday 25 February 2017 19:49
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

Re: lux calculation via lua

Posted: Saturday 25 February 2017 20:19
by jvdz
How is the script ran to retrieve the weather information? The linkied page is pretty empty.

Jos

Re: lux calculation via lua

Posted: Saturday 25 February 2017 20:35
by tiga

Re: lux calculation via lua

Posted: Saturday 25 February 2017 22:34
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...:)

Re: lux calculation via lua

Posted: Saturday 25 February 2017 22:41
by tiga
thanks that slipt my mind..... i had it on "all" now i changed it to "time".......i will run it again thanks