Jump to content

Programming question


bmiller

Recommended Posts

I created a folder called "away" the folder states "if KPL C is on". Inside the folder are 4 programs for individual lights. They all come on at dusk, and turn off at different times with a random off time. If i turn KPL C on, and then return home, and turn KPL C off, the program continues to run, ie, the lights stay on, and i assume will continue until the set off time in the program. I'd like to have the lights go off when the KPL C is turned off. What is the easiest way add to the program to get it to reset all to off. I was going to add another program to the folder stating if KPL C is off then turn lights off. I don't know if this is the best way to accomplish what i'm after.

Thanks

Brad

Link to comment
I was going to add another program to the folder stating if KPL C is off then turn lights off.

 

Given that the programs in the folder are disabled if KPL C is off, I am not sure that such a program would run. I believe it would be best to keep this program out of the folder.

 

I don't know if this is the best way to accomplish what i'm after.

 

This is a good option in my mind in that this allows a bit easier maintenance and updates for new devices into the affected scenes.

Link to comment
I was going to add another program to the folder stating if KPL C is off then turn lights off.

 

Given that the programs in the folder are disabled if KPL C is off, I am not sure that such a program would run. I believe it would be best to keep this program out of the folder.

 

I don't know if this is the best way to accomplish what i'm after.

 

This is a good option in my mind in that this allows a bit easier maintenance and updates for new devices into the affected scenes.

 

The program runs regardless of whether it is inside or outside of the folder. I had the same thought and tested it before posting.

Link to comment

So I guess to put it into a "pearl"

 

When a single trigger condition changes the state of a folder and is a trigger condition for a program inside that folder, the program will either execute or not execute based on the folder's status at the time of the trigger (not the state after the change).

 

Wow, that is kind of hard to say.

Link to comment
So I guess to put it into a "pearl"

 

When a single trigger condition changes the state of a folder and is a trigger condition for a program inside that folder, the program will either execute or not execute based on the folder's status at the time of the trigger (not the state after the change).

 

Wow, that is kind of hard to say.

Wow apostolakisl, Nice One! I am with oberkc, I would have bet that it wouldn't have worked either. But sure enough it does work. Nice Job!
Link to comment

I attribute it to ISY being "event driven". Events seem to trigger programs simultaneously. They may not execute to completion simultaneously, but they at least all queue up based on conditions at the instant of the trigger.

 

The only caveat is that I have not tested this when there are multiple conditions. If that has any affect on speed of processing/order of processing I don't know. But I would hope not, since then you would get inconsistent results.

Link to comment

I'm trying to follow. I'm going to create a program inside the folder stating if KPL C is off, then turn ..... Light off and so on for all 4 lights. I'll see how that works out tonight.

Thanks for the help. I'm still trying to decipher the answers.

Brad

Link to comment
I'm trying to follow. I'm going to create a program inside the folder stating if KPL C is off, then turn ..... Light off and so on for all 4 lights. I'll see how that works out tonight.

Thanks for the help. I'm still trying to decipher the answers.

Brad

 

"control off" is probably going to be more appropriate than "status off". Control off will only respond to actually pushing the button where status off would respond to other means of turning button c off.

 

You should make a scene. It is much less insteon traffic. . . one insteon command can take care of as many lights as you want. Listing each light separately in the program is way more traffic all at once which is going to have a higher failure rate. Plus it is easier to add and remove lights from a scene than it is to add/delete parts of a program.

Link to comment

Thanks. I changed it to control KPL C is switched off. That even reads better as a statement. I did create a scene a while ago, and dragged the KPL C button into it. This was for control via mobilinc. I assume the program will work the same way. I'll look more closely at revising this program as a scene if it will make it more reliable. I listed them separately because i wanted different off times, and different random settings for each light. I thought this would give it more of that someone is home feeling instead of the lights all going off at the same time. If i can create the same type of program as a scene , then i'll look into that.

Thanks for the help. Much appreciated.

Brad

Link to comment

I had the KPL C on at dusk and nothing ran, so it's back to the drawing board. I'l remove the program in the folder i just added, and look for a different route.

I'm not sure what you mean by another scene with the lights in it, but not the KPL C button. What would be the controller, and what would be the responders? I have to do some more reading on creating scenes.

Link to comment

An ISY Scene does not require an explicit Controller. The ISY PLM is the default Controller for all ISY Scenes.

 

Can you post the Program that did not run at Dusk. If the Folder condition was True there is some issue with the IF conditions in the Program.

Link to comment
I had the KPL C on at dusk and nothing ran, so it's back to the drawing board. I'l remove the program in the folder i just added, and look for a different route.

I'm not sure what you mean by another scene with the lights in it, but not the KPL C button. What would be the controller, and what would be the responders? I have to do some more reading on creating scenes.

 

