Jump to content

Can't get Motion Light Control to Work


geogecko

Recommended Posts

Posted

I'm having issues trying to get a simple motion controlled light to work. Basically, all I want, is the motion to turn the light on, and when no motion is detected for 10 minutes, turn the light back off. I have this mostly working, except when the light gets turned off, because I am sitting really still, I move around a bit, to trigger the motion, and it does not do the commands in the "then" statement, and no matter what I do, it doesn't do anything. I have to wait for the motion's internal one minute timer to time out, then trigger it again, to get the light back on. Here is my program at the moment. I have the 2 seconds in there, because I thought maybe the ISY is having problems if the light goes out, and then is required to go back on right away, but that didn't work, unless it needs to be more than 10 seconds?

 

 

If
  Status 'Study Motion-Sensor' is On

Then
  Wait 2 seconds
  Set Scene 'Study Lights' On

Else
  Wait 10 minutes
  Set Scene 'Study Lights' Off

Posted

Hi Jason,

 

The problem is that the status of the motion sensor does NOT change till the internal timer turns is off.

 

What you might want to try is Control instead of status. Control means every time ISY hears an On or and Off (regardless of the status of the motion sensor) then the program is re-evaluated.

 

And, for testing purposes, it's always best to have a folder and separate this program in two: one for On and one for Off. This way you can actually see the status of the programs as they are being re-evaluated.

 

With kind regards,

Michel

Posted

If my understanding of the motion sensor is correct, this will not work. The motion sensor will never send another "ON" command (control or status) until its internal countdown expires. I presume that this is done to save battery life.

 

You might be able to get this working by setting the motion sensor's internal timer to a lower duration, but keep in mind that the device will still not send another ON command unless the internal timer expires. That won't happen if there is constant motion in the room.

 

For this reason, I do not manage my motion timers with programs as I could never get the motion sensor to work in this way.

Posted

Have you checked your event view to ensure you are recieving the signal? I assume that this is not an issue.

 

I understand that insteon motion sensors have jumpers that must be set, depending on your needs. Is your set to send an off signal when it reset? I assume that ISY status is based on recieving on and off signals, but that is just a guess.

 

Are you motion lights set up as a scene controller with the study lights? In this case, I don't believe that would achieve the results you are looking for.

 

Having asked all those questions, I suggest ensuring that your motion sensor is set so that it does NOT send an off signal. Then, write a program looking something like:

 

If

Control 'Study Motion-Sensor' is turned On

 

Then

Set Scene 'Study Lights' On

Wait 10 minutes

Set Scene 'Study Lights' Off

 

Else

 

I suspect you were getting into problems with the program re-evaluating itself mid execution, which is not good.

 

I also recall a recent thread on this very same topic. Try searching for motion sensors. You will find much.

Posted

That last example seems to work well, with the off command disabled on the motion sensor. The only thing I don't like about doing it this way, is I can't really use the motion as an occupancy sensor anymore, as it's state is always on now.

Posted
That last example seems to work well, with the off command disabled on the motion sensor. The only thing I don't like about doing it this way, is I can't really use the motion as an occupancy sensor anymore, as it's state is always on now.

 

I learned most of what I know by experimentation. Go ahead and enable the off command, and see if the new program will work. I was not sure if recieving the off command would force the program to re-evaluate itself before the 10 minute timer was complete, but assumed that it would. If this does not work, then change it back.

 

If setting your off command breaks your program, then there are probably other options. It is sometimes good to check the simple solutions first.

 

One possibility would be to create a program without "if" conditions, having only an else to turn on the light, wait ten minutes, then turn off the light. A second program would watch of motion sensor "on" commands, then run the first program's "then" statement. For example

 

Program one:

 

if

 

then turn light on

wait 10 minutes,

turn light off

 

else

 

Program 2:

 

If control motion sensor is turned on

 

then run program 1 then path

 

else

 

I believe that program 1 else path would continue to run, regardless of the presence of a motion sensor off signal.

Posted

Actually, it isn't working, now that I've tested it more. I then enabled the off command again, and it also does not work.

 

What is going on is this. If I make motion, the light turns on. Then, if there is no motion, the light turns off after 10 minutes.

 

However, if there is motion, the light comes on, and I keep moving, after 10 minutes, the light will turn off.

 

The motion will have to have it's internal timer time out, before I am able to then, make motion, and have the light come on again.

 

I'm going to have to think about this one some more. I think you are right that there is going to have to be some weird programming going on to make this work...

