Jump to content

Insteon on/Off on X10 received


scoobydawg

Recommended Posts

Hi -

I have X10 motion sensor floodlights (X10 A5) in my backyard, what I would like to do is have a program which on an X10 A5 code turn on Insteon "kitchen light" - 5 minutes later I would like to have the Kitchen light turned off, but only if the light was not previously on prior to the X10 signal - So for example if I have the light on in my kitchen already, I do not want it to get shut off by the program - Am I clear or am I confusing everyone??? Thanks!

Link to comment

d_l,

 

I don't believe you can use "control" here. You are essentially looking for two simultaneous events - unlikely. A secondary problem could be that the "control" condition can't tell if the light was activated by a scene.

 

A status command can work, but it will require two programs since you're modifying the Kitchen lamp within the program.

Monitor

 

IF

X10 'A%/On(3)' is Received

And STATUS 'Kitchen Light' is OFF

 

Then

Call KitchenTimerProgram

 

Else

No Actions

KItchenTimerProgram

No conditions

 

Then

Set "Kitchen Light" On

Wait 5 Minutes

Set "Kitchen Light' Off

Run "KitchenTimerProgram" (Else Path)

 

Else

- No Actions

Link to comment

Mike, you are right. It takes two programs to do it. Control doesn't do what I thought it did! I hadn't used it before now. I just mistakenly changed my programs to use Control to eliminate the two-program requirement. What with all the X10 status programs, I have too many little programs listed in the Program Summary and I wanted to condense things down a little there.

 

It seems wasteful to have to use two programs.

 

