Jump to content

Program for activating light if motion sensor triggered


bobmre

Recommended Posts

Posted

Here is what I would like to do:

 

if its between sunrise and sunset and the kitchen motion sensor is violated and the kitchen light is not on then turn the kitchen counter lights on for 2 minutes.

 

if the kitchen light is turned on and the kitchen counter lights is on then turn the kitchen counter lights off.

 

Does someone have an example of how to do this.

 

Thanks

Bob Moore

Posted

Can someone tell me why the Kitchen Counter Lights never turn off?

 

Entry.Keypad.B is the controller for the Kitchen.Counter.Lights

 

Program (Kitchen.Counter.Lights.Motion.On)

 

If

From Sunset

To Sunrise (next day)

And Program 'Kitchen.Counter.Motion.Disable' is False

And Elk Zone 'Kitchen Motion' is Violated

And Status 'Kitchen.Counter.Lights' is Off

 

Then

Set 'Kitchen.Counter.Lights' On

 

Else

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

 

Program (Kitchen.Counter.Lights.Motion.Disable)

If

(

Control 'Entry.Keypad.B' is switched On

Or Control 'Entry.Keypad.B' is switched Fast On

)

And Control 'Entry.Keypad.B' is not switched Off

And Control 'Entry.Keypad.B' is not switched Fast Off

 

Then

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

 

Else

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

 

Program (Kitchen.Counter.Lights.Motion.Timer)

If

From Sunset

To Sunrise (next day)

And Program 'Kitchen.Counter.Motion.Disable' is False

And Elk Zone 'Kitchen Motion' is Violated

 

Then

Wait 1 minute

Set 'Kitchen.Counter.Lights' Off

 

Else

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

 

 

Thanks,

Bob Moore

Posted

The ELK Zone does not stay violated for the 1 minute+ that is required for the Wait to complete and the light turn Off. As soon as the ELK Zone is no longer violated the If is reevaluated to False and the Else clause runs.

Posted

Thanks Lee

 

It seems to work if I change:

 

Program (Kitchen.Counter.Lights.Motion.Timer)

If

From Sunset

To Sunrise (next day)

And Program 'Kitchen.Counter.Motion.Disable' is False

And Elk Zone 'Kitchen Motion' is Not Violated (Changed from Violated to not Violated)

 

Then

Wait 1 minute

Set 'Kitchen.Counter.Lights' Off

 

Else

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

 

 

Bob Moore

Guest
This topic is now closed to further replies.

×
×
  • Create New...