[PROJECT] Driver for Unifi Network Controllers

that is all I can think of :frowning:

I use a different controller, but same Network 7.4.150 on the UCK G2 v3.1.6

(SOLVED)
I am going to smack myself for you. You will not believe what it was.

I overlooked one area in my firewall due to the new interface, switched to legacy and found my issue. I was blocking all traffic from my vlan to the controller IP for tighter security. So I put a hole in the firewall to allow the hubitat only to talk to it and then it works now. It found all my switches, AP's, and USP both strip and pro version. Thanks so much for your hard work.

I am so sorry for all of that.

It works great so no worries about EA OS :slight_smile:

:tada::sparkler::tada::sparkler:

3 Likes

Well... Glad it works!

There are still issues with the EA OSes... (that have been otherwise confirmed) but I am glad this is not one.

:wink:

Making changes and reviewing the logs has made me notice a few new pieces of data being provided by the API that I did not handle previously. So this had that benefit. A minor update should be coming in the next couple days. Further review, some will be ignored and some may even be useful.

1 Like

Question for you, Do you have or working on drivers for the connect side of unifi? I have a connect screen that is always on (as it displays protect cameras in full screen), but want to be able to turn it on and off as needed without having to go into the OS to do so. (Want to turn it on and off during work hours as I work from home in my basement)

Also was interested into using one for a dashboard in the future where the display would be off when no movement was detected and such. And more.

I do not have one... But I HAD given some thought about it since I got a Connect Cast to play with (although it does not do nearly what I hoped).

I could probably toss together something basic and shoot you a message in a couple days to try it out.

1 Like

For @albertjmulder and anyone else interested... I have started a project thread where I will post the Unifi Connect related drivers and such going forward (they are not live yet).

Progress is being made and I have even been able to do some VERY basic control of my Connect Cast device (Display On & Display Off)... but their method for dealing with commands is very different from the existing Network or Protect methods and is going to require some more work before I can post the initial versions.

1 Like

Hi, installed the driver and it found my UDMSPE, however the AP's under it are showing up only as presence.. I added the MAC address to the presence check. How do I get them to show up as the WIFI 6 Enterprise AP's they are? Edit the U6-LR showed up, but the U6-Enterprise's do not.

Thanks!

Edit: The UHDIW driver is for the enterprise AP's and they showed up after I loaded the driver.

@gmAU: It is not adding any child device for them at all, not even a generic child? Are there any errors in your logs for the parent device?

If neither of those are correct, can you set the parent device to Trace logging and capture what happens when you run the "Refresh Unifi Devices Basic" command, then send that to me in a message (please do not post it here in the thread)?

1 Like

Ah got it! Thanks for the pointers. The UHDIW driver was not loaded. All sorted now. Appreciate the assist

1 Like

No problem. I am testing out a newer child creation method that automatically "fails" back to the generic child if the correct one is not loaded... but I am not sure if that would actually help most people with this type of thing.

I wish Hubitat implemented dynamic capabilities/commands/attributes so I could have 1 (or just a few) child drivers that would modify what they could do at install time (or when preferences are saved, or something like that).

1 Like

Yeh I noticed it didnā€™t drop in the generic driver even though I had it installed. It simply didnā€™t show up the devices at all. I think seeing it installed generically with the ability to select another driver would be helpful.

1 Like

Would be great to expose more of the attributes to Sharptilesā€¦ is this on the driver side or on their side? Thx

Probably their side. I am not familiar with Sharptiles, but I expose a bunch of attributes in the drivers. However these are all custom attributes so it is likely that anything looking for them would not automatically know about non-standard attributes.

1 Like

Edit: Turns out it's all just an issue with auth. :7443 is the correct port, but no combination of username and password seems to work for authorization. I can log in locally to my CloudKey, and using that login (username, not an email) does not work for auth for this driver :S

Do you have that login as a local account on the controller, with permissions assigned to the UniFi Network app? It is confusing IMHO because it can be a controller account but without permissions for the individual apps (and the SSO with email for the ui.com account is another layer on top of that).

Is that port correct? I have not seen one on 7443 before. Usually non-UDM based controllers start with 8443. But there have been cases of other controllers (and the UDM ones by default) using port 443.

Hello! I just recently got my USPPDUPro and found this driver (Thank you!! for making this). I had a question though (apologies if I missed it in this thread) but is it possible to setup a dashboard button to turn on/off individual outlets on the PDU? For example if I wanted to create a button to turn on/off outlet 12 via a dashboard on a tablet.

Yes... and no.
Easiest answer first, no. The device driver itself does not include the button capability so you cannot add something directly using it.

But now for the "good" answer. Yes! There is a way to do it. You can create a virtual button device that CAN be put on the dashboard and can be set to what button you want to do what. Then have a Rule that monitors button presses for that virtual button which then sends the actuator command to the PDU Pro. Here is a screenshot I made of a rule monitoring a virtual button for when button 7 is pushed, to then control outlet 7.
Rule for Button 7

1 Like

@snell have you considered creating a child "presence" device that you can input a mac address and the presence state will reflect if it is present on the UDM during the regular polling? There are a few Unifi Presence community solutions and I am using your awesome driver and would prefer if it could update a child presence device. You already have the Presence Check plumbing in place its a matter of updating a child device with that state value.

I might be a bit confused here, but this exact ability exists now (initial versions were way back in the 0.2.x versions, with the most recent "significant" change in 0.4.20 when I added more features to them). The Presence Check you mention already creates child devices and updates their presence capability. Here is a screenshot of some of the child devices of my UDMP (showing a couple are Presence children) and below that is a screenshot of the Current States of the "Dave Pixel 4a" child:
Presence Children
Presence States