Jump to content

Bedroom Sensor


ENrgStar

Recommended Posts

Posted

I created a program (attached photo below) that turns on the bedroom light for 45 seconds, then Alerts me when it's about to turn off, waits an additional 15 seconds, and then turns the bedroom light off. The problem is, if I just walk into the bedroom quickly, and then walk out, the light never turns off. The reason this is happening is because the motion sensor has a 30 second "timeout". After those 30 seconds the motion sensor reports "off" and the program becomes false. Since the program switches to "false" before the final off command can be executed, the light remains on.

The easiest solution would be to increase the timeout, unfortunately the 30 second timeout is a requirement for different unrelated program, so I can't change it. Does anyone have any suggestions on how to get the program to continue executing, in spite of the fact that the motion sensor reports "off" without changing my time out?

 

post-5455-140474161834_thumb.png

Posted

Hi ENrgStar,

 

The problem is that [Wait] is interruptible. This means that while ISY in the Wait, if the condition turns to false, then the Wait stops, program exists (Else is executed) and statements following Wait are not executed.

 

I suspect that the timeout in your Motion Sensor is less than 45 seconds and thus your Motion Sensors turns off in the middle of the Wait. What you need to do is to use Control instead Status. And, by doing so, every time motion is sensed, the timer starts from scratch (i.e. occupancy vs. motion).

 

With kind regards,

Michel

Guest
This topic is now closed to further replies.

×
×
  • Create New...