Please login or register.

Login with username, password and session length

Author Topic: Moving up and want to use Motion Detector  (Read 6326 times)

dlongnecker

  • Jr. Member
  • **
  • Helpful Post Rating: 0
  • Posts: 18
Moving up and want to use Motion Detector
« on: January 18, 2010, 11:20:38 PM »

I've been using the X10 switches at my home for two years now.  Simple, stuff turning lights on and off automatically.  When I bought the stuff, I also bought a couple motion detectors and decided to hook it up next weekend.

I was going to put the unit outside by my garage, so if it detects movement, it will turn on a group of outside lights for about 5 minutes.

My question, if it is during the 'normal' time when the lights are turned on anyway, how do I get the macro to NOT turn the lights on after the 5 minutes?

My current setup turns the lights on at dusk and off at 10 p.m.   So, if the motion detector detects movement at 9 p.m., I don't want it to turn the lights off at 9:05.  However, if it detects movement at 11 p.m., I do want it to tturn the lights on for 5 minutes.

Thanks, Dennis
Logged

HA Dave

  • Hero Member
  • *****
  • Helpful Post Rating: 175
  • Posts: 7127
Re: Moving up and want to use Motion Detector
« Reply #1 on: January 19, 2010, 05:53:43 AM »

My current setup turns the lights on at dusk and off at 10 p.m.   So, if the motion detector detects movement at 9 p.m., I don't want it to turn the lights off at 9:05.  However, if it detects movement at 11 p.m., I do want it to tturn the lights on for 5 minutes.

This sounds to me to be a good use for a conditional macro.

