Automated lights with Sonoff SNZB-06P Human Presence Sensor!

This post will explore how a presence sensor can automatically turn on lights when you enter a room and keep them on, even if you’re not moving around.
But before we dive deeper, let’s address some of the frequently asked questions about these smart sensors.
FAQ
What is a human presence sensor?
A human presence sensor is a sophisticated device specifically designed to detect the presence of people within a specific area.
Unlike basic motion sensors, these sensors can differentiate between humans and pets or other moving objects, which reduces false alarms and improves the system’s accuracy.
Integrated into a smart home system, human presence sensors can intelligently control lighting, heating, cooling, and entertainment systems based on the occupancy of a room
Human presence sensor vs motion sensor
At first glance, these devices may seem similar, both designed to detect activity within a space. However, their capabilities and applications are distinct. Motion sensors are the more basic of the two, triggered by any movement, be it a pet, a fluttering curtain, or a person. This broad sensitivity makes them ideal for simple applications like turning on lights when someone enters a room.
In contrast, human presence sensors are far more advanced. They possess the ability to discern between humans and inanimate objects or animals. This specificity reduces false alarms and enhances system efficiency, making them perfect for more sophisticated tasks like energy management, where heating or cooling systems can adjust based on human occupancy.
A smart combination is key
A combination of human presence sensors and motion sensors can significantly elevate a home’s intelligence and efficiency. While each sensor type has its unique strengths, using them in tandem harnesses the best of both worlds. Motion sensors are excellent for immediate, reactive tasks, such as activating lights or alarms when movement is detected, providing instant responsiveness to activity within the home. On the other hand, human presence sensors add a layer of sophistication and precision.
You get the best of both: fast response from motion sensors and smart control from presence sensors.
This combo makes your smart home work better for you.
Now, let’s get on with the stuff I have implemented in my home.
My set-up to have automated lights using the human presence sensor
Here’s how I’ve combined a motion sensor with a human presence sensor for an optimal lighting experience.
When I enter the room, the motion sensor, strategically placed near the door, immediately detects my presence. This prompt detection triggers an automation in Home Assistant, turning on the lights without delay.
But the true finesse of my setup lies in the human presence sensor, located conveniently on my bedside table. This sensor is key to maintaining the room’s illumination. Whether I’m reading, resting, or simply staying still, it ensures the lights stay on, adapting to my presence in the room. As soon as I exit, it registers the absence, and the lights turn off accordingly.
An important aspect of my system is its adaptability to the time of day. I haven’t yet incorporated a luminosity sensor, so I use sunrise and sunset times to determine when the lights should activate in response to presence. Additionally, I’ve integrated a ‘sleep time’ state in Home Assistant. During these hours, the lights remain off to ensure my sleep isn’t disturbed.
This setup offers a blend of responsiveness, courtesy of the motion sensor, and intelligent control from the presence sensor. It’s not just automation; it’s about creating a lighting environment that adjusts to my lifestyle, ensuring comfort and efficiency.
These are the sensors I’ve used:

SONOFF SNZB-06P Zigbee Human Presence Sensor

SONOFF SNZB-03 ZigBee Motion Sensor
My Smart Bedroom with SONOFF Zigbee Sensors
I use a Home Assistant picture elements card, featuring a detailed floorplan which showcases the setup and functionality of the smart devices in my apartment. The image below shows the bedroom section of the picture elements card.

At the top right of the floorplan is the entry door, with two key sensors positioned on the top left, just below the En-suite. The first sensor is the Zigbee motion sensor, strategically placed to monitor the room’s entrance. The second, a crucial element in this setup, is the SONOFF Zigbee Human Presence Sensor, designed for detecting even stationary presence in the room. Centrally located is the Philips Hue light icon, while at the bottom center, near the window, you’ll find an icon for a smart blind.
Entering the bedroom
To illustrate the seamless interaction between these devices, let’s visualize the process using a diagram:

Upon entering the bedroom, the Zigbee motion sensor detects movement, sending a signal through the Zigbee network. This message is picked up by the Zigbee Coordinator – a SonOFF Zigbee USB Dongle connected to a RaspberryPi. The RaspberryPi runs Home Assistant, the central hub for all smart home activities.
The motion alert is then communicated to the Mosquito MQTT broker via Zigbe2MQTT, both integral Home Assistant add-ons. Home Assistant, upon receiving the MQTT topic linked to the motion sensor, triggers an automation to control the Philips Hue Light based on specific conditions such as time of day and whether sleep mode is activated.
Occupancy-Based Lighting Control
Now, let’s discuss how the light remains on while in the room. The key player here is the SONOFF Zigbee Human Presence Sensor. Using its 5.8GHz microwave radar, it can detect a stationary person, ensuring the lights stay on even when you’re still, like reading in bed.
If you leave the room, the system smartly responds. The motion sensor will detect your exit, while the presence sensor will cease to register your presence, both within about a minute. Home Assistant then processes this information, turning off the lights through a pre-set automation once it receives the ‘clear’ signal from the Human Presence Sensor.

Conclusion
In conclusion, the integration of the SONOFF Zigbee Human Presence Sensor and other smart devices like the Philips Hue light and Zigbee motion sensor, all orchestrated seamlessly through Home Assistant, transforms a standard bedroom into a sophisticated, automated space. This setup not only enhances convenience and comfort but also showcases the efficiency and intelligence of modern home automation systems. By leveraging open source technologies like Zigbe2MQTT and Mosquito MQTT, users can enjoy a tailored, responsive environment that adapts to their presence and activities, illustrating the remarkable capabilities of today’s smart home solutions.