Jump to content

Motion sensor programming help


chrishick

Recommended Posts

I have another question. I notice a lot of people are ending a then statement with a call to run the empty else statement of the same program.

 

Program 'program 1'

 

If

 

Xxxxxxx

 

Then

 

Xxxxxxxx

Xxxxxxxx

Run Program 'program 1' (Else Path)

 

Else

 

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

 

What is the reason for this?

 

 

Sent from my iPad using Tapatalk

I see a few others have chimed in on this already with basically the same answers I would have given.

 

I use program (true/false) status as a control flag in some cases.  Running the empty else section sets the program false when I need it to be.

Mobilinc sees program status and I use that for feedback on certain items so some programs will set others false for feedback reasons.

 

-Xathros

Link to comment

Now, back to our regularly scheduled topic...

 

HOWTO: Disable a scene controlled by a motion sensor using Adjust Scene statement in ISY

 

Purpose:

To achieve an instant light response via motion trigger yet maintain programmatic control over timeout and ability to disable motion response.

 

A Switchlinc Dimmer and an Insteon Motion Sensor both added as controllers of a scene called 'OfficeMotionLights'

post-1150-0-55404900-1416582169_thumb.jpg

 

Motion sensor is configured: On Only, Sensing Mode, Night Mode Disabled.

 

A program is in place to watch for motion sensed and then turn off the scene after a timeout (15 seconds for testing purposes).  And, there is no load connected to the SLD so my office lights do not resemble a Disco while I'm working on this.

If
        Control 'Office / Office Motion-Sensor' is switched On
 
Then
        Wait  15 seconds
        Set Scene 'Office / Office MotionSLD' Off
 
Else
   - No Actions - (To add one, press 'Action')

When I trigger the motion sensor, the SLD turns on to 100%.  15 seconds after the last motion triggered, the SLD turns off.

 

So far so good.

 

Next to Enable/Disable the "Lights" on motion, I created another program:

Program: OfficeMotionLightsEnable/Disable

If
   - No Conditions - (To add one, press 'Schedule' or 'Condition')
 
Then
        In Scene 'Office / Office Motion-Sensor' Set 'Office / Office SLD' 0% (On Level)
 
Else
        In Scene 'Office / Office Motion-Sensor' Set 'Office / Office SLD' 100% (On Level)

Here is a screenshot for assistance on this one:

post-1150-0-03206300-1416582531_thumb.jpg

 

Here is the critical and not very obvious part:  I selected the Motion sensor as the Scene and set the SLD OnLevel to 0%.  I don't want to adjust the Scene, but rather the controller of the scene here - the motion sensor. 

 

If I were to adjust the Scene instead, only the scene when controlled from the ISY is affected. 

 

This is where is is misleading in a big way.  Motion Sensor is NOT a scene but rather a Device.  It happens to be a Scene Controller.  In fact, there is no scene called 'Office Motion Sensor'.  By selecting the device 'Office Motion Sensor' in the "In Scene" drop down list, we are adjusting the responder link record in the SLD that matches the motion sensor's Insteon address.

 

Now to test.  I run Then on the Enable/Disable program then trigger motion.  The event log shows the motion sensor activity but the SLD stays off.  I manually turn on the SLD then move in front of the sensor again and the SLD turns off with the motion.  Running else on the Enable/Disable program restores the previous behavior.

 

Thats it in a nutshell.

 

Let me know if you find this useful.

 

-Xathros

Link to comment

Here is my test program.  It is verified to affect the ISY Scene setup brightness each way but does not affect the SLD or any of my plug-in modules when attempting this.

If
   - No Conditions - (To add one, press 'Schedule' or 'Condition')
 
Then
        In Scene 'Mudroom / MudRm Walkthrough' Set 'Mudroom / Mudroom Potlights' 0% (On Level)
 
Else
        In Scene 'Mudroom / MudRm Walkthrough' Set 'Mudroom / Mudroom Potlights' 100% (On Level)

Do you see any difference? There is nothing else in this scene to adjust. The MS is not available to adjust in the scene and not in linking mode to take an adjustment.

 

