Jump to content

'All Off' button/status -- one more twist


Algorithm

Recommended Posts

Posted
This is your problem. Get rif of the 'ON level 0' set of mind. (BTW, this is left over from PH, right? :wink:)

Your '2nd floor off' scene level are not really relevant (I set mine to some usable "dim" levels for reuse), as long as you call your trigger with OFF statement, instead of calling it the way you do now (with 'ON, level 0').

 

Hi Mark. Actually, Mike's '2nd floor off' scene is not a trigger, it is a direct-linked scene. The purpose of the 'On Level 0' is so that the scene effectively turns off whether the button itself is turned on or off. The purpose of having the button in toggle mode is so that, in addition to controlling the scene, it can serve as an indicator for the scene. Full details are in the first post of this thread, which also outlines the advantages of using a direct-linked scene as opposed to a trigger.

Posted
If you remove the secondaries from the '2nd floor off' scene as in point 1 above, they should no longer turn on when '2nd floor off' button is turned on.

 

True, but then if my son has his lamps on when I hit my '2nd floor off' button, his lamps will go off but his KPL secondaries will not. Unless of course I keep my 'fix' programs, which will have to run every time I use my '2nd floor off' button and his lamps are on.

 

So, I think I will keep my KPL secondaries in the scene, and my 'fix' program will only run of someone accidentally presses my '2nd floor off' button ON (which really should never happen).

 

Here is what I'm running. I tested it a bit last night, and it seems good. I'm going to adjust my WAIT values a bit, but wanted to start a bit high:

 

 

FLOOR 2 STATUS

If
       Status  'AndyBedCloset1' is not Off
    Or Status  'AndyBedControls1C' is not Off
    Or Status  'AndyBedControls1D' is not Off
    Or Status  'AndyBedLamp1' is not Off
    Or Status  'Bathroom2ndMain1' is not Off
    Or Status  'Bathroom2ndMirror1' is not Off
    Or Status  'Bathroom2ndVent1' is not Off
    Or Status  'MikeyBedCloset1' is not Off
    Or Status  'MikeyBedLamp1' is not Off
    Or Status  'SpareBedCloset1' is not Off
    Or Status  'SpareBedLamp1' is not Off
    Or Status  'Stairway1' is not Off

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

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

 

 

FLOOR 2 STATUS OFF

If
       Status  'MasterBedControls1H' is not Off
   And Program 'Floor 2 Status' is False

Then
       Wait  4 seconds
       Set Scene 'Floor2StatusLight' Off

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

 

 

FLOOR 2 STATUS ON

If
       Status  'MasterBedControls1H' is Off
   And Program 'Floor 2 Status' is True

Then
       Wait  4 seconds
       Set Scene 'Floor2StatusLight' On

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

 

 

ANDYBEDLAMPB FIX

If
       Status  'AndyBedLampModule2' is Off
   And Status  'AndyBedControls1C' is not Off

Then
       Wait  1 second
       Set Scene 'AndyBedLampB' Off

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

 

 

ANDYBEDLAMPC FIX

If
       Status  'AndyBedLampModule3' is Off
   And Status  'AndyBedControls1D' is not Off

Then
       Wait  1 second
       Set Scene 'AndyBedLampC' Off

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

 

Thanks again Joe!

Posted

Hi Mark. Actually, Mike's '2nd floor off' scene is not a trigger, it is a direct-linked scene. The purpose of the 'On Level 0' is so that the scene effectively turns off whether the button itself is turned on or off. The purpose of having the button in toggle mode is so that, in addition to controlling the scene, it can serve as an indicator for the scene. Full details are in the first post of this thread, which also outlines the advantages of using a direct-linked scene as opposed to a trigger.

 

Is your goal to achieve totally ISY free solution?

 

What I was suggesting is a different and to me simpler approach to the same problem.

 

Let’s say a toggle button F is controlling two devices through direct link. Button F is on when devices are on and off when they are off. No ISY required up to this point.

 

