Night light scene

Hi All,

First of all i’m sorry if this has already been answered however i’m new to the forum in terms of posting. However I need help with something i’m trying to do… I’ll tell you what I have in terms of physical devices…

Vera Lite Controller
Fibaro Universal module which monitors two sensors in my house
Fibaro dimming module on the landing.

What i’m trying to do…

I want to set up a scene where between the hours of 1am and 5am, if the motion sensor is triggered on the landing then the light will come on for 2 minutes and only at 20%.

I have always used the normal vera scene to create the scenes but not used scripting, i’m hoping someone has done this and can help…?

The motion sensor ID is e2 and the landing light ID is 9, can anyone help with how I get this working…?

Thanks Tesh ???

This scene would use a multi-condition trigger. It utilizes a logical AND.
TimeFrame AND Motion Then Light@20% Then OFF

Standard Vera scenes cannot do AND logic through the GUI interface. Instead you must utilize LUA code or a plugin. Fortunately, your desired scenario is a common one that can be achieved fairly easily.

For the LUA code approach, I recommend @RexBeckett’s Conditional Scene Execution: Some Examples tutorial.

For the easier plugin approach, I recommend @RichardTSchaefer’s Program Logic Event Generator(PLEG) plugin. @RexBecket wrote a tutorial for that too. See: PLEG Basics - An Introduction to the Program Logic Event Generator

Edit: When searching, be sure to use the site:micasaverde.com keyword on Google. e.g
https://www.google.com/search?q=site:micasaverde.com+night+light

Thanks I was just watching a video on PLEG which I’ve created a switch however i’m not sure the schedules is turning off when I’ve set it too…

But I will check the links above out, thanks agaon :slight_smile:

Note that with PLEG(and Vera) conditions become true at the time of transition. So your schedule is not On(true) until the moment of the On time passes.

Example: The current time is 9pm. You create a PLEG schedule to turn on a light between 6pm and 11:59pm, but it doesn’t seem to work. That is because the schedule won’t transition to true until 8pm the next day!

If you changed that schedule to be from 9:02pm until 11:59pm, then it will start working correctly in two minutes.