With ISY installing direct connected reciprocal links between the MS and SLD I doubt it that link can be affected by ISY as I stated above. Maybe there is a clue there.  Note the direct link was installed by the ISY scene and not "on the side".

 

I have repeatedly tried this technique in five or six locations, in about five or six sessions, every few months, when I become enthused again, unsuccessfully each time and gave up.  I have also tried this with direct X10 links in LampLincs and abandoned that idea due to lack of ISY control (in the X10 case ISY doesn't even know the LampLinc is activated). Back to the default method with X10 through the ISY to an Insteon LampLincyou can expect 2-10 seconds of delay sometimes.

 

It would be real nice to make this work. What am I missing?

Link to comment

Larry-

 

Change the Scene in the "In Scene" drop down to the Motion Sensor (Device) instead.  As I said in my example - this is NOT intuitive at all.  You need to select the controller (MS) as the scene rather than the Scene itself.

 

What we are saying here is: when the scene is controlled by the MS, then the SLD should respond with xx OnLevel and XX ramp Rate.  By selecting the Scene instead of the MS, you are only affecting the outcome when the ISY calls the scene, not the MS.

 

See my second screenshot for an example.

 

-Xathros

Link to comment

There are many aspects to an ISY Scene that have to be changed when using Adjust Scene.  That statement changes one value (On Level or Ramp Rate) in a single link record.  It usually takes many Adjust Scene statements to change all On Levels for example.

 

ISY Scene xxxx

Motion Sensor - Sensor as Controller

SwitchLinc as Controller

LampLinc as Controller

 

There are several "Insteon" Scenes associated with the above ISY Scene.

 

The PLM is a Controller with the SwitchLinc as Responder

The PLM is a Controller with the LampLinc as Responder 

The Motion Sensor - Sensor is a Controller with the SwitchLinc as Responder

The Motion Sensor - Sensor is a Controller with the LampLinc as Responder

The SwitchLinc is a Controller with the LampLinc as Responder

The LampLinc is a Controller with the SwitchLinc as Responder

 

That is 6 "Insteon" Scenes, each of which must be changed with a separate Adjust Scene statement to keep all the Controllers doing the same thing with all the Responders at the same On Level.  If Ramp Rate is changed then 6 more Adjust Scene statements are needed to make the Ramp Rate changes.

 

Coding an ISY Scene is pretty simple.  Many folks do not understand just how many "Insteon" Scenes are involved with that single ISY Scene and how many Adjust Scene statements are necessary to alter the Responder values.

Link to comment

I just spent like 3 -4 weeks (in my spare time, not straight) figuring this one out. I have a light and a small shelf fan in a laundry room that also doubles as the cat's home at night. I set up an open/close sensor on the door that would change the scene parameters of the light.

 

When the door is open, the light and fan come on when motion is sensed. When the door is closed, the fan runs but the light stays off.

 

Took me forever to figure this out!

Link to comment

There are many aspects to an ISY Scene that have to be changed when using Adjust Scene.  That statement changes one value (On Level or Ramp Rate) in a single link record.  It usually takes many Adjust Scene statements to change all On Levels for example.

 

ISY Scene xxxx

Motion Sensor - Sensor as Controller

SwitchLinc as Controller

LampLinc as Controller

 

There are several "Insteon" Scenes associated with the above ISY Scene.

 

The PLM is a Controller with the SwitchLinc as Responder

The PLM is a Controller with the LampLinc as Responder 

The Motion Sensor - Sensor is a Controller with the SwitchLinc as Responder

The Motion Sensor - Sensor is a Controller with the LampLinc as Responder

The SwitchLinc is a Controller with the LampLinc as Responder

The LampLinc is a Controller with the SwitchLinc as Responder

 

That is 6 "Insteon" Scenes, each of which must be changed with a separate Adjust Scene statement to keep all the Controllers doing the same thing with all the Responders at the same On Level.  If Ramp Rate is changed then 6 more Adjust Scene statements are needed to make the Ramp Rate changes.

 

Coding an ISY Scene is pretty simple.  Many folks do not understand just how many "Insteon" Scenes are involved with that single ISY Scene and how many Adjust Scene statements are necessary to alter the Responder values.

Thanks LeeG.  As always, your insight on these things is invaluable.

 

My example scene contains only a sensor and a single SLD.  I was trying to keep it simple to make it as understandable as possible.  As you point out above, if there are more responders in a scene, that would require additional Adjust scene statements with those responders as the target devices.

 

Based on the OP's and Others goals in this thread, we weren't concerned with how the scene would react from controllers other than the motion sensor so I limited my example to only that function.

 

-Xathros

Link to comment

Larry-

 

Change the Scene in the "In Scene" drop down to the Motion Sensor (Device) instead.  As I said in my example - this is NOT intuitive at all.  You need to select the controller (MS) as the scene rather than the Scene itself.

 

What we are saying here is: when the scene is controlled by the MS, then the SLD should respond with xx OnLevel and XX ramp Rate.  By selecting the Scene instead of the MS, you are only affecting the outcome when the ISY calls the scene, not the MS.

 

See my second screenshot for an example.

 

-Xathros

OK Got it!

I can't believe I have read this over so many times and attempted to apply it without success. I think the problem was the "Adjust Scene" pulldown scene list was too long and I never scrolled it up that far to even see these devices at the top. The syntax of the whole thing really is NOT very intuitive, either. I suppose the way to think of this is you are adjusting the levels in the SLD link from the MS. UDI couldn't name it after the  SLD because it could contain links from many devices and be ambiguous. The list would have to contain all the combinations (see LeeG's post above) such as "MD-SLD","KPL-SLD", "ISY-SLD", etc..... 

 

I hate to say it but I have been messing around with this method for almost a year on and off. I have read some posts attempting to explain this before but it just never clicked. Even tonight I read your post over and over for many hours and began wondering if this was some kind of joke. Either you were or I had to be crazy or maybe both of us. :D

 

Thank you so much (also LeeG) for your time and persistent efforts. Tis was an extremely bumpy road for me. I owe you a few beers for this one!!!

Link to comment

Now, back to our regularly scheduled topic...

 

HOWTO: Disable a scene controlled by a motion sensor using Adjust Scene statement in ISY

 

Purpose:

To achieve an instant light response via motion trigger yet maintain programmatic control over timeout and ability to disable motion response.

 

A Switchlinc Dimmer and an Insteon Motion Sensor both added as controllers of a scene called 'OfficeMotionLights'

attachicon.gifScreen1.jpg

 

Motion sensor is configured: On Only, Sensing Mode, Night Mode Disabled.

 

A program is in place to watch for motion sensed and then turn off the scene after a timeout (15 seconds for testing purposes).  And, there is no load connected to the SLD so my office lights do not resemble a Disco while I'm working on this.

If
        Control 'Office / Office Motion-Sensor' is switched On
 
Then
        Wait  15 seconds
        Set Scene 'Office / Office MotionSLD' Off
 
Else
   - No Actions - (To add one, press 'Action')

When I trigger the motion sensor, the SLD turns on to 100%.  15 seconds after the last motion triggered, the SLD turns off.

 

So far so good.

 

Next to Enable/Disable the "Lights" on motion, I created another program:

Program: OfficeMotionLightsEnable/Disable

If
   - No Conditions - (To add one, press 'Schedule' or 'Condition')
 
Then
        In Scene 'Office / Office Motion-Sensor' Set 'Office / Office SLD' 0% (On Level)
 
Else
        In Scene 'Office / Office Motion-Sensor' Set 'Office / Office SLD' 100% (On Level)

Here is a screenshot for assistance on this one:

attachicon.gifScreen2.jpg

 

Here is the critical and not very obvious part:  I selected the Motion sensor as the Scene and set the SLD OnLevel to 0%.  I don't want to adjust the Scene, but rather the controller of the scene here - the motion sensor. 

 

If I were to adjust the Scene instead, only the scene when controlled from the ISY is affected. 

 

This is where is is misleading in a big way.  Motion Sensor is NOT a scene but rather a Device.  It happens to be a Scene Controller.  In fact, there is no scene called 'Office Motion Sensor'.  By selecting the device 'Office Motion Sensor' in the "In Scene" drop down list, we are adjusting the responder link record in the SLD that matches the motion sensor's Insteon address.

 

Now to test.  I run Then on the Enable/Disable program then trigger motion.  The event log shows the motion sensor activity but the SLD stays off.  I manually turn on the SLD then move in front of the sensor again and the SLD turns off with the motion.  Running else on the Enable/Disable program restores the previous behavior.

 

Thats it in a nutshell.

 

Let me know if you find this useful.

 

-Xathros

THANK YOU!

 

This needs to be made a stickie or something for others use.

Link to comment

I can't believe I have read this over so many times and attempted to apply it without success. I think the problem was the "Adjust Scene" pulldown scene list was too long and I never scrolled it up that far to even see these devices at the top. The syntax of the whole thing really is NOT very intuitive, either.

 

I hate to say it but I have been messing around with this method for almost a year on and off. I have read some posts attempting to explain this before but it just never clicked. Even tonight I read your post over and over for many hours and began wondering if this was some kind of joke. Either you were or I had to be crazy or maybe both of us. :D

 

Thank you so much (also LeeG) for your time and persistent efforts. Tis was an extremely bumpy road for me. I owe you a few beers for this one!!!

My problem exactly. It's so damn easy, but so confusing at the same time!

Link to comment

Motion sensor is configured: On Only, Sensing Mode, Night Mode Disabled.

 

If I'm not mistaken it should be noted that in this configuration an ON command is sent every 10 secs when there's activity in front of the MS. This could keep your insteon network pretty busy if you live in a busy household. In my case I use 2 motion sensors to monitor rec room occupancy and there are certainly times when the kids are down there that both would be sending an ON command every 10 secs for extended periods of time. Add to that the traffic generated by other motion sensors firing off in other rooms. I could see reliability suffering, which is why I live with the delay of letting ISY turn the lights on but if I've missed something, please let me know.

Link to comment
  • 4 weeks later...

Glad this is resolved for the OP. My goal is so similar to the OP's that I thought it best to add on instead of start a new thread.

 

Simple Goal:

Use a scene for instant on with a motion sensor, however give precedence to local control of the switch. Have an auto off program because I'm lazy.

 

Scenario:

At night, have the bathroom motion turn on the lights at 30%. If I need to actually see something, like the new scratch my cat gave me that woke me up, use the switch to brighten to whatever I need... 50%, 80%, or 100%.

 

Result:
Works great, however, as soon as I move, the MS triggers the scene again and resets the light back to 30%

 

Solution:

Set the motion to send an On only after the maximum timeout (2 hours I think, which is long enough). This solution kills my motion sensing auto turn off program, and I have to rely only on my failsafe fixed time turn-off program. This is sort of acceptable.

 

Result:
Great, now I can move freely, treat my wound and go back to bed. However... sometime before the 2 hour MS timeout has expired, the cat scratches me again and I head back to the bathroom. Because the MS is still sleeping, it does not turn on the light. So here the compromises start to add up and tip the scale against this approach.

 

Solution:

Ask the forum for other ideas :-P

 

Thanks in advance,

Jeff

Link to comment

To me, if I have to start making trades, the least painful would be to accept the small delay associated with programs and remove the motion sensor as direct controller of the scene. I dont find an extra second or so delayed response to be that big of a problem.

 

If one must have the MS be scene controller, the options do, indeed become more limited.

Link to comment

Solution:

Ask the forum for other ideas :-P

 

Thanks in advance,

Jeff

Hi Jeff-

 

There is a fairly low tech solution to this problem that works well for me: A square (1/2" by 1/2" of white electrical tape placed on the MS lens such that it obscures the bed area.  I can toss and turn all I want but the sensor does not trigger till I stand up getting out of the bed or walk into the room through the door.  I have the sensor mounted across the room from the bed centered with the bed.  The tape is affixed to the lower center of the MS lens.  I used a square cut out of a post-it note to experiment with placement before placing the electrical tape.

 

Since the door to my master bath is normally open when it's not in use, instead of bringing the MBR lights on dim, I bring the LED backlight of the Master Bath Switchlinc Dimmer on to 100% for 5 minutes.  Normally the backlights are off during our sleep hours.  This provides enough light to navigate to and inside the bathroom without lighting up the bedroom and waking the boss.  I also set the onlevel for the vanity light to 20% so that if we do turn on the light once in the bathroom with the door closed, it's not a blinding light.  Normally, the backlight is all we need though.

 

Hope this helps.

 

-Xathros

Link to comment

builderb, yes, that's exactly the kind of functional solution I was hoping for - setting the on level to the current level - but searched through all the options in 4.2.18 and didn't see that capability. Is it really coming in 5.x?

 

oberkc, yes, I know, that's how it's all currently implemented... all programmatic. However it's flakey... but I think that is mostly because I've been using the X10 motions (because they are so nice and small and I had them already from my legacy setup). They missed a lot. With the recent Smarthome sale, I got a ton of Insteon motions to replace them, and so now I have the opportunity to put them in scenes. In addition to much higher reliability, I was just hoping to eliminate the slight program delay. Until 5.x comes along, I'm too am leaning toward trading off the instant response for all the functionality of a fully programmatic solution.

 

Cheers,

Jeff

Link to comment

oberkc, yes, I know, that's how it's all currently implemented... all programmatic. However it's flakey... but I think that is mostly because I've been using the X10 motions (because they are so nice and small and I had them already from my legacy setup). They missed a lot. With the recent Smarthome sale, I got a ton of Insteon motions to replace them, and so now I have the opportunity to put them in scenes. In addition to much higher reliability, I was just hoping to eliminate the slight program delay. Until 5.x comes along, I'm too am leaning toward trading off the instant response for all the functionality of a fully programmatic solution.

 

Cheers,

Jeff

 

When I hear your description of programs as "flakey", my mind instantly runs to communication around the PLM. With programs, perhaps unlike with scenes, there is reliance on a communication with a single device...the PLM. Because of the importance of this single device, it is paramount to ensure it is on a good, clean, circuit.

 

Unfortunately, most of us, I suspect, find the most convenient location for the PLM to be near some of the noisiest and interfering equipment we have in our house...other computer equipment.

 

Do take the time and effort to make sure your PLM is on a good circuit, or filter all that computer stuff. Better yet, do both.

Link to comment

builderb, yes, that's exactly the kind of functional solution I was hoping for - setting the on level to the current level - but searched through all the options in 4.2.18 and didn't see that capability. Is it really coming in 5.x?

 

From what I've read here, you'll be able to pass device states to variables, and vice-versa when 5.x arrives. That's the necessary missing piece here. Supposedly shipping Q1 2015.

 

If you have a computer you can use, you can run ISYLink right now though, and use that as the intermediary in passing the on level between the device and variable.

Link to comment

I've only read through the first page but just wanted to post an observation I found with a similar issue.  Had the same problem, motion sensors taking 1-2 seconds to turn a light on with a program.  However now I have the Z-Wave module in my ISY after having the Vera for a bit, and so my network is mixed.  I have rooms with Insteon motion sensors and a program to turn the Z-Wave switch in that room on/off, and also Z-Wave motion sensors with programs to turn Insteon lights on and off.  Just worked out that way, wasn't planned.

 

Anyway what's interesting, is that these trigger the same speed as a scene, even though it's an ISY program.  I don't know if it's because it can send the light on command the instant it receives the motion command or what, but it's so fast you'd think it was an Insteon scene.  I walk in my bathroom and I'm half way through the door and my Insteon motion sensor turns on the Z-Wave switch before I am even fully in the room.  Not that that's a solution necessarily, but was interesting.

Link to comment

Archived

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


×
×
  • Create New...