See what your presence sensor covers before you buy
Draw your room with furniture and doors, place a sensor and see where it detects presence. In the browser, on your phone too, no sign-up.
Here's how to build your own alarm system with a presence sensor in one afternoon, one that can do more than many commercial solutions, without any monthly costs.
Be honest: have you ever thought about what happens when you are not at home? In Germany, around 83,000 home burglaries were recently registered per year (PKS 2025), the fourth year in a row with a rising trend. That is more than 220 burglaries a day. The good news: around 45 percent of burglaries fail at the attempt stage, often because security technology deters the burglars or raises the alarm early.
An alarm system gives you a better sense of security while also acting as a deterrent. Visible security technology is one of the most important deterrence factors. Some insurers even reward its use with lower premiums.
However, commercial alarm systems are often expensive, tied to cloud services, and require monthly fees. There is another way.
Classic motion detectors (PIR sensors) have two decisive weaknesses:
The Senvolon presence sensor KL MZ solves both problems at once:
Combined with Home Assistant, this becomes a full-featured, smart alarm system. Flexible, expandable, and with no ongoing costs at all.
| System | Purchase Cost | Monthly Cost | Cloud Required |
|---|---|---|---|
| Comparable off-the-shelf alarm system | €500–1,000 | €10–30/month | usually |
| DIY with Senvolon + Home Assistant | €300–450 | €0 | No |
DIY cost example:
After 2 years with a cloud-based off-the-shelf solution (at €15/month), you would already have spent €360 on the subscription alone, and would still be limited to PIR detection without zones.
| Component | Details | Cost |
|---|---|---|
| 2–3× Senvolon presence sensor KL MZ | Order in the shop | €99 each |
| Home Assistant | On a Raspberry Pi 4/5, mini PC, or NUC | €0–150 |
| Wi-Fi router | Probably already on hand | €0 |
| USB-C power adapters | 5V/2A per sensor (USB-C cable included) | €0–10 |
| Smartphone | For notifications (HA Companion App) | already on hand |
No separate control panel, no gateway, no additional siren needed.
Think about which rooms you want to monitor. A typical setup for an apartment:
| Room | Position | Monitors |
|---|---|---|
| Hallway | Wall opposite the front door, 1.8 m high | Entrance area |
| Living Room | Wall facing the balcony door, 1.8 m high | Balcony door & center of room |
| Bedroom | Wall facing the window, 1.8 m high | Window area |
Mounting tips:
The power supply is provided via USB-C (cable included). Route the cable neatly along the wall, or use the internal 5V connector for hidden wiring.
MQTT is the communication protocol between your sensors and Home Assistant. You need an MQTT broker. The easiest option is the Mosquitto app in HA.
Installing Mosquitto:
Creating a login for the sensors:
mqtt_user
sicheres_passwort
Adding the MQTT integration:
localhost (or core-mosquitto), port: 1883
You can also find a compact overview of all the MQTT steps in our quick start guide Integrating the presence sensor into Home Assistant.
Each presence sensor has its own web interface for configuration.
192.168.1.100)1883
mqtt_user
sicheres_passwort
Flur, Wohnzimmer, or Schlafzimmer. This name is used as the base for all MQTT messages from this device.Tuer or Balkon, for early detection during a break-inRaum, detects movement throughout the whole room. When the alarm system is disarmed, this zone also works great for lighting control: the light turns on automatically when someone enters the room.Repeat these steps for each sensor.
The presence sensor supports MQTT Auto-Discovery: as soon as MQTT is set up, the sensor registers itself with Home Assistant automatically. You do not need to write any YAML configuration.
At least the following entities are created automatically:
| Entity | Description | Type |
|---|---|---|
Presence |
Presence in the room (yes/no) | binary_sensor |
Detection |
Number of people detected | sensor |
[Zonenname] |
Presence in the respective zone | binary_sensor |
Siren |
Siren on/off | switch |
Temperature |
Room temperature | sensor |
Humidity |
Humidity | sensor |
Air Pressure |
Air pressure | sensor |
Brightness |
Brightness | sensor |
The zones appear in Home Assistant with exactly the name you configured in the presence sensor. Give your zones meaningful names (without umlauts), and you get clear, easy-to-use entities in HA right away.
Tip: name your devices in the presence sensor after the room they are mounted in (e.g.,
Flur,Wohnzimmer,Schlafzimmer). Then all entities in Home Assistant are sorted by room right away, and the entity IDs in these instructions match without renaming. The entity IDs are in fact derived from the topic you set: a sensor with the topicFlurcreatesbinary_sensor.flur_presence, while a sensor with the topicmulti_zone_presence_sensorcreatesbinary_sensor.multi_zone_presence_sensor_presence. You can see the exact IDs for your system at any time under Developer Tools → States.
The alarm control panel is the central hub of your alarm system in Home Assistant.
Set it up via the user interface:
Settings → Devices & Services → Add Integration → "Manual Alarm Control Panel"
Configure the following:
Alarmanlage
30 seconds, time to leave the home30 seconds, time to disarm after returning300 seconds, this is how long the alarm state stays active, matching the automatic siren shutoff after 5 minutes in step 6Note for Docker users: unlike the standard installation, this integration currently cannot be set up via the user interface in the Docker/Portainer version. It must be entered manually into
configuration.yaml.
1. Accessing the Configuration File via SSH
Since Home Assistant runs in a Docker container, the configuration files are located in a protected system directory.
Open your terminal (PowerShell, CMD, or macOS Terminal) and connect:
ssh admin@192.168.1.100
Open the configuration file with administrator rights in the Nano editor:
sudo nano /var/lib/docker/volumes/HASS_Config/_data/configuration.yaml
2. Inserting the YAML Configuration
Scroll all the way to the bottom of the file and insert the following block. Make sure alarm_control_panel: starts at the very left margin (no spaces before it):
# Manual alarm control panel
alarm_control_panel:
- platform: manual
name: Alarmanlage
code: "0815" # Your personal PIN
delay_time: 30 # Time to disarm after returning (entry delay)
arming_time: 30 # Time to leave the home (exit delay)
trigger_time: 300 # Duration of the alarm state (300 sec = 5 min, matches step 6)
Save & exit: Ctrl + O → Enter → Ctrl + X
3. Checking the Configuration and Restarting
4. Adding the Panel to the Dashboard
After the restart, the alarm system is registered in the system and still needs to be made visible in the interface:
alarm_control_panel.alarmanlage and click Save
Now comes the heart of the system: the automations that turn your sensors into a real alarm system.
Where do you edit automations? The easiest way is directly in the HA interface under Settings → Automations → Create Automation → Start with an Empty Automation. There, paste the YAML code for each of the following automations, one at a time, and save.
A note on the code: the automations use the note: field, which lets you comment directly on triggers, conditions, and actions. These notes also appear in the visual editor at the relevant step and mark, among other things, the places where you need to enter your own entity IDs. If your Home Assistant version does not yet know this field, simply delete the note: lines; the function of the automations will not change as a result.
Automation 1: Trigger the Alarm on Presence
alias: "Alarm: Presence Detected"
description: >
Triggers the alarm when presence is detected while the system is armed.
triggers:
- trigger: state
entity_id:
- binary_sensor.flur_presence
- binary_sensor.wohnzimmer_presence
- binary_sensor.schlafzimmer_presence
to: "on"
note: >-
Enter the presence entities of all your sensors here. If you only
want to arm individual zones, enter the zone entities instead,
such as binary_sensor.flur_tuer.
conditions:
- condition: state
entity_id: alarm_control_panel.alarmanlage
state: "armed_away"
note: "The alarm only triggers when the system is armed."
actions:
- action: alarm_control_panel.alarm_trigger
target:
entity_id: alarm_control_panel.alarmanlage
mode: single
Automation 2: Activate the Sirens on Alarm
alias: "Alarm: Turn On Sirens"
description: >
Activates all sirens when the alarm is triggered.
triggers:
- trigger: state
entity_id: alarm_control_panel.alarmanlage
to: "triggered"
actions:
- action: switch.turn_on
target:
entity_id:
- switch.flur_siren
- switch.wohnzimmer_siren
- switch.schlafzimmer_siren
note: "Enter the siren entities of all your sensors here."
mode: single
Automation 3: Turn Off the Sirens on Disarm or After 5 Minutes
alias: "Alarm: Turn Off Sirens"
description: >
Deactivates all sirens when disarming or after 5 minutes.
triggers:
- trigger: state
entity_id: alarm_control_panel.alarmanlage
to: "disarmed"
note: "Case 1: You disarm the system."
- trigger: state
entity_id: alarm_control_panel.alarmanlage
to: "triggered"
for:
minutes: 5
note: "Case 2: The alarm has been running for 5 minutes."
actions:
- action: switch.turn_off
target:
entity_id:
- switch.flur_siren
- switch.wohnzimmer_siren
- switch.schlafzimmer_siren
note: "The same siren entities as in Automation 2."
mode: single
Good to know: the sirens turn off automatically in two cases: when you disarm the system, or after 5 minutes at the latest. The trigger duration of the alarm control panel from step 5 (
trigger_time: 300) is set to match this value.
Of course, you also want to know immediately when something happens, even while you are out.
Automation 4: Push Notification on Alarm
alias: "Alarm: Push Notification"
description: >
Sends a notification when the alarm is triggered.
triggers:
- trigger: state
entity_id: alarm_control_panel.alarmanlage
to: "triggered"
actions:
- action: notify.mobile_app_ihr_handy
data:
title: "🚨 ALARM!"
message: >
Presence detected! The alarm has been triggered.
Time: {{ now().strftime('%H:%M:%S') }}
data:
priority: high
ttl: 0
channel: alarm
note: >-
Use your own notification service, e.g.,
notify.mobile_app_[device_name] or notify.signal.
mode: single
Tip: install the Home Assistant Companion App on your smartphone. The notification service automatically becomes available as
notify.mobile_app_[device_name]; the exact name depends on the device name in the app and can be found under Developer Tools → Actions.
A clear dashboard gives you your alarm system's status at a glance. Here is a Lovelace configuration:
title: Alarm System
views:
- title: Overview
path: alarm
icon: mdi:shield-home
cards:
# Alarm panel
- type: alarm-panel
entity: alarm_control_panel.alarmanlage
name: "Alarm system"
states:
- arm_away
# Room overview
- type: horizontal-stack
cards:
- type: entities
title: "🚪 Hallway"
entities:
- entity: binary_sensor.flur_presence
name: "Presence"
- entity: sensor.flur_detection
name: "People"
- entity: binary_sensor.flur_tuer
name: "Door zone"
- type: entities
title: "🛋️ Living Room"
entities:
- entity: binary_sensor.wohnzimmer_presence
name: "Presence"
- entity: sensor.wohnzimmer_detection
name: "People"
- entity: binary_sensor.wohnzimmer_balkon
name: "Balcony zone"
- type: entities
title: "🛏️ Bedroom"
entities:
- entity: binary_sensor.schlafzimmer_presence
name: "Presence"
- entity: sensor.schlafzimmer_detection
name: "People"
- entity: binary_sensor.schlafzimmer_fenster
name: "Window zone"
# Sensor data
- type: horizontal-stack
cards:
- type: sensor
entity: sensor.flur_temperature
name: "Hallway"
graph: line
- type: sensor
entity: sensor.wohnzimmer_temperature
name: "Living room"
graph: line
- type: sensor
entity: sensor.schlafzimmer_temperature
name: "Bedroom"
graph: line
# Recent events
- type: logbook
entities:
- alarm_control_panel.alarmanlage
- binary_sensor.flur_presence
- binary_sensor.wohnzimmer_presence
- binary_sensor.schlafzimmer_presence
hours_to_show: 24
title: "Recent Events"
Tip: you can find the exact entity IDs of your zones (e.g.,
binary_sensor.flur_tuer) under Developer Tools → States in Home Assistant. Adjust the entity IDs in the dashboard accordingly.
Every presence sensor offers up to 4 detection zones. Put them to targeted use:
Arm the system automatically at night or when you leave the house:
alias: "Alarm: Arm Automatically at Night"
description: >
Arms the system automatically every evening at a fixed time.
triggers:
- trigger: time
at: "23:00:00"
actions:
- action: alarm_control_panel.alarm_arm_away
target:
entity_id: alarm_control_panel.alarmanlage
data:
code: "IHR_CODE"
note: "Use the same code as when setting it up in step 5."
mode: single
alias: "Alarm: Disarm Automatically in the Morning"
description: >
Disarms the system automatically every morning at a fixed time.
triggers:
- trigger: time
at: "06:30:00"
actions:
- action: alarm_control_panel.alarm_disarm
target:
entity_id: alarm_control_panel.alarmanlage
data:
code: "IHR_CODE"
note: "Use the same code as when setting it up in step 5."
mode: single
Even more convenient: the system arms itself automatically as soon as the last person leaves the house, with no manual switching on at all.
Home Assistant uses the zone feature (zone.home) for this. As soon as the count of people in the home zone drops to 0, the automation is triggered.
alias: "Alarm: Arm Automatically When Leaving"
description: >
Arms the alarm system when no one is home anymore.
triggers:
- trigger: state
entity_id: zone.home
to: "0"
note: "The state of zone.home corresponds to the number of people present."
actions:
- action: alarm_control_panel.alarm_arm_away
target:
entity_id: alarm_control_panel.alarmanlage
data:
code: "IHR_CODE"
note: "Use the same code as when setting it up in step 5."
mode: single
Requirement: the Home Assistant Companion App must be installed on all household members' smartphones, with location sharing enabled. Only then can HA detect when there really is no one left at home.
The built-in climate sensors provide an additional clue. A sudden drop in temperature in a room can indicate an open window.
Your alarm system is a solid foundation, and with Home Assistant, the possibilities are almost unlimited:
With just a few Senvolon presence sensors KL MZ and Home Assistant, you get an alarm system that surpasses classic off-the-shelf solutions in several ways:
Ready to get started?
👉 Order the Senvolon presence sensor KL MZ in the shop
If you have questions, the Senvolon support team is happy to help: support@senvolon.de
All models compared: Presence sensors
Draw your room with furniture and doors, place a sensor and see where it detects presence. In the browser, on your phone too, no sign-up.