Reliably informing Home Assistant whether someone is occupying a room has to be one of the most challenging tasks we face on our home automation adventure. In an attempt to cover all bases, I built a cheap (~US$25) and simple chair occupancy sensor, and in this guide I will show you how you can do the same. Although it is a DIY project, This sensor requires no soldering, 3D-printing, or knowledge of electronics.
If working from home has taught me one thing, it is that motion sensors, known also as passive infrared sensors (PIR), are worthless when sitting at a desk for hours. The problem these sensors face is that they rely on a significant amount of motion to be triggered, certainly more than is produced by typing on a keyboard. With my new DIY chair occupancy sensor, the lights stay on, no matter how still I am sitting.
Table of Contents
- What you will need to build a Zigbee chair occupancy sensor
- Attaching the car seat pressure sensor
- Completing the car seat pressure sensor
What you will need to build a Zigbee chair occupancy sensor
As the title suggests, this project relies on Zigbee, so you will have to have one of the Zigbee offerings set up in Home Assistant. I am using Zigbee2MQTT, and ZHA will also work. Next, you will need an Aqara/Xiaomi water leak sensor (model SJCGQ11LM). No, I am not joking, you will need a water leak sensor. Finally, the easiest way of detecting a person in a chair is by using something that already exists to do exactly that: a car seat pressure sensor.
Using a Zigbee sensor has many advantages, mainly the fact that it can be powered by a single button cell. Its size means it can be hidden underneath the chair or attached somewhere unobstructive using double-sided tape. With everything tucked away nicely, you can use the chair without having to care about accidentally ripping out any cables.
As to why you need to use the Aqara/Xiaomi water leak sensor, it is simple: Just like every other binary sensor, for example a door/window sensor, the water leak sensor is either on (circuit closed) or off (circuit open). Water leak sensors work by having two exposed terminals which complete a circuit when they are submerged in a conductive liquid, such as tap water.
Attaching the car seat pressure sensor
What the Aqara/Xiaomi water leak sensor allows you to do is attach wires to the terminals and use the sensor in whatever way you want to. The terminals on this sensor are two small screws you can loosen, wrap a wire around, and tighten again to make sure the wires don’t come loose.
The wires we are attacking to it are the two stemming from the car seat pressure sensor. It doesn’t matter which wire you attach to which terminal. Simply strip a short section of the sleeving, loosing the screw on the Aqara/Xiaomi water leak sensor, wrap one exposed wire around each screw, and tighten the screws again.
Completing the car seat pressure sensor
Just like that, you have built your very own chair occupancy pressure sensor. If you are lucky, your chair will have a removable case, which allows you to place the car seat pressure sensor right underneath behind. Most popular office chairs from IKEA seem to allow this.
You have to make sure that the car seat pressure sensor doesn’t have too much weight on the chair is unoccupied, or else it will continually be registering the seat as occupied.
In Home Assistant, this DIY sensor will still show up as a water leak sensor. When using it in automations, simply select the
water_leak attribute and use the states
on (chair occupied) and
off (chair unoccupied). The sensor registers a leak within a couple of seconds but takes around ten seconds to switch back. In most cases, this delay shouldn’t be an issue.
Of note is that the temperature reading of the sensor, as seen in the screenshot above, is useless. I’m uncertain if it is measuring the inside temperature to protect the battery, but in any case, you will not be getting any useful information out of it. I recommend disabling this entity altogether.