Continuous light adjustment

Hi,

just wanted to check if this is possible, then maybe implement it down the road…

Say I activate a scene, there shouldn’t beva problem adjusting dim levels based on time of day or light sensors, right? Now - how about creating a scene called “comfortable light” that will, either continuously or at set intervals, adjust the light? The light needed in the afternoon would be a lot brighter than it would have to be at 9 pm…

Perhaps not continuous but you could use Lua code in a scene to achieve a similar result.

I would do it by having the scene turn on the light and then call a delayed function.

The delayed function would first check if the light was still on, if not it would just exit. If the light is still on, get the current time and use a table to get the required dim level. Check the current dim level and, if different, set the new level. Finally make another delayed call to itself in, say, ten minutes.

You can see code examples using delayed functions here.

Now this simple approach would get broken by a Vera restart - you would need to re-execute the comfort scene.

An alternative would be to use the Program Logic Event Generator (PLEG) plugin. PLEG schedules and timers are maintained through restarts so the logic could be more robust. See PLEG Basics for an introduction.