Jump to content

Help with motion sensor program


jsandlin

Recommended Posts

I am trying to come up with a simple program to control a light with a motion sensor.What I would like to do is turn the light on when you enter the room and turn it off 10 after the last movement The first one I tried is:

control motion sensor is switched on
and status light is off 
then 
set light on
else 
wait 10 minutes
set light off

This works somewhat but if there is only one on from the motion sensor it never gets to the else so the light stays on.

 

The next attempt was to try it with two programs:

control motion sensor is switched on
and status of light is off
then
set light on

control motion sensor is switched on
then
wait 10 minutes
set light off   

This one will not reset the timer if there is continuous movement and the lights go off while there is still movement in the room.

I have set the motion sensors to send an on command when ever there is movement that seems to help but the light still go out sometimes.

Any help would be appreciated.

 

One more observation this seems to happen more with the older motion sensors than the newer ones. Dose anybody know if the older sensors support the on commands when ever movement is sensed

Link to comment

There are lot's of examples and subtle variations on the motion sensor program. It is definitely worth some time searching them out. In the mean time, make it simple:

 

if
control motion sensor is switched on 
then 
set light on 
wait 10 minutes 
set light off
else

 

If your requirements get a bit complicated (different reponse if light is manually turned on), the fine folks around here can discuss other options.

Link to comment

Hi jsandlin,

 

The v1.1 motion sensors do not support the occupancy mode. They will not send continuous On messages.

 

With the older sensors I watch for the Off and then start a countdown.

 

If
       Control 'Kitchen / Motion Sensor' is switched Off
   And Control 'Kitchen / Motion Sensor' is not switched On

Then
       Wait  10 minutes 
       Set Scene 'Kitchen / ~Kitchen Motion' Off

Else
  - No Actions - (To add one, press 'Action')


 

EDIT: The not switched On Condition cancels the Then Actions if motion is detected during the Wait. The program will wait for the next Off before it starts again.

 

Rand

Link to comment

I'm not sure what Rand means by 1.1 motion detectors will not support "occupancy mode." The 1.1 motion detectors support the same functionality as the 2.0 detectors, except that the timeout is fixed at one minute and cannot be modified with a potentiometer.

 

I use my 1.1 and 2.0 motion detectors to send ON commands only. This is set with a jumper on the motion detector. On the 2.0 motion detectors, I also set the timeout to 30 secs (full counter-clockwise on the POT 1). In this mode, the 1.1 and 2.0 motion detectors will send on commands every 1 minute or 30 seconds, respectively.

 

The program posted by Oberkc is the simplest and will work in most cases. For example:

 

If
       Control 'Outdoor / Driveway Motion-Sensor' is switched On
Then
       Set Scene 'Outdoor / Driveway Floods on Motion' On
       Wait  8 minutes 
       Set Scene 'Outdoor / Driveway Floods on Motion' Off
Else
  - No Actions - 

If you don't want the program to run (or, more accurately, don't want the light to turn off after 8 minutes) if the light was already on, then you may try this:

 

If
       Control 'Outdoor / Driveway Motion-Sensor' is switched On
   And Status 'Outdoor / Driveway Floods' is not On
Then
       Set Scene 'Outdoor / Driveway Floods on Motion' On
       Wait  8 minutes 
       Set Scene 'Outdoor / Driveway Floods on Motion' Off
Else
  - No Actions - 

However, you will find this program has a problem: because turning the light on in the program changes the light' status, the program will re-enter and cancel the pending Wait. So the light never turns off. To fix this issue, you need multiple programs with flags (empty programs) and it gets quite complex, even more so if you want to cancel pending waits with subsequent switch usage. You can find examples of it on this site.

Link to comment

On Only mode is not the same as Occupancy Mode. On only mode sends On commands only, the Off command is suppressed. The timeout interval applies with the next On command coming only after the timeout interval has expired. When Occupancy Mode is set, On commands are sent for every motion detected whether the timeout value has expired or not.

Link to comment

Occupancy mode is controllable with the ISY through the same mechanism as the other Motion Sensor options. I don't have a v1 motion sensor but don't think Occupancy mode is available at that level.

 

Smarthome does not mention much about Occupancy mode beyond the product description "Wireless INSTEON Motion / Occupancy Sensor".

 

From a functional perspective when Occupancy mode is Off the Motion Sends an On command when motion is detected AND the timeout interval is not active. Only one On command even if more motion is detected during the timeout interval. When Occupancy mode is On the Motion Sensor sends an On command for each motion detected.

Link to comment

Archived

This topic is now archived and is closed to further replies.


×
×
  • Create New...