hjdhjd / homebridge-unifi-protect

:video_camera: Complete HomeKit integration for all UniFi Protect device types with full support for most features including HomeKit Secure Video, and more. https://homebridge.io
Other
1.45k stars 93 forks source link

UniFi OS Update #226

Closed Vortec4800 closed 3 years ago

Vortec4800 commented 3 years ago

I have a CK Gen2+ and didn't realize they released UniFi OS for it until I saw your most recent release notes. I got everything all updated, and it's pretty cool to see the new person detection working.

I've mostly been ignoring all the UniFi OS stuff in your plugin because I knew it didn't work for me, could you point me to some of the additional features and improvements the plugin has now that I'm running UniFi OS?

github-actions[bot] commented 3 years ago

@Vortec4800 - this issue is being automatically closed because it does not follow either the feature request or bug report issue template. The issue templates have been designed to help in the troubleshooting (or feature request) process. Please use them and populate it as completely as possible to streamline troubleshooting or feature request discussions.

hjdhjd commented 3 years ago

Sure - the single largest feature, and the reason why I've deprecated older UCK firmwares is that the non-UniFi OS firmwares didn't allow us to get realtime events from Protect. You had to poll the controller every few seconds (as frequently as every two seconds if you had a Doorbell installed, and every 5-10 seconds otherwise) to get an update on the state of Protect. It was never an elegant solution, but it worked and was the best I could do.

UniFi OS, on the other hand, has a realtime events API I can plug into, so as as soon as a doorbell rings or motion is detected, it notifies the plugin, and in turn the user. It causes no additional stress / unnecessary calls to the Protect controller, and is zippy. Once Ubiquiti pushed out the production / stable firmware to UCK, and it's been out for a week or two without issues, it made sense to formalize the move in this plugin.

Selfishly...having to test every release on both UniFi OS and legacy UCK firmwares is a pain in the rear for me, and if I can simplify my life to test for a single platform, that just makes for a more efficient code base, and better use of my time. UniFi OS is clearly the present and the future for Ubiquiti...it's a good thing. :smile:

Hope this helps illuminate some of my reasoning.

Vortec4800 commented 3 years ago

I think it's great, definitely looking forward to improved performance from the reduced load.

Are there any other features of the plugin I get access to now? Anything with the person detection stuff?

hjdhjd commented 3 years ago

Not really, no. I worked to keep feature parity between UniFi OS and non-UniFi OS platforms. Person detection is a UniFi Protect feature that you have access to if you have a G4-class camera. Those are Ubiquiti limitations. There will be other object classes in the future that Ubiquiti detects, and as they add them, I'll be adding those capabilities as well. You can learn more about person detection capabilities on the Ubiquiti forums.

Vortec4800 commented 3 years ago

Cool.

Well at any rate, keep up the good work, this is one of the best homebridge plugins I have.

hjdhjd commented 3 years ago

ONE OF????? 😛

Vortec4800 commented 3 years ago

To be fair, I don't think any of my automation would work without the ELK M1 plugin... 😅

fpuigb commented 3 years ago

Is HK Secure Video coming ?

hjdhjd commented 3 years ago

@fpuigb Once we've reverse-engineered it for Homebridge, in general, the answer is likely yes. If/when that happens, I'd like to add it. It has significant limitations, however, that aren't obvious to people until they read the fine print:

The protocol has been largely reverse-engineered at this point, but support in Homebridge isn't there yet, and it needs testing and refinement. I'd expect it's going to take a few more months to a year, at earliest, before you see it. There's a lot of plumbing still to solve for.

I'd like to see HKSV, but if I'm being intellectually honest, Protect's object detection for G4-and-above cameras is / will be a better answer for people in the UniFi ecosystem. It offers finer grain control than what you can get, today, in HKSV. And Ubiquiti seems serious about extending it's capabilities. I'm optimistic in the additional object support Ubiquiti is going to be introducing (my guess is we'll see vehicle, animal / pet, and maybe a few other things), and we'll be able to support them immediately.

The advantages to HKSV that make it attractive are really:

So...yeah...would love to support it, but we're a ways away. And even when we eventually do, I suspect the limitations are going to be more impactful than people realize until Apple raises the camera limits. If you have a dozen (or more) cameras, it's going to be painful to choose which five you want to prioritize or use with HKSV. I'm sure Apple has a grand plan for all this...I'm intensely curious to see how it evolves, and to support as much of it as I can.

Vortec4800 commented 3 years ago

