Jump to content
C4 Forums | Control4

Motion Sensors and button presses issues


Jaffacree

Recommended Posts

Hello,

I have 2 Axxess motion sensors in my house. The first is in the kitchen, the second is in the garage. I have a 3 button keypad at the bottom of the stairs that i would like to turn off the lights in the kitchen that have been activated with the motion sensor. My issue is, when motion has been detected and i walk downstairs and hit the keypad button to turn off the lights in the kitchen, the lights turn off and quickly turn back on again. If i wait about 2 minutes, this button works and the lights shut off as i have intended. I cant figure out for the life of me why?

Here is the programming:

When motion is detected in kitchen

>start timer motion

>if timer motion is running

>>reset timer motion

>Turn on Kitchen table light

>Turn on kitchen main light

When timer motion expires

>turn off Kitchen table light

>turn off Kitchen Main light

This is the button to turn off the lights from motion if i go downstairs

When stairway button 2 is pressed

>if timer motion is running

>>reset timer motion

>>stop timer motion

>if kitchen table light is on

>>turn off kitchen table light

>if kitchen main light is is on

>>turn off kitchen main light

now in the garage i was experimenting with variables and this is the programming

when garage motion is detected

>if time is day time

>>turn on the garage west light

>>turn on the garage light

>>turn on the garage north light

>if time is night time

>>turn on the garage east light

>>turn on the garage light

>>turn on the garage outside light

>>turn on the garage north light

>>turn on the porch light

>variables>garage motion = true

>start garage motion timer

>if garage motion timer is running

>>reset the garage motion timer

When garage motion timer has expired

>if daytime

>>turn off garage east light

>>turn off the garage north light

>>turn off the garage light

>if night time

>>turn off the porch lights

>>turn off the garage north lights

>>turn off the garage east lights

>>turn off the garage lights

>>turn off the garage outside lights

>variables>garage motion to false

Garage motion variables changes

>if garage motion is true

>>set all LED on garage north light to purple

>if garage motion is false

>>set top LED to white when off

>>set top LED to red when on

>>set bottom LED to white when on

>>set bottom LED to red when off

When garage north light level changes

>if garage north light is off

>>set variable>garage motion to false

When garage north light level is pushed

>set motion sensor to ignore motion reports to on

>if garage motion timer is running

>>reset timer

>>stop timer

>set variable>garage motion to false

When garage north light bottom button is pushed

>set motion sensor to ignore motion reports to off

>if garage motion timer is running

>>reset the timer

>>stop the timer

>start timer garage off

>set variable>garage motion to false

When timer garage off expires

>>activate lighting scene garage...this scene turns off the garage, experimenting with advanced scenes!

The garage LED's never change? I want them to change so i know the timer is running.

How do i keep the motion sensors off on a button push if i am going to be hosting an event to keep the light from turning off if we are all sitting at the table?

there has to be a better way to program this stuff. any suggestions?

Link to comment
Share on other sites


Let's break this up, see additions below.

Here is the programming:

When motion is detected in kitchen

*delete:

>start timer motion

>if timer motion is running

>>reset timer motion

*JUST do

reset timer motion

*reset will set the timer to zero AND start the timer

*add

delay 250ms

*this give the system a change to catch up on things and should help prevent the lights turning on.

>Turn on Kitchen table light

>Turn on kitchen main light

When timer motion expires

>turn off Kitchen table light

>turn off Kitchen Main light

This is the button to turn off the lights from motion if i go downstairs

When stairway button 2 is pressed

*delete

>if timer motion is running

>>reset timer motion

>>stop timer motion

*just do

stop timer motion

*the if statement is redundant and the reset is as well.

>if kitchen table light is on

>>turn off kitchen table light

>if kitchen main light is is on

>>turn off kitchen main light

Link to comment
Share on other sites

when garage motion is detected

>if time is day time

>>turn on the garage west light

>>turn on the garage light

>>turn on the garage north light

>if time is night time

>>turn on the garage east light

>>turn on the garage light

>>turn on the garage outside light

>>turn on the garage north light

>>turn on the porch light

>variables>garage motion = true

*delete -as per other post

>start garage motion timer

>if garage motion timer is running

>>reset the garage motion timer

reset garage motion timer

When garage motion timer has expired

>if daytime

>>turn off garage east light

>>turn off the garage north light

>>turn off the garage light

>if night time

>>turn off the porch lights

>>turn off the garage north lights

>>turn off the garage east lights

>>turn off the garage lights

>>turn off the garage outside lights

>variables>garage motion to false

Garage motion variables changes

>if garage motion is true

>>set all LED on garage north light to purple

>if garage motion is false

>>set top LED to white when off

>>set top LED to red when on

>>set bottom LED to white when on

>>set bottom LED to red when off

When garage north light level changes

delay 750ms

*as per the other one, you're doing a lot of things at the same time here - putting a short delay here give the system chance to execute everything before checking the light level

>if garage north light is off

>>set variable>garage motion to false

When garage north light level is pushed I'm assuming you mean top button is pushed?

>set motion sensor to ignore motion reports to on

*delete

>if garage motion timer is running

>>reset timer

>>stop timer

*add instead

stop timer

>set variable>garage motion to false

When garage north light bottom button is pushed

>set motion sensor to ignore motion reports to off

*delete

>if garage motion timer is running

>>reset the timer

>>stop the time

stop timer

>start timer garage off

>set variable>garage motion to false

When timer garage off expires

>>activate lighting scene garage...this scene turns off the garage, experimenting with advanced scenes!

The garage LED's never change? I want them to change so i know the timer is running.

How do i keep the motion sensors off on a button push if i am going to be hosting an event to keep the light from turning off if we are all sitting at the table?

Well you sort of do this with the garage north light button already.

Alternatively create a "motion override" variable (boolean) and use it to completely disable the motion programming.

Just turn on/off/toggle that variable with a button and add in front of each piece of programming based on motion a [iF variable motion override is true], embedding the motion stuff into that sentence.

there has to be a better way to program this stuff. any suggestions?

Link to comment
Share on other sites

The programming you changed worked very well, thank you so much. Any thoughts on this button press?

This is the button to turn off the lights from motion if i go downstairs

When stairway button 2 is pressed

>stop timer motion

>if kitchen table light is on

>>turn off kitchen table light

>if kitchen main light is is on

>>turn off kitchen main light

Any idea why the button press to turn off these lights would make the lights turn off, then really quickly turn right back on, after a couple of minutes the button works just fine, but right after the initial motion is detected in kitchen, if i walk down stairs and press the button, the lights flash and turn back on?

Link to comment
Share on other sites

Sounds like the current timer is still tuning things on for some reason.

Missed in that bit that the IF statements are not needed by the way - they don't hurt anything, but when the lights are NOT on, ie off, turning them off again won't do a thing.

Try this, see if it fixes things.

STOP motion timer

delay 750ms

turn off kitchen table

turn off kitchen main

If it doesn't I may need to know a bit more about what you have for (advanced) lighting scenes, motion sensor settings etc.

Link to comment
Share on other sites

I completely went through and deleted the code and re did it with what you have listed and now it finally works. Somewhere somehow, some piece of code was keeping them on. Thank you for your assistance!

I went ahead and added motion enabled and disabled announcements, as well as LED color changes. Just a nice little touch i thought of.

Thanks again!

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.