Jump to content

testing for control on all switchlincs


bbrally

Recommended Posts

I'm trying to write a program where the condition is the on or off of any the switchlincs in the house. Is there a better way of testing this condition other than an "or" statement for every on or off command such as below? I have so many switches that this seems rediculous.

 

If

Control 'Basement' is switched Off

Or Control 'Basement' is switched On

Or Control 'Basement slave' is switched Off

Or Control 'Basement slave' is switched On

Or Control 'Den' is switched Off

Or Control 'Den' is switched On

Or Control 'Den slave' is switched Off

Or Control 'Den slave' is switched On

Or Control 'Dining Area' is switched Off

Or Control 'Dining Area' is switched On

Or Control 'Fireplace' is switched Off

Or Control 'Fireplace' is switched On

etc....

etc....

etc....

Link to comment

I have a "Control event detection" routine as part of my occupancy programs. This is exactly how it works. Lots of If Control Switched..." statements ored together. Nasty to look at but seems to function just fine. I have two lines for most switches (On/Off) and four lines each for a few dimmers that see fade up/down regularly.

 

-Xathros

Link to comment

FYI I've asked (in the programming improvements area in the past) for the ability to write a program like this based on a scene and have the ISY internally 'break it out' into the list of individual devices (so that if you update the scene membership the program would automatically update).

 

E.g. is control 'All Light Switch Scene' is on and internally the ISY would generate a list much like what you wrote above. We shall see if it is considered...

Link to comment

Archived

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


  • Recently Browsing

    • No registered users viewing this page.
  • Who's Online (See full list)

    • There are no registered users currently online
  • Forum Statistics

    • Total Topics
      36.9k
    • Total Posts
      370.3k
×
×
  • Create New...