UniFi binding beta [3.2.0;3.6.0)

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!

Another question. What is the right input for the poePort portIdx value? I’ve tried “gi2”, as my USW-16-PoE is reporting, but I receive the message

2022-02-28 14:10:35.332 [WARN ] [penhab.core.config.core.ConfigParser] - Could not set field value for field 'portIdx': For input string: "gi2"
java.lang.NumberFormatException: For input string: "gi2"
	at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) ~[?:?]
	at java.lang.Integer.parseInt(Integer.java:652) ~[?:?]
	at java.lang.Integer.valueOf(Integer.java:983) ~[?:?]
	at org.openhab.core.config.core.ConfigParser.valueAs(ConfigParser.java:215) ~[bundleFile:?]
	at org.openhab.core.config.core.ConfigParser.configurationAs(ConfigParser.java:128) [bundleFile:?]
	at org.openhab.core.config.core.Configuration.as(Configuration.java:79) [bundleFile:?]
	at org.openhab.core.thing.binding.BaseThingHandler.getConfigAs(BaseThingHandler.java:219) [bundleFile:?]
	at org.openhab.binding.unifi.internal.handler.UniFiBaseThingHandler.initialize(UniFiBaseThingHandler.java:66) [bundleFile:?]
	at org.openhab.core.thing.binding.BaseThingHandler.thingUpdated(BaseThingHandler.java:153) [bundleFile:?]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
	at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
	at org.openhab.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:154) [bundleFile:?]
	at org.openhab.core.internal.common.Invocation.call(Invocation.java:52) [bundleFile:?]
	at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
	at java.lang.Thread.run(Thread.java:834) [?:?]

Any clue?
Andrea

For the device I have it’s a number. Can you use openHAB discovery to find the ports and if you add such a port does it work? or does it also give the same error? In the later case it could be the port_idx is sometimes a number and sometimes a string. If that would be the case the binding needs to be fixed to handle strings.

It seems the number is working (so, we can say that this is not related to the config itself, as it should be “gi2”).

for enabling/disabling a port, you should use the channel “enable” right? what is the channel “cmd” goal?

thanks again
Andrea

See the link to the readme in the first post in this topic.

After first try, everything’s working as expected.

But unfortunately, enable/disable a ssid triggers also a reprovisioning, and that is not fitting my use case. I would like instead to find a way to trigger a firewall rule with a switch … not sure if this is possible via rest-api, investigating

edit: perhaps I can use the “blocked” field … after 2 hours eg I can block the clients in the wlan for kids, instead of disabling the entire wlan

Andrea

@hilbrand Really love this update and the opportunity to test this beta version that offers a lot more functionallity than the old binding.

In my network setup a cloud key G2+ runs the network application. While setting up the bridge i had to switch the port from 8443 to 443.

Maybe that is an information that helps someone.

2 Likes

Perhaps I’ve missed, but

Any chance to see if there are users connected via VPN?

Andrea

It’s not available in the binding. Do you know where this can be seen in the data reported by the UniFi controller?

My guess is that it’s only reported by the Controller when you have a USG device in your network, as that’s the device that handles VPN connections.

@ariela Do you have a USG?

correct. but it should be configurable also in UDM Pro: