Jump to content

conditional programming sort of


PeterHart

Recommended Posts

For give me if this topic has been covered but after having read through a lot of the forum I cannot find it or I simply do not understand it when I do see it. I have a program which runs everyday to run an "evening On" scene which turns all my house lights on each evening. There are times when for example the chandelier in the dining room is already on at a brightness level greater than the "evening on" scene calls for because someone is in the dining room using the light. As it is now when the "evening on" scene runs it dims the chandelier and the user then has to get up and manually brighten the chandelier again via the wall switch. I would like to be able to modify the programming to determine that the chandelier is already on and therefore not run the evening on scene on that light so that its dim level is not changed while it is already on and in use. My question is not so much how to do that specifically in a program since that has been covered pretty thoroughly in this forum but rather I am struggling to grasp the higher level picture. For instance, if I want to check the on/off status of every light before I let the "evening on" program execute the evening on scene, do I need to create a separate "evening on" scene for each individual light I might wish to prevent the evening dim change to if that light is already in use and then also create a separate timer program to run each scene or is there some more elegant programming way of getting the result I am after? In short what I am looking for is how to program the ISY to run the "evening on" scene but not alter the status of any scene member (light) which is already on.

Link to comment

The answer to your questions is mostly "yes".

 

What you want is a "Set to At Least xx" command. You can't of course accomplish this with Insteon scenes as they aren't sensitive to the current state of the device.

 

So, yes. You would need to create little programs for each light you want to check and possibly change or not change. As LeeG says, this isn't exactly elegant. But at least is isn't all that difficult.

 

The skeletal ISY program logic would be something like this:

If  Then
 run program 'SetDevice1' (If Part)
 run program 'SetDevice2' (If Part)
 ...

//program SetDevice1: (Disabled)
If Status 'Device1' < 30% Then
 Set 'Device1' 30%

//program SetDevice2: (Disabled)
If Status 'Device2' < 50% Then
 Set 'Device1' 50%

...

 

It is important that these little "SetDevice#" programs be set to Disabled so they can only get activated explicitly by the main, triggering event program. You do not want these programs activating or self-activating every time status of the device changes.

 

In the end, whether this kind of thing is workable depends mostly on how many devices there are, and whether the small program delays bother you. If you do try it out, you should give it a little time to see if you get used to the small lag time - we all have.

Link to comment
  • 2 weeks later...

Archived

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


×
×
  • Create New...