Jump to content

MOtion Sensor and Scene Control (programming)


walkman9999

Recommended Posts

Posted

Hi all,

 

I am playing with my new Motion Sensor, and have run across a puzzle. Hope I can get some suggestions.

 

I'd like the sensor to trigger a scene that blinks one or two lights in the house when it is triggered (using it as a "doorbell"). I can write a program that flashes the lights (turns a scene on/off in succession), but once the program is run the light will either be left ON or OFF regardless of its status before the scene was triggered.

 

It would be nice if I could somehow return the lights that were blinking to their previous state when the program was completed. Like maybe query the device for the on state and use that variable to return the devices when the program is done.

 

Any suggestions are appreciated!

 

Thanks.

 

:Mike Walker (walkman9999)

Posted

Maybe in a few months when Variables are updated with new features that will be possible. For now it is difficult. You would need a series of Programs that could be triggered by a motion sensor motion On ANDed with a range of On Level values. Maybe in 10-20% range for each Program.

 

If Control 'motionOn' is switched On

And 'lightOnlevel' is => 20

And 'lightOnlevel' is <= 40

Then

blink light

Set 'light' On 30

Else

Posted

Hi Mike-

 

As long as you don't want to track levels of dim, you could use two programs to accomplish this.

 

If 
  Control MotionDetector is Switched On

Then
  Run Blink (If Path)

 

 

Program Blink: (Disabled)

 

If
  Status Light is On
Then
  Repeat 2 times
  Set light Off
  Wait 1
  Set light On
  Wait 1

Else
 Repeat 2 times
  Set light On
  Wait 1
  Set light Off
  Wait 1

 

-Xathros

 

EDITED: To reduce the number of programs and provide proper operation.

EDITED Again for same reason.

Posted

This is not technically on-topic, but maybe someone has already come-up with a creative solution for how to use the motion sensor for a "doorbell"? Blinking a household light is somewhat effective (above problems notwithstanding), but it isn't an exact fit. Maybe a sound as well? I have an outletlinc that I can plug something into, but not sure what to plug into it.

 

Thoughts?

Posted

Blender, Vacuum, anything that makes noise - or -

Trigger an IOLinc attached to a Doorbell?

 

-Xathros

Posted

I see a "beep duration" setting, is there a way to make one or more of my Insteon devices beep? I have switchlincs, outletlincs and keypads.

 

And, back to the original problem (Sorry for jumping around). I can't get the trigger/response to work correctly by following the examples above.

 

I have a program "Door Trigger" that says:

 

If

Motion Sensor is on

and light1 is at 100%

 

Then

Run "Door Responder"

 

The "Door Responder" program says:

 

set lamp1 fast on

wait 2 seconds

set lamp1 fast off

wait 2 seconds

set lamp1 fast on

wait 2 seconds

set lamp1 100% (to return lamp1 to its previous level of 100%)

 

Problem is, lamp1 continues to cycle on/off way beyond the 3 blinks I have asked for. I think Door Trigger program gets triggered again b/c the motion sensor is still ON. I tried setting timeout for MS at .5, and I tried sending a "set motion sensor off" command through the program, but I don't think the device supports those options.

 

Sorry if I'm being thick.

Posted

That is because the program is re-triggered by the changing status of the lamp.

 

In my programs:

 

Program: MotionMonitor

If
  Control MotionDetector is Switched On

Then
  Run Program Blink (If Path)

 

 

Program Blink: (Disabled)

If
  Status Light is On
Then
  Repeat 2 times
  Set light Off
  Wait 1
  Set light On
  Wait 1

Else
 Repeat 2 times
  Set light On
  Wait 1
  Set light Off
  Wait 1

 

We check for the motion sensor sending a Control On message (Not status) then call a disabled program that makes a decision based on the status of the lamp. This second program is essentially what you did but since it is DISABLED, it does not self trigger when the lamp status changes. It will still operate when called by the first program.

 

-Xathros

Posted

