How Sanctum sees a device
Sanctum looks at every device in two ways: by its parts, the things it can do, and by its type, what the whole device is. Parts decide what you can do with a device. Its type decides what it is called and where it sits on a room’s page.
Each part of a device does one thing. Sanctum knows eight:
| Part | What it does |
|---|---|
| Light | Turns on and off, and may dim or change colour |
| Switch | Turns something on and off |
| Sensor | Measures one thing: temperature, humidity or light level |
| Motion | Says whether something is moving |
| Contact | Says whether something is open or closed |
| Media | Plays, and says what it is playing and how loud |
| Microphones | Listens for its wake word, and can be muted |
| Button | Is pressed |
A device can have several parts, and several of the same part. A ceiling light is one light. A wall module with two relays is two switches. A sensor that measures temperature and humidity is two sensors, one for each.
What each part does has the details of each.
A device’s type is what the whole device is: a light, a motion sensor, a door. The app that brings the device in chooses it, usually from the device’s main part, so a light that also measures temperature is a light. The household can show a contact sensor as a door or a window, and a media player as a TV or a speaker.
Device types lists every type, what it needs and what it is called.
One device, followed through
Section titled “One device, followed through”Take a motion sensor that also measures the light level, in the Office:
- Its parts are a motion part and a sensor part for the light level.
- Its type is motion sensor, so Sanctum names it “Office Motion Sensor”.
- On the Office’s page it is one tile under Presence, saying “Quiet for 5 min” or “Motion now”.
- In the categories, it is under Presence for its motion and under Environment for its light level, since each category gathers every part that fits it.
- Opened, it shows its Motion, Readings and Activity pages, one tab each.
Categories explains where devices show.
Where devices come from
Section titled “Where devices come from”Sanctum doesn’t talk to devices itself. Apps called drivers do: Zigbee for Zigbee lights, sensors and remotes, ESPHome for devices that run ESPHome. A driver tells Sanctum each device’s parts and its type, and Sanctum checks that the device has the parts that type needs. For driver apps has what a driver says and what Sanctum checks.