Ubiquiti Unifi Binding Feature Discussion

Perfect thanks. Worked for me as well :slight_smile:

FYI - I’ve opened a thread over a UBNT on the connection details for the UDM. Let me know if I have any of the details wrong and I’ll update on that thread. I’ll also get back with what they say.

I recently upgraded to a UniFi Dream Machine Pro and the binding no longer works for me. So I’d like to ask for UDM/UDM-Pro support

2 Likes

Hi guys,

I was looking into this binding as I have a UniFi network setup and noticed that it seems the binding is mainly used for presence detection. e.g. if a phone is online.

I am already doing that since years with the network binding which shows me if all my servers and bridges are up and running and also if our phones are pingable in the local WiFi.
I was wondering if someone could explain to me what the benefit for presence detection of the UniFi Binding compared to the Network Binding is?

Hi guys,
I hope it’s apropiate to post this here:

I installed the ubiquiti binding and followed the guide on openhab.org. But for mee it seems like for every refresh it changes the devices status, so it goes like this:
"2020-05-25 00:48:36.923 [vent.ItemStateChangedEvent] - PifiPhone changed from ON to OFF
2020-05-25 00:48:36.931 [vent.ItemStateChangedEvent] - PifiPhoneSite changed from Default to UNDEF
2020-05-25 00:48:36.944 [vent.ItemStateChangedEvent] - MifiPhone changed from ON to OFF
2020-05-25 00:48:36.947 [vent.ItemStateChangedEvent] - MifiPhoneSite changed from Default to UNDEF
2020-05-25 00:48:43.150 [vent.ItemStateChangedEvent] - PifiPhone changed from OFF to ON
2020-05-25 00:48:43.157 [vent.ItemStateChangedEvent] - PifiPhoneSite changed from UNDEF to Default
2020-05-25 00:48:43.172 [vent.ItemStateChangedEvent] - PifiPhoneLastSeen changed from 2020-05-25T00:48:26.000+0200 to 2020-05-25T00:48:41.000+0200
2020-05-25 00:48:43.174 [vent.ItemStateChangedEvent] - MifiPhone changed from OFF to ON
2020-05-25 00:48:43.176 [vent.ItemStateChangedEvent] - MifiPhoneSite changed from UNDEF to Default
2020-05-25 00:48:43.178 [vent.ItemStateChangedEvent] - MifiPhoneLastSeen changed from 2020-05-25T00:48:26.000+0200 to 2020-05-25T00:48:41.000+0200
2020-05-25 00:48:52.543 [vent.ItemStateChangedEvent] - PifiPhone changed from ON to OFF
2020-05-25 00:48:52.556 [vent.ItemStateChangedEvent] - PifiPhoneSite changed from Default to UNDEF
2020-05-25 00:48:52.580 [vent.ItemStateChangedEvent] - MifiPhone changed from ON to OFF
2020-05-25 00:48:52.588 [vent.ItemStateChangedEvent] - MifiPhoneSite changed from Default to UNDEF
2020-05-25 00:48:58.797 [vent.ItemStateChangedEvent] - PifiPhone changed from OFF to ON
2020-05-25 00:48:58.805 [vent.ItemStateChangedEvent] - PifiPhoneSite changed from UNDEF to Default
2020-05-25 00:48:58.822 [vent.ItemStateChangedEvent] - PifiPhoneLastSeen changed from 2020-05-25T00:48:41.000+0200 to 2020-05-25T00:48:56.000+0200
2020-05-25 00:48:58.838 [vent.ItemStateChangedEvent] - MifiPhone changed from OFF to ON
2020-05-25 00:48:58.840 [vent.ItemStateChangedEvent] - MifiPhoneSite changed from UNDEF to Default
2020-05-25 00:48:58.843 [vent.ItemStateChangedEvent] - MifiPhoneLastSeen changed from 2020-05-25T00:48:41.000+0200 to 2020-05-25T00:48:56.000+0200
"
And I directly started watching a youtube video on one of the phone. Any idea what am I missing or could you help to write a rule which only checks when was the last state update and if its older than a given value, make the phone away?
(controller build: atag_5.12.72_13103)

From what I understand, some phones have issues where they may not respond to pings when in sleep mode - or something along those lines. Whereas the Unifi binding reports if the Unifi controller thinks the phone is online. Obviously I am not sure of the mechanics behind the scenes.

I use it to determine which access point the phones are connected to and therefore which room the phone is in. I would love it if I could determine how many guests were connected to each AP

