Developer Portal
Documentation
API ReferenceConsole

Zones

Zones are similar to Places, but as non-structural areas, they're a separate concept. Zones can span multiple spaces on a floor, and can be a variety of types. One example of a typical Zone would be an Occupancy Zone - the area in which an Occupancy Sensor would be monitoring. We'll look up the occupancy sensors associated with a particular zone using the isServedBy field:

Request Response
Copy
1
2
3
4
5
6
7
8
9
10
11
12
{
  zones {
    id
    name
    exactType
    isServedBy {
      id
      name
      exactType
    }
  }
}

The other side of that is looking at a thing to see what zone it serves - i.e. which zone is this device covering (an occupancy sensor looking for occupants, a light covering a specific area, a n HVAC system covering a specific cooling area):

Request Response
Copy
1
2
3
4
5
6
7
8
9
10
11
{
  things(filter: {id: {eq: "THG9wEpMm2x4Nzs2t4SWyjdJp"}}) {
    id
    name
    serves {
      id
      name
      exactType
    }
  }
}

You can see which spaces may be included in the zone by using hasPart:

Request Response
Copy
1
2
3
4
5
6
7
8
9
10
11
12
{
  zones(filter: {id: {eq: "ZONESfMzfmffM6dDbKaefWVkL6"}}) {
    id
    name
    exactType
    hasPart {
      id
      name
      exactType
    }
  }
}

And the reverse, whether a space isPartOf a zone:

Request Response
Copy
1
2
3
4
5
6
7
8
9
10
11
{
  spaces(filter: {id: {eq: "SPCRC5QAHcGGufW2QvHCeCfBG"}}) {
    name
    exactType
    isPartOf {
      id
      name
      exactType
    }
  }
}

The last relationship concept for zones is a scenario where a zone is only covering a portion of a space - this could be something like a large space like a hallway with multiple lighting or cooling zones. In the scenario where the zone only handles a portion of a space, you would use isPartOf instead:

Request Response
Copy
1
2
3
4
5
6
7
8
9
10
11
{
  zones(filter: {id: {eq: "ZONEMwCKzKpgaNeUwuihwiCWok"}}) {
    name
    exactType
    isPartOf {
      id
      name
      exactType
    }
  }
}