Unifi Driver Download

5 views
Skip to first unread message

Giuditta Dea

unread,
Jan 21, 2024, 7:00:54 AM1/21/24
to tyastijkingperh

After the relative success of my Unifi Network API driver (previously just the Unifi API driver) I decided to branch into what else my UDMP is capable of. One of those functions is the Protect area. I do not have much in the way of Protect hardware but I am able to enable it and start digging around into the features so I felt it would be useful to provide a driver for those interested.

Driver Links:
You MUST have the parent driver of course... children are needed for particular devices you have on Protect. So if you have a camera, also install the Camera driver. Bridges are very typical as Unifi Protect defaults to including your Access Points as bridges, so in most cases you will need that child driver.

unifi driver download


DOWNLOADhttps://t.co/fXaPJFOm1d



The driver should automatically attempt to login and refresh the basic information from the Protect system and will attempt to refresh it per the Stats Refresh Rate preference from then on. It will also automatically create child devices from that point forward.

Not sure. The Unifi Network driver does work with non-UDMP controllers and I tried to incorporate information I could dig up from Ubiquiti's site. That is why there is the Unifi Controller Type preference. It should attempt to use a path appropriate for non-UDMP controllers.

It would not be difficult to generalize this to display the number of presently connected devices, if I'm understanding your use case correctly. I'm not sure if @snell's UniFi Network API drivers may already support this.

I felt keeping the two drivers separate at this time is the better idea. Especially since someone can easily make 2 separate virtual devices that go to the same controller (that is how mine is operating).

Request for anyone that is using this driver... If you have any devices OTHER than a Floodlight on your system could you do a couple things for me?
Set your logging for TRACE and capture a log when you run "GetProtectInfo". You can redact any tokens/IDs/usernames... any of the field values (just please mark that you REDACTED the value or something similar), just please leave the field name.

As a hint... I have an upcoming major change to the driver. Not only will I be starting to break out the types of children BUT it is not going to be just READ ONLY anymore! However, it is impossible to figure out commands without seeing samples of data (it was really tough figuring out how to do it for my floodlight even with all the samples). So I do not want to leave most devices sitting with the read-only generic child driver...

As I was making my summer road trip in Michigan to get my friends clients to move to Hubitat and to update hubs and drivers if needed I had one client that was running a full Unfi stack at their business along with protect. I tried to talk them into a Hubitat for some automations and it would have been a good way of testing out your drivers. But luck wasn't on my side they went with Comcast services a month ago for all their other needs outside of the cameras and network from Unifi.

Hi @snell,
I've just installed the unifi driver on my UDM Pro, and finally got the presence detection for my iPhone working after years of nightmares. So, thank you.
I also have the Protect ecosystem on my UDMPro, with a bunch of G3 cameras.
Are you interested in getting info on the cameras? I have 12 x G3Flex and 1 x G3 Pro (so it has the Zoom feature)?

I need to see if I can set up websockets to get notification of motion, which is not something I have ever done (all of my current network drivers use HTTP/s). I also am not sure I can get thumbnails or anything like that and I have been kindof leaving it on the backburner due to Christmas and correcting other drivers.

I also have a UniFi Protect driver which supports motion detection (including smart detect) and other features on various cameras, plus most features of the G4 doorbell. Ubiquiti Unifi Protect cameras - #37 by tomw

@tomw and I always seem to be working on similar things and trading information back and forth. If I was not trying to learn more of this stuff myself and do as much on my own as possible I would look over his drivers and copy out the methods mine lack.

Hmm... not sure how I would get that at this time. Right now the driver only polls the API for status information, it does not have a way to receive PUSH notifications (and Hubitat is more geared towards receiving responses than unsolicited broadcasts).

If you set the parent driver to Trace logging, there should be evidence there if the websocket messages are being handled or not. You can message me a sample of those. I only have one camera so I do not know if there is a "weirdness" in the data with more than one. (Tough to justify another small/cheap camera like the instant when I already have Blink cameras around, and the other cameras I might be interested in are out of stock or WAY down my purchase priority list).

For child devices you also need the respective child drivers on the Hubitat for them to be useful. Including the Presence child driver for presence detection. However, the error is more that it is not even getting to that stage.

Looking at update times, the controller did an update roughly 10 days ago, then I updated the hubitat code and broke things on the 22nd. We then applied updates again yesterday and it worked. I do know they released a new update for unifi just yesterday after we installed one so you might have new uodates

I did notice that in the State Variables for my device is says "Driver Version: 0.4.19" and in the Current States it says "Driver Status: New patch 0.4.20 available". I assume that is your driver? However, when I run HPM, there are no updates available

0.4.20 is the latest and the one that HPM should be pulling (I just double-checked the Manifest file). You could try doing a direct import from the driver file itself (and check the version in the code before saving). Maybe HPM needs a refresh itself?

After some digging in the drivers, I realised that I had somehow ended up with two copies of UnifiNetworkAPI, one at 0.4.19 and one at 0.4.20 and when I tried to delete the 0.4.19 it would not let me as it was in use by my device. That would explain the discrepancy in the driver my device reported, and there being no update in HPM, as I had both versions.

In the end, I deleted my device and both versions of the driver. I used HPM repair to repair the package and then recreated my device. Within seconds it had created a few child devices which it obviously pulled from my controller

First and foremost, your UDM Pro SE was not detected properly by my driver and not given a child driver (see how it is labeled as Generic) because I have not seen one before and have no data to recognize it. If you would be willing, I would love a Trace log for when you run a "Refresh Unifi Devices Basic". That would give me the model information I can then use to start supporting it. Or you can just tell me directly about it... For example, my UDMP has a model value of "UDMPRO". I EXPECT the SE to be something like "UDMPROSE" or "UDMSE" but have no way of knowing. Once I get that I can build it into the parent driver AND create a child driver (based on the UDMP one, but also handling the PoE ports hopefully).

I have a separate topic for Unifi Protect... but I definitely have not put as much effort into it lately as I have for the Unifi Network driver. So when you have requests/recommendations for that one there, let me know.

For the Protect-related stuff we can discuss it further in the Protect Driver's topic, just to keep them separate. Long story short, I have a G3 Instant (my only Unifi camera) and it is working for motion detection using the Protect driver and WebSockets, so we can look into it more in that topic.

UniFi Protect is a smart camera platform using the latest in modern anyalitics and hardware to bring you a truly amazing video monitoring solution. Using the smart home Control4 platform, you can tap into this intelligence by creating powerful When/Then programming. Integrate your Protect hardware into Control with the Cindev UniFi Protect drivers!

Doorbell Integration:
Program doorbell announcements with ease using the UniFi Protect drivers! Tired of letting the person at the door know you're not home? The UniFi doorbell has an LCD screen on it that can display custom messages. Incorporate region clicking with custom doorbell messages for a truly unique doorbell solution.

df19127ead
Reply all
Reply to author
Forward
0 new messages