hjdhjd / homebridge-unifi-access

UniFi Access plugin for HomeKit (Homebridge)
Other
48 stars 5 forks source link

Update #1

Closed anthonyvancauwenberghe closed 6 months ago

anthonyvancauwenberghe commented 3 years ago

Hi, Do you have any updates regarding this project?

best regards, arthur

hjdhjd commented 3 years ago

Not yet. šŸ˜„

Things need to smooth out a bit more yet with UniFi Access before I can really take a solid crack at it and feel good about it.

Would love to hear what you'd like to see in the way of HomeKit integration for Access. The obvious ones I see is unlocking doors, but welcome any other thoughts.

michaelyork commented 3 years ago

Oh man, this plug-in would be so useful! And no one better to do it than the person behind the Protect plug-in. :)

It's unfortunate to see UI move mobile access for UniFi Access behind the upcoming (paid subscription) UID product, so unlocking doors would be super useful here.

Also being able to expose the UA-Pro as a HomeKit camera and doorbell would be fantastic.

Happy to donate to such a project!

hjdhjd commented 3 years ago

Thanks for the support - I'm still trying to think through what feature set would make sense from a HomeKit perspective. It's primarily a business-centric product, though I can see some residential / home aspects to it. Welcome any thoughts or suggestions people have.

WJKramer commented 3 years ago

I love your Protect plug-in and I can't wait to have Access as well. I am using in a residential setup in several locations. Obviously unlocking doors would be great to get started as well as door open/close status notifications.

hjdhjd commented 3 years ago

Unlocking doors seems like an obvious one...as is contact sensor support, which would give those open / close notifications.

Here's the question: is this useful in a HomeKit context? It seems like a very business-centric solution and I can't imagine a home using this stuff. I've got the starter kit and have been messing with it, but can't imagine actually using this stuff in a real world setting at home.

Thoughts?

michaelyork commented 3 years ago

I'm using it in a real-world setting at home. Works great for a mag lock pedestrian gate.

Agree, it's not intended for home use but still would be invaluable for some of us in HomeKit.

TumblerP85D commented 3 years ago

Unlocking doors seems like an obvious one...as is contact sensor support, which would give those open / close notifications.

Here's the question: is this useful in a HomeKit context? It seems like a very business-centric solution and I can't imagine a home using this stuff. I've got the starter kit and have been messing with it, but can't imagine actually using this stuff in a real world setting at home.

Thoughts?

I played as well with the starter kit and now I'm planning to use UniFi Access for several doors in our newly built house. I actually was looking forward to a HomeKit integration. Really love your plugin for Protect. Great Work! Hope you can do something for Access as well.

anthonyvancauwenberghe commented 3 years ago

I think a lot of people will start using this product for home situations aswell since there's not really another easy to use solution available atm.

hjdhjd commented 3 years ago

Appreciate everyoneā€™s thoughts on this. I was thinking that the starting point will be getting the door releases and potentially video working. Iā€™m waiting for another release or two of Access before I really lean into it...itā€™s clear the underlying infrastructure is going through a lot of evolution, but Iā€™m going to be poking at it every so often. Thereā€™s only so much free time. :smile:

michaelyork commented 3 years ago

ā¤ļø thankful for anything! And please ā€“Ā let us donate this time!

VeniceNerd commented 3 years ago

Unlocking doors seems like an obvious one...as is contact sensor support, which would give those open / close notifications. Here's the question: is this useful in a HomeKit context? It seems like a very business-centric solution and I can't imagine a home using this stuff. I've got the starter kit and have been messing with it, but can't imagine actually using this stuff in a real world setting at home. Thoughts?

I played as well with the starter kit and now I'm planning to use UniFi Access for several doors in our newly built house. I actually was looking forward to a HomeKit integration. Really love your plugin for Protect. Great Work! Hope you can do something for Access as well.

I also find this really intriguing for my home but ONLY if I can find an electric lock which still lets me lock and unlock with a regular door knob from the inside. I donā€™t want to swipe over anything to be able to leave my home. Thatā€™s just bizarre. Iā€™ve tried to Google quite a bit but canā€™t find any locks that could just replace a regular home deadbolt that can be manually locked and unlocked from the interior.

If anyone has any insights on this Iā€™d love to see them!

Maxwell70 commented 3 years ago

@hjdhjd Is the camera from the UA Pro visible in the Protect?

rsulzenbacher commented 3 years ago

@hjdhjd Is the camera from the UA Pro visible in the Protect?

Unfortunately not šŸ‘Ž