Crud, now I have to revert those programs back to the old method which basically ends up having three programs involved. :(

Link to comment

Thanks so much - I have the code in place now, hopefully when the snow melts (only have a few feet.. covered by a few inches of ice) I can get in my backyard and trigger a motion sensor to test it out... At this rate it'll be mid July by the time the snow melts... Once again - Thanks!

Link to comment

IndyMike

 

KItchenTimerProgram

No conditions

 

Then

Set "Kitchen Light" On

Wait 5 Minutes

Set "Kitchen Light' Off

Run "KitchenTimerProgram" (Else Path)

 

Else

- No Actions

 

 

In your Then statement, why do you have Run "KitchenTimerProgram" (Else Path)?

 

Wouldn't the ISY just execute the Then statement to completion, and stop?

 

Just curious.

Link to comment

clark, he put that Run "KitchenTimerProgram" (Else Path) in there because I had it in my incorrect single program. I'm not sure if he commonly uses that statement or not, but I do.

 

Yes, the ISY just execute the Then statement to completion, and stop, but it would also still be read as True in the Program Summary page after it had stopped. The Run Else statement forces the program to be false after completion.

 

I use a convention where I name my programs as simple sentences, e.g. in this case it would be something like, "Kitchen Light ON by A5". So when when I look at the Program Summary page and see "Kitchen Light ON by A5" is True, I know the Kitchen Light had been turned on by A5 conditions and the time limit for the A5 condition hasn't expired.

 

Sure you can check the status of the Kitchen Light on the Main page, and know if it is on or not, but by using the Run Else as I do, then you have a little more information on the Program Summary page as to what is happening if you are using X10 sensors. This becomes more useful if you have multiple X10 sensors or other programs that turn the Kitchen Lights on.

Link to comment

OK Mike, here is what I was trying to do (thought I was doing) with the Control statement in my single program. This alternative method still needs two programs, but it makes the activation of the physical light switch sort of "non-overrideable" if you want. However as listed, it doesn't allow the switch to be powered on by a scene and then not shut off by the motion detector, but I really don't use scenes due to a limited number of Insteon devices and so I don't think about scene incorporation when making programs.

 

"Program Content for 'Manual Kitchen Switch'"

 

If
       Control 'Kitchen Light' is switched On
    Or Control 'Kitchen Light' is not switched Off

Then

Else

// Manual activation of Kitchen Light Switch

 

"Program Content for 'Kitchen Light On by A5'"

 

If
       X10 'A5/On (3)' is Received
   And Program 'Manual Kitchen Switch' is False

Then
       Set 'Kitchen Light' On
       Wait  5 minutes 
       Set 'Kitchen Light' Off
       Run Program 'Kitchen Light On by A5' (Else Path)

Else

 

By tracking the manual activation of the Kitchen Switch, you have a little more information available to interact with other programs. This gets away from the two program technique of Check Status, then Run Statements Only that you posted and that Chris Jahn has shown before in this situation.

 

If scoobydawg had a second X10 sensor that was to activate the Kitchen Light for a different length of time (this is a situation that I have), this method is much easier. Simply have a second program, e.g. 'Kitchen Light On by A7'. I absolutely could not come up with programs to do this by the 'Check Status, then Run Statements Only' technique.

 

If someone had a problem with the Kitchen Light Switch accidentally being left on late into the night, I suppose that a From-To time test could be added to the first program, to power off the light at the end of that period.

Link to comment

Clark,

 

As d_l stated, if you do not run the "else path" the program status will remain "true" in the program summary table. Since I sometimes use the status of one program to qualify another ( if program 1 true, then run program 2) it's become habit to run the else path to ensure a "false" status.

 

...In your Then statement, why do you have Run "KitchenTimerProgram" (Else Path)?

 

Wouldn't the ISY just execute the Then statement to completion, and stop?

 

Just curious.

 

IM

Link to comment

Dave,

I experimented with something similar using two programs to detect the "control" of the kitchen light. Activating one program would turn the other off. Unfortunately, I realized that this would not work if the light was activated by a scene (I use a lot of them - I understand that you do not).

 

 

If
       Control 'Bar Lamp KPL2-Primary' is switched On

Then
       Run Program 'Bar Control Off' (Else Path)

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

 

 

If
       Control 'Bar Lamp KPL2-Primary' is switched Off

Then
       Run Program 'Bar Control On' (Else Path)

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

 

 

You setup is obviously simpler (and interesting). My question is (I haven't tested), does the " Or Control 'Kitchen Light' is not switched Off" set the program status to "false"? Sorry, it's Sunday and I'm feeling a bit lazy - actually working on my projection TV and doing a brake job in parallel...

 

IM

 

"Program Content for 'Manual Kitchen Switch'"

 

If
       Control 'Kitchen Light' is switched On
    Or Control 'Kitchen Light' is not switched Off

Then

Else

// Manual activation of Kitchen Light Switch

 

Link to comment

Mike,

The "Or Control 'Kitchen Light' is not switched Off" is not needed in the example I posted, but I had it there because it IS needed if you change that program to add these sort of lines that I mentioned near the end of that post and so I've just started to add it to these type of programs automatically:

 

If
       Control 'Kitchen Light' is switched On
    Or Control 'Kitchen Light' is not switched Off
   And From    Sunset 
       To      11:00:00PM (same day)

Then

Else
       Set 'Kitchen Light' Off

 

This is actually the way I have my porch light set up. It is intended to automatically power off the light late in the night if it should ever be manually switched on and left on. Probably scoobydawg might not accidentally leave an inside kitchen light on all night, but it is easier to do with my porch light. :oops:

 

Edit: This program works to turn off a manually switched on light at the To time and it prevents the motion sensor program from powering off the manually turned on light during the time interval, but it breaks the intended True/False structure. Instead of a From/To command, there would need to be an After Time command for it to work as I wanted.

 

I had an alternate idea of setting the program to a multi-hour Wait in the Then branch and then shutting off the light after the Wait. This would have the advantage of showing up as a nice red "Running Then' entry in the Program Summary which would make it stand out.

Link to comment

d_l and IndyMike, thanks for the clarification. I program energy management systems for a living, so I'm not new to this stuff, but I have only had my ISY in place for a few days.

 

The documentation is a bit sparse at times, but that's understandable. I looked at your post, then looked at my ISY and noticed just what you had mentioned. I had wondered why it showed what it did. And you explained it.

 

It seems that what you were doing is a good programming practice in the ISY. Thanks for the clarification.

Link to comment

Clark,

 

Sorry we took this thread a bit sideways (that's my/our nature). I'm glad that you were able to pick out the pertinent details.

 

You're correct that, in some instances, the ISY documentation hasn't progressed. This is due to the fact that the ISY people have been following this forum and implementing changes at a incredible pace (documentation hasn't kept up). Once we users stop throwing requests at Michel and Chris I expect a new documentation package will be released (they really have been extremely attendant to our requests). In the mean time, MarkSanctuary has been doing a wonderful job of including things in the Wiki.

 

IM

Link to comment

Clark,

 

What Mike says is true about the Wiki. MarkSanctuary has done a terrifiic job updating it as new ideas and info become available. I never have much luck finding anything there by browsing for it, but a good search always turns up what I need to know. :)

Link to comment

Archived

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


×
×
  • Create New...