Since June 8, the unifi_access_entry hasn’t seemed to work. This would work based upon whether there was an ‘exit’ event in unifi access. Reloading the configuration created a log that ‘Detected an event’, but the exit function does not seem to log anything to HA.
Hey @anis, awesome to see you working on this. I’m working on something unrelated to Home Assistant but I created protobuf definitions for the message and services in the Unifi Access API v2.2.10. Thought you might be able to leverage the generated python code in your project to make life easier.
I’m just adopting UniFi access was thrilled to see the HA integration. Thanks for doing this!
Can you share the entity list and experience @merrmill ??
Hi @annis thank you so much for working on this integration! I am a heavy Access user with multiple sites and doors/gates. We use Identity Enterprise so the API key comes from our Identity workspace and not a local access session on a given console. So far I cannot get that key to work. Does your work have getting access to the API for Identity Enterprise users and also Gate Hub. We really need to get the door position sensor into HA but just can’t get there yet
I am not familiar with UID enterprise but if the API is the same, it should just work. I believe someone tried using the free version of UID with some level of success. I don’t personally own a gate hub (or any hub but the OG Unifi Access Hub) but there is currently experimental support for it provided by some members of the community. It’s hard for me to support hubs I don’t have access to as the websocket API used in the integration is not documented and requires a lot of trials and errors.
@anis Thanks for the integration and the work! I have a question regarding the metadata messages:
How do we see those in HA? I have an G3 Intercom together with the Door Hub Mini. Sensors and events have been correctly created upon installation but I am clueless on where to see the metadata messages in HA…
Thanks
@Zoltun go to Developer Tools → Events and start listening for unifi_access_entry
or unifi_access_exit
. Anytime you enter or exit the door/gate you should see the data there. It’s mostly meant for automations. Also questions are better answered on the repository
thanks a lot Anis, I will post there next time for quicker response
I will check the events once more but last I tried listening I had nothing showing up…
I’ve downgraded UID Identify Enterprise to UID identity yesterday, to enable this integration. Things are working well, and haven’t regretted it.
Downgrade
I’ve used the method 2 outlined on the official page
It clearly says it’s reversible
Effects
negative
- I had to authenticate to the app via an email link.
- I lost the cameras on UniFi identity
positive
- I gained face authentication on my G2 Pro doorbell (the site seems to indicate it’s a feature available for the G3 only). It works well!
- The VPN (which I use), and WiFi (which I don’t use) options are still available.
- This integration works.
The integration will require a bit more work than usual to write automations (using templates), but I don’t find it too cumbersome.
I’ve
- Installed SQLlite web (from the add-on store)
- Query:
SELECT event_id, DATETIME(time_fired_ts, 'unixepoch', 'localtime'), event_types.event_type, shared_data, hex(context_id_bin) FROM events LEFT JOIN event_data ON (events.data_id=event_data.data_id) LEFT JOIN event_types ON (events.event_type_id=event_types.event_type_id)
where event_types.event_type like 'unifi%'
order by time_fired_ts desc
- Export to CSV (to see the full text details)
Automation-wise, here is an example I wrote:
alias: Announce person having opened the street door coming up
description: ""
triggers:
- trigger: event
event_type: unifi_access_entry
event_data: {}
conditions:
- condition: template
value_template: >-
{{ trigger.event.data.door_name == 'Flat 3 (4th floor)-Noe G' and not
trigger.event.data.actor in
state_attr('input_select.street_door_access_do_not_notify_internally',
'options') }}
actions:
- action: tts.speak
metadata: {}
data:
cache: true
media_player_entity_id: media_player.unnamed_room_2
message: "{{ trigger.event.data.actor }} is coming up"
language: en-UK
mode: single
Because unifi has several services
Network
Protect
Access
And so on…
Problem is most of us want full control of our unifi doorbells/intercoms through an easy integration but unifi door bells need two services (protect + access) there’s currently no official unifi access integration
You can add them back, the unifi identity app is so foolish I lost cameras on it too but noticed it was a permission issue in user groups