@MossieNZ you can read about the benefits of the UniFi binding vs. the networking binding here:

Hello !
I created a thing for my controller but nothing has been discovered. I tried to change the user settings from admin to super admin but nothing changed…

Any ideas ?

With the latest version:

bundle:list | grep UniFi
300 x Active x  80 x 2.5.5.202005131819      x openHAB Add-ons :: Bundles :: UniFi Binding

I am contiuning to get Unhandled exception errors every 10 seconds.

2020-06-09 09:28:06.865 [TRACE] [fi.internal.api.cache.UniFiSiteCache] - Cache HIT : 'id:59448a82e4b07ca2c0c76ff9' -> UniFiSite{name: 'default', desc: 'Default'}
2020-06-09 09:28:06.865 [TRACE] [fi.internal.api.cache.UniFiSiteCache] - Cache HIT : 'id:59448a82e4b07ca2c0c76ff9' -> UniFiSite{name: 'default', desc: 'Default'}
2020-06-09 09:28:06.865 [TRACE] [fi.internal.api.cache.UniFiSiteCache] - Cache HIT : 'id:59448a82e4b07ca2c0c76ff9' -> UniFiSite{name: 'default', desc: 'Default'}
2020-06-09 09:28:06.865 [TRACE] [fi.internal.api.cache.UniFiSiteCache] - Cache HIT : 'id:59448a82e4b07ca2c0c76ff9' -> UniFiSite{name: 'default', desc: 'Default'}
2020-06-09 09:28:06.866 [TRACE] [fi.internal.api.cache.UniFiSiteCache] - Cache HIT : 'id:59448a82e4b07ca2c0c76ff9' -> UniFiSite{name: 'default', desc: 'Default'}
2020-06-09 09:28:06.866 [TRACE] [fi.internal.api.cache.UniFiSiteCache] - Cache HIT : 'id:59448a82e4b07ca2c0c76ff9' -> UniFiSite{name: 'default', desc: 'Default'}
2020-06-09 09:28:06.866 [TRACE] [fi.internal.api.cache.UniFiSiteCache] - Cache HIT : 'id:59448a82e4b07ca2c0c76ff9' -> UniFiSite{name: 'default', desc: 'Default'}
2020-06-09 09:28:06.867 [TRACE] [fi.internal.api.cache.UniFiSiteCache] - Cache HIT : 'id:59448a82e4b07ca2c0c76ff9' -> UniFiSite{name: 'default', desc: 'Default'}
2020-06-09 09:28:06.867 [TRACE] [fi.internal.api.cache.UniFiSiteCache] - Cache HIT : 'id:59448a82e4b07ca2c0c76ff9' -> UniFiSite{name: 'default', desc: 'Default'}
2020-06-09 09:28:06.867 [TRACE] [fi.internal.api.cache.UniFiSiteCache] - Cache HIT : 'id:59448a82e4b07ca2c0c76ff9' -> UniFiSite{name: 'default', desc: 'Default'}
2020-06-09 09:28:06.867 [TRACE] [fi.internal.api.cache.UniFiSiteCache] - Cache HIT : 'id:59448a82e4b07ca2c0c76ff9' -> UniFiSite{name: 'default', desc: 'Default'}
2020-06-09 09:28:06.868 [TRACE] [fi.internal.api.cache.UniFiSiteCache] - Cache HIT : 'id:59448a82e4b07ca2c0c76ff9' -> UniFiSite{name: 'default', desc: 'Default'}
2020-06-09 09:28:06.868 [TRACE] [fi.internal.api.cache.UniFiSiteCache] - Cache HIT : 'id:59448a82e4b07ca2c0c76ff9' -> UniFiSite{name: 'default', desc: 'Default'}
2020-06-09 09:28:06.868 [TRACE] [fi.internal.api.cache.UniFiSiteCache] - Cache HIT : 'id:59448a82e4b07ca2c0c76ff9' -> UniFiSite{name: 'default', desc: 'Default'}
2020-06-09 09:28:06.869 [TRACE] [fi.internal.api.cache.UniFiSiteCache] - Cache HIT : 'id:59448a82e4b07ca2c0c76ff9' -> UniFiSite{name: 'default', desc: 'Default'}
2020-06-09 09:28:06.869 [TRACE] [fi.internal.api.cache.UniFiSiteCache] - Cache HIT : 'id:59448a82e4b07ca2c0c76ff9' -> UniFiSite{name: 'default', desc: 'Default'}
2020-06-09 09:28:06.869 [TRACE] [fi.internal.api.cache.UniFiSiteCache] - Cache HIT : 'id:59448a82e4b07ca2c0c76ff9' -> UniFiSite{name: 'default', desc: 'Default'}
2020-06-09 09:28:06.869 [TRACE] [fi.internal.api.cache.UniFiSiteCache] - Cache HIT : 'id:59448a82e4b07ca2c0c76ff9' -> UniFiSite{name: 'default', desc: 'Default'}
2020-06-09 09:28:06.870 [TRACE] [fi.internal.api.cache.UniFiSiteCache] - Cache HIT : 'id:59448a82e4b07ca2c0c76ff9' -> UniFiSite{name: 'default', desc: 'Default'}
2020-06-09 09:28:06.870 [TRACE] [fi.internal.api.cache.UniFiSiteCache] - Cache HIT : 'id:59448a82e4b07ca2c0c76ff9' -> UniFiSite{name: 'default', desc: 'Default'}
2020-06-09 09:28:06.870 [TRACE] [fi.internal.api.cache.UniFiSiteCache] - Cache HIT : 'id:59448a82e4b07ca2c0c76ff9' -> UniFiSite{name: 'default', desc: 'Default'}
2020-06-09 09:28:06.871 [TRACE] [fi.internal.api.cache.UniFiSiteCache] - Cache HIT : 'id:59448a82e4b07ca2c0c76ff9' -> UniFiSite{name: 'default', desc: 'Default'}
2020-06-09 09:28:06.871 [TRACE] [fi.internal.api.cache.UniFiSiteCache] - Cache HIT : 'id:59448a82e4b07ca2c0c76ff9' -> UniFiSite{name: 'default', desc: 'Default'}
2020-06-09 09:28:06.871 [TRACE] [fi.internal.api.cache.UniFiSiteCache] - Cache HIT : 'id:59448a82e4b07ca2c0c76ff9' -> UniFiSite{name: 'default', desc: 'Default'}
2020-06-09 09:28:06.871 [TRACE] [fi.internal.api.cache.UniFiSiteCache] - Cache HIT : 'id:59448a82e4b07ca2c0c76ff9' -> UniFiSite{name: 'default', desc: 'Default'}
2020-06-09 09:28:06.872 [TRACE] [fi.internal.api.cache.UniFiSiteCache] - Cache HIT : 'id:59448a82e4b07ca2c0c76ff9' -> UniFiSite{name: 'default', desc: 'Default'}
2020-06-09 09:28:06.872 [TRACE] [fi.internal.api.cache.UniFiSiteCache] - Cache HIT : 'id:59448a82e4b07ca2c0c76ff9' -> UniFiSite{name: 'default', desc: 'Default'}
2020-06-09 09:28:06.872 [TRACE] [fi.internal.api.cache.UniFiSiteCache] - Cache HIT : 'id:59448a82e4b07ca2c0c76ff9' -> UniFiSite{name: 'default', desc: 'Default'}
2020-06-09 09:28:06.873 [TRACE] [fi.internal.api.cache.UniFiSiteCache] - Cache HIT : 'id:59448a82e4b07ca2c0c76ff9' -> UniFiSite{name: 'default', desc: 'Default'}
2020-06-09 09:28:06.873 [TRACE] [fi.internal.api.cache.UniFiSiteCache] - Cache HIT : 'id:59448a82e4b07ca2c0c76ff9' -> UniFiSite{name: 'default', desc: 'Default'}
2020-06-09 09:28:06.873 [TRACE] [fi.internal.api.cache.UniFiSiteCache] - Cache HIT : 'id:59448a82e4b07ca2c0c76ff9' -> UniFiSite{name: 'default', desc: 'Default'}
2020-06-09 09:28:06.873 [TRACE] [fi.internal.api.cache.UniFiSiteCache] - Cache HIT : 'id:59448a82e4b07ca2c0c76ff9' -> UniFiSite{name: 'default', desc: 'Default'}
2020-06-09 09:28:06.874 [TRACE] [fi.internal.api.cache.UniFiSiteCache] - Cache HIT : 'id:59448a82e4b07ca2c0c76ff9' -> UniFiSite{name: 'default', desc: 'Default'}
2020-06-09 09:28:06.874 [TRACE] [fi.internal.api.cache.UniFiSiteCache] - Cache HIT : 'id:59448a82e4b07ca2c0c76ff9' -> UniFiSite{name: 'default', desc: 'Default'}
2020-06-09 09:28:06.874 [TRACE] [fi.internal.api.cache.UniFiSiteCache] - Cache HIT : 'id:59448a82e4b07ca2c0c76ff9' -> UniFiSite{name: 'default', desc: 'Default'}
2020-06-09 09:28:06.875 [TRACE] [fi.internal.api.cache.UniFiSiteCache] - Cache HIT : 'id:59448a82e4b07ca2c0c76ff9' -> UniFiSite{name: 'default', desc: 'Default'}
2020-06-09 09:28:06.875 [TRACE] [fi.internal.api.cache.UniFiSiteCache] - Cache HIT : 'id:59448a82e4b07ca2c0c76ff9' -> UniFiSite{name: 'default', desc: 'Default'}
2020-06-09 09:28:06.875 [TRACE] [fi.internal.api.cache.UniFiSiteCache] - Cache HIT : 'id:59448a82e4b07ca2c0c76ff9' -> UniFiSite{name: 'default', desc: 'Default'}
2020-06-09 09:28:06.875 [TRACE] [fi.internal.api.cache.UniFiSiteCache] - Cache HIT : 'id:59448a82e4b07ca2c0c76ff9' -> UniFiSite{name: 'default', desc: 'Default'}
2020-06-09 09:28:06.876 [TRACE] [fi.internal.api.cache.UniFiSiteCache] - Cache HIT : 'id:59448a82e4b07ca2c0c76ff9' -> UniFiSite{name: 'default', desc: 'Default'}
2020-06-09 09:28:06.876 [TRACE] [fi.internal.api.cache.UniFiSiteCache] - Cache HIT : 'id:59448a82e4b07ca2c0c76ff9' -> UniFiSite{name: 'default', desc: 'Default'}
2020-06-09 09:28:06.876 [TRACE] [fi.internal.api.cache.UniFiSiteCache] - Cache HIT : 'id:59448a82e4b07ca2c0c76ff9' -> UniFiSite{name: 'default', desc: 'Default'}
2020-06-09 09:28:06.877 [TRACE] [fi.internal.api.cache.UniFiSiteCache] - Cache HIT : 'id:59448a82e4b07ca2c0c76ff9' -> UniFiSite{name: 'default', desc: 'Default'}
2020-06-09 09:28:06.877 [TRACE] [fi.internal.api.cache.UniFiSiteCache] - Cache HIT : 'id:59448a82e4b07ca2c0c76ff9' -> UniFiSite{name: 'default', desc: 'Default'}
2020-06-09 09:28:06.877 [TRACE] [fi.internal.api.cache.UniFiSiteCache] - Cache HIT : 'id:59448a82e4b07ca2c0c76ff9' -> UniFiSite{name: 'default', desc: 'Default'}
2020-06-09 09:28:06.877 [TRACE] [fi.internal.api.cache.UniFiSiteCache] - Cache HIT : 'id:59448a82e4b07ca2c0c76ff9' -> UniFiSite{name: 'default', desc: 'Default'}
2020-06-09 09:28:06.878 [TRACE] [fi.internal.api.cache.UniFiSiteCache] - Cache HIT : 'id:59448a82e4b07ca2c0c76ff9' -> UniFiSite{name: 'default', desc: 'Default'}
2020-06-09 09:28:06.878 [TRACE] [fi.internal.api.cache.UniFiSiteCache] - Cache HIT : 'id:59448a82e4b07ca2c0c76ff9' -> UniFiSite{name: 'default', desc: 'Default'}
2020-06-09 09:28:06.878 [TRACE] [fi.internal.api.cache.UniFiSiteCache] - Cache HIT : 'id:59448a82e4b07ca2c0c76ff9' -> UniFiSite{name: 'default', desc: 'Default'}
2020-06-09 09:28:06.879 [TRACE] [fi.internal.api.cache.UniFiSiteCache] - Cache HIT : 'id:59448a82e4b07ca2c0c76ff9' -> UniFiSite{name: 'default', desc: 'Default'}
2020-06-09 09:28:06.879 [TRACE] [fi.internal.api.cache.UniFiSiteCache] - Cache HIT : 'id:59448a82e4b07ca2c0c76ff9' -> UniFiSite{name: 'default', desc: 'Default'}
2020-06-09 09:28:06.881 [TRACE] [fi.internal.api.cache.UniFiSiteCache] - Cache HIT : 'id:59448a82e4b07ca2c0c76ff9' -> UniFiSite{name: 'default', desc: 'Default'}
2020-06-09 09:28:06.881 [TRACE] [fi.internal.api.cache.UniFiSiteCache] - Cache HIT : 'id:59448a82e4b07ca2c0c76ff9' -> UniFiSite{name: 'default', desc: 'Default'}
2020-06-09 09:28:06.881 [TRACE] [fi.internal.api.cache.UniFiSiteCache] - Cache HIT : 'id:59448a82e4b07ca2c0c76ff9' -> UniFiSite{name: 'default', desc: 'Default'}
2020-06-09 09:28:06.881 [TRACE] [fi.internal.api.cache.UniFiSiteCache] - Cache HIT : 'id:59448a82e4b07ca2c0c76ff9' -> UniFiSite{name: 'default', desc: 'Default'}
2020-06-09 09:28:06.881 [TRACE] [fi.internal.api.cache.UniFiSiteCache] - Cache HIT : 'id:59448a82e4b07ca2c0c76ff9' -> UniFiSite{name: 'default', desc: 'Default'}
2020-06-09 09:28:06.882 [WARN ] [.handler.UniFiControllerThingHandler] - Unhandled exception while refreshing the UniFi Controller unifi:controller:home - null

