Jump to content

How did this not work


andrew77

Recommended Posts

Posted

If
       Control 'Barn Spots' is switched On

Then
       Wait 5 minutes
       Set 'Barn Spots' Off

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

 

I have a spotlight that I want to turn off as its left on sometimes.

I thought it was straight forward. But the light remains on.

 

Drew

Posted

How was the light turned on? This would only run if someone physically did a single click "on" to the paddle. If it was turned fast on (double click), or fade up (push and hold), or if it turned on as a responder to a scene or as a command from ISY the program would not run.

Posted

If 'Barn Spots' is turned On by a Program or other switch the 'If Control' will not trigger the posted Program. If Control triggers the Program when the 'Barn Spots' switch is turned On with a paddle press at the switch itself.

 

Use If Status when the switch is operated remotely.

 

If the switch was operated manually then the On messages did not make it back to the PLM or the Program is not Enabled. Run Tools | Diagnostics | Event Viewer at LEVEL 3. Press the switch paddle On and see if the expected messages are being traced.

Posted

If
       Status  'Barn Spots' is not Off

Then
       Wait  10 seconds
       Set 'Barn Spots' Off

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


 

This worked.

I'm still not sure why the other didnt.

(I changed it to 10 seconds solely for testing purposes)

 

But this raises an issue I can never figure out.

 

The light shuts off because the program tells it to but the KPL LED that turns it on is still lit.

 

I've tried to get my LEDS to properly display the status of the light or lights connected but I fail every time.

(insert comic book argh here)

 

If i could clear it up I would be ever so grateful.

I've been told I need to put the LED button in question into the scene as a responder but I cant as it tells me it already in the scene (It is the controller)

 

 

Drew

Posted

The KPL button must not be the load control button. The "Barn Spots" must be a separate device being turned On/Off by a Secondary KPL button.

 

Turning "Barn Spots" On/Off from an ISY Program has no affect on other devices that may be controlling the "Barn Spots" device. If the only way "Barn Spots" is turned On is with the Scene that has the KPL button as a Controller, the Program can turn that Scene Off which will turn Off "Barn Spots" and turn Off the Secondary KPL button. If this Scene is more complex, controlling other devices such that the Scene should not be turned Off, then use a separate Scene with the KPL button as a Responder. A Scene is needed because Insteon does not have a Direct command that can turn a Secondary KPL button On/Off. The Direct command cannot identify which KPL button should respond. Only a Scene identifies the actual button.

 

There should not be a problem defining a Scene and adding the Secondary KPL button as a Responder. Insteon allows a node to be a Controller of only one Scene. This is an Insteon design point, not an ISY limitation. A node (KPL button) can be a Responder in many Scenes.

Posted

So if I make a scene with the KPL button (the C button in this instance) as a responder.

 

and have the scene triggered to run when the light shuts off?

 

That's seems easy but then I'd have to make a scene for everything KPL secondary button that I wanted to display the

status of the light or lights linked.

 

Is this the way to do it?

Posted

The Program that has the If Status "Barn Spots" is On would

 

Then

Wait ....

Set Scene 'kplbutton' Off

Set 'Barn Spots' Off

 

to turn the KPL button Off.

 

If multiple Secondary KPL buttons should be turned Off along with button C these can be added as Responders to the 'kplbutton' Scene. If the other Secondary KPL buttons are associated with other situations separate from "Barn Spots" then separate Scenes are needed.

 

kplbutton Scene

KPL1 button C as Responder

KPL2 button C as Responder

KPL3 button D as Responder

 

etc.

Posted

If the existing Scene that has KPL button C as Controller looks like this

 

Scene xxxx

KPL1 button C Controller

Barn Spots Responder

 

The Program can turn Scene xxxx Off and no additional Scene is needed. If there are other nodes in Scene xxxx that should not be affected by the automatic turn Off Program then a separate Scene is needed to control button C LED.

Posted

If
       Status  'Barn Spots' is not Off

Then
       Wait  10 seconds
       Set 'Barn Spots' Off
       Wait  3 seconds
       Set Scene 'KPL off' Off

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


 