Yeah I have to agree, I have 3 cameras total, two G4s in Protect and an Eve cam that uses HKSV and while the HKSV video is handy the Protect is much more reliable and useful. I suppose it would be a good feature to add if you have Protect cameras without an NVR already.

hjdhjd commented 3 years ago

Yeah I have to agree, I have 3 cameras total, two G4s in Protect and an Eve cam that uses HKSV and while the HKSV video is handy the Protect is much more reliable and useful. I suppose it would be a good feature to add if you have Protect cameras without an NVR already.

That situation can never exist. A Protect controller is required for Protect cameras. The Protect controller is an NVR already. :smile:

Vortec4800 commented 3 years ago

I see, I thought there was a way to use the camera as a basic IP cam without the controller.

hjdhjd commented 3 years ago

There is, but you basically lose 90+% of the reason why you bought the camera. You’re way better off buying another camera and not paying the premium for Protect gear.

Also...you can’t use this plugin without the controller. It’s where all the smarts come from. :smile:

ccsingleton commented 3 years ago

@fpuigb Once we've reverse-engineered it for Homebridge, in general, the answer is likely yes. If/when that happens, I'd like to add it. It has significant limitations, however, that aren't obvious to people until they read the fine print:

  • HKSV only supports up to five cameras, total. Read the fine print: https://support.apple.com/en-us/HT210538
  • You can't get five cameras in HKSV unless you have a 2TB iCloud storage plan. To get just one camera, you need a 200GB iCloud storage plan.

The protocol has been largely reverse-engineered at this point, but support in Homebridge isn't there yet, and it needs testing and refinement. I'd expect it's going to take a few more months to a year, at earliest, before you see it. There's a lot of plumbing still to solve for.

I'd like to see HKSV, but if I'm being intellectually honest, Protect's object detection for G4-and-above cameras is / will be a better answer for people in the UniFi ecosystem. It offers finer grain control than what you can get, today, in HKSV. And Ubiquiti seems serious about extending it's capabilities. I'm optimistic in the additional object support Ubiquiti is going to be introducing (my guess is we'll see vehicle, animal / pet, and maybe a few other things), and we'll be able to support them immediately.

The advantages to HKSV that make it attractive are really:

  • The ability to review video right in the Home app.
  • Notifications with information about the objects it's detecting. So you can see something like "Backyard camera has detected an animal".
  • The ability to tie person detection to your favorite faces in Photos. So you can ask to say be alerted when your spouse or children are detected.

So...yeah...would love to support it, but we're a ways away. And even when we eventually do, I suspect the limitations are going to be more impactful than people realize until Apple raises the camera limits. If you have a dozen (or more) cameras, it's going to be painful to choose which five you want to prioritize or use with HKSV. I'm sure Apple has a grand plan for all this...I'm intensely curious to see how it evolves, and to support as much of it as I can.

This was helpful to read through. On the heels of apple announcing unlimited camera support, maybe this becomes much more attractive to solve and integrate into Homebridge

link266 commented 3 years ago

This was helpful to read through. On the heels of apple announcing unlimited camera support, maybe this becomes much more attractive to solve and integrate into Homebridge

Yep, @hjdhjd has explained the thinking/process behind this very well. I've personally always been satisfied to view 'past camera video' in the UniFi Protect app but hearing about the new "unlimited cameras" option (still with the 2TB plan FWIW) definitely does increase the interest in (eventually) getting my UniFi Protect cameras into HomeKit Secure Video.

johnathanmorristest commented 3 years ago

Any status on this?

hjdhjd commented 3 years ago

TL;DR: until Homebridge supports HKSV, there is nothing to report on the plugin end. Until that plumbing is complete, there is nothing to work with.

johnathanmorristest commented 3 years ago

Is their a status chain I can follow for that? Thanks for all of your work.

hjdhjd commented 3 years ago

Release notes on the main Homebridge project...when HKSV support is ready, there'll be plenty of noise in the Homebridge and Apple world...it's not like this is a unique request to this plugin, I assure you. :smile:

jfmoots commented 2 years ago

Playing with Camera UI and it’s ability to take advantage of the current Beta of HomeBridge and it’s support for HSV. It’s working. There are certainly some limitations and reduced performance delivery by HomeKit, but you always have your Unifi NVR to fall back to. The image/person recognition is pretty slick.

Biggest drawback with Camera UI is motion detection. I like how your plug in handles motion detection. With Camera UI you have to set up motion detection again, and it’s not quite as accurate/tunable as Ubiquiti has made it.

It’s a solid platform though. Looking forward to the added HSV support here as you work it out.