The code is swallowing the exception without printing a stack trace. Could we have a build that prints the stack track of that exception to help narrow down the cause?

@mgbowman I am having some strange behaviour with a device (my Android phone) on my network. If I disable the Wifi on my device, the binding reports the client offline as expected. However when I go to work and basically just leave the network, the binding continues to say the device is online. Unfi itself doesnt show the device in the current clients list, and in the Insights tab, the device is shown last seen many hours ago.

Is there something I can do to fix this behaviour?

Thanks in advance.

@broconne, @MossieNZ and everybody else…

I’m managing some IRL issues that prevent me from working on this project for at least the next 2-3 weeks. Unfortunately, this means that right now I cannot help you guys debug your issues.

I promise to reach out once the dust has settled.

All the best,
Matthew

3 Likes

Thanks for this great binding. I’ve just installed it using Paper UI. Sorry but I did not have the patience to read all previous 1070 posts in this thread, so I don’t know if this question was asked before.

I’m using the AP’s with several ssid’s, but when I’m on vacation I would like to disable some of these ssid’s. Are there plans to make this possible ?

Unfortunately this is not possible yet … it’s been on the roadmap for quite sometime but IRL tends to get in the way :man_shrugging:

As of today, I no longer have access to any UniFi equipment - I have to replace it all :frowning:

