Ubiquiti Unifi Binding Feature Discussion

check the openHAB console to see if the old version is still being listed:

openhab> bundle:list -s |grep unifi
190 │ Active   │  80 │ 2.3.0.201804221805     │ org.openhab.binding.unifi

Only 1 line should appear

Make sure that you have removed the old jar from:

root@homer:~# l /usr/share/openhab2/addons/org.openhab.binding.unifi-2.3.0-SNAPSHOT.jar 
-rw-r--r-- 1 openhab openhab 39055 21:06 22-Apr-2018 /usr/share/openhab2/addons/org.openhab.binding.unifi-2.3.0-SNAPSHOT.jar

Stop OH2, clear cache & tmp folders

Start OH2

It should work :slight_smile:

Ps: Using build #10 from https://jenkins.otr.mx/job/openhab2-unifi-binding-v2/

Both are listet: :face_with_raised_eyebrow:

openhab> bundle:list -s |grep unifi
 27 │ Active    │  80 │ 2.3.0.201804221805     │ org.openhab.binding.unifi
239 │ Installed │  80 │ 2.2.0.201709191042     │ org.openhab.binding.unifi
openhab>

How to remove the old one?

And second - Why the heck does this happen?

make sure that you don’t have 2 jars in addons and clear tmp + cache
if it still appears: try bundle:uninstall 239 (or something similar… i can’t check atm)

I renamed version 2.2.0.jar in the addons folder, (renamed it´s extention to .old), and afterwards cleared the cache/tmp folders. This is where my problems started in the first place. Is renaming not enough?

I can however give it another go, and delete the version 2.2.0 first. I just wonder why rename it´s extension shouldn´t work.

Gave it a new try. (actually 2 tries as the first try gave me problems again with 2.3.0 failing to load).
Second try I downloaded a fresh copy of the jar file (build 10). Cleared the cache/tmp again, and started Openhab service…

Now I don´t get any errors. 2.3.0 loads fine, and no errors about 2.2.0 not beeing found. (Guess it´s gone for good now).

So I guess everything is fine now… Thx for you´r help.

1 Like

Does this binding oly show devices attached to APs, or also other fix LAN devices if they have a valid mac address?

I tried it with two lan devices that the controller can see and it didn’t seem to trigger an online status

I tried as well. Same result as yours.
I guess it would only work for wireless devices. I do not see why though.

No neither. Though I remember playing with the Unifi API and it allowed you to cycle through all the connected devices on an AP…but there is an overall client list, as I use it for feeding an influxdb with data usage per device.

Hi,
this thread has grown to 368 posts. For someone just joining in this is a lot to read. Is there a documentation of how to set up and use the binding? Maybe even for manual setup?
Thanks in advance!
Alex

Here’s a link to the documentation that is part of the latest revision of the binding.

1 Like

Thanks! That’s what I was looking for.
Now I somehow need to get the lastSeen on the sitemap to show in the local timezone… :slight_smile:

EDIT: Solved timezone issue. I needed to add the timezone to the EXTRA_JAVA_OPTS. Setting it under “System” in PaperUI was not enough. I know this is not a UniFi Binding issue, but a OpenHAB2 one…

EDIT2: @mgbowman Maybe the link to the documentation can be added to the first post?

Great job on this!

It took me 1/2 hour and I was up and running with it using Synology NAS with OH2.3.

My only suggestion would be to report the THINGS as being offline when controller HTTP port is down. In the log file it’s just giving a HTTP error of 503 and the THINGS are still online.

Best, Jay

Guys,

receiving this log:

2018-06-21 12:00:31.760 [WARN ] [.handler.UniFiControllerThingHandler] - Unhandled exception while refreshing the UniFi Controller unifi:controller:7846a3b1 - java.net.SocketTimeoutException: Connect Timeout
2018-06-21 12:03:56.160 [WARN ] [.handler.UniFiControllerThingHandler] - Unhandled exception while refreshing the UniFi Controller unifi:controller:7846a3b1 - Unknown HTTP status code 503 returned by the controller
2018-06-21 13:36:56.608 [WARN ] [.handler.UniFiControllerThingHandler] - Unhandled exception while refreshing the UniFi Controller unifi:controller:7846a3b1 - Not a JSON Object: null
2018-06-21 15:56:00.532 [WARN ] [.handler.UniFiControllerThingHandler] - Unhandled exception while refreshing the UniFi Controller unifi:controller:7846a3b1 - Not a JSON Object: null
2018-06-21 16:22:14.251 [WARN ] [.handler.UniFiControllerThingHandler] - Unhandled exception while refreshing the UniFi Controller unifi:controller:7846a3b1 - Not a JSON Object: null

version 2.3.0.201804221805

Any clue?

thanks
Andrea

Hello again,

now that I have the presence part working, I’m already starting with a feature request :slight_smile:
It would be great if one could not only read info about clients, but also do changes in the controller. I would like to enable and disable the guest network.

Cheers
Alex

See post above yours: the binding cannot reach the controller.

  • Is the IP and port set up correctly?
  • Can you reach that IP:port from the system where Openhab is installed (use telnet, netcat, or socat from the command line)
1 Like

Hi :slight_smile:

I’ve just installed my first Ubiquiti access point, and would like to start playing with the binding. I’m running 2.4.0 build 1314 and can’t find it in the list of bindings. What do I need to do to get it installed and start playing?

Cheers!

download the jar from here: https://jenkins.otr.mx/job/openhab2-unifi-binding-v2/
and deploy it in the addons folder

1 Like

Thanks - copied it to my addons folder and within a couple of minutes had all my mobile devices set up - and presence detection working the best it ever has! No more network binding for me!

1 Like

@mgbowman

Several times I’ve seen this in my logs.

2018-07-24 13:48:12.671 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler UniFiControllerThingHandler tried updating the thing status although the handler was already disposed.
2018-07-24 13:48:23.672 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler UniFiControllerThingHandler tried updating the thing status although the handler was already disposed.
2018-07-24 13:48:34.672 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler UniFiControllerThingHandler tried updating the thing status although the handler was already disposed.
2018-07-24 13:48:45.673 [WARN ] [.core.thing.binding.BaseThingHandler] - Handler UniFiControllerThingHandler tried updating the thing status although the handler was already disposed.

These messages begin whan openHAB is started, and continue every Refresh Interval even after stopping the binding. The only way I’ve found to resolve this is to restart openHAB.

I’m running this version of the binding, which admittedly is not the most current version. Let me know if you think this might be resolved in a more recent version.

2.3.0.201804210948

Edit: It’s coming from here in BaseThingHandler.

Same problem here with the weatherunderground binding, after the last update