I recently (finally) upgraded to OpenHAB 3.1 from 2.5.10 and finally decided to chase down an annoyance I have had with the UniFi binding. Please note this is not an OpenHAB 3 issue–I was actually having this problem in 2.5 as well but did not feel like spending time working on it.
Modern phones used randomized MAC addresses. This makes the MAC-based identification a nuisance. If I disable the random MAC on my phone then all of my OpenHAB instrumentation works great. Example working item:
Thing works fine, everything is great. If I change it to use a hostname (as displayed from the UniFi controller) or an alias I create on the UniFi controller the Thing will not work, e.g.:
I am going to leave this here for future reference rather than deleting it, but I believe my question was predicated on an incomplete understanding of what Apple was doing.
When I poked a bit more into the UniFi view (and enabled debugging on the UniFi binding) I discovered that in addition to the randomized MAC address, that security option also prevents any textual client-identifiers from being transmitted.
With randomization, the entry the UniFi controller comes purely as a MAC with no other identifying information.
I dunno about Apple, but android you can choose to enable/disable that PER wifi Network. I have it disabled for my home networks for this exact reason.
Yeah, there was a bit of windmill tilting going on here and a lot that I did not pay attention to. In the Apple ecosystem you can disable it per-SSID, which is a relatively convenient solution. It actually also looks like the randomized MAC address that Apple devices generate is salted with the SSID and is the same each time for a given WiFi network. So having the Thing entry simply set to the fake MAC appears to work long term… with a sample size of a few days and one device.
I’ll probably flip other family members over eventually. But yes, just disabling it for the home WiFi network is also a totally workable solution.
Rambling post about a nothing burger. My valuable community contribution.