Okay, so here is one that is extremely functional and will WOW your friends and family. Have you ver been watching a video in a dark room, hit pause so your friend could run to the restroom only to watch him trip on the step because he couldn’t see anything? Has this happened to you? Well, the best part about Home Automation is the automated part, and this is one I really like. This little tutorial will teach you how to have your lights automatically ramp up to a certain level you choose when your video source is paused, and then return to the previous light level once the play button is pressed. VERY COOL! Once you get this done you’ve got to invite some people over for movie night to show it off!

First, into the Agents tab, and create a number variable. In this example we are going to track the level the lights are at in the loft, so we will call this variable “Loft Lighting”.

Now that we have the variable created, we need to go into the Programming tab and tell Control4 to use that variable to track the level the light is at when the pause command is pressed. In order to do this in the Device Events pane, select the room you’re programming this for. Then, under that rooms events selects commands, and in the long list of commands select “Pause”. Now, slide over to the Device Actions pane and scroll down to Variables and click on the “+” symbol to the left to get a list of all your Variables. Select your newly created number variable (in my case “Loft Lighting”) and under commands select “Set to Value of”, and in the drop down list find the dimmer that you’re working with (in my case “Loft Can Lights”), and select the “LIGHT_LEVEL”. The programming line created should look like this:

Drag that programming line the the Script (middle section of Composer). What we have done now is setup the number variable to store the level the light was at prior to the pause button being pressed. This way, we can recall to that same level later when play is pressed. (NOTE: In the room I am using as an example there are a lot of windows and ambient light during the day, so I put in a conditional statement “If tiem is night time”. This is done in the Device Actions pane under Programming Control. I realize most applications for this are theaters, in which case it will be dark regardless of the time of day so this wouldn’t apply.) Now, move back up to the Device Actions pane and select the dimmer you’re going to be controlling (in my case “Loft Can Lights”). Now, we need to create a Conditional statement here so that in case the lights are already on at a higher level than we want them to come on to when pause is pressed, they are left alone. In my case, the level I want them to ramp to is 25%. So, click on the conditional tab and select “Level is:”, then select “<” (less than), then type in the appropriate level (in my case 25%). Drop that programming line into the script. Now, bounce over to the Commands tab and select “Ramp to Level:”, choose the ramp rate you want, and type in the level you want the lights to ramp to (in my case 25%). Drop that in the script, and make sure it is nested under the conditional statment. When you’re done it should look like this:

Now, we have everything working once Pause is pressed, we just need to setup the Play button to bring things back to the way they were prior to the movie being paused. In the Room Events pane, under commands, change from Pause to Play. The Device Actions pane should still have the dimmer selected, so click on the Conditionals tab and create a Conditional for if “Level is:”, and select the level that you have the lights ramp to when pause is pressed (In my case 25%). Drop that line in the script. Now click on the little “+” symbol next to the dimmer and you’ll see a list of items drop down…it looks like this:

Select “LIGHT_LEVEL”, then under the Commands tab select “Set to Value of”, and in the drop down menu select your number variable (in my case Loft Lighting). Variables are listed at the very end of this list. Drop that line in the script and make sure it is nested underneath the conditional statment you just created. It should look like this:

There you go…all done! Now you’re friends will be amazed when the movie is paused and the lights raise to a level so you can see around the room, then return to the level they were at prior to the movie being paused. Any questions feel free to ask in the comments, or discuss it in the thread over at C4Forums, which can be found here.

Share