UniFi Access API

I released a new version yesterday that supports instantaneous updates (using websockets) and doorbell presses (with UA Access Pro G1/G2). It also supports polling in case your Unifi Access application is version 1.19 or below. I’d appreciate some help testing it. You have to delete the current integration and re-install unfortunately as using websockets is now the default.


Will do, do you need access to a remote test enviroment?

Nope. Just test it and open issues on github if you run into any problems.

Is there an ability to ever get this functioning with those of us that have UID?

Not at this time.

@anis thanks for creating this! Now I can remove the relays that I’d added for HA to control my doors, which will really clean up my wiring.

1 Like

Planning on installing this early next week as I migrated away from UI Enterprise to the free license.

Question for those that use this: when you unlock a door using HA what do the UniFi logs report— does it state a user unlocked the door?

When you create the API token for Home Assistant, you provide a name for it. This name is the one found in the logs: in my case it says that “Home Assistant unlocked [gatename] with Remote Unlock” and includes a video recording.

I can also confirm that the doorbell events work perfectly with automations, just as they always did for Protect doorbell presses with the Protect integration.

1 Like

I installed the HACS app and can unlock the doors with HA! Woohoo!

However the locks report unavailable in HA when you unlock them.

Also, could not find a doorbell entity, but rather a binary sensor that has remained ‘clear’ since I kayaked the add-on

After these two items to be expected?

Count me in for testing also…
Just started deploying my HA last weekend so it’s a steel learning curve… but I like HA and all the intergrations and was missing the UniFi Access :innocent:

The first one is expected, as the underlying Access API doesn’t allow unlocked doors to be locked. This capability was only just added to the Access UI and I’m hoping that it’ll come to the API.

And yeah, the doorbell binary sensor will switch to ‘occupied’ for a few seconds when the bell is triggered on a Pro Access reader. This is consistent with how Unifi Protect doorbells are exposed in Home Assistant.

We hope too! I’m waiting about the video livestream so we can get rid of the App!

I released a new version yesterday that supports instantaneous updates (using websockets) and doorbell presses (with UA Access Pro G1/G2).

Great work @anis! Installed here and working well. Would be great if we could capture which user unlocked a door. If you need help with testing/logging let me know :slight_smile:

You can! Download the latest beta and listen for the unifi_access_entry or unifi_access_exit event and it will notify you who entered or exited a given door. Let me know how it goes!


Hi guys, I am new to HA and Unifi, but I both the Access starter kit. I will try the integration, but what is missing for me is door position status to have this info in HA and can create an alert when someone is forgetting to have the main door closed all the way in my house.

1 Like

@anis Your integration removed my need to have a micro controller forwarding door unlock events from access hub to home assistant and finally unlock a Level lock. I appreciate all your time and effort invested, sincerely, thank you.

1 Like

When I add the integration I get the error: Config flow could not be loaded: {“message”:“Invalid handler specified”}

I’ve tried both downloading through HACS and cloning the repository both bring up the same result also tried older versions.

I have HA running on a Pi4 in a docker container as I have a custom local anpr system also running that pi

@anis does there exist any ‘door_position’ status we can listen for to answer this question?

Yes there is. You have to have a DPS sensor or maglock type lock though.

Hi, I’m new here and trying to learn how to use this sort of stuff for my first home. Right now it’s sort of the stage of figuring out what hardware I need and such. Assuming I already have a unify network, and switch, does this API remove the need for me to have one of Ubiquiti’s UA access hubs? Can I simply hook a G2 reader up to my PoE switch and have this API handle the adoption and use of said reader?