Jump to content

Rudimentary Programming Questions -Motion Sensor Scene/Prgrm


amb

Recommended Posts

First post and I'll apologize for this being a noob question but so far I'm 1 for 3 in getting simple programs to behave the way I think they should so I'm here for to get pointed in the right direction.

 

Incidentally, I've never owned an ISY unit (previously used a Mac and Indigo) and I am very impressed. The interface is very intuitive and the system has much less lag than I had previously experienced.

 

Scenario: I have an Insteon Motion Sensor that I use to control the light in my walk in closet. I set up a scene to make this work and there are no problems with it. I would however like to have a program that limits the brightness of the light in the wee hours of the day so I don't wake up my wife when I'm getting up for work in the morning. Here is what I wrote and so far it is not doing what I want it to (the light comes on at full brightness within the time window I thought I had set up for it to be on dim only).

 

Program

 

If
       From     7:00:00AM
       To      11:30:00PM (same day)

Then
       In Scene 'Master Walk In' Set 'Master / Master Walk-in Closet' 100% (On Level)

Else
       In Scene 'Master Walk In' Set 'Master / Master Walk-in Closet' 40% (On Level)


 

I'm sure I'm overlooking something simple but hope someone more experienced than I can point it out for me. The scene referenced is v simple (and functional as I note above). The motion sensor controls a Switchlinc Dimmer.

 

Btw my next program is to write something that overrides the motion sensor so that with a double tap, this scene is disabled for x min following. I tried that tonight and it did not work. Might as well post that code too then I guess.

 

If
       Control 'Master / Master Walk-in Closet' is switched Fast On

Then
       Wait  20 seconds
       Set Scene 'Master Walk In' Off
       Wait  20 minutes 
       Set Scene 'Master Walk In' On

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


 

The 20 second wait was added as an experiment since the program did not work initially. But it did not help.

 

Many thanks in advance for assistance.

Link to comment

The Adjust Scene is not correct. The first parameter, In Scene, has to be the name of the Controller. It needs to be the name of the Motion Sensor since it is controlling the SwitchLinc. The second parameter, Set is the name of the SwitchLinc.

 

The Adjust Scene above only changes what happens when the Motion Sensor turns the SwitchLinc On. If you also want to affect what happens when pressing the SwitchLinc paddle, an additional Adjust Scene is needed. The In Scene parameter must specify the name of the SwitchLinc, and Set also contains the name of the SwitchLinc. This additional Adjust Scene is not necessary if the SwitchLinc paddle is not used.

 

The second Program turns the Scene Responders Off and the On 20 minutes later. A Scene cannot be Disabled. Do you want the Motion Sensor to no longer turn the SwitchLinc On or no longer turn the SwitchLinc Off or both. What needs to be implemented depends on what the objective is.

Link to comment

Thanks, are these changes correct?

 

If
       From     7:00:00AM
       To      11:30:00PM (same day)

Then
       In Scene 'Master Walk In Motion / Master Walk In Motion-Sensor' Set 'Master / Master Walk-in Closet' 100% (On Level)

Else
       In Scene 'Master Walk In Motion / Master Walk In Motion-Sensor' Set 'Master / Master Walk-in Closet' 40% (On Level)


 

Tested this program just now, expecting that it would come on to 40% but it is still coming on at 100%.

 

Edit - actually it doesn't seem to make any difference what dim level I set either parameter to. E.g. if I change the first one to 50% it still comes on at 100%.

Link to comment

The Program triggers only at the specified times. If the Adjust Scene Statements were not set before reaching 11:30 PM or 11:30 PM has not yet occurred the link record in the SwitchLinc has not been changed.

 

Run a Show Device Links Table for the SwitchLinc and post the result including the Insteon address of the Motion Sensor. If the image cannot be posted Save the Show results which will be an XML file and post the full XML file

 

The Adjust Scene settings in the Then clause would not get set until 7:00 AM

 

After making changes to the Adjust Scene statements, right click the Program name and select Run Then or Run Else to have the statements executed.

Link to comment

Thanks I was wondering about whether a threshold would have to be crossed in order for the program to run. I had subsequently fiddled with the time parameters and then when I got up this morning it did indeed dim to 40%. When the light comes on initially however it is at 100% and then dims to 40% immediately.

 

Is there any way to finesse things so it simply goes 0% => 40%? Not 0% => 100% => 40%?

Link to comment

This was from the Motion Sensor turning the SwitchLinc On and not from pressing the SwitchLinc paddle? What type of load is the SwitchLinc controlling, Incandescent light, CFL, LED, etc?

 

