More on Curtains and Anti-Presence

| No Comments | No TrackBacks
I mentioned before that there were two recent additions to Cortex that made a significant improvement to my curtain automation.
The other change is the introduction of anti-presence or unoccupied features. 

Before the new feature, when one person left the room, the presence state would instantly be set to unoccupied, with the light timer being used to hold the light state in case there was another person remaining in the room, basically giving a delay long enough to have a good chance of picking up some motion.

For cases where you want to take action when a room becomes occupied, this works well enough.

However, if you wanted to take an action on a room being empty, this behaviour was not ideal, since the action would still take place even when the room was still occupied. The net effect is that if one person left the bedroom in the morning the curtains would open, much to the annoyance of the other occupant. When your bedroom is overlooked this can be more significant.

Attempts to work out "safe" sequences of presence in other rooms as a proxy for the bedroom being unoccupied (such as bathroom -> kitchen) didn't help, especially when you have irregular waking hours due to shift work, with maybe only one person getting up for some time. In the end I had to set the curtains to open later than the latest possible getting up time just for security purposes.

So the introduction of delayed unoccupied has allowed me to resolve this, with the addition of a macro. First the delayed unoccupied setting:-

delayed-unoccupied.png
This has quite a long delay period, since it is a bedroom and motions are quite sparse (or perhaps duvets reduce the motion target).Here you can see that the delayed unoccupied timer is holding a nominal presence 17 minutes since the room state became unoccupied (in this case due to timeout through lack of motion detected with the door closed). By experimentation and examining the motion detect graphs I found that 20 minutes seemed to be a good time for a bedroom.

Since I don't want the curtains to open every time the room becomes unoccupied I needed to set a trigger time from the event scheduler and used this to trigger a macro. The event time is set to a time where normally we'd be asleep and hence occupying the room.

curtain-open-macro.png
At first the macro was simply set to wait for the delayed unoccupied condition to go false. However, this transition will not occur if the room is not initially occupied at the time the macro is triggered, for example, if you are away for the weekend. I tried testing for the "False" level but only a transition seems to be fed through to the macro condition. I was also caught out by the apparent logic inversion, since I thought that unoccupied = TRUE would mean the room is unoccupied.

So by using the IF statement I can test if the room is occupied and then wait for the transition to unoccupied, and if it is not occupied at the event trigger time it will fall through to the curtain open step straight away. This seems to work quite satisfactorily.

No TrackBacks

TrackBack URL: http://www.gumbrell.com/cgi-bin/mt4/mt-tb.cgi/70

Leave a comment

About this Entry

This page contains a single entry by David published on April 2, 2009 12:11 AM.

Comparing GU10 LED bulbs was the previous entry in this blog.

chMox replaced by iCHM is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.