Once my situation improves and I get my hands on some UniFi gear, I will start working on the binding again I promise!

Should be no more than 2-3 weeks before I’m back in action.

All the best,
Matthew

2 Likes

Is there any news on the issue with items not refreshing/updating?

I did a the following items, but they just show NULL

Number Wifi_BensExperience 	"Experience: [%d%%]" 				{ channel="unifi:wirelessClient:home:bensPhone:experience" }
Number Wifi_GuestClients 	"Default Site: Guest Clients [%d]" 	{ channel="unifi:site:home:default:guestClients" }

besides that: is there any up to date documentation with all the things, channels etc? Because on https://www.openhab.org/addons/bindings/unifi/ I just see the wirelessclient thing and respective channels, e.g. not the Experience channel and the GuestClients topic.

Regards

@Fichte07 I recently had items not refreshing.

I renamed my things and items file for UniFi, restarted openHAB and renamed the things back, then items. It is currently working for about a week now.

1 Like

I’ve trawled through the whole thread because I was also confused.

It seems that the binding that comes with OpenHAB, and its documentation that you linked, is old. Lots of people on this thread are using much newer snapshot versions from https://jenkins.otr.mx/job/openhab2-unifi-binding/. The associated README is https://github.com/mgbowman/openhab-addons/blob/unifi-binding/bundles/org.openhab.binding.unifi/README.md

I’ve just installed build #132 and tried out the GuestClients from the example in the README, and it works great!

1 Like

Dear COlleagues,

I’m facing a issue regarding presence detection everytime openhab server is rebooted and the only way to solve it’s clean-cache, but I don’t wanna do it everytime. May you help me on get it solved? How to clean specific files for this binding? Os ir there any update on it?

openhab> bundle:list | grep -i unifi
276 | Active | 80 | 2.5.5 | openHAB Add-ons :: Bundles :: UniFi Binding

Can you give me a hint how to install the addon manually? i placed the .jar file in the addons folder, but i assume i need to run some addiitional commands etc…
thx

After placing into the add-ons folder, easiest is to restart openHAB itself…