Custom Component: Unifi Protect

Will we see device trigger for doorbell? Or is state change still the only way?

There is currently no plan to implement a device trigger. We have talked about it, but device triggers are a lot more limiting than state changes (you cannot add device triggers to a Lovelace dashboard).

It would also a large breaking change to remove the binary_sensor entity.

We may circle back around to this after everything is merged into core though.

I noticed that too, but only after I started completely deleting/re-installing the custom component.

Now, even when I start from scratch - and install 0.12.0-beta8, it installs it in an extra unifiprotect sub-folder (which I fix) but no matter what I do I can’t then add the integration :frowning:

Hmmm… that sounds like it might be a HACS bug them. Maybe HACS is having an issue because unifiprotect is in the dev branch for Home Assistant?

2022.2 comes out in just a little under 4 weeks, so I would recommend getting 0.11.4 or 0.12.0-beta8 running and then just leaving until then unless you need one of the bug fixes that get released on the 0.12 beta.

I also had another user report downgrading to HACS 1.17 solves the issue.

EDIT: Confirmed from the HACS dev. It looks like 1.19 of HACS is causing the issue. Downgrading to 1.17 or 1.18 should fix it. If you have not yet upgraded to 1.19, do not do it.

1 Like

Shelly integration has both binary sensor and trigger. For new people, the device trigger is a lot more discoverable. But we have something that works now, that’s the most important thing obviously.

Thanks for this - still trying to find out how I can actually downgrade HACS.

HACS 1.19.1 is now out and I can confirm it’s allowed me to get the Unifi Protect plugin installed/working again. Thanks for your help @AngellusMortis :+1:

You are running version v0.12.0-beta6, version v0.11.4 is available
UPDATE

Doesn’t seem to let me get the latest beta just offers the above. Is that correct?

v0.12.0-beta6 was accidently marked stable. So, a lot of people installed it. I unmarked it as stable, so that is now why HACS is giving you an update for 0.11.4.

If you want to keep getting beta releases, you need to check the box for show beta releases.

1 Like

Sorry if this is off topic, if so feel free to delete this, I’m just trying to get the Unifi audience to to see this question. PM if you don’t want to derail the convo and I can make a separate post. Just felt it’d get lost in the sauce.

Does anybody have a script to reboot a G4 Doorbell (wireless) :rofl: Unifi camera on a schedule?
I know I have an AP weak spot issue, but a reboot makes the camera quality so much better for a while.
Thanks for any responses, if not keep up the great work this integration has yielded, good luck with the official integration.

If you have a Unifi switch and the camera connected to a POE port you can cut the power and then power on the camera again.

1 Like

Thanks, this is the wireless Doorbell. Good idea though.

Ah, sorry. Then I don’t know.

1 Like

0.11 / 0.12 of the HA integration has a reboot button, but it is disabled by default.

Enable button, make automation to reboot on interval.

Also need to be on HA 2021.12 or newer as well (button platform did not exist for integrations before that).

1 Like

Wow, now my post is on topic and your solution works!
Thanks again again for the great work.
Maybe one day I’ll be swimming in APs and won’t need to do this.
Until then, sweet!

Hi – I think you’re spot on. Hopefully gets resolved soon.

Found the box. Updating to latest beta. Thanks

0.12.0-beta9

Home Assistant core port complete! The version that is in 2022.2 will officially have all of the same features. This is the final backport version to make sure the two versions are equal. The only difference between 0.12.0-beta9 and the code in 2022.2 is

  • Migration code from < 0.11.x has been dropped. You must be on at least 0.11.0 or newer to migrate to the Home Assistant core version.

Additionally, we could not add every feature from the HACS version to the HA core version so there are 2 additional breaking changes in this release (sorry!):

  • CHANGE: BREAKING CHANGE Removes profile_ws and take_sample debug services. Core plans to add a more centralized way of getting debug information from an integration. This will be back in some form after that feature is added (estimate: 1-2 major core releases).

  • CHANGE: BREAKING CHANGE Removes event_thumbnail attribute and associated ThumbnailProxyView. After a lot of discussion, core does not want to add more attributes with access tokens inside of attributes. We plan to add back event thumbnails in some form again. If you would like to follow along with the dicussion, checkout the architecure dicussion for it.

  • FIX: More Websocket reconnect improvements.

Going forward, there will be some new features for the 0.12.0-beta / core version that will be developed for core version and then be backported to the HACS version. These include improvements for the G4 Doorbell Pro and the UP Sense devices. Once the 2022.2.0 beta is cut, I will make a final combined patch notes for all of the changes between 0.11 and the HA core version.


:warning: :warning: WARNING ABOUT Home Assistant v2022.2

The unifiprotect integration will be in Home Assistant core v2022.2. If you are running 0.10.x or older of the HACS integration, do not install v2022.2.x of Home Assistant core.

If you are running 0.11.x or the 0.12.0-beta, you should be safe to delete the HACS version as part of your upgrade. The 0.11.x branch is designed to be compatible with the 0.12.0-beta and the HA core version. The latest version of 0.12.0-beta will be the version of unifiprotect in HA core in v2022.0.

After v2022.2.0 comes out, this repo will be deprecated in favor of the Home Assistant core version.

Steps to migrate to the Home Assistant core version:

  1. Upgrade to the latest 0.11.x release or the latest 0.12.0-beta release for the HACS unifiprotect integration and restart Home Assistant.
  2. Upgrade to Home Assistant 2022.2.x
  3. Remove your HACS unifiprotect integration and restart Home Assistant. It is safe to ignore the warning about needing to remove your config first.

6 Likes

The Protect app keeps asking for my location permission.
I’ve been looking for a more private gps presence solution.
Is this something I’ve missed in the component, or are people just doing it based on if their phones are on WiFi?
Thanks for any response.