Ubiquiti Unifi Binding Feature Discussion

After upgrade to OH3 I am missing “wired clients” and “site” support in this binding.
Is there any plans to get wired clients support in OH3?
Thanks,

From what I can tell, it kinda looks like both wired clients and site support were part of a branch that was never merged to main. This update added support for the latest authentication method for Unifi OS, but didn’t include the wired clients or site support in that feature branch. It also appears this is not being actively worked on so unless you want to hack it together like I’m doing, you’re SOL.

I don’t know if this is the right place to ask!

OpenHAB 3.1.0.M3
Unifi contoler 6.0.28 (on a Linux VM)
UniFi Binding latest

Has anyone managed to get this binding up and running for the use of presence detection?

Mark, thanks for info. I am not programmer, so I can’t hack this binding…

I have 3.1.0 M3 with the UniFi binding to match (not sure if by latest you mean a CI / snapshot version) hitting Unifi controller 6.0.45, doing wireless presence detection and providing data just fine.

I remember it stopped working when I went to M1 but I can’t remember what I did to fix it.

I do also have 3.1.0 M3 with the UniFi binding.
I connect to an Unifi controller 6.0.45 that is running on docker.
I’m also doing presence detection and it’s working fine.

My current setting looks like this:

Bridge unifi:controller:home "UniFi Controller" [ host="XXX.XXX.X.X", port=8443, username="abcdef", password="dontsayit",  refresh=10,  unifios="false" ] {
	Thing wirelessClient simonsPhone "Simon's Phone" [ cid="c2:e0:b5:9a:35:a0", site="", considerHome=180 ]
    Thing wirelessClient katrinsPhone "Katrin's Phone" [ cid="66:6a:a9:2f:d7:c1", site="", considerHome=180 ]
    Thing wirelessClient miasPhone "Mia's Phone" [ cid="8c:f5:a3:d2:7d:7d", site="", considerHome=180 ]
    Thing wirelessClient jurisPhone "Juri's Phone" [ cid="50:2e:5c:d0:be:50", site="", considerHome=180 ]
    Thing wirelessClient mariannesPhone "Marianne's Phone" [ cid="88:11:96:a3:fa:0d", site="", considerHome=180 ]   
}

That’s good to know. Then it is not for nothing that I am trying to find out why it does not work for me yet. :slight_smile:

How good of you to share a working configuration

I just updated openHAB from 3.0.1 to 3.1.0.M3 with UniFi controller 6.0.43 (on a CKG2+) and the binding is also working for me. I don’t know when they added this, but in the UniFi controller thing configuration there is a UniFi OS toggle. Once this option is enabled, the binding works smoothly (I think I restarted the binding once but it may just be me doing something else weird).

You may also want to double check that the toggle wasn’t overlooked like I did.

I thought UniFi OS was for Cloud Key or Dream Machine type devices?

I have the toggle switched off and all is working. I configured it through the UI so have no config to share though.

Correct me if I’m wrong here, but I believe UniFi OS is on all the newer firmware versions. The way I distinguished the UniFi OS on my system was the controller local address changed from 192.168.xxx.xxx:8443 to 192.168.xxx.xxx/network which broke the UniFi binding back in OH2.

The UniFi Protect binding documentation has a short description of the UnFi OS:

Supported hardware

  • UniFi Protect Cloud Key Gen2+ Firmware >= 2.0.18
  • UniFi Dream Machine / Pro
  • Any UniFi Protect Camera G3 and G4
  • UniFi NVR
  • UniFi Doorbell

The binding has been rewritten to support UniFi OS only. That means if you have a UCKP (Cloudkey gen2+)
you need to update it to at least firmware 2.0.18. After 2.0.18 UCKP is running UniFiOs just like the
UDMP and UNVR.

I just updated openHAB from 3.0.1 to 3.1.0.M3 with UniFi controller 6.0.43 (on a CKG2+)

You have a Cloud Key Gen2+. micware was asking about running the Unifi controller on Linux instead - which is what I do too and what seimenb does. So you’re using UniFi OS and need the toggle on but we don’t.

Ah I see, sorry I got things mixed up. I thought the authentication issue applies to all new firmware.

Has this issue been solved? I’m still on OH2.5 and my Ubiquiti Cloud Key 2+ no longer connects since I updated the Unifi software to version 6.0.44. I’ve tried changing the port from 8443 to just 443, but it just gives errors in the log:

Unhandled exception while refreshing the UniFi Controller unifi:controller:a2bc7a83 - com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 2 column 12 path $

No, still broken. Even with 3.1

I’ve added this problem as an issue here:

Hi All,

On 2.5.12 and running Unifi OS 6.2.25. I cannot get my Android or Iphone to switch on based off presense. I’m using the binding that comes native with 2.5.12

Any suggestions? Thanks!

Currently, the 2.5 versions of the UniFi binding do not support UnifiOS, so you won’t get it to work (I have the same problem) The controller software is no longer reachable at 192.168.xxx.xxx:8443 but rather 192.168.xxx.xxx/network and unifi changed the auth stuff.

This feature has been implemented in OH3.1M2 though so if someone wanted to back-port the binding, I’d be overjoyed…

1 Like

Thats a real shame :frowning: hopefully someone can back port it!

It works! (@dastrix80)

I’ve gotten the it to work by manually merging the commit that added the UniFi-OS code and then recompiling the UniFi Jars. Here they are:

2.5.13 UniFi binding fix with UniFi OS support

To use these you’ll need to:

  1. Just to be safe, delete the current unifi controller thing
  2. Uninstall the existing unifi binding via Paper UI
  3. Install the jars by placing them in the addons folder (UniFi will show up in the “add thing” menu)
  4. Create the UniFi controller thing and make sure to set the the unifios toggle to true and use the right username/password (NOT ubiquiti account!). Also, make sure you’re on port 443
  5. I was getting weird 404 errors, so I restarted OH and everything started working properly!
3 Likes