I’ve tried removing my controller and found the binding in resolved state to gave it a restart. Then I was able to see the binding config - couldn’t see a site in there, so tried adding the controller again. Now I see to be in some sort of mess where i can’t see the binding config anywhere.

I am currently running:
openHAB 2.2.0 Snapshot Build #1028 on a Debian Jessie with Oracle’s JVM 8u144 with 2.1.0.201706081307 org.openhab.binding.unifi and Unifi Controller version 5.5.19 (need to up to 5.5.20)

the binding works fine on this latest release. I never had problems with it since I started using it.

@psyciknz: what is your opinion on changing the channel type for the Online channel from Switch to Contact? (I am in favor since it is a “read only” setting)

@psyciknz sorry for the confusion, as @Dim said, the site parameter was moved to the Thing. Glad to hear the 2.2.0-SNAPSHOT is working.

@Dim Those builds were coming from my rebase / squash commits I was pushing last night - automation ftw!

I will put together a Contact variant today and push it - probably as a new branch. Should be pretty straight forward but it will break existing configs so I would like to see some testing in the wild before I open a PR.

This binding is used by me for presence detection (one of many possible uses)…

and it is (by far) the best presence detection solution that I have used so far (and I have tried several )

Agreed

The fact most phones keep the wireless association - therefore visible in the UniFi controller - make this a much more reliable presence detection solution than any other “network monitoring” or GPS (read: battery drain) approach out there.

The only (minor) drawback is the delay introduced by the controller in marking a client as away. This could be fixed in the binding but it would take a bit of rework as the binding was designed to be stateless (as it should be).

I have a problem with this one.
I downloaded the jar, placed it in the addon folder, but nothing happens. Cant see the binding anywhere?? What went wrong?
I assume it´s suppose to go into usr/share/openhab2/addons/ ??

The fact most phones keep the wireless association - therefore visible in the UniFi controller - make this a much more reliable presence detection solution than any other “network monitoring” or GPS (read: battery drain) approach out there.

The only (minor) drawback is the delay introduced by the controller in marking a client as away. This could be fixed in the binding but it would take a bit of rework as the binding was designed to be stateless (as it should be).

Agreement here as well.

I was originally planning on needing to rely on an aggregate of several sensors to get reliable data, but so far there doesn’t seem to be a need. Admittedly I haven’t started to actually use the presence data for anything, but I have never seen it be inaccurate.
Any way in which it might fail, other methods are just as, if not more, susceptible to. Wifi being turned off, device left behind, etc.

Reducing the time for reporting as away would be a nice improvement for future versions. As it stands now though this binding is pretty sweet.

For now, I’m leaving the binding purely stateless. We will just have to live with the delay introduced by the controller when it comes to marking a client as absent. Maybe in the future I will find a simple way to support some kind of binding specific timeout.

Looking forward to feedback.

PointandClick:

Admittedly I haven’t started to actually use the presence data for anything, …

I can give you one of my use cases that may switch on a lightbulb (no pun intended… ok maybe a little)

I track my wife and I’s iPhones. I have a “It’s Bedtime” scene that is trigged when the living room’s harmony switches off in the evening. All the lights along the path to the bedroom dim up and both of our bedside table lamps turn on.

When both bedside table lamps turn off, this means “we’re in bed” and all the lights in the house turn off.

What does this have to do with presence detection?

My wife travels a lot for work so when she’s not home, her bedside lamp doesn’t come on - I only have to turn mine off. I got annoyed having to roll over every night and turn hers off whenever she was away. Am I lazy? Yes, yes I am!