I tried this. It didnt work for some reason.

 

I dod have a slow ramp rate. Should I delay the KPL LED scene off more?

 

(just tried it, no go)

Posted

It did not work because the Status changes when Barn Spots is turned Off. This cancels the Wait before the Set Scene that turns the KPL button Off. Turn the KPL button Off, then the Barn Spots Off. A Wait is not needed between these two actions.

Posted

Works like a charm.

 

I'm trying to get the hang of programming my ISY stuff so I don't have to keep running to the forum.

 

Thank you.

 

Drew

Posted
Works like a charm.

 

I'm trying to get the hang of programming my ISY stuff so I don't have to keep running to the forum.

 

Thank you.

 

Drew

 

No worries. As long as it's not the same question over and over, its all good. After all, thats why the forum is here. I was in your position about 5 years ago.

 

-Xathros

Posted

Encouraging. Thank you.

 

Although the LED issue has been driving my a little for a while. My main issue is time.

(as is everyone else's)

I don't have enough time to sit and ponder this stuff. I have bursts of time here and there but not enough to

learn.

 

I don't want to be the typical forum user that just stands on everyone's shoulders.

I'd like to contribute as well.

(and not in the 'don't do what Drew is doing' capacity)

 

hahahaha

 

 

Drew

Posted

This may be your intent, but realize as it is, there is no way to turn that light on and have it not shut off in 10 seconds. Every time the status of the light changes it will trigger the program. I suppose that means you could constantly dim it up/down a little and keep resetting the program, but realistically you aren't going to do that.

Posted

Yes, well 10 seconds or 10 minutes, he just has to be aware that it will shut off every time unless first disabling the program. This can be rather inconvenient when you actually want to be out there doing something and using the light. All of my timed light programs have a simple way to get out of them. Using 2 programs instead of one and having the second program time the light with an "if" section that causes it to abort (like hitting the on when it is already on).

 

Similar to the following. The first program checks the status of the door and the light and calls the "else" of the second program. If I hit the "on" paddle of the light the second program (the one timing to shut down) ends and the light does not shut off after 5 minutes 30 seconds.

 

If
       Program 'Dark Outside' is True
   And Elk Zone 'Back Door' is Violated
   And Status  'Garage / Third Garage-Breez L' is Off

Then
       Run Program 'back door 2' (Else Path)

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


 

 

If
       Control 'Back Hall / Back Hall Ext Door-Breezway' is switched On

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

Else
       Set Scene 'Breezway S' 100%
       Wait  5 minutes 
       Set 'Back Hall / Back Hall Ext Door-Breezway' 250 (Beep Duration)
       Wait  30 seconds
       Set Scene 'Breezway S' Off


 

In his case he might do something like

 

If

status of light is not off

 

Then

run else of program 2

 

 

If

control someswitch is switched on

 

Then

. . . blank

 

Else

Wait x amount of time

Set light off

Posted

Hey apostolakisl,

 

Thanks for another one of your brilliantly simple solutions. After seeing your timed light program method, I had another one of those "man...that's a slick way to do it" moments. Keep 'em coming.

Posted
Hey apostolakisl,

 

Thanks for another one of your brilliantly simple solutions. After seeing your timed light program method, I had another one of those "man...that's a slick way to do it" moments. Keep 'em coming.

 

I wrote these programs a while back. This got me looking at them and it just seemed like I should be able to do it in one program. And indeed you can.

 

If
       (
            Program 'Dark Outside' is True
        And Elk Zone 'Back Door' is Violated
        And Status  'Garage / Third Garage-Breez L' is Off
       )
    Or Control 'Back Hall / Back Hall Ext Door-Breezway' is not switched On

Then
       Set Scene 'Breezway S' On
       Wait  5 minutes 
       Repeat 15 times
          Set 'Back Hall / Back Hall Ext Door-Breezway' 250 (Beep Duration)
          Wait  2 seconds
       Repeat 1 times
          Set Scene 'Breezway S' Off

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


 

Putting the original stuff in parentheses and "or" ing it with "not switched on" forces the blank "else" clause to run if you hit the "on" paddle while the program is running and terminates the timer.

Posted

The exposure to combining into one program means that "any" of the If conditions changing will cancel the Wait or Repeat and drive the Else.

Posted
The exposure to combining into one program means that "any" of the If conditions changing will cancel the Wait or Repeat and drive the Else.

 

 

No. the "or is not switched on" saves you since that is true.

 

So, I do believe that closing the door resets the program, but that is fine.

 

Edit: although I think that this means when the program "dark outside" changes from true to false or vice versa it will run. Which I guess is OK, but not ideal. I'll have to think about that.

 

EDIT again: Actually, this is invalidating the dark outside stipulation and making the program run every time you open the door. Not sure I can get around that and will have to go back to the old program.

Posted

The first thing the Then does is turn On Scene 'Breezway S'. If Dark Outside, Elk Zone, Garage / Third Garage-Breez L', or 'Back Hall / Back Hall Ext Door-Breezway L' changes state the Wait or Repeat will be cancelled driving the Else clause. This will leave 'Scene 'Breezway S' On.

 

The advantage of being two programs is that any state change drives the first program Else, allowing the logic in program 2 to run to completion.

 

 

 

If

(

Program 'Dark Outside' is True

And Elk Zone 'Back Door' is Violated

And Status 'Garage / Third Garage-Breez L' is Off

)

Or Control 'Back Hall / Back Hall Ext Door-Breezway' is not switched On

Posted

Wait, I think this might fix that problem.

 

If
       (
            Program 'Dark Outside' is True
        And Elk Zone 'Back Door' is Violated
        And Status  'Garage / Third Garage-Breez L' is Off
       )
    Or (
            Control 'Back Hall / Back Hall Ext Door-Breezway' is not switched On
        And Program 'Dark Outside' is True
       )

Then
       Set Scene 'Breezway S' On
       Wait  5 minutes 
       Repeat 15 times
          Set 'Back Hall / Back Hall Ext Door-Breezway' 250 (Beep Duration)
          Wait  2 seconds
       Repeat 1 times
          Set Scene 'Breezway S' Off

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


Posted
The first thing the Then does is turn On Scene 'Breezway S'. If Dark Outside, Elk Zone, Garage / Third Garage-Breez L', or 'Back Hall / Back Hall Ext Door-Breezway L' changes state the Wait or Repeat will be cancelled driving the Else clause. This will leave 'Scene 'Breezway S' On.

 

The advantage of being two programs is that any state change drives the first program Else, allowing the logic in program 2 to run to completion.

 

 

 

If

(

Program 'Dark Outside' is True

And Elk Zone 'Back Door' is Violated

And Status 'Garage / Third Garage-Breez L' is Off

)

Or Control 'Back Hall / Back Hall Ext Door-Breezway' is not switched On

 

 

The goal of the program is to turn the light on at the back door for 5 minutes if someone opens the door, at night, and the light isn't already on. Any activity with the door will restart the program. .. which is good. Any change in the status of the light will also reset the 5 minute timer except for clicking "on" at that one switch. . .which is fine (although it wouldn't happen in practice). Clicking the "on" paddle will cancel the program. . . which is the objective.

 

EDIT: The only time I think this program will not work as I want is if I open the door in the morning and in less than 5 minutes the "Dark outside" program changes to false.

Posted

OK, I think this solves all problems except for the 5 minute window right at sunrise.

 

If
       (
            Program 'Dark Outside' is True
        And Elk Zone 'Back Door' is Violated
        And Status  'Garage / Third Garage-Breez L' is Off
       )
    Or (
            Control 'Back Hall / Back Hall Ext Door-Breezway' is not switched On
        And Program 'Dark Outside' is True
        And Status  'Garage / Third Garage-Breez L' is not Off
        And Program 'back door' is False
       )

Then
       Set Scene 'Breezway S' On
       Wait  5 minutes 
       Repeat 15 times
          Set 'Back Hall / Back Hall Ext Door-Breezway' 250 (Beep Duration)
          Wait  2 seconds
       Repeat 1 times
          Set Scene 'Breezway S' Off

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


Guest
This topic is now closed to further replies.

×
×
  • Create New...