Search found 5 matches

by stefanvn
Tuesday 16 February 2016 13:21
Forum: LUA
Topic: Real-time solar data : azimuth, Altitude, Lux sensor... [closed]
Replies: 245
Views: 67514

Re: Real-time solar data : azimuth, Altitude, Lux sensor...

Hi Guys,

How do you use the solar radiation in other scripts? I.e. How to read the value and switch lights on/off based on the amount of Lux?

I have tried numerous things, but I keep failing in using the lux value in another script.
by stefanvn
Sunday 07 February 2016 20:17
Forum: LUA
Topic: Real-time solar data : azimuth, Altitude, Lux sensor... [closed]
Replies: 245
Views: 67514

Re: Real-time solar data : azimuth, Altitude, Lux sensor...

Hi Alexsh1,

Thanks for your reply. Please note that the script that jmleglise provided is working perfectly! It is just that I can't seem to get other scripts going to switch lights on and off based on the Lux value calculated in the script. Hence my request for help in this topic.
by stefanvn
Sunday 07 February 2016 11:41
Forum: LUA
Topic: Real-time solar data : azimuth, Altitude, Lux sensor... [closed]
Replies: 245
Views: 67514

Re: Real-time solar data : azimuth, Altitude, Lux sensor...

Still not working....I'm getting a bit frustrated. Seems to me that I'm missing something obvious or something. What I did sofar: * Check value in Setup->More options->Events->Show Current States: Value is present. * Check whether it is the only device called "Lux": it is. * print(otherdevices ...
by stefanvn
Saturday 06 February 2016 17:22
Forum: LUA
Topic: Real-time solar data : azimuth, Altitude, Lux sensor... [closed]
Replies: 245
Views: 67514

Re: Real-time solar data : azimuth, Altitude, Lux sensor...

Hi Jimlegise, Thanks for your reply. I tried your suggestion in a small script: ommandarray={} if tonumber(otherdevices_svalues['Lux'])>1000 then print("on") end return commandarray Again, I'm getting an error message: lua: luxswitch.lua:2: attempt to index global 'otherdevices_svalues' (a nil value ...
by stefanvn
Saturday 06 February 2016 10:11
Forum: LUA
Topic: Real-time solar data : azimuth, Altitude, Lux sensor... [closed]
Replies: 245
Views: 67514

Re: Real-time solar data : azimuth, Altitude, Lux sensor...

Thanks for the script, this works great! I also wanted to use this script to switch the lights in and around the house, based on the amount of light. However, if I try to retrieve the Lux-value in a separate LUA script with the "otherdevices_svalues command, I'm constantly getting an error. The code ...