jpcurcio Senior Member
Joined: April 01 2007 Location: United States
Online Status: Offline Posts: 119
|
Posted: January 03 2008 at 16:40 | IP Logged
|
|
|
In the new year, I'm going to try to make my lighting control a little smarter and more sophisticated. I'll try to explain what I mean... here are a few examples:
1. I have a "dusk" timed event/macro to turn on certain lights. However, if I manually turned on a light, I probably don't want the "dusk" timed event/macro to change the level... but I still want it to turn off with the "go to bed" event.
2. I want to be able to over-ride a setting for one (or multiple) lights, but then restore it to the state it should be in afterwards. For example, if a timed event turns a light on to 80%, but I want to locally dim it to 20%, it should stay there until I "restore" it. At that point, if the light should have turned off via a timed event, I would want it to turn off.
In order to do this, there are a few things that I need to do... one is store the "previous value" of the light. This is easy to do using variables, but is there a better way?
Also, what I want to happen might depend on the current status. Short of including a status check for every lamp in every a macro prior to executing the command (every single time, mind you), is there a simpler way?
As an example, take this scenario:
Timed event to turn on kitchen light. If light is on already, do nothing, but if it's off, turn it on. Next, I want to execute a "special" command to dim the light, but later restore the value. However, if the kitchen light should have turned off by a timed event, I want to turn it off, not resotre the previous dim level.
Make sense? I'm sure I can do this by "brute force" programming, but any suggestions to streamline the process?
Thanks...
-John
|