Jump to content

Motion Sensor "Override"


mvprj84

Recommended Posts

I'm getting a bunch of motion sensors hooked up, and I'm trying to determine the appropriate logic for some of my programs. Here's the different cases of what I'm trying to achieve:

 

 

1. Motion sensor is triggered - light turns on. Light turns off when no motion is sensed.

2. Motion sensor is triggered - light turns on. Then a physical light switch is pressed "on" to keep the light on, which overrides the motion sensor from trying to turn the light off. The light will need to be turned off manually.

3. Light switch is pressed on before motion is even sensed - this disables the motion sensor like in number 2, and the light will need to be turned off manually.

 

 

I didn't have a problem coming up with programs to accomplish all of that (my code is below), but my real problem is when the light is turned on from a non-physical switch (a.k.a. the ISY Java app or an iPhone app). I noticed that the ISY logs these events as an on/off command, but classifies it as a "web" event which, as far as I know, can't be explicitly used in a program. Meaning I can't build an "if" statement when an on/off command is issued through the web interface. This would solve all my issues, but I don't think it's possible. From my understanding, in terms of creating programs, the "status" is called whenever the status of a light changes (via the web interface, a program, or a physical switch), and the "control" is called whenever a physical switch is pressed. There is nothing designed for catching the web-issued commands.

 

I know I can detect whether the light was turned on because of the motion sensor, but what I'm trying to avoid is having to turn a light off and back on again if I want it to stay on. I should just be able to issue an "on" command from the switch itself or through the web and have it override the motion sensor that way.

 

I appreciate any insight you guys can give me! This is what I've got thusfar...

 

---------------------

Cabinet Lights - Auto Off

This is disabled by default, and is only enabled if the lights are automatically turned on.

---------------------

If

Control 'Motion - Kitchen' is switched Off

 

Then

Set 'Kitchen - Cabinets' Off

Disable Program 'Cabinet Lights - Auto Off'

Enable Program 'Cabinet Lights - Auto On'

 

Else

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

 

---------------------

Cabinet Lights - Auto On

Disables itself once triggered since it isn't needed again until the lights are turned off.

---------------------

If

Control 'Motion - Kitchen' is switched On

 

Then

Set 'Kitchen - Cabinets' On

Enable Program 'Cabinet Lights - Auto Off'

Disable Program 'Cabinet Lights - Auto On'

 

Else

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

 

 

---------------------

Cabinet Lights - Manual Off

When the physical light switch is triggered off this will re-enable the motion sensor.

---------------------

If

Control 'Kitchen - Cabinets' is switched Off

 

Then

Enable Program 'Cabinet Lights - Auto On'

 

Else

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

 

 

---------------------

Cabinet Lights - Manual On

When the physical light switch is turned on this will disable the motion sensor.

---------------------

If

Control 'Kitchen - Cabinets' is switched On

 

Then

Disable Program 'Cabinet Lights - Auto Off'

Disable Program 'Cabinet Lights - Auto On'

 

Else

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

Link to comment

Archived

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


  • Recently Browsing

    • No registered users viewing this page.
  • Forum Statistics

    • Total Topics
      36.9k
    • Total Posts
      370.2k
×
×
  • Create New...