-
8th January 2008, 09:30 PM
#1
Automated Home Legend
Help; macro to control manual light switch
I am after some help with creating a macro or other solution to control a light from a light switch as well as automatically from sensors. Sounds more simple than it is as I'll try to explain.
Automatic light control defined by light level sensor, time of day, presence and timer.
Manual input from digital switch.
The automatic side works fine, someone enters, its dark, the right time of day the light turns on. They leave and presence removed, light goes off.
Now to explain what I am trying to do with the manual input from the switch. Basically it should be able to override the current light state regardless of other conditions. So if the light is off and the switch operated the light should come on (regardless of time of day or light level). If the light is on then it can be turned off immediately by pressing the button. However, if the light is left on then the automated presence removal should turn it off after the timer period.
Now the main problem I have is the macro functionality doesn't allow for state interrogation or extended logic. So I can't do something like.... if light is off then turn on...
I have made some progress by using two macros; one to switch light on, one to turn light off, both macros are always running and registered against the light condition change. The continuing problem is that when the light conditions would normally have the light off and it is manually turned on the override flag is set and doesn't get reset. Therefore, automatic control no longer works (lights will turn on even when they should be off due to time of day or light level when presence is detected)
Paul
Last edited by Paul_B; 9th January 2008 at 12:05 AM.
-
8th January 2008, 11:49 PM
#2
Moderator
So if I understand correctly, when you first press the button it enters an override state, on or off depending on prior state, a subsequent button press clears the override, but there is also an timeout that cancels the override period.
Or did you mean the second press retains the manual override, but toggles the overridden state ?
I think we are about to explore the detailed logic of the override vs toggle actions ... I note that the latest help has some additional notes covering these.
I have a suspicion that you may want to just apply a toggle on the light from the button, and may be enable auto clear override on period change.
But I'm not sure I've entirely understood your desired scheme.
-
9th January 2008, 12:16 AM
#3
Moderator
So I've just done a quick experiment and I think you just want to set the button to toggle the light. Toggle is sort of intelligent, in that it is exactly a toggle when the light is set to manual, but "does the right thing" when the light is automated in some way.
Using override actions can confound the logic since the response depends on presence and the button press can create presence depending where it is.
Have a play with behaviour panels for the room, the light and the button all open at the same time so you can see the status and simulate presence/no presence. I seem to have noticed some changes to the light behaviour panel in particular to help clear up confusions round this topic.
Or I've misunderstood the requirement :-)
-
9th January 2008, 10:21 AM
#4
-
9th January 2008, 02:36 PM
#5
Automated Home Legend
Thanks for the advice guys. I am sure I tried the toggle function initially but it didn't quite do what I wanted. However, I didn't make notes at the time and now can't remember what was wrong.
I'll re-try this again tonight and this time make some notes!
The one thing that maybe strange with this particuliar light is it is in an ensuite location. The actual switch is in the next room.
I'll describe some specifics tonight when I get home.
Paul
-
10th January 2008, 01:40 AM
#6
Automated Home Legend
The automated lighting logic is a good example of how something that might be perceived to be 'easy' is actually quite complex because when you sit down and analyse different peoples' requirements you sometimes find that you need some sort of mind reading facility. Take a simpler example of heating adjustments: Someone is perhaps feeling a bit cold and requests a set point increase from the system, sounds simple enough, but then how long should that set point increase persist? Remember we are talking about automation here so its a bit of a failing if the user has to remember to go and reduce the setting at some later time and this is further complicated by the fact that the system will likely be following a profiled set point curve so it may not be so obvious later on that the setting has been increased. Its the same with lighting - you get some situations where the user is effectively saying they want the automation turned off or mode changed - but how long for? Should they have to remember to then turn it back on? Worse still - someone else later walks into room and automation does not respond as expected. When you get used to automation even occasional incidents of it not working as expected feel worse than not having automation in the first place.
Cortex uses heuristics to try and second guess peoples intentions, but even so I can tell you that in the new release of Cortex you will likely see a revised lighting engine which is perhaps more complicated to 'play with' but provides better user access to the automation parameters and some new heuristics.
Karam
IDRATEK LTD
-
10th January 2008, 11:35 AM
#7
Automated Home Legend
Help; macro to control manual light switch
sorry, slight aside :
magic ... Kevin asked a while back why I went with Idratek, and I found it difficult to give a short reply ... but this is exactly it ... ie: Karam & his colleagues do actually understand the problem, do understand what automation needs to be, and are making it happen !
-
10th January 2008, 12:29 PM
#8
Automated Home Legend
Heuristics is a word I have come across a number of times, but I am not sure I really understand it. Can anyone give a simply explanation as to what heuristics is?
Paul
-
10th January 2008, 02:02 PM
#9
Automated Home Guru
-
10th January 2008, 10:05 PM
#10
Automated Home Legend
Back to the original topic of the thread. I have tested disabling the macros I am using and setting the light input to toggle.
Situation:
Operating period = valid
Light level = dark (therefore, light should come on)
Light switch pressed
Light comes on
Add presence, light stays on
Remove presence, light goes off after timer countdown
The above situation works as I want.
Now to describe what doesn't work how I want.
Situation:
Operating period = valid
Light level = dark (therefore, light should come on)
Light switch pressed
Light comes on
Add presence, light stays on
Remove presence and immediately press light switch
Light goes off immediately (as I want)
However, the override flag gets set on the light object. The override then doesn't clear so if I walk back into the room presence detection doesn't turn the light on because of the override flag still being set.
Paul
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules