View unanswered posts | View active topics It is currently Mon May 20, 2013 11:18 am



Reply to topic  [ 10 posts ] 
 Motion Sensor Triggering 
Author Message

Joined: Apr 09, 2011
Posts: 19
Post Motion Sensor Triggering
Hello,

I am new to Indigo and am loving the the capability it provides.

I want to setup a motion sensor for our deck lights, with the following criteria:

- Only turns on lights when dark
- Auto-off after 45 minutes
- Doesn't execute if the lights its controlling is already on
- "don't want it shutting the lights off, or ramping to 100% if we are on the deck, lights dimmed etc.."
- This is the part I don't know how to do

Additionally,
- When daylight
- Do not turn lights on
- Notify that motion has been detected

I know this is nebie stuff, but I greatly appreciate your help and guidance!


Best Regards,

Mike Pierce


Mon Apr 11, 2011 3:01 pm
Profile
Site Admin
User avatar

Joined: Mar 19, 2008
Posts: 6648
Location: Austin, Texas
Post Re: Motion Sensor Triggering
Welcome - I think there are a couple of wiki articles that will help you get the gist of what you're wanting to do:

http://www.perceptiveautomation.com/wik ... d=auto_off
http://www.perceptiveautomation.com/wik ... sor_basics

Basically, I think you have two triggers: "Turn On outside lights at night on motion", and "Notify on motion during the day".

The first one would defined roughly like this:

Trigger Tab
Type: Device State Changed
Device: "YOUR MOTION SENSOR NAME"
"On/Off State"
"Becomes On"

Condition Tab
"If script returns true"
In the script text box:
Code: Select all
if not (on state of device "NAME OF LIGHTS HERE") then
    if (value of variable "isDaylight" = "false") then
        return true
    end if
end if
return false


This script says if the on state of your lights is not true (meaning they're off), then if isDaylight is false (which means it's dark), then the actions should be executed, otherwise the actions won't be executed.

Actions Tab
Type: "Control Light / Appliance"
Device: "NAME OF LIGHTS HERE"
Action: "Turn On"
check "Auto-off after" and enter 45 minutes


That should do it for the first one. The second trigger is very simple:

Trigger Tab
(define exactly as above)

Condition Tab
"if daylight"

Actions Tab
(whatever you want it to do to notify)

_________________
Jay (Indigo Support)
Image


Mon Apr 11, 2011 4:52 pm
Profile WWW

Joined: Apr 09, 2011
Posts: 19
Post Re: Motion Sensor Triggering
Hello Jay,

Thank you very much, I greatly appreciate your help and guidance!

Best Regards,

Mike


Tue Apr 12, 2011 1:31 pm
Profile
User avatar

Joined: Dec 24, 2008
Posts: 386
Location: Mission Viejo, CA
Post Re: Motion Sensor Triggering
What type of motion sensor is being used here?

I am confused on the difference between "device state becomes on" and "received an X10 on" when using an MS14a. I wasn't able to get my triggers to work using "device state becomes on" with the X10 motion sensors. I ended up using "received an X10 on" to turn on, and "device state becomes off" to turn off. The house/unit codes for the motion sensors and the devices they control are essentially "mapped" in my setup by turning on a device with a different house/unit code than the code that is assigned to the motion sensor. I also have it setup to "send off 5 minutes after last on command" in the motion sensors device settings.

I'm sure you can clear this up, can't wait to finally understand this.

_________________
Indigo 6.x w/ Dual-Band PLM 2413U
Mac OS X 10.6.x Snow Leopard
2006 Mac Mini Core Solo


Mon May 23, 2011 10:59 am
Profile
Site Admin
User avatar

Joined: Mar 19, 2008
Posts: 6648
Location: Austin, Texas
Post Re: Motion Sensor Triggering
There's a good wiki article that discusses motion sensors and the virtual device state that we create for them.

_________________
Jay (Indigo Support)
Image


Mon May 23, 2011 11:09 am
Profile WWW
User avatar

Joined: Dec 24, 2008
Posts: 386
Location: Mission Viejo, CA
Post Re: Motion Sensor Triggering
jay wrote:There's a good wiki article that discusses motion sensors and the virtual device state that we create for them.



I had read that, and I understand that it is for an OFF command and it works for me with both X10 and Insteon motion sensors.

The problem however is that I can't get devices to turn on when the trigger is "device state becomes on" for an X10 motion sensors, only when I change it to "received X10 on command". I guess I don't see the difference. When I setup the motion sensors BEFORE I had read that article my intuition was to set it to "received x10 on command".

Maybe, I'm missing a piece of the puzzle here.

_________________
Indigo 6.x w/ Dual-Band PLM 2413U
Mac OS X 10.6.x Snow Leopard
2006 Mac Mini Core Solo


Mon May 23, 2011 11:16 am
Profile
Site Admin
User avatar

Joined: Mar 19, 2008
Posts: 6648
Location: Austin, Texas
Post Re: Motion Sensor Triggering
Not sure why device state becomes on isn't working for you - it does for me using X10 (and INSTEON) motion sensors.

_________________
Jay (Indigo Support)
Image


Mon May 23, 2011 11:47 am
Profile WWW
Site Admin
User avatar

Joined: Jan 27, 2003
Posts: 11688
Location: Texas
Post Re: Motion Sensor Triggering
"Received X10 XYZ Command" and "Received INSTEON XYZ Command" are low level protocol specific command catchers. It is preferred, but not required, in most cases to use the higher level abstraction of the Indigo internally tracked Device State. Doing so will make it easier to swap out the Devices with different types of hardware in the future (X10 Motion Sensor <-> INSTEON Motion Sensor, etc) -- you won't have to change your Trigger Action logic at all -- just change the Device type.

Additionally, the Device State change tracking is more of a requirement for the INSTEON motion sensors. They differ in how/when they send ON and OFF commands, so a higher level abstraction is needed for them to work well.

I suspect your problem with the Device State Change ON trigger not firing is because its state is already ON. All device state change triggers only fire where there is a change from one state to another. Going from ON to ON will not trigger it. If you need to execute logic anytime the X10 motion sensor sends ON for some reason, then you will indeed have to use the lower level "Received X10 ON Command" trigger type.

_________________
Image


Mon May 23, 2011 12:21 pm
Profile WWW
User avatar

Joined: Dec 24, 2008
Posts: 386
Location: Mission Viejo, CA
Post Re: Motion Sensor Triggering
Thanks Matt...that clears things up a bit

_________________
Indigo 6.x w/ Dual-Band PLM 2413U
Mac OS X 10.6.x Snow Leopard
2006 Mac Mini Core Solo


Mon May 23, 2011 12:51 pm
Profile

Joined: Nov 26, 2009
Posts: 923
Location: Kalispell, MT
Post Re: Motion Sensor Triggering
I found it very helpful to have Indigo change the state of the X10 motion sensor
to off, after a few seconds delay, whenever it became on. Then it's always ready to be re-triggered to an on state with new motion.

Carl


Mon May 23, 2011 1:24 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 10 posts ] 

Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.   Template designed by STSoftware.