hjdhjd commented 3 years ago

Sorry, I missed this - no, very little is actually currently available in UniFi Access. Thatā€™s why this project hasnā€™t progressedā€¦plus my lack of time to take a good look at it. Iā€™m hoping to make meaningful progress at investigating this (thatā€™s not promising a working plugin, but looking much more closely at Access!) over the summer.

Kcvavkr commented 3 years ago

Does anyone think the HomeKeys feature introduced in WWDC21 will be possible to implement for UniFi Protect?

hjdhjd commented 3 years ago

LOL. Let me get a working plugin before we start aspirational musings like HomeKeysā€¦thereā€™s no point even speculating at this point. The answer is: itā€™s unlikely but itā€™s a long, long way off. I wouldnā€™t hold my breath.

Kcvavkr commented 3 years ago

Yeah šŸ˜‚šŸ˜‚ was just wishful thinking on my part. Given how long it's taking for HomeKit secure video to come to HomeBridge, I'm not holding my breath.

rsulzenbacher commented 3 years ago

I managed to open the door with NodeRED if anyone is interested. But unfortunately UniFi still does not offer a doorbell function :-(

[{"id":"448be38.a6f851c","type":"tab","label":"UniFi Access Interface","disabled":false,"info":""},{"id":"3a73bef8.cd6102","type":"debug","z":"448be38.a6f851c","name":"Token","active":true,"tosidebar":false,"console":false,"tostatus":true,"complete":"headers['x-csrf-token']","targetType":"msg","statusVal":"headers['x-csrf-token']","statusType":"auto","x":450,"y":220,"wires":[]},{"id":"84a68435.e94a48","type":"http request","z":"448be38.a6f851c","name":"CSRF-Token Request","method":"GET","ret":"txt","paytoqs":"ignore","url":"https://192.168.0.1","tls":"78e9015e.f7de68","persist":true,"proxy":"","authType":"","x":220,"y":220,"wires":[["3a73bef8.cd6102","cc539915.3cfac8"]]},{"id":"eac5bac8.87fbd8","type":"http request","z":"448be38.a6f851c","name":"Auth Request","method":"POST","ret":"obj","paytoqs":"body","url":"https://192.168.0.1/api/auth/login","tls":"78e9015e.f7de68","persist":true,"proxy":"","authType":"","x":200,"y":340,"wires":[["fcc2ce89.b48698","c16701a3.42ecb"]]},{"id":"fcc2ce89.b48698","type":"debug","z":"448be38.a6f851c","name":"Account Id","active":true,"tosidebar":false,"console":false,"tostatus":true,"complete":"payload.unique_id","targetType":"msg","statusVal":"payload.unique_id","statusType":"auto","x":470,"y":340,"wires":[]},{"id":"cc539915.3cfac8","type":"change","z":"448be38.a6f851c","name":"set Username & Password","rules":[{"t":"set","p":"payload","pt":"msg","to":"{\"username\":\"USER\",\"password\":\"PASSWD\"}","tot":"json"}],"action":"","property":"","from":"","to":"","reg":false,"x":240,"y":280,"wires":[["eac5bac8.87fbd8"]]},{"id":"37587ce0.02587c","type":"http request","z":"448be38.a6f851c","name":"Door Unlock","method":"PUT","ret":"obj","paytoqs":"body","url":"https://192.168.0.1/proxy/access/api/v2/device/ACCESS_MACID/relay_unlock","tls":"78e9015e.f7de68","persist":true,"proxy":"","authType":"","x":190,"y":460,"wires":[["f98ef229.72648"]]},{"id":"f98ef229.72648","type":"debug","z":"448be38.a6f851c","name":"Message","active":true,"tosidebar":false,"console":false,"tostatus":true,"complete":"payload.msg","targetType":"msg","statusVal":"payload","statusType":"auto","x":460,"y":460,"wires":[]},{"id":"c16701a3.42ecb","type":"change","z":"448be38.a6f851c","name":"set Cookie","rules":[{"t":"set","p":"headers.cookie","pt":"msg","to":"headers['set-cookie'][0]","tot":"msg"},{"t":"delete","p":"headers['set-cookie']","pt":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":190,"y":400,"wires":[["37587ce0.02587c"]]},{"id":"af73f363.09846","type":"inject","z":"448be38.a6f851c","name":"Test","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":370,"y":100,"wires":[["84a68435.e94a48"]]},{"id":"4fbff274.a699dc","type":"switch","z":"448be38.a6f851c","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"true","vt":"jsonata"}],"checkall":"true","repair":false,"outputs":1,"x":190,"y":160,"wires":[["84a68435.e94a48"]]},{"id":"78e9015e.f7de68","type":"tls-config","name":"","cert":"","key":"","ca":"","certname":"","keyname":"","caname":"","servername":"","verifyservercert":false}]

You have to replace IP, USER, PASSWD and ACCESS_MACID. ACCESS_MACID is the MAC Adress of the UA-Hub. (written as follows: f492bf82bf3c)

hjdhjd commented 3 years ago

Thanks - helpful, as I start to focus more on Access.

TTvanWillegen commented 3 years ago

Hi there, another useful thing would be to see who check in at which location; for businesses this could mean that you can easily see who is in, and who is out.

Also, they recently (just this/last week?) made the doorbell function available, but it now only rings in the unifi.ui.com webapp and on the pro-device outside the building. Could give you an insight in how to allow a secondary bell (inside the building) to ring and open the door on command.

I've had a chat with Ubiquiti support before about the camera function of the UA-Pro; it only records when the tag is scanned / code is filled, without any option from Unifi to allow it to record continuously. This is also why it doesn't show up in the Protect app.

In any case, if you need a hand with something, don't hesitate to ask, glad to help here!

rsulzenbacher commented 3 years ago

I was able to catch the doorbell event from local UDM WebSocket: wss://__IP__/proxy/access/ulp-go/api/v2/ws/notification ("TOKEN" in cookie header is needed to authorise)

hjdhjd commented 3 years ago

@rsulzenbacher appreciate the continued tidbits of information youā€™re gathering. Iā€™m hoping to mess with this at some length in the near future to see what we can make work.

rfitzpatrickCO commented 3 years ago

I'm eagerly awaiting your progress on this project. I'd personally love to be able to:

@Kcvavkr the UI-Team has responded in a community post that Home Keys will be on their roadmap. Although, I wouldn't hold your breath.

@rsulzenbacher The doorbell feature is functioning on Access v1.3.31

@michaelyork UI confirmed to me yesterday in a community post that there will be a stand alone Access app that will function separately of UID. I'm testing UID and it's certainly a solution for many small businesses, but it's complete overkill for my customers. The only downside is they said normal users won't be able to use the Access app to unlock doors, which I think is a huge missed opportunity.

michaelyork commented 3 years ago

Thanks @rfitzpatrickCO! Just caught up on your community thread. Happy to see they're finally acknowledging a standalone app is coming, but what a ridiculous set of limitations. I responded there too.

ydnar commented 3 years ago

Ubiquiti released the standalone Access app this week. It works as well as Network and Protect apps, with push notifications for doorbell presses. Iā€™d love to see this integrated with Homebridge as a camera and doorbell.

Nit: I havenā€™t seen any mechanism to enable SRTP feeds for a UA-Pro.

realdannys commented 2 years ago

I would be very interested in this plugin. In the UK it's better to buy an electric mortice lock (with no smart features) and then pair it up with your access system of choice. The UI would be ideal for us as I have their other products, the Pro looks great and HomeKit support is the only thing stopping me for using it.

Being able to lock/unlock with Homekit alone would be perfect - but as you mentioned open/closed sensor and probably integration of the camera like Unifi Protect.

silviokennecke commented 2 years ago

Does anyone think the HomeKeys feature introduced in WWDC21 will be possible to implement for UniFi Protect?

@Kcvavkr Will only be supported if Ubiquity implements it natively. The open source specification of HomeKeys does not state anything about HomeKeys and the full specification is under NDA, so it will most likely be implemented in any open source projects. But as @rfitzpatrickCO commented, Ubiquity states in a post that they will put HomeKeys on their Roadmap.

realdannys commented 2 years ago

Does anyone think the HomeKeys feature introduced in WWDC21 will be possible to implement for UniFi Protect?

@Kcvavkr Will only be supported if Ubiquity implements it natively. The open source specification of HomeKeys does not state anything about HomeKeys and the full specification is under NDA, so it will most likely be implemented in any open source projects. But as @rfitzpatrickCO commented, Ubiquity states in a post that they will put HomeKeys on their Roadmap.

That's good to hear, thanks for the information.

obcocav commented 2 years ago

Would gladly donate to make this happen!

hjdhjd commented 2 years ago

Soon as I finish a few more Protect-related items, I'm going to refocus here. Some headway has been made...as to donating, look at my Protect plugin...prefer donations to charity. :smile:

Marfre888 commented 2 years ago

I wonder if the new G4 Doorbell Pro's fingerprint sensor is for Unifi Access/it is extensible enough that a successful authentication could be leveraged as an unlock event in homekit?

@sammarcus REDACTED

I'm currently planning a new house, and am looking very heavily at this combination. Where I'm from deadbolts aren't very common. I also very an antique door, so it's not good aesthetics to have tech on the door. The only logical thing would be to maybe use a Nuki Smart lock. On my currently antique door, I use a Nuki Opener (which opens an electric door lock). It's tidy, and no one picks up that the door is 'smart', but it's into Homekit, this system is very similar, but with more hardwired features which I really like.

So for me, the features would be. The ability to open a door from homekit. The state of the contact sensor would tell Homekit if the door is currently closed or open, and expose the G3 flex (haven't done a lot of research on this, so idk if that would be exposed as a normal camera in Protect or not, or if I could use an different ui camera)

hjdhjd commented 2 years ago

Hey guys...I get the excitement, but please do not discuss EA products here. Ubiquiti has clear policies in place and I'd like to stay on the right side of them. :smile:

As to your problem domain @Marfre888 ...happy to discuss it on the Discord. It's not an easily solved problem as you're discovering.

sammarcus commented 2 years ago

@hjdhjd good call, removed, sorry!

Marfre888 commented 2 years ago

Hey guys...I get the excitement, but please do not discuss EA products here. Ubiquiti has clear policies in place and I'd like to stay on the right side of them. šŸ˜„

As to your problem domain @Marfre888 ...happy to discuss it on the Discord. It's not an easily solved problem as you're discovering.

As I said, I don't want to discuss too much, but thankfully Ubiquity has officially announced it, so I guess we can technically discuss it.

https://www.youtube.com/watch?v=34DjZxOm-Rk

I'm happy to pop by to your discord, but I'm not sure I understood what you would like to discuss :D

Clausi821 commented 2 years ago

Hello @hjdhjd ,

I have been using Unifi products for a long time. From the UDM Pro, switch's to access points, cameras to the access starter package.

A few days ago I came across their great solution for Unifi Protect and was also happy to see that something is already planned for Unifi Access.

I use the UA-Hub + UA-PRO as a bell and to let people on the property and will buy a second set for the front door.

Functions that I would find great:

These are only ideas which I consider useful. I don't know what can be implemented. I am a user, I can not program.

Thanks for reading my message.

Best regards from Germany Tobias

Clausi821 commented 2 years ago

Hallo @hjdhjd ,

two more useful functions for me and maybe for others would be if: motion detection by the UA-Pro is written in a state. and UA-Pro or UA-Lite connected to the switch without a hub can change a state (forward the scanned NFC or entered code).

This would give the Lite a function with me currently he has no use. If this works it could write the NFC scan the serial number in a state and in my case iobroker could evaluate the state and open my garage door.

We now use the UA-Pro daily and it really works great. In the meantime, I have an NFC sticker on the iPhone, car keys and in the leather wristband of the Apple Watch.

Thanks for reading my message.

Best regards from Germany Tobias

shard87 commented 2 years ago

Hello @hjdhjd! Any news on this yet? Exposing the doors to homekit would be amazing! Many Thanks!!

jbyerline commented 1 year ago

Just wanted to put a bump on this. I'm really looking forward to this plug-in as we have been installing this equipment for residential homes for awhile now. Any updates?

obcocav commented 1 year ago

Just another bump from me as well. This would be huge! Easy for me to say....Please let me know if I can help though. @hjdhjd

higgins-ab commented 1 year ago

@hjdhjd Similarly please let us know when this will be available and if I can be of any help. I have been hoping for this plugin for over a year and would really complete my home automation dreams.

Clausi821 commented 1 year ago

@hjdhjd Since I'm still anxiously waiting for the adapter. I wanted to ask what the future plan looks like? Best regards Tobias

hjdhjd commented 1 year ago

I expect to have something to show in 2023. Thanks.

jotala commented 1 year ago

I expect to have something to show in 2023. Thanks.

I can't wait!

bcyng commented 1 year ago

would love to have enough functionality exposed to integrate Access reader and Access reader pro with regular HomeKit door locks so we can use the Unifi Access Application to manage regular (non-unifi) door lock access. e.g enter PIN code on access reader pro, then have homebridge/homekit unlock door.

jbyerline commented 1 year ago

Has any progress been made on this? I am really looking forward to it!

hjdhjd commented 6 months ago

v1.0.0 released. Enjoy.