Jump to content

Basic Motion Sensor program


emtrader1004

Recommended Posts

Posted

I'm programming challenged and am trying to set up a simple program to control a light with a motion sensor. I want the program to only execute at night and only if the light switch has not been manually turned on. In other words I want it to behave like a typical nighttime motion sensor operating only when motion is sensed after dark, otherwise the light can be manually turned on and off using the switch and unaffected by the motion sensor.

 

I tried coping the program that was on the forum but for some reason it's not working for me. Here is the list of programs I've been using...

 

'DrivewayMotion'

 

If

Control 'Driveway Motion Sensor-Sensor' is switched On

And Status 'Driveway Motion Sensor-Dusk/D' is On

And Status 'Driveway Spot' is not On

And Program 'DrivewayMotionTimerEnable' is True

 

Then

Set 'Driveway Spot' 2 (Beep Duration)

Set 'Driveway Spot' On

 

Else

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

 

 

'DrivewayMotionNotDetected'

If

Status 'Driveway Motion Sensor-Sensor' is Off

And Status 'Driveway Spot' is On

And Program 'DrivewayMotionTimerEnable' is True

 

Then

Wait 10 seconds

Set 'Driveway Spot' Off

 

Else

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

 

 

'DrivewayMotionTimerEnable'

 

If

- No Conditions - (To add one, press 'Schedule' or 'Condition')

 

Then

Set Program 'DrivewayMotionTimerEnable' To Run At Startup

 

Else

Set Program 'DrivewayMotionTimerEnable' To Not Run At Startup

 

 

'DrivewayMotionTru/False'

 

If

Control 'Driveway Spot' is switched On

And Control 'Driveway Spot' is not switched Off

 

Then

Run Program 'DrivewayMotionTimerEnable' (Else Path)

 

Else

Run Program 'DrivewayMotionTimerEnable' (Then Path)

 

 

Can someone tell me what I'm doing wrong? I have the sensor set up with the jumper on pin 5 so it will only be controlled from the ISY and I don't have it in a scene with the switch or manually linked to the motion sensor through the set button.

Posted

Can you expand on what is not working. Things like Beep Duration do not work as no device honors that setting (so far). But is Beep Duration a concern. That is why more detail regarding what is actually happening versus what you want to happen will be helpful.

 

Include what Motion Sensor options have been established.

Posted

Sorry, beep duration not an issue. The motion sensor will turn the light on when it first senses motion but will not turn it off after no motion is sensed. Also, it was turning the light off after I used the switch to turn the light on and then tripped the motion sensor.

Posted

What did you change between the motion sensor turning the lights Off and the motion sensor not turning the lights Off?

 

What motion sensor options are set?

Posted

I believe I have it set for both on and off commands and night only mode.

 

As for the change in the program, it originally said status not control in the first line of PatioMotion

Posted

The Program that turns the light Off has a Wait which means if any of the conditions in the If change during the Wait the Set 'Driveway Spot' Off will not execute.

 

Suggest looking at the Programs | Summary tab to see if the Program is triggered when the motion sensor sends the Off command. If not the other conditions in the If are preventing the Then clause from running. If it is triggered then look for when the Program 'DrivewayMotionTimerEnable' turns False. If that happens in the 10 second window the spot light will not be turned Off. I guess before any of that be sure the motion sensor –Sensor node is changing to Off. The motion sensor may not be configured to send Off commands.

 

If

Status 'Driveway Motion Sensor-Sensor' is Off

And Status 'Driveway Spot' is On

And Program 'DrivewayMotionTimerEnable' is True

 

Then

Wait 10 seconds

Set 'Driveway Spot' Off

 

Else

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

Posted

Originally the wait was 2 minutes but I changed it to 10 secs so I could test the program faster. The program operated the same way regardless of the wait time.

 

I changed the program to:

 

 

If

Status 'Patio Motion Sensor-Sensor' is On

And Status 'Patio Motion Sensor-Dusk/Dawn' is On

And Status 'MasterBedRm Patio Spots' is not On

Or Status 'Kitchen Patio Spots' is not On

And Program 'PatioMotionTimerEnable' is True

 

Then

Set 'Kitchen Patio Spots' 2 (Beep Duration)

Set Scene 'Patio Spots' On

 

Else

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

 

This seems to have solved my problem although I'm not exactly sure why but I won't complain. Thanks for your help.

Guest
This topic is now closed to further replies.

  • Recently Browsing

    • No registered users viewing this page.
  • Who's Online (See full list)

  • Forum Statistics

    • Total Topics
      37k
    • Total Posts
      371.5k
×
×
  • Create New...