Excellent! Glad I could help.

 

Just noticed that I failed to answer one of your questions Re: Beep Duration.

 

Some newer Insteon devices can beep. Not very loud and its just a short beep (maybe 1/10 second) regardless of the duration selected. I use this on some of my light timers to warn that a light is about to turn off in 30 Seconds and at a few key locations when a door opens - sort of like a chime. I would not rely on this as a doorbell as if there is even any moderate noise in the room you may not hear these beeps.

 

-Xathros

Posted

I use beep programs based off motion sensors. I double beep each light and then go to the next when my front door motion is tripped. The beeps are an awesome feature! I also use them for when my 3yr daughters door opens between 8pm and 8 am. The beep duration does not work, so dont bother trying to use that, its the same for any setting.

Posted

The beeps are not loud, but they can be made to happen in a lot of places so that helps! I'm using the beeps as a stopgap measure for chimes, but still looking for a more comprehensive solution.

 

The idea of an I/Olinc and doorbell is a good one and I may try that later. Right now, I'm going ot try to figure somehting out with no new equipment as my SO continues to see these packages from Irvine, CA on the doorstep.

 

Anyway I'll say again, this forum is great. Thanks for the help.

 

:Mike

  • 2 months later...
Posted

Hi, I've got a motion sensor set to turn on a scene of lights when activated in a business environment. It's set for security purposes and only from sunrise to sunset. The problem I have seems simple but I can't figure it out. When we work late, the motion turns on the lights and we cat get out the door without turning them back on because of the motion sensor. I do have a command to turn the scene off after 30 minutes but I it doesn't actually turn off the lights. It's like the scene only works to turn them on and does not work to turn the off. I end up using the mobile app to manually turn off each light because the scene off command does not work. So the 2 main questions are:

 

1. What can I do to keep the lights from coming back on by motion if I use the wall switch?

2. Is there something about scenes that would cause a scene to only work as on and not as off for devices?

 

I've added a couple of screenshots. Thanks.

post-4788-140474163289_thumb.png

post-4788-140474163291_thumb.png

Posted

As soon as the Motion Sensor sends an Off command which must be before the Wait 30 minutes completes the Program is triggered again by the change in motion sensor Status. This time the If is False and the Else clause executes so nothing after the Wait executes.

 

Simple solution is to split into two Programs. Program 1 invokes Program 2 which has the current Then clause statements. When Program 1 is triggered when the motion sensor turns Off it does not affect what happens to Program 2.

 

The Status of the manual switch can be added to the Program If section and allow the motion On to be True only when the manual switch is Off.

Posted

Thanks LeeG, I probably should have mentioned that I'm not an expert at this. I've read your comments 8+ times and created the following 2 programs. Do you think this will work?

post-4788-140474163311_thumb.png

post-4788-140474163312_thumb.png

Posted

I think you programs will mostly work, but will have a problem if sunrise interrupts your 30 minute wait. Instead, try the following approach:

 

If

From 630

To sunrise (next day)

And

Control motion sensor is set on

Then

Run next program (then path)

Else

Nothing

 

Next program:

 

If

Then

Set scene retail lights on

Wait 30 minutes

Set scene retail lights off

Else

Nothing

 

Of course, this does not address your need to override the program with the switch.

Posted

I didn't think it would be this hard to get out the door. The current program below is still behaving the same way, when we head for the door, the lights come on, even if we hit the switch, any ideas?

post-4788-140474163323_thumb.png

post-4788-140474163326_thumb.png

Posted

If "Light Switch B Main Cans" is On before the Motion On is received the first program cannot turn On the Scene (unless a save is pending for the program).

Posted
The current program below is still behaving the same way, when we head for the door, the lights come on, even if we hit the switch, any ideas?

 

What time are you heading "for the door"? When you "hit the switch", are you turning it off, or on?

 

