[RELEASE] UniFi Presence Drivers for Hubitat – v1.7.4.0 (Stable)
I’m happy to announce the stable release of the UniFi Presence Drivers — a parent/child driver pair for Hubitat that integrates directly with a UniFi Network Controller or UniFi OS Console to provide wireless client presence detection and optional guest monitoring.
There are many like it, but this one is mine.
Background
I have been using @xtreme22886’s UniFi-Presence-Sensor all the way back to the SmartThings times. That has done yeoman’s work all these years, even through the migration to Hubitat. It has been the most reliable and consistent method for presence detection for me.
There were two minor items I wanted to address:
Presence detection was based on polling the UniFi controller via a Python script that ran in a Docker container. While not at all a heavy load, there were the occasional issues that required a container restart.
Polling (every 5 seconds) created an additional load on both the hub and the controller.
I looked for a solution that was event-driven. I didn’t find anything that fit exactly what I wanted, so I created this event-driven, device-driven solution that doesn’t need anything external.
This project began as a fork of work originally shared by @tomw — big thanks to Tom for the foundation . The first things I added were manual Arrived/Departed buttons and the AP Display Name.
From there, my goal was to create a lightweight, event-driven driver that listens to UniFi, interprets presence, and surfaces it as standard Hubitat attributes.
Along the way, the project expanded to include:
Hotspot guest monitoring for UniFi guest portals.
Automatic child device creation (wireless clients seen within the last X days).
Disconnect debounce handling (avoids false departures when Wi-Fi roams).
Sysinfo attributes pulled from UniFi controllers.
Resiliency features like proactive cookie refresh, event filtering, and websocket recovery.
I know there are other UniFi drivers out there that are more comprehensive, but my goal was to make the most efficient presence monitoring. Those others provide more details into UniFi devices and their control. I just wanted presence monitoring.
Today, v1.7.4.0 marks the first public release: feature-complete, hardened, and ready for everyday use. Paraphrasing Clausewitz: “No driver survives first contact with production.”
Features
Parent Driver: UniFi Presence Controller
Connects to UniFi Controller / UniFi OS and listens for events.
Tracks wireless clients for presence detection.
Supports optional Hotspot Child device for guest monitoring.
Automatic Child Device Creation: add clients seen in the past X days (default = 1). This was my way of not creating an app to go along with the device drivers in order to select which devices to monitor. It will create child devices which can just be manually deleted if not needed. Be careful though; you probably have more ghost devices in your UniFi controller than you realize.
Bulk Management: Refresh or reconnect all children.
Summaries:
Child Devices → “X of Y Present”
Guest Devices → “X of Y Present”
Sysinfo Attributes pulled from UniFi: deviceType, hostName, UniFiOS, Network.
Resilient cookie refresh.
Wireless-only event filtering for performance. (This reduces the load on the hub by not having to parse JSON for LAN events that are not relevant to Wi-Fi monitoring.)
Debug and raw event logging (auto-disables after 30 minutes).
Scheduled jobs such as debounce timers are canceled across reboots.
Child Driver: UniFi Presence Device
Works as a Presence Sensor in Hubitat.
Commands: Arrived, Departed (these weren’t part of the original but certainly do help troubleshooting pistons and rules).
Attributes (visible in the GUI and available in WebCoRE and RM for monitoring):
Local admin account worked for me. I was seeing the same error in the logs as you. What I ended up doing was
In the UniFi Controller, deleted the local account I made
Create a new local admin account
Log into UniFi controller with the account to make sure the credentials work
Go the UniFi Controller device in HE and update the credential
I found that I did could set the username in UniFi to whatever I want (for example, "hubitat"), and that username goes into the username field in the Preferences tab in HE. It doesn't seem like I needed to match the local admin's username password to the UniFi owner account.
What did you enter for the site name setting? I entered the name of my device (which contains a space) and I got all sorts of errors, including the ones shown in your screenshot.
I didn't read closely enough, but when I changed the site name to "default" everything started working.
@MHedish You probably should remove the required flag for site name and just default to "default" if it's blank. Also, you should url encode whatever is in site name or else it throws another error, like this:
httpExecWithAuthCheck() general error: Illegal character in path at index 49: https://10.0.7.1:443/proxy/network/api/s/Wildwood House/stat/sysinfo
Good evening! Following these excellent instructions above:
In the UniFi Controller, I deleted the existing local account, created a new local admin account, logged into the UniFi Controller with the new account to verify the credentials worked (and they did!), then went to the UniFi Controller device in Home Assistant and updated the credentials.
A few minutes later, it worked! Thank you very mutch!
[UPDATE] UniFi Presence Drivers for Hubitat – v1.7.5.1
A quick maintenance update for the UniFi Presence Drivers (Parent/Child pair).
This patch addresses missing WebSocket handlers that could cause error logs during event stream operations.
Changes in v1.7.5.1 (2025-09-17)
Parent Driver
Added missing webSocketStatus and webSocketMessage handlers.
Prevents MissingMethodException errors when Hubitat receives WebSocket events.
Child Driver
No functional changes; aligned version with parent.
Installation / Update
If you’re using Hubitat Package Manager (HPM), simply run Update.
Manual installs: update both parent and child drivers via their Import URL.
Notes
This is a patch release following v1.7.5.0.
No new features — only stabilizing WebSocket event handling.
I enabled the feature to monitor guest hotspot monitoring. Tried connecting to my guest WiFi but my device is not being picked up by the driver. It does show as connected in my Unifi controller. Is there a specific configuration for the hotspot zone that needs to be set for this to work?
Not at all. As long as hotspot monitoring is enabled, the driver checks for the number of devices currently connected as well as the number of guests that are unexpired but not connected.
I'm using an order Application that looks similar to this. Look for the difference between the two. I'm using Unifi WiFi Presence, Mike10. It's been working OK.. I have this on a separate hub from the main one. Check if Mhedish's application is better—less memory or CPU. I wasn't able to authenticate, and I will need to work on this some more.