These two devices and several others are in the scene I want to be able to turn off only. ISY checks status of all these devices, if any of them is on ISY turns button F on. Pressing it will turn off two linked devices directly (it doesn't matter if they are currently on or off, they will get off signal) and several others through the ISY program. If all the devices in the scene are off, ISY will turn button F off. At no point you need to check status of the F button. F button will always follow the two linked devices or a scene they are part of. No calls to 'scene on level 0' required either.

 

I fail to see how this is not accomplishing what you outlined above, unless the goal is to not use ISY at all.

 

But, to each its own. There is certainly more than one way to skin the cat.

 

Mark

Posted
If you remove the secondaries from the '2nd floor off' scene as in point 1 above, they should no longer turn on when '2nd floor off' button is turned on.

 

True, but then if my son has his lamps on when I hit my '2nd floor off' button, his lamps will go off but his KPL secondaries will not. Unless of course I keep my 'fix' programs, which will have to run every time I use my '2nd floor off' button and his lamps are on.

 

So, I think I will keep my KPL secondaries in the scene, and my 'fix' program will only run of someone accidentally presses my '2nd floor off' button ON (which really should never happen).

Mike, I think you're right. The likelyhood of the '2nd floor off' button being pressed when it is already off is likely much less than that of it's being pressed when the bedroom lamps are on, since it is an 'all off' type button. Therefore the fix program will run less frequently if it fixes the former condition rather than the latter, as you said.

 

Unless of course the 'all off' scene contains many such instances, in which case many fix programs would have to run. Such a situation could be eased by taking all such secondary-responders out of the 'all off' scene and placing them all together into a fix scene. That fix-scene-off would run each time, but it would add only a single command as opposed to several fix commands.

 

So it would seem to depend on the number of instances requiring fixing, and you have found the right solution for your situation.

 

Thanks again Joe!

 

My pleasure. Thanks for the feedback, which should benefit others as well.

Posted

Hi Mark,

 

Is your goal to achieve totally ISY free solution?

Actually I hope not to be totally ISY free, since ISY is the best way to manage the network :lol: ! Seriously, I do understand the question. Yes, you could say the goal is to have as many buttons as is reasonably possible, each carry out it's action without ISY intervention (that is, without intervention in the action, not in the scene management, etc.), so that should ISY for any reason be off-line, the network will continue to function to the greatest degree possible. But as I have said elsewhere, direct linking and ISY triggers can work hand in hand, so that ISY can enhance direct-linked scenes in addition to offering extended capabilities which are not even feasible through direct linking.

 

What I was suggesting is a different and to me simpler approach to the same problem.

 

Let’s say a toggle button F is controlling two devices through direct link. Button F is on when devices are on and off when they are off. No ISY required up to this point.

 

These two devices and several others are in the scene I want to be able to turn off only. ISY checks status of all these devices, if any of them is on ISY turns button F on. Pressing it will turn off two linked devices directly (it doesn't matter if they are currently on or off, they will get off signal) and several others through the ISY program. If all the devices in the scene are off, ISY will turn button F off. At no point you need to check status of the F button. F button will always follow the two linked devices or a scene they are part of. No calls to 'scene on level 0' required either.

In the scenario you describe, pressing the F button while it is off, will turn on the two devices to which it is directly linked. Was that your intention?

 

I fail to see how this is not accomplishing what you outlined above, unless the goal is to not use ISY at all.

What was being discussed in this thread was an All Off button which, when pressed would always turn the entire scene off, regardless of the state the button was in. In addition, the button is to serve as a status indicator, being on when any device in the scene is on, and off only when all devices in the scene are off, thereby giving a visual sign that all devices are off.

Posted
What was being discussed in this thread was an All Off button which, when pressed would always turn the entire scene off, regardless of the state the button was in. In addition, the button is to serve as a status indicator, being on when any device in the scene is on, and off only when all devices in the scene are off, thereby giving a visual sign that all devices are off.

Joe, I didn’t mean to impose on your tread and criticize your solutions. Any approach is good as long as it suits your needs and works as designed. You seek to have “All off†button that will always send an Off signal. And you want to have visual indication that any device in the scene is on.

 

My approach does all of these and goes one step further. Why? Because you need not to send “all off†if there is nothing to be turned off in the scene. In my setup when the button is off, the scene is off, therefore I don't need to send “all off†to the scene I already know is off. That would control nothing. Instead by pressing the same button I send "on" to the desired subset of the “all†scene. I essentially turned the button into functional dual purpose button. It does turnâ€all off†when there is something to turn off, and it turns some devices on when there is nothing to turn off.

 

All of these logically follows from the examples I gave above, however, I do admit, this is not a fix to your particular setup but rather an alternative solution that achieves same result in a different and arguably simpler way.

 

Mark

Posted
Joe, I didn’t mean to impose on your tread and criticize your solutions.

No offense given or taken, Mark. Thanks for the feedback.

 

I essentially turned the button into functional dual purpose button. It does turnâ€all off†when there is something to turn off, and it turns some devices on when there is nothing to turn off.

So it was intentional to turn the devices on. Yes, your dual purpose button is a very cool idea. It would be a good example to post either in ISY Example Programs or in How-To, to make it easier to find.

 

It serves as an alternative to the solution at the top of this thread, and gives the user an additional option. Each has its own advantages and disadvantages. The more choices available the nicer it is for the user.

  • 1 month later...
Posted

I assumed by selecting "Run" it ran the program. It appears to run the "Then" part of the program without checking the "If" statements. I checked this on multiple programs.

Posted

Chuck,

 

That's true. Run simply runs the Then part.

 

With kind regards,

Michel

 

I assumed by selecting "Run" it ran the program. It appears to run the "Then" part of the program without checking the "If" statements. I checked this on multiple programs.
Guest
This topic is now closed to further replies.

×
×
  • Create New...