Posted

I must confess to not being a user of the insteon motion sensor. All mine are X-10. I understand that the insteon sensor must reset itself before it can, again, sense motion. Can you not configure the sensor to reset itself without sending an off command? After enabling the off command, for how long did you set your time-out? What was the result of your experiment.

 

There are A LOT of posts regarding motion sensors and programming. Some of the programming can get very creative. I can say, however, that your needs are nothing unusual. I think there is even a wiki article about this. It is worth searching and checking out.

Posted

Hi geogecko,

 

Re-enable the Off command and try something like this:

 

If
  Control 'Study Motion-Sensor' is switched On

Then
  Set Scene 'Study Lights' On

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


 

If
       Control 'Study Motion-Sensor' is switched Off

Then
      Wait 10 minutes
      Set Scene 'Study Lights' Off

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


 

Then all you have to do is move sometime between the 1 minute time-out of the motion sensor and the 10 minute Wait in the Off program.

 

Rand

Posted

Martin, I'm still digesting your post.

 

Sub, the problem is the off program. The on works just fine.

 

If I trigger the motion, the light comes on, if I'm moving within the 1 min window, everything is fine, if I don't move for 1 minute, and the off program starts to execute, then it continues to execute, even if I trip the motion shortly after the 1 minute has expired, so 9 minutes later, the light goes off. Then, if the motion happens to be already tripped, I have to wait for it to time out, then trip it again, to send another on command.

 

I wish that the program language used for the ISY was not so basic. Yes, it's far better than HouseLinc ever was, but since most of us seem to be tinkers to begin with, a little more branching, testing, and variables would be awesome.

 

Basically, I need a way to re-evaluate the off condition, if the motion comes back on, when it has already started execution.

 

I think the problem here, is the 10 minute timer, it has no way of being interrupted at all.

Posted

Shoot. I was just thinking that! I forgot the switched On line :oops:

 

If
       Control 'Study Motion-Sensor' is switched Off
 And Control 'Study Motion-Sensor' is not switched On

Then
      Wait 10 minutes
      Set Scene 'Study Lights' Off

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


 

That should make the Off program quit.

 

Rand

Posted

Hmm, I may have to try that...

 

Here is what I came up with so far, that appears to be working, although, there is the possibility, that the motion could stop near the end of a 10 minute timer (such as, it has already run the off command, so it is waiting in the 10 minute loop, without a way out, until the status shows off, so if I stopped moving around the 8th minute, the light would turn out in two minutes.

 

What I'd like to emulate, is a 10 minute after stop of all motion, until the light turned out, but I think that would require variables (you could make the wait time one minute, count until you had 10 of them, then turn the light out, but checking the status between every minute, if at any time the status of the motion was on, you just reset the counter (that is counting 10 times), and you would be between 9 and 10 minutes after the stop of motion.

 

3 Programs, notice the enabled/disabled states:

 

Motion On Cmd (enabled):

 

If
  Control 'Study Motion-Sensor' is switched On
Then
  Set Scene 'Study Lights' On
Else

 

Motion Off Cmd (enabled):

 

If
  Control 'Study Motion-Sensor' is switched Off
Then
  Wait 10 minutes
  Run Program 'Motion Status-Off' (If)
Else

 

Motion Status-Off (disabled):

If
  Status 'Study Motion-Sensor' is On
Then
  Run Program 'Motion Off Cmd' (Then Path)
Else
  Set Scene 'Study Lights' Off

 

I'm using this with a 2 minute wait, and it seems to be working rather well right now. I will do more testing, and see if there are any flaws...

Posted

Jason,

 

A couple things -

My MS is part a Scene. The Scene only has the motion Sensor in it.

I have another Scene with the Companion Switch and Dimmer Control.

I do have jumper 4 closed so I do not get a Sensor "Off" command - So if you look at my MS it is always "On" after the first initial On Trigger. So my program to turn the light on is in a different scene that the on/off/dim Switch. I guess I could have left the MS on its own and not part of a scene.

I originally had the MS, Companion Sw. and the Dimmer all in the same Scene. This eliminated any delays that the programming introduces but was not working for me.

If you use a scene for your MS and leave the #4 Jumper off, the off signal will trigger the scene to go off - You will not need an "Off" Program. You also cannot override the MS "Off condition unless it is less than the MS Count Down timer. You therefore, could set the MS count down timer to a larger number than your desired time delay for your program and that would give you the control you want.

 

I hope this was not too long winded.

 

Clarence

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...