How to set up Home Assistant Presence Detection using NMAP

Опубликовано: 01 Май 2026
на канале: vCloudInfo
39,064
230

Today, I tackled Presence Detection with Home Assistant. To get the most out of your home automation, you need good presence detection. A way for the house to know if you are home or away and then react accordingly. If no one is home, you would want the system to start shutting down unnecessary lights and scaling back the HVAC. If you are home, you want everything perfect and lights coming on and off based on the sensors in the home. This all starts will reliable presence detection. For my smart home, I use the NMAP component. It is one of the oldest components in the system and I have used it from the very beginning. It does a simple scan of my network to determine all the devices connected to it and if there are new devices, it will list them in my known_devices.yaml file. It uses the MAC addresses as the unique identifier so even when IP addresses change, the system can still keep track of the particular device.

When a new device is found on my network, the system voice will announce it and I then usually do some HA configuration or Circle assignments to make sure the device can (or cannot) access the internet. Using NMAP, I then create groups to track presence within the house based on our phones. When we come to the house, our phones connect to the WiFi network and then NMAP marks the device as Home. When we leave the house (with our phones), the IP addresses (and MAC) eventually drop off the network and then NMAP marks us as away. In my home, this works pretty flawlessly. There are always some things you need to tweak and change but otherwise it’s pretty rock solid.

I do have plans to add in a secondary Ubiquiti device tracker eventually.

PARTS LIST:
Find all the source code for my Smart House (and Device lists) on my Github Page : https://github.com/CCOSTAN/Home-Assis...

You can read about all of this in greater detail on the Website:
https://www.vcloudinfo.com/2019/02/ho...

You can read about all of this in greater detail on the Website:
https://www.vcloudinfo.com/

CONTACT ME:
https://www.vcloudinfo.com/about-me

SUPPORT:
Please consider supporting this channel by visiting the blog and/or using the Amazon Affiliate links found in the descriptions. They cost nothing extra and really help the channel.
Affiliate Disclosure - https://www.vcloudinfo.com/p/affiliat...

:wave: About this channel : My Name is Carlo. I've been running Home Assistant for a BUNCH of years. Almost from the very beginning actually. This channel is focused on bringing what I have implemented at my own house to you so that you can bring it to your house. The channel will be a mix of reviews, tutorials and inspiration. It is a companion to my GitHub site that holds all the code for my Smart Home and my main site where I keep the more in-depth technical writings. I hope you will enjoy the videos and consider subscribing.

CREDITS:
Design by Steve Fatone - IG: @Steve_Fatone