If turned on by the Motion Sensor only what is the SwitchLinc firmware level? It is displayed on the second line in the right pane when the SwitchLinc node is select in the My Lighting/ISY Lighting tree.

 

Run Tools | Diagnostics | Event Viewer at LEVEL 3. Enter the Motion Sensor field of view to have it turn the SwitchLinc On. Confirm the SwitchLinc went to 100%, then down to 40%. Post the event trace.

Link to comment

Correct, motion sensor trigger only. The load is a typical multihead halogen fixture.

 

I will check the firmware version (the SLD was purchased in 2008), run a trace and post. FWIW, when I was controlling this load w my previous set up and programs, there was no flicker to full brightness and then dim, it just went to the dim level from 0.

 

Thank you so much for your help. This is such a huge benefit of owning an ISY box, I'm really impressed with and appreciative of this level of support.

Link to comment

It is not normal for a SwitchLinc to go to 100% and then dim down from a single On command from a Controller. I assume the SwitchLinc LEDs go to full On and then dim to 40%. The event trace may show some other activity going on at the same time. If that does not show anything perhaps there is a link record issue in the SwitchLinc, one that directs it to 100% and one that directs it to 40% On.

Link to comment

Just to say that this is a great thread and some fabulous answers from LeeG (as usual).

I suspect many people wrestle with this exact same issue from time to time. Several months ago when setting up a motion sensor for our master bedroom bath, I had these precise same issues and finally figured it out for myself. I wish I had posted the problem at the time. I would have not needed to waste so much time figuring it out.

Thanks LeeG for your great knowledge and considerate postings.

Link to comment

False alarm, I think I was a bit fuzzy headed this morning + I'd forgotten to save the original program settings after fiddling with it last night. It works now as given the changes you had me incorporate. Thanks again! Will be on to the program two shortly.

Link to comment
The second Program turns the Scene Responders Off and the On 20 minutes later. A Scene cannot be Disabled. Do you want the Motion Sensor to no longer turn the SwitchLinc On or no longer turn the SwitchLinc Off or both. What needs to be implemented depends on what the objective is.

 

So what I would like to do second is this. Sometimes I have to work in the walk in closet for extended periods of time with the lights on and the motion detector is not always sensitive enough to pick up movement unless you're actually up walking around so they turn off while you are in the room.

 

So what I'd like to do is use a simple action (?double tap) on the SLD paddle to both turn on the load and temporarily suspend any subsequent Off signal from the Motion sensor (effectively to disable the scene).

 

I thought I could write a program that IF a Fast On was sensed from the SLD paddle, THEN this could trigger a program that would disable the Motion Off signal for a pre-specified period of time (e.g. 20 min in the program I initially attempted).

 

I guess there might be other ways to accomplish the same goal ... a double tap extends the Off delay (not sure what duration can be achieved, is it only 5 min? That wouldn't be long enough).

 

Ideally a Fast Off could be used to set everything back to normal but I'm sure my wife would forget so I'd rather it be reactivated automatically. Maybe something could be written such that a Fast Off on the paddle reactivated the Motion Off signal but a failsafe THEN auto reactivation could be written to make sure.

 

Hope the above makes sense.

 

Edit - I suppose the first question I should ask is whether my SLD is capable of having a double tap sensed? I'm not even sure of that. It's a 2476D SLD v.27

Link to comment

There is no means to selectively disable the motion Off message. The approach is to put the Motion Sensor into On Only mode so the Motion Sensor never generates Off messages. Then use an ISY Program triggered by Motion On to turn the SwitchLinc Off after the desired amout of time.

 

The following Program Waits for some number of minutes. If additional Motion On messages are received before the Wait completes the Wait is terminated, the Program triggers again and the Wait starts over.

 

If Control 'Motion Sensor - Sensor' is switched On

Then

Wait x minutes

Set 'switchlinc' Off

Else

 

A second Program is triggered by the SwitchLinc being manually turned On (no need for special double tap Fast On/Off). The second Program Disables the first Program, preventing the automatic Off. When the SwitchLinc is manually turned Off the second Program Enables the first Program reestablishing the programmatic automatic Off. Also the Then has a 10 minute Wait to reestablish automatic operation if someone forgets to manually turn SwitchLinc Off.

 

If Control 'switchlinc' is switched On

Or Control 'switchlinc’ is not switched Off

Then

Disable Program 1

Wait 10 minutes

Enable Program 1

Set 'switchlinc' Off

Else

Enable Program 1

 

 

These are examples to establish ideas for a starting point. Usually when something like this is put into actual there is a 'gee it would be nice if it did this' so things are often tweaked along the way. Also there are other ways to accomplish this.

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.6k
    • Total Posts
      368.1k
×
×
  • Create New...