Say the Motion sensor is on House code "M" and the Outside lights are on House Code "O". The Motion sensor would turn the outside lights ON... [here's the condition] "if past a certain time". Then delay for five minutes... and turn the lights off.

Now... with that said let me also say (type) that isn't the way I would do it. Sometimes timers that run past midnight have problems. So I would create a timer that turned on a fake but monitored module at 10 PM. And then I would create another timer that turned that same monitored module off at dawn. Then... the condition in my conditional macro would be... if the fake monitored module was on... turn on the Outside lights... delay five minutes... then turn it off.

The CM15A will keep track (remember the status of) Monitored Modules. However... you only get one house code of monitored modules (your selection as to which code that is). Another way to accomplish the same thing would be with the use of flags. These are just my ideas...
« Last Edit: January 19, 2010, 06:01:50 AM by Dave_x10_L »
Logged
Home Automation is an always changing technology

dlongnecker

  • Jr. Member
  • **
  • Helpful Post Rating: 0
  • Posts: 18
Re: Moving up and want to use Motion Detector
« Reply #2 on: January 24, 2010, 05:43:31 PM »

Thanks for the reply.  I've been busy changing addresses of switches to try to make better sense of it all.

I assume when you talk about flags/etc. I would need the Smart Macros plugin?  I've looked in the regular manual for flags and don't see anything.
Dennis
Logged

HA Dave

  • Hero Member
  • *****
  • Helpful Post Rating: 175
  • Posts: 7127
Re: Moving up and want to use Motion Detector
« Reply #3 on: January 24, 2010, 06:04:01 PM »

I assume when you talk about flags/etc. I would need the Smart Macros plugin? 

I don't know about you.... but I certainly do.
Logged
Home Automation is an always changing technology

dlongnecker

  • Jr. Member
  • **
  • Helpful Post Rating: 0
  • Posts: 18
Re: Moving up and want to use Motion Detector
« Reply #4 on: January 25, 2010, 08:51:15 PM »

The light is on.

Got the Smart Macros, and it all makes sense now.   I am operational!  Thanks for your help!!!!
Logged

Noam

  • Community Organizer
  • Hero Member
  • ***
  • Helpful Post Rating: 51
  • Posts: 2818
Re: Moving up and want to use Motion Detector
« Reply #5 on: January 26, 2010, 01:51:59 PM »

To simplify things (slightly?), you may want to make sure that the light is on your monitored housecode, and have the motion sensor trigger a macro with a condition based on the on/of status of the light:

If it is NIGHTTIME and If [liGHT] is OFF
Turn [liGHT] ON
Wait 5 minutes
Turn [liGHT] OFF

That should only run between 10 PM and midnight, and between midnight and dawn.
The NIGHTTIME condition allows the condition to cross midnight more easily, and the "If [liGHT] is OFF" condition will prevent the macro from running between dusk and 10:00 PM.

Logged

dlongnecker

  • Jr. Member
  • **
  • Helpful Post Rating: 0
  • Posts: 18
Re: Moving up and want to use Motion Detector
« Reply #6 on: March 08, 2010, 11:29:05 AM »

I did this and it is working like a champ!
Thanks
Logged

g33k499

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 4
Re: Moving up and want to use Motion Detector
« Reply #7 on: March 12, 2010, 05:12:16 PM »

I run the latest version of the AHP software and had a lot of strange problems with Delays.  I had 2 rooms close to each other and as long as one room was in a delay the other rooms light wouldn't come on. 

Also I was expecting for the macro to reset everything including the delay every time the macro was called.  I hated the light turning off every 15 minutes whether I was actively moving around or not.

So, I downloaded the SDK and started up on a new project to make my light work like they should.  What happens is when a motion detector is triggered it will send an on command to a dummy device for monitoring.

My software will detect that on command and turn on the appropriate light and an actual timer/counter.  After the event is triggered and the lights are on, any additional movement will just reset the counter.  That way as long as you are moving your light will remain on.

Logged

HA Dave

  • Hero Member
  • *****
  • Helpful Post Rating: 175
  • Posts: 7127
Re: Moving up and want to use Motion Detector
« Reply #8 on: March 12, 2010, 05:21:41 PM »

.........   My software will detect that on command and turn on the appropriate light and an actual timer/counter.  After the event is triggered and the lights are on, any additional movement will just reset the counter.  That way as long as you are moving your light will remain on.

You can create a macro that turns on a ghost module or sets a flag... then use that ghost or flag as a condition to run another macro.. like the off macro. AHP software is awkward because it's a tween. Too complex for the non-nerdy and too simple for the programmer. It's tween the two.
Logged
Home Automation is an always changing technology

g33k499

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 4
Re: Moving up and want to use Motion Detector
« Reply #9 on: March 12, 2010, 05:33:00 PM »

You can create a macro that turns on a ghost module or sets a flag... then use that ghost or flag as a condition to run another macro.. like the off macro. AHP software is awkward because it's a tween. Too complex for the non-nerdy and too simple for the programmer. It's tween the two.

I considered that, but with how many of those I would need, the AHP software would be cluttered more than it already is.  The nice thing is it gives me a new project where I can continually make my software better and more functional.  I just added a UDP server into it the other day.
Logged

HA Dave

  • Hero Member
  • *****
  • Helpful Post Rating: 175
  • Posts: 7127
Re: Moving up and want to use Motion Detector
« Reply #10 on: March 12, 2010, 07:53:43 PM »

...... The nice thing is it gives me a new project where I can continually make my software better and more functional.

It's great you have the skills to do that! Many of us [like myself] don't. I just wanted to mention that what you wanted could be done with AHP so as non-code-writers wouldn't become discouraged. But others peoples user-created software is a BIG part of my setup.
Logged
Home Automation is an always changing technology

pconroy

  • Hero Member
  • *****
  • Helpful Post Rating: 9
  • Posts: 294
Re: Moving up and want to use Motion Detector
« Reply #11 on: March 13, 2010, 06:58:59 PM »

You can create a macro that turns on a ghost module or sets a flag... then use that ghost or flag as a condition to run another macro.. like the off macro. AHP software is awkward because it's a tween. Too complex for the non-nerdy and too simple for the programmer. It's tween the two.

I considered that, but with how many of those I would need, the AHP software would be cluttered more than it already is.  The nice thing is it gives me a new project where I can continually make my software better and more functional.  I just added a UDP server into it the other day.


I agree.  My approach has been straight TCP sockets between the X10 PC's and the server.
But I like the flexibility you get when you role your own.

For instance - it takes only a few minutes to add functionality to a Macro like:
$moduleLocation = getModuleLocation( 'B', 7 );
if ($timeInactive( 'A', 4 ) > 60) and ($sunIsDown( now) ) and ($isWeekday( today) ) then
..$moduleOn( 'B', 1 );
...

Personally I'm really not looking for home automation as much as I am home monitoring.
I'm going to have the system call my Cell and send an email to me if the motion sensors go off while we're on vacation, if the temp in the house drops too low, etc.
Logged
 

X10.com | About X10 | X10 Security Systems | Cameras| Package Deals
© Copyright 2014-2016 X10.com All rights reserved.