My guess is you had it set to "control switched on" for your dusk activation. If so, it needs to be "status on". Your dusk program is triggered by dusk occurring. . . kpl c status on is an additional condition that must also be met. Control switched on program only run true at the instant you push the button (provided everything else is true). Your off program is triggered by pushing the button (control switched off).

Link to comment

Here are some screen captures of what i have that was in a working state. The only difference was yesterday i added a program within the folder which stated " control KPL C switched off", then i had all 4 lights listed to turn off. All 4 lights have a slightly different time settings, and random off times. I gather that was the conflict. I removed it. I want to be able to disable the folder actions after it has started without waiting for all the timers to time out. I may have to start over using a scene as the starting point. KPL C as the controller, and the lights as the responders. I'll have to read up on setting the parameters for each light in a scene.

post-4005-140474156538_thumb.jpg

post-4005-14047415654_thumb.jpg

post-4005-140474156541_thumb.jpg

Link to comment
I want to be able to disable the folder actions after it has started without waiting for all the timers to time out.

As I understand it, disabling a folder will only stop included programs from self-triggering. I don't believe it will halt on-going programs, nor will it prevent initiation of these programs from other sources (such as being called from other programs).

 

Perhaps (I don't remember) there is a program action that can halt a currently-executing program?

Link to comment

I may have found a solution. I created a test folder with one light in the program. It tested out okay. Let me know what you think, or if there is an easier way. I'd have to add for all the lights, but that's no big deal.

post-4005-140474156543_thumb.jpg

post-4005-140474156545_thumb.jpg

Link to comment
I want to be able to disable the folder actions after it has started without waiting for all the timers to time out.

As I understand it, disabling a folder will only stop included programs from self-triggering. I don't believe it will halt on-going programs, nor will it prevent initiation of these programs from other sources (such as being called from other programs).

 

Perhaps (I don't remember) there is a program action that can halt a currently-executing program?

 

Correct. Programs in a disabled folder won't self trigger. End of story.

 

To stop programs from running.

 

If

KPL C is switched off

Then

Stop Program 1

Stop Program 2 . . .etc

 

Also include

Set light 1 off

set light 2 off

 

In this way, when you come home and switch kpl c off, it will disable the folder, turn the lights off, and stop the programs from turning the lights off at 10pm (in the event that you had manually turned it back on).

Link to comment
The first set of programs you posted screen shots should have worked.

 

Reasons for not working:

 

1) The program wasn't saved

2) The program was disabled. Be sure to check that the "enabled" box is checked.

3) There was an insteon failure to communicate and ISY didn't know kpl c was on.

Or KPL C was turned On after Sunset had already occured.

Link to comment

The KPL was enabled long before sunset occurred, and was operational for the last few weeks. The only difference was a program that was added to turn the lights off when the KPL was off. The program was removed before i posted the captures. I assume that was the reason. I don't think the program was correct, and it prevented it from activating. As it stands it works ok, most of the time.

The second set is a test i made this morning to try and shut the folder actions down after they were started, and with the one light, it worked as i want it to. The light came on at the scheduled time, and when i pressed the KPL button to the off position, the light turned off, which in effect turned off the folder action.

In this case i gather that if the KPL is set after sunset, the program will not start until the next occurrence of sunset, i.e. the next day.

apostolakisl i'm going to do as you suggest, and add that to the away folder, and test again tonight. I have an idea this will work just fine.

Thanks

Brad

Link to comment
The KPL was enabled long before sunset occurred, and was operational for the last few weeks. The only difference was a program that was added to turn the lights off when the KPL was off. The program was removed before i posted the captures. I assume that was the reason. I don't think the program was correct, and it prevented it from activating. As it stands it works ok, most of the time.

The second set is a test i made this morning to try and shut the folder actions down after they were started, and with the one light, it worked as i want it to. The light came on at the scheduled time, and when i pressed the KPL button to the off position, the light turned off, which in effect turned off the folder action.

In this case i gather that if the KPL is set after sunset, the program will not start until the next occurrence of sunset, i.e. the next day.

 

A program such as this

 

If

KPL C is switched off

Then

anything

 

Can not have any affect on anything unless KPL C button is physically clicked from on to off (in which case your then will run). Unless you added that "if" clause to one of your other programs . . . in which case it would cause them to run false (since the button wasn't pushed).

 

As I mentioned your first set of programs is valid and it would be a very odd program that could conflict with it . . . at least the turning on part. It does happen sometimes that the "enabled" box defaults to unchecked when you first write the program and you don't notice it. I have had that happen.

 

The best way to trouble shoot is to change the times on your program to just a minute in the future. Then watch the program summary page to see which programs run and whether they run true or false.

Link to comment

Thanks. It's possible changes were not saved. It wouldn't be the first time. I'll try the folder with the new additional program to turn off the lights via the KPL c button this evening, as apostolakisl recommended and see how it goes. My test this morning worked ok. The only change i made was adding "stop program...." to the list. It's armed now.

Link to comment

Archived

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


×
×
  • Create New...