It looks like the Unifi Protect plugin is broken after an update and no longer functions? All the entities report as “recovered” or “unavailable”. This was previously working before I updated Home Assistant.
I’ve attempted to bin the integration and set it up again but it won’t accept my login details anymore with “Unknown Error” or “Failed to connect” despite this all working flawlessly before. I have setup a new user in Unifi OS with Super Admin rights and still no joy.
I was a bit silly and forgot I sat my UDMP on Early Access and so Unifi Protect updated from 2.11.21 (official) to 3.0.10 (early access) breaking the integration in the process.
For anyone who finds they’ve done the same you can SSH into your UDMP and issue the following commands to force a downgrade.
Same here, the read only user is left over though when downgrading, I assume that’s what the readlive error is. We’ll just have to wait patiently for it to be fixed
EDIT: Looking at github, it looks like its been fixed and merged, hopefully it’ll make it in 2024.3.2
Just updated to Unifi Protect 3.0.22 (official release channel) and home assistant no longer connecting to cameras etc. Suggest not to update protect until the integration is updated.
With how fickle the integration is, I ended up just adding Generic Cameras pointing at the RTSP and snapshot links. Yes, I lose the person / motion detection, but I don’t end up with random crashes of the integration and it seems to load the snapshots more quickly (and more often).
Once the integration is operational again, I’ll probably keep the Generic Camera one as the primary for images and just use the motion / person detection from the integration.
Your second one is closest – but the RTSP link needs to be pulled from the Camera Settings page in Protect, with changes to the port and protocol.
the snap.jpeg only comes from the camera, and the rtsp only comes from the protect appliance (and seems to be anonymous). I’ve attached what I configured in the UI.
Appreciate. How do u get this options UI ?And I see you have Basic Authentication defined, username\pwd is for a specific user within the UnifiProtect ? or your kept without anything ?
I added the “Generic Camera” integration through Settings → Devices & Services → Integrations. Then, after selecting the integration, I clicked “Add Entry” at the bottom.
It says “Basic Authentication” but the u/p info is blank. Those were defaults that I tried first and they worked.
I think it’s only fair to say it solves the Protect v.3.0.x issue. I’ve watched this integration get broken with other releases within the same major release, too.
Dude… if it breaks because Ubiquiti sneezes, it’s pretty hard to support. I’m not a python programmer, so I won’t be contributing code – it would just cause you more work.
To be clear, I’m not bitching in a way that expects you to do anything – I’ve found a workaround by using Generic Camera for the image / video stream (which works better even when this integration is working since it grabs the snapshots directly from the camera, and more often). If I need to use the sensors for automations, I just use the Node-RED integration that doesn’t break with every minor change.
I don’t understand how it is that other integrations (Scrypted, Node-RED, probably others) don’t go kaboom at the slightest change, but this one seems to need everything perfect in order to not blow up. In any other API work I’ve done, everything is backwards compatible (unless otherwise stated), and a tool programmed against an older API will work, just without the new features.
There is no need for name calling. It’s clear you’re frustrated this week – both with people complaining that the integration isn’t working, as well as with the HA Core maintainers who didn’t see the need to push the change out more quickly.
Perhaps you’re just doing things in a way that isn’t congruent with the way Ubiquiti does things – as you’ve just detailed. Your desire to use enums when that doesn’t align with the source API could be part of the problem. While it is the best practice, it doesn’t lend itself to working with a vendor who makes changes willy-nilly.
Aside from your hubris, is there any reason why you can’t use strings and solve this issue? Or, barring that, include error handling that doesn’t throw up its hands at the slightest issue?
Regardless, most of what you’ve just said doesn’t address why the HA UniFi Network integration doesn’t seem to break. Certainly not as badly as the Protect one does. So perhaps it is an issue in how you’re doing things.
Confirming that HA update resolving the issue.
To be honest I’m very grateful that there is a group of people who has a will to contribute and deliver the plugin. Even if sometimes is broken still gives a lot of value.
It’s open source so we take it as it is.
Many thanks.