Package: Occupancy

Author: HCA Central
Version: 1
Added to Library: 11-Nov-23
HCAVersion needed: 17
Keywords: Utility

Package Description:
See notes on "State Change" program.

Program: IsNameOnList

Program Description:
Provided with a CSV list of device names and a device name, sees if that name is on the list.

Return value: 0 = not on list, 1 = on list

Parameters:

Name Type Description Default
List Value CSV list of device names  
Name Value Name of a device  

Program: IsRoomOccupied

Program Description:
Simple program that supplies a result (0 or 1) if the room is occupied

Parameters:

Name Type Description Default
RoomName Value Name of room  

Program: StateChange

Program Description:
Add to any room these tags:

Tag name = Occupy

Tag Value = A comma separated list of the names of motion sensors that when change to an ON state will mark this room as occupied

Tag name = Unoccupy

Tag Value = A comma separated list of the names of motion sensors that when change to an OFF state will mark this room as unoccupied

Tag name = ProcessOff

Tag value = 0 or 1

Unless this tag is present and has a value of 1, the motion sensor changing to an OFF state has no effect so the the room remains showing as occupied. This tag is useful for rooms that one doesn't typically reside in - baths, hallways, stairways.

Tag name = IsOccupied

Tag Value = 0 or 1

This tag is created / modified by this program in response to the algorithm it implements

Create your own programs that have a tag change trigger on the IsOccupied tag on the room to take actions when the room becomes occupied or unoccupied.

Example:
Suppose I have a room called "media" that has a motion sensor. Also suppose that these tags as added to the Media and Hallway rooms

Media room

Occupy: Media - Motion Sensor

Unoccupy: Hallway = Motion Sensor

Hallway

Occupy: Hallway - Motion Sensor

Unoccupy: Media - Motion Sensor

Entering the media room via the hallway causes the media room to show as occupied and the hallway as unoccupied. When exiting the media room, the hallway sensor causes the hallway to show as occupied and the media room as unoccupied.

Parameters:

Name Type Description Default
Object Object Object whose state changed  
Percent Value New percent of that object