From: Timothy S. <spa...@ic...> - 2010-09-28 16:03:55
|
I don’t know about turning off the light as I never wait that long for when the $Dark variable will be set to 0 by the code a t sunrise*. What I was intending to say is that the light in the laundry room will come on as soon as the $Dark variable is set to 1 by it being sunset_twilight, even though there is no occupant (attached presence monitor) to the light item. From: Chris Engel [mailto:chr...@gm...] Sent: Tuesday, September 28, 2010 11:51 AM To: The main list for the MisterHouse home automation program Subject: Re: [mh] Coding of Events Question On Mon, Sep 27, 2010 at 7:36 PM, Timothy Spaulding <spa...@ic...<mailto:spa...@ic...>> wrote: Hello All, I could use some advice and another set of eyes to look at what I have and help me understand what I am missing. I’ve defined a Light_item for the laundry room, a Motion_item for the laundry room and Presence_Monitor for the laundry room as well as a light restriction. I only want the light to come on in the laundry room when motion is detected and it is dark. Per my code below, the light comes on in the laundry room (and no motion has been detected) when the $Dark scalar is set and the light is staying on even after motion should have been detected. Reading this a bit closer are you saying the light never turns off ? I think that may be because you have a presence monitor defined that doesn't have any adjoining rooms defined with set_edges and you don't have occupancy_expire set on the presence monitor, without these I don't believe the room will ever go to vacant and hence the light will stay on. The set_edges functions are used to pass presence between rooms as motion detectors are triggered in adjoining rooms and the occupancy_expire sets how long to wait after the last motion/door was triggered in the room to remove a presence. -- Chris |