Ubiquiti Unifi Binding Feature Discussion

I would find it useful if this binding would work with wired clients as well. Then it would be a one stop shop for all things connected vice using this with the network binding. Thanks for all the work thus far.

Enjoy your vacation, you have more than earned it :smile:

That was actually what I asked about five post before this one. Matthew wrote on 18. December that he introduced the thing type ā€œwirelessClientā€ in preparation of supporting wired ones as well.

Hi All

Is there a way I can speed up the Mobile phone detection? Right now it takes quite a few miniutes to determine if a phone is online or offline.

Im using it for presence

Cheers!

Most of the time for online detection is in the Unifi Controller, so thereā€™s little you can do about that other than lower the refresh interval of the binding (which already is pretty low at 10 seconds).

For offline detection, you can lower the Consider Home Interval of the client, but you run the risk of false positives (or would they better be called false negatives) if you set it too low.

Thanks Mark, so basically I should leave it as it is :smiley: hahaha

You can try tweaking the considerHome parameter, but as @mhilbush said, setting it too low can result in false positives.

See the README for more

1 Like

With OH 2.4 stable unifi binding

The only channels that are being updated are AP, Lastseen and RSSI. The other channels are just silent.

No errors appear in the logs.
DId I miss something or do something wrong?
Update:
Again, I dunno why, but the other channels came back again.

sorry , but which binding is the JS xform? JSONpath?

Javascript

hmm. that binding is already installed. but my item in the Paper UI still just shows a switch at on position

If the item is defined as a Number, it shouldnā€™t show as a switch. Check that the item definition is of type Number, and then define it as a Text widget in the sitemap.

Sorry, its not a switch . What I meant to say is that even with Java Transformation for the uptime, I still see only seconds in Paper UI.

Its the unifi.map transformation that does not seem to be doing anything . It still shows presence as on or off switch

I donā€™t understand what this has to do with displaying the duration.

No, its 2 seperate things.
I was under the impression the unifi.map transformation , changes my on/off switch to present or away. I do not see any difference in my paper UI with the unifi.map edit.

As the seconds conversion, I was trying to achieve who is listed in post #693

What do you see in the sitemap? Iā€™m not sure if Paper UI handles map transformations.

Same with this. What do you see in the sitemap?

Iā€™ve removed the jar file, made sure the bundle isnā€™t listed in the command line and then installed the 2.4.0 binding through paper UI. I then updated the .items to match the new format (wirelessClient and cid)

Iā€™ve then gone through my things and items but canā€™t get anything returned. If I query smarthome:items list I donā€™t see any unifi items.

Config is:

Bridge unifi:controller:home "UniFi Controller" [ host="192.168.10.255", port=8443, username="my@email.com", password="abc123", refresh=10 ] {
        Thing wirelessClient robsPhone          "Rob's Phone"           [ cid="cc:9f:7a:ab:xx:yy", considerHome=180 ]
        Thing wirelessClient helensPhone        "Helen's Phone"         [ cid="64:a2:f9:4c:xx:yy", considerHome=180 ]
}

Is there anything obvious Iā€™ve missed?

One possible thoughtā€¦ If thereā€™s a syntax error in the .items file, the items wonā€™t be loaded. Do you see anything logged in openhab.log when you save the .items file? How about when you save the .things file?

What do you see in the console when you query the things?

smarthome:things list | grep unifi

Both the .items and .things refresh fine in openhab.log.

I got my things and items confused last night.

smarthome:things list | grep unifi is empty
smarthome:items list | grep Rob returns the following:

RobsPhone (Type=SwitchItem, State=NULL, Label=Rob's Phone, Category=null)
RobsPhoneSite (Type=StringItem, State=NULL, Label=Rob's Phone: Site, Category=null)
RobsPhoneESSID (Type=StringItem, State=NULL, Label=Rob's Phone: ESSID, Category=null)
RobsPhoneUptime (Type=NumberItem, State=NULL, Label=Rob's Phone: Uptime, Category=null)
RobsPhoneRSSI (Type=NumberItem, State=NULL, Label=Rob's Phone: RSSI, Category=null)
RobsPhoneAP (Type=StringItem, State=NULL, Label=Rob's Phone: AP, Category=null)
RobsPhoneLastSeen (Type=DateTimeItem, State=NULL, Label=Rob's Phone: Last Seen, Category=null)

Hmm. Do you see the Unifi things in Paper UI?