CueServer allows the separation of different lighting areas within a project using Zones. When a zone is selected, only channels within that zone can be changed. For example, a zone named “Meeting Room” only contains channels 10 through 19. If that zone is selected, then any subsequent commands that might change channel values (such as On, Off, At, Go, Release, Toggle, etc.) will only operate on channels 10 through 19, regardless of which channels are being targeted by the Cue, Group, Preset, etc.

In certain applications, it is useful to be able to join multiple zones together (such as in a Ballroom with removable “air walls”). See the Join command to learn more.

This tip will demonstrate how the use of Zones and Joins will bring ease of use to any project.

Room Combine Example



The Scenario


There are 5 divisible sections of an event hall. These sections can be labeled sections A, B, C, D, and E. Using sliding doors, these sections can be separated for individual use or combined together for larger event areas. The doors used to separate sections are also equipped with sensors that open or close depending on each door's state. These sensors are connected to the Contact Closures on CueServer and should re-map zones when the hall's layout has changed.




The Breakdown


To set this up, each room must begin as an individual zone. These zones will then be combined based on the room layout and door positions.

When a door's state becomes closed, the sensor will notify CueServer (via Contact Closure) and rules will dictate which zones need to be combined and which separated.

The rules to accomplish this look at the position of each door and through a series of IF/Then logic gates determine where zones are connected and where they are separated. Once this is determined, the rules simply Join or Unjoin (Join Clear) each room.




The Walkthrough


The rules inside of the macro will serve as the logic gates behind our room's zone adjustments. Each contact closure action will run the macro any time the room layout changes (door opens/closes).

Running this macro each time any door's state has changed enables CueServer to re-evaluate the room and make any necessary adjustments. This is necessary so that cascading changes can be recognized and adapted to (i.e. when a door changes and the effects of that change cascade to adjacent rooms).

To get a better idea of how this works, try it out on the interactive demo below. Each switch opens or closes a door (representing a sensor). Whenever doors are opened or closed, the rooms are all updated with the correct join status (represented by color).



To begin, open Contacts from the sidebar.

Set each of the contacts (1-6) to Perform Macro 1 for both the Is Opened and Is Closed events.

Repeat and append these two rules to each of the six contacts. Once the contacts have all been set accordingly, move on to the macro.

Contact Closure Rules

Next, create Macro 1 from the Macro menu in the sidebar and add this code to its script box.

Whenever a contact is opened or closed, this macro will run. This macro will then re-initialize all of the zones and determine which zones should be joined and which should not be based on the state of the contact closures.

The code first unjoins all of the Zones, then it goes through the contacts, left-to-right, via a series of If/Then statements and joins zones when appropriate.

Using a centralized macro is the key to achieving the desired result. The reason a central macro is important is that each contact (or door) being opened or closed can have cascading effects on adjacent zones.

For instance, in the demo above, if the door between red and orange is opened and either the red/yellow or orange/yellow doors are also open, then both the red and orange block should be joined with yellow as the red/orange door provides access to the yellow block indirectly.

Using this method forces each zone to be reevaluated to ensure it's joined, or unjoined, correctly.

zone "A" join clear
zone "B" join clear
zone "C" join clear
zone "D" join clear
zone "E" join clear

If (contact 1) Then
 zone "A" join 1
 zone "B" join 1
 If (contact 2) Then
  zone "A" join 2
  zone "B" join 2
 EndIf
 If (contact 6) Then
  zone "A" join 2
  zone "B" join 2
 EndIf
else
 If (contact 2) Then
  zone "A" join 2
 EndIf
 If (contact 6) Then
  zone "B" join 2
 EndIf
EndIf

If (contact 4) Then
 zone "D" join 3
 zone "E" join 3  If (contact 3) Then
  zone "D" join 2
  zone "E" join 2
 EndIf
 If (contact 5) Then
  zone "D" join 2
  zone "E" join 2
 EndIf
else
 If (contact 3) Then
  zone "D" join 2
 EndIf
 If (contact 5) Then
  zone "E" join 2
 EndIf
EndIf

If (contact 2) Then zone "C" join 2 EndIf
If (contact 3) Then zone "C" join 2 EndIf
If (contact 5) Then zone "C" join 2 EndIf
If (contact 6) Then zone "C" join 2 EndIf



Have a Tip or Trick you would like to see? Let us know!


If you have an idea for a future tip or trick, we would love to hear it! Drop us an email at This email address is being protected from spambots. You need JavaScript enabled to view it. and let us know.