UniFi binding (beta)

logo

UniFi beta binding

(Uninstall the official UniFi binding first if you want to install this beta version).

If you use this version of the binding do :heart: the UniFi binding topic on the openHAB community forum or for questions related to this version post your question in the topic.

Updates

4 Jan 2022

  • Added a new Thing: The Power over Ethernet Port: poePort
  • Added a new Thing: Wired Client: wiredClient
  • Added guest channel to wireless thing
  • Adds discovery of things

19 Feb 2022

  • Added a new Thing: WLAN
  • Added a new Thing: Site
  • Added Dutch translation

27 Feb 2022

  • Added experience channel to clients
  • Added cmd channel to reconnect as command channel to clients
  • Added cmd channel to power-cycle PoE port

3 March 2022

  • (wlan) Added count of clients: wirelessClients and guestClients channels.

20 March 2022

  • (wlan) Fix bug with wlan networks with no passphrase.

11 May 2022

  • (wlan) Renamed channel xPassphrase to passphrase.
  • (poePort) Renamed config parameter portIdx to portNumber

This change includes changes made by Matthew Bowman that he created on his own branch but were never completed.

Fixes:

  • Closes #9609: Implemented async http call, which should fix the buffer overflow.
  • Closes #10375: At least should avoid the stack overflow.
  • Closes #11964: Binding should search for sid case insensitive.

Resources

org.openhab.binding.unifi-3.3.0-SNAPSHOT.jar

Source code PR #11959

README

14 Likes

This l great! Does it also include the ability to see/detect connected Guests, like the unpublished OH2 version that Mr Bowman had?

No I’ve not added the site thing (yet). The site thing had a list of guests. But it’s also possible to add a channel to a client indicating if it’s a guest. Are you interested in the count or/and if a client is a guest?

I’m only interested in the count of devices connected to the Guest WiFi. And actually, I only care if the count is greater than zero: openHAB then puts the house into guest mode so the lights don’t suddenly switch off on the babysitter…!

3 Likes

Hi @hilbrand,
that sounds like you plan to add the site thing. If you do and if possible I would love to control my wifi over OH. Turn wifi off while I am away for example.
Kind regards

Yes, this seems like the use case that would interest me, too. This also fits the case where you have guests in your house but you are not home.

BTW, thanks @hilbrand for breathing life into this!!

Presumably this feature doesn’t enable us to work out if anyone is connected to a Guest wifi network? It only tells you if a specific connected IP address (preconfigured) is a guest?

Separately, is there any way that we can subscribe to the first post so that we get notified when new features are added?

No. That will be part of a new Site thing. That was in the original development branch, and I working to get that included. It will give the number of connected guests.

I’ll post a new message to this topic when I’ll update the binding. If you track this topic you then will be notified (but also for any other post to this topic)

Perfect, thanks!

I’ve updated the binding with the following changes:

  • A new Thing: Site
  • A new Thing: WLAN
  • Added Dutch translation
1 Like

Fantastic - I’ve just tried the guestClients Channel and it works as expected!

Thanks very much!

(Running Unifi controller version 6.5.55 & 7.0.23)

1 Like

Hi @hilbrand, thanks a lot for continuing work on this binding.

One question (not really to this specific binding): how do I update a marketplace binding as I have installed the previous version ?
UI only offers me to remove. Is that the official way to go (remove and then re-install) ?

TIA
-Markus

1 Like

Yes that is the way to go. Configuration is not affected if you remove and reinstall a binding. Only if thing types/channels have changed you need to recreate the thing to pick up the changed channels. But that is not the case with this binding update.

first of all, a huge THANK YOU for the effort and support here. Much appreciated.

I have a question for you :slight_smile:

is it possible to expose also the “experience” field? I remember there was in a unofficial release, so perhaps this is possible

thanks again
Andrea

Can you give some more information about this field? Which device? What data type?

1 Like

it was a number exposed from a unofficial release done by Matthew, the channel to receive that number was:

channel="unifi:wirelessClient:home:andreaPhone:experience"

If you enter in the Controller>Client Devices you should see it. It’s especially useful for Wireless Clients. I suppose this is a number that should represent the “experience” in terms of connectivity quality.

here the thread:

unfortunately in the following binding releases, that feature disappeared.

thanks
Andrea

1 Like

Update binding (27-02-2022) with:

  • Added cmd channel to power-cycle PoE port.
  • Added experience channel to clients
  • Added cmd channel to reconnect as command channel to clients

Note: if you had created the things in the UI (poePort or clients) with an older version of this binding you need to recreate the things to see the new channels.

4 Likes

Sorry for silly question, but I don’t remember how to check in which build will be included the latest features (27-02)

If you go to things management in main UI and click on + to add new things. It shows a list of bindings. There you can see the date appended to the binding name.

If you have installed this binding via community marketplace. Simply remove and reinstall and you have the latest version.

1 Like

it works like a charm :slight_smile: thank you!