It sounds to me that the program is doing exactly what it is programmed to do. If it is after 630pm, and before sunrise, and you turn the switch off, and the motion sensor is already on, then I would expect the first program to turn on the lights. Alternatively, if you are heading out, and you turn off the switch, and the motion sensor was off, but subsequently senses motion as you leave, then I would expect the first program to turn on the lights. I am curious what provisions you believe exist in this program that would allow the ISY to know that you are leaving and to hold off responding until you have left and have closed the door.

 

I don't consider what I think you are attempting to be a trivial problem. Now that you have had some experience with this, and have time to better understand your needs, perhaps it is time to describe your requirements in total. For example, I assume your set of requirements is something like:

 

-between 630 and sunrise, motion detected turns on the lights

-30 minutes after last motion is sensed, turn off the lights

-at sunrise, turn off the lights regardless of how long they have been on (unless the light switch has been manually turned on)

-if the light switch is manually turned on, disable the response to motion and halt any ongoing countdown or automatic shutoff

-if we are leaving between 630 and sunrise, and you turn off the switch, re-enable motion response, but only after a short delay to allow occupants time to leave

-send text message if motion is sensed and the lights turned on

-other?

 

If accurate, this does not sound so trivial, does it? I find that writing your requirements down to be very enlightening and helpful. If you are willing to do this, I will do my best to offer a solution and help understand the reasoning behind it. For now, I believe you are having issues with "status" versus "control" conditions. I believe you will have problems with the current program if sunrise interrupts a countdown period. You may be having problems with the way the motion sensor is configured. I believe the way you have broken your programs down into two is not the best approach.

Posted

Thanks for the additional comments. I think I could resolve this if I knew how to do this:

 

-if the light switch is manually turned off, disable the response to motion for 5 minutes

Posted

If the "response to motion" is itself a Program, something similar to this should work:

 

If

Control 'light-switch' is switched Off

 

Then

Disable Program 'motion-alarm'

Wait 5 minutes

Enable Program 'motion-alarm'

 

Else

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

Posted
-if the light switch is manually turned off, disable the response to motion for 5 minutes

 

To be clear and precise, there is no way to disable response to motion or to disable motion sensor activity (short of taking out the batteries). There is, however, a few of ways to disable a program from self-triggering. Thesidewinder has identified one of those ways. Another is to create a program and use the state of that program as a condition for a program folder.

 

As an alternative to disabling programs, there are also ways to generate and incorporate program conditions to accomplish your goal. You can use program status (true or false) as a program condition. There are also variables (integer and state) that may prove useful. The trick is to exploit all these tools with the others in such a way that your combination of scenes and programs are integrated, and accomplish your complete goals, and do so efficiently in order to minimize the unforeseen complications.

 

I suspect you have a bit more complicated scenario than I believe you will find is addressed by Thesidewinders example . You also want to disable the motion sensor if the switch is manually turned on, in addition to to enabling motion sensing if the switch is manually turned off, but only after waiting 5 minutes from the point it is turned off.

 

In an attempt to avoid the added complication of creating a variable (perhaps that would be a good next step some day), one could create a couple of programs:

 

Status program for the sole purpose of using as a program condition:

 

if

nothing

then

nothing

else

nothing

 

Second program for the sole purpose of executing the status program at the right time:

 

if

status light switch is on

then

run status program (then path) <<

else

wait 5 minutes

run status program (else path) <<

 

Once these two programs are established, the status program could be used as a condition for a program, such as:

 

if

time is from XXXX to YYYY

and control motion sensor is turned on

and status program it false

then

turn on lights

wait 30 minutes

turn off lights

else

nothing

 

Assuming that your light switch is a controller of your lighting scene, this may be a complete solution to your lighting automation requirements. Given that you were interested only in a way to disable the motion sensor response to 5 minutes, however, I will leave it to you to decide whether and if this approach can be incorporated into your current program construct, or whether Thesidewinders method gives you enough ideas to continue.

 

Let us know how it works out.

Guest
This topic is now closed to further replies.

×
×
  • Create New...