UniFi binding beta [3.2.0;3.6.0)

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

Note: At this moment the marketplace binding doesn’t work on openHAB 4.0 due to changes in core. However, the version in openHAB 4.0 is the same as the market place version. Therefor no reason to use the marketplace version at this moment

30 Januari 2023 (available in 4.0.0.M1)

25 Januari 2023 (available in 4.0.0.M1)

  • Added channels name and hostname to client things.

19 Januari 2023 (available in 4.0.0.M1)

  • Fixed bug, causing nullpointer, in devices not reporting voltage/ampere values on PoE ports.
  • Added new addon.xml that is a replacement for binding.xml in 4.0.0 (binding.xml still present to be backward compatible)
  • Improved error logging for unhandled exceptions in controller.

13 Januari 2023 (available in 4.0.0.M1)

  • Improved handling of null values. Should avoid the binding from going offline.
  • Improved handing timeout exception. Should not stop the binding.
  • Improved handling case where server returns data, but it’s not from the api, and therefor can’t be parsed.
  • Improved adding additional text to the error messages by adding the reported exception message too.

21 December 2022 (available in 4.0.0.M1)

  • Fix to to handle additional port_override data for PoE ports when updating internal cache (caused a crash).
  • Fix typo in channel poeEnable option pas24

12 October 2022 (available in 3.4.0)

  • Fixed PoE port mode value for 24V.

30 September 2022 (available in 3.4.0.M3)

  • Fixed PoE port support for switches that have don’t have PoE support on all ports

28 September 2022

  • Set PoE port thing offline if no data about the port could be found.

6 September 2022 (available in 3.4.0.M2)

  • Fix for PoE port deleting additional port settings, like name, when changing port status in openHAB.

16 May 2022 (available in 3.3.0 M6)

  • Pull request merged. All changes mentioned before are available in milestone 3.3.0 M6. If you use that milestone or newer you can install the official binding. For older openHAB versions use this marketplace version.

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.

11 May 2022

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

20 March 2022

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

3 March 2022

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

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

19 Feb 2022

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

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

Resources

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

README

20 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!