Ubiquiti Unifi Binding Feature Discussion

thank you Matthew,
here is the bundle version (2.4.0 - jar file in addons folder, 2.5.0 - comes with openHAB 2.5.0~S1554-1 (Build #1554))

openhab> bundle:list | grep UniFi
256 │ Active │  80 │ 2.4.0.201812081314    │ UniFi Binding

openhab> bundle:list | grep UniFi
257 │ Active │  80 │ 2.5.0.201903112315    │ UniFi Binding

The snapshot version of the binding is just what’s in master. My jenkins build server is building the “development” version from my repo.

Can you try installing build #100? org.openhab.binding.unifi-2.5.0-SNAPSHOT.jar

bad news, it does not work at all. As if all things are online (bridge and phones) but no data is downloaded from the UniFi controller. When I change the file from version 2.5.0 to 2.4.0 everything reacts immediately. I do not understand it completely :confused:

I’m sorry to hear that… I will try upgrading to the snapshot you’re running and see if I can reproduce your issue. It will be over the weekend as I’m quite busy with my house - I’m installing the last electrical panel tomorrow!

Matthew, thank you very much for your help and sincerely appreciate.

I’m sorry @porthos but I can’t reproduce your issue.

Here’s what I did…

systemctl stop openhab2
openhab-cli clean-cache
vi /etc/apt/sources.list.d/openhab2.list # disabled "Testing" / enabled "Snapshot"
apt-get update
apt-get install openhab2 # upgraded 2.5.0~M1-1 to 2.5.0~S1555-1
systemctl start openhab2
ssh openhab2
openhab> bundle:install https://jenkins.otr.mx/job/openhab2-unifi-binding/100/artifact/addons/binding/org.openhab.binding.unifi/target/org.openhab.binding.unifi-2.5.0-SNAPSHOT.jar
Bundle ID: 206
openhab> bundle:start 206

And here are my results…

bendie:~ mgbowman$ ssh openhab2

                          __  _____    ____
  ____  ____  ___  ____  / / / /   |  / __ )
 / __ \/ __ \/ _ \/ __ \/ /_/ / /| | / __  |
/ /_/ / /_/ /  __/ / / / __  / ___ |/ /_/ /
\____/ .___/\___/_/ /_/_/ /_/_/  |_/_____/
    /_/                        2.5.0-SNAPSHOT
                               Build #1555

openhab> bundle:list | grep -i unifi
206 │ Active │  80 │ 2.5.0.201903111759    │ UniFi Binding 

/var/log/openhab2/openhab.log

2019-03-15 17:14:35.544 [DEBUG] [org.openhab.binding.unifi           ] - BundleEvent INSTALLED - org.openhab.binding.unifi
2019-03-15 17:14:45.758 [DEBUG] [org.openhab.binding.unifi           ] - BundleEvent RESOLVED - org.openhab.binding.unifi
2019-03-15 17:14:45.760 [DEBUG] [org.openhab.binding.unifi           ] - BundleEvent STARTING - org.openhab.binding.unifi
2019-03-15 17:14:45.761 [DEBUG] [org.openhab.binding.unifi           ] - BundleEvent STARTED - org.openhab.binding.unifi
2019-03-15 17:14:45.773 [DEBUG] [fi.internal.UniFiThingHandlerFactory] - Registering Trust Manager Provider : UniFiTrustManagerProvider{peer: 'UniFi'}
2019-03-15 17:14:45.780 [DEBUG] [org.openhab.binding.unifi           ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.core.thing.binding.ThingHandlerFactory}={service.id=339, service.bundleid=206, service.scope=bundle, component.name=org.openhab.binding.unifi.internal.UniFiThingHandlerFactory, component.id=188} - org.openhab.binding.unifi
2019-03-15 17:14:45.897 [DEBUG] [.handler.UniFiControllerThingHandler] - Initializing the UniFi Controller Handler with config = UniFiControllerConfig{host = unifi, port = 8443, username = operator, password = *****, refresh = 10}
2019-03-15 17:14:45.897 [DEBUG] [.handler.UniFiControllerThingHandler] - Registering Trust Manager Provider : UniFiTrustManagerProvider{peer: 'unifi:8443'}
2019-03-15 17:14:46.291 [DEBUG] [.handler.UniFiControllerThingHandler] - Scheduling refresh job every 10s
2019-03-15 17:14:46.299 [DEBUG] [.handler.UniFiControllerThingHandler] - Refreshing the UniFi Controller unifi:controller:home

/var/log/openhab2/events.log

2019-03-15 17:14:45.875 [hingStatusInfoChangedEvent] - 'unifi:controller:home' changed from UNINITIALIZED to INITIALIZING
2019-03-15 17:14:46.309 [hingStatusInfoChangedEvent] - 'unifi:controller:home' changed from INITIALIZING to ONLINE
2019-03-15 17:14:46.310 [hingStatusInfoChangedEvent] - 'unifi:wirelessClient:home:matthewsPhone' changed from UNINITIALIZED to INITIALIZING
2019-03-15 17:14:46.327 [hingStatusInfoChangedEvent] - 'unifi:wirelessClient:home:matthewsPhone' changed from INITIALIZING to ONLINE
2019-03-15 17:14:46.482 [vent.ItemStateChangedEvent] - MatthewsPhone changed from NULL to ON
2019-03-15 17:14:46.488 [vent.ItemStateChangedEvent] - MatthewsPhoneSite changed from NULL to Home
2019-03-15 17:14:46.488 [vent.ItemStateChangedEvent] - MatthewsPhoneUptime changed from NULL to 3956
2019-03-15 17:14:46.502 [vent.ItemStateChangedEvent] - MatthewsPhoneAP changed from NULL to Living Room
2019-03-15 17:14:46.507 [vent.ItemStateChangedEvent] - MatthewsPhoneRSSI changed from NULL to 41
2019-03-15 17:14:46.508 [vent.ItemStateChangedEvent] - MatthewsPhoneESSID changed from NULL to Home
2019-03-15 17:14:46.508 [vent.ItemStateChangedEvent] - MatthewsPhoneLastSeen changed from NULL to 2019-03-15T17:14:42.000+0200
2019-03-15 17:14:56.539 [vent.ItemStateChangedEvent] - MatthewsPhoneUptime changed from 3956 to 3970
2019-03-15 17:14:56.539 [vent.ItemStateChangedEvent] - MatthewsPhoneLastSeen changed from 2019-03-15T17:14:42.000+0200 to 2019-03-15T17:14:56.000+0200

I would try this…

  1. Remove any UniFi binding version you manually copied to the addons folder
  2. Uninstall any UniFi binding version you installed via PaperUI
  3. Stop OH2
  4. Clear the Cache
  5. Start OH2
  6. Install & start build #100 as I did above via the OH2 console

Good luck!

Hey guys, anybody else other than @porthos having any issues with build #100?

I’d like to open a PR with the changes I’ve made so far.

have the same issue


                          __  _____    ____
  ____  ____  ___  ____  / / / /   |  / __ )
 / __ \/ __ \/ _ \/ __ \/ /_/ / /| | / __  |
/ /_/ / /_/ /  __/ / / / __  / ___ |/ /_/ /
\____/ .___/\___/_/ /_/_/ /_/_/  |_/_____/
    /_/                        2.5.0-SNAPSHOT
                               Build #1557

Hit '<tab>' for a list of available commands
and '[cmd] --help' for help on a specific command.
Hit '<ctrl-d>' or type 'system:shutdown' or 'logout' to shutdown openHAB.
                                                                                                                                                                                                                     openhab> bundle:list|grep unifi
openhab> bundle:list|grep -i unifi
232 x Active x  80 x 2.5.0.201903170725    x UniFi Binding
openhab>

That’s not build #100

Should be 2.5.0.201903111759

I have downgraded now but still no communication with the controller


  ____  ____  ___  ____  / / / /   |  / __ )
 / __ \/ __ \/ _ \/ __ \/ /_/ / /| | / __  |
/ /_/ / /_/ /  __/ / / / __  / ___ |/ /_/ /
\____/ .___/\___/_/ /_/_/ /_/_/  |_/_____/
    /_/                        2.5.0-SNAPSHOT
                               Build #1555

Hit '<tab>' for a list of available commands
and '[cmd] --help' for help on a specific command.
Hit '<ctrl-d>' or type 'system:shutdown' or 'logout' to shutdown openHAB.

openhab> bundle:list|grep -i unifi
263 x Active x  80 x 2.5.0.201903111759    x UniFi Binding
openhab>

Bridge  unifi:controller:home "UniFi Controller" [ host="192.168.0.5", port=8444, username="openhab", password="habopen", refresh=10 ] {
	Thing wirelessClient ThomasHandy "HandyThomas" [ cid="Handy Thomas", site="default", considerHome=180 ]
	Thing wirelessClient JuttaHandy "Handy Jutta" [ cid="Handy Jutta", site="default", considerHome=180 ]
	Thing wirelessClient FlorianHandy "Handy Florian" [ cid="Handy Florian", site="default", considerHome=180 ]
	Thing wirelessClient RonjaHandy "Handy Ronja" [ cid="Handy Ronja", site="default", considerHome=180 ]	
	Thing wirelessClient JonathanHandy "Handy Jonathan" [ cid="Handy Jonathan", site="default", considerHome=180 ]
	Thing wirelessClient EmelieHandy "Handy Emelie" [ cid="Handy Emelie", site="default", considerHome=180 ]
	Thing wirelessClient DaniHandy "Handy Dani" [ cid="Handy Dani", site="default", considerHome=180 ]
	Thing wirelessClient MarkusHandy "Handy Markus" [ cid="Handy Markus", site="default", considerHome=180 ]
	Thing wirelessClient MarlonHandy "Handy Marlon" [ cid="Handy Marlon", site="default", considerHome=180 ]
	Thing wirelessClient EricHandy "Handy Eric" [ cid="Handy Eric", site="default", considerHome=180 ]
	Thing wirelessClient TraudelHandy "Handy Traudel" [ cid="Handy Traudel", site="default", considerHome=180 ]
}
Switch   ThomasHandy           "Thomas  [MAP(unifi.map):%s]"          		(fritzbox,Anwesenheit_Thomas)     	{ channel="unifi:wirelessClient:home:ThomasHandy:online" }
Switch   JuttaHandy           	"Jutta  [MAP(unifi.map):%s]"          		(fritzbox,Anwesenheit_Thomas)     	{ channel="unifi:wirelessClient:home:JuttaHandy:online" }
Switch   FlorianHandy          "Florian  [MAP(unifi.map):%s]"          		(fritzbox,Anwesenheit_Thomas)     	{ channel="unifi:wirelessClient:home:FlorianHandy:online" }
Switch   JonathanHandy         "Jonathan  [MAP(unifi.map):%s]"          	(fritzbox,Anwesenheit_Thomas)     	{ channel="unifi:wirelessClient:home:JonathanHandy:online" }
Switch   EmelieHandy           "Emelie  [MAP(unifi.map):%s]"          		(fritzbox,Anwesenheit_Thomas)     	{ channel="unifi:wirelessClient:home:EmelieHandy:online" }
Switch   RonjaHandy           	"Ronja  [MAP(unifi.map):%s]"          		(fritzbox,Anwesenheit_Thomas)     	{ channel="unifi:wirelessClient:home:RonjaHandy:online" }

Switch   DaniHandy           	"Dani  [MAP(unifi.map):%s]"          		(fritzbox)     						{ channel="unifi:wirelessClient:home:DaniHandy:online" }
Switch   MarkusHandy           "Markus  [MAP(unifi.map):%s]"          		(fritzbox)     						{ channel="unifi:wirelessClient:home:MarkusHandy:online" }
Switch   MarlonHandy           "Marlon  [MAP(unifi.map):%s]"          		(fritzbox)     						{ channel="unifi:wirelessClient:home:MarlonHandy:online" }
Switch   EricHandy           	"Eric  [MAP(unifi.map):%s]"          		(fritzbox)     						{ channel="unifi:wirelessClient:home:EricHandy:online" }
Switch   TraudelHandy          "Traudel  [MAP(unifi.map):%s]"          		(fritzbox)     						{ channel="unifi:wirelessClient:home:TraudelHandy:online" }
1 Like

@porthos and @4u2fast does the controller show ONLINE in the PaperUI?

If it does, then it should have at least logged in to the controller which means it’s not a “trust” issue. Can you two enable DEBUG logging so that we can dig further and figure out what’s going on?

Yes, it shows online
i have added Debug lines and restarted OH but nothing in the logs
unifi.json is created but empty

Yes, it does. The controller and phones(things) are online. When I use 2.4.0 jar file everything works with no issues.

The unifi.json logging code was removed as there wasn’t much interest :frowning:

To enable DEBUG to the openhab.log file, just add the following to your logging config file /var/lib/openhab2/etc/org.ops4j.pax.logging.cfg

log4j2.logger.unifi.name = org.openhab.binding.unifi
log4j2.logger.unifi.level = DEBUG

After this, restart OH2 and you should see DEBUG level statements in /var/log/openhab2/openhab.log similar to this:

2019-03-15 17:14:35.544 [DEBUG] [org.openhab.binding.unifi           ] - BundleEvent INSTALLED - org.openhab.binding.unifi
2019-03-15 17:14:45.758 [DEBUG] [org.openhab.binding.unifi           ] - BundleEvent RESOLVED - org.openhab.binding.unifi
2019-03-15 17:14:45.760 [DEBUG] [org.openhab.binding.unifi           ] - BundleEvent STARTING - org.openhab.binding.unifi
2019-03-15 17:14:45.761 [DEBUG] [org.openhab.binding.unifi           ] - BundleEvent STARTED - org.openhab.binding.unifi
2019-03-15 17:14:45.773 [DEBUG] [fi.internal.UniFiThingHandlerFactory] - Registering Trust Manager Provider : UniFiTrustManagerProvider{peer: 'UniFi'}
2019-03-15 17:14:45.780 [DEBUG] [org.openhab.binding.unifi           ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.core.thing.binding.ThingHandlerFactory}={service.id=339, service.bundleid=206, service.scope=bundle, component.name=org.openhab.binding.unifi.internal.UniFiThingHandlerFactory, component.id=188} - org.openhab.binding.unifi
2019-03-15 17:14:45.897 [DEBUG] [.handler.UniFiControllerThingHandler] - Initializing the UniFi Controller Handler with config = UniFiControllerConfig{host = unifi, port = 8443, username = operator, password = *****, refresh = 10}
2019-03-15 17:14:45.897 [DEBUG] [.handler.UniFiControllerThingHandler] - Registering Trust Manager Provider : UniFiTrustManagerProvider{peer: 'unifi:8443'}
2019-03-15 17:14:46.291 [DEBUG] [.handler.UniFiControllerThingHandler] - Scheduling refresh job every 10s
2019-03-15 17:14:46.299 [DEBUG] [.handler.UniFiControllerThingHandler] - Refreshing the UniFi Controller unifi:controller:home

If everything is showing as ONLINE, I’m wondering if the refresh task is somehow not getting scheduled. This is the key logging statement here:

Scheduling refresh job every 10s

Let me know how you both manage. We will fix this!

ok, here the debug, please let me know how to fix the could not find matching client
thanks
Thomas


 - UniFiSite{name: 'default', desc: 'default'}

2019-03-21 07:47:58.189 [DEBUG] [i.internal.api.model.UniFiController] - Found 6 UniFi Device(s): 

 - UniFiDevice{mac: 'fc:ec:da:d3:19:ad', name: 'Security Gateway', model: 'UGW3', site: UniFiSite{name: 'default', desc: 'default'}}

 - UniFiDevice{mac: '80:2a:a8:c6:06:97', name: 'AP-Wohnzimmer', model: 'U7LR', site: UniFiSite{name: 'default', desc: 'default'}}

 - UniFiDevice{mac: 'fc:ec:da:10:5c:8f', name: 'AP-Florian', model: 'U7LR', site: UniFiSite{name: 'default', desc: 'default'}}

 - UniFiDevice{mac: 'b4:fb:e4:f6:2d:19', name: 'AP-Markus', model: 'U7LR', site: UniFiSite{name: 'default', desc: 'default'}}

 - UniFiDevice{mac: '80:2a:a8:19:86:0b', name: 'AP-Dachboden', model: 'U7LT', site: UniFiSite{name: 'default', desc: 'default'}}

 - UniFiDevice{mac: 'f0:9f:c2:1a:2f:47', name: 'Switch-Wäschekeller', model: 'US8', site: UniFiSite{name: 'default', desc: 'default'}}

2019-03-21 07:47:58.229 [DEBUG] [i.internal.api.model.UniFiController] - Found 35 UniFi Client(s): 

 - UniFiClient{mac: 'b4:f7:a1:e8:35:d7', ip: '192.168.0.155', hostname: 'null', alias: 'handy jonathan', wired: false, device: UniFiDevice{mac: '80:2a:a8:c6:06:97', name: 'AP-Wohnzimmer', model: 'U7LR', site: UniFiSite{name: 'default', desc: 'default'}}, guest: false, blocked: false}

 - UniFiClient{mac: 'b0:d5:cc:28:a7:b2', ip: '192.168.0.178', hostname: 'null', alias: 'staubsauger', wired: false, device: UniFiDevice{mac: 'b4:fb:e4:f6:2d:19', name: 'AP-Markus', model: 'U7LR', site: UniFiSite{name: 'default', desc: 'default'}}, guest: false, blocked: false}

 - UniFiClient{mac: 'c0:f4:e6:65:f9:37', ip: '192.168.0.195', hostname: 'huawei_p20-412dae1e3eb1d9', alias: 'handy dani', wired: false, device: UniFiDevice{mac: 'b4:fb:e4:f6:2d:19', name: 'AP-Markus', model: 'U7LR', site: UniFiSite{name: 'default', desc: 'default'}}, guest: false, blocked: false}

 - UniFiClient{mac: '8c:dc:d4:5c:2b:10', ip: '192.168.0.175', hostname: 'npi5c2b10', alias: 'hp laserjet thomas', wired: true, device: UniFiDevice{mac: 'f0:9f:c2:1a:2f:47', name: 'Switch-Wäschekeller', model: 'US8', site: UniFiSite{name: 'default', desc: 'default'}}, guest: false, blocked: false}

 - UniFiClient{mac: '90:2b:34:34:84:7f', ip: '192.168.0.30', hostname: 'minint-erjlp7d', alias: 'pc thomas', wired: true, device: UniFiDevice{mac: 'f0:9f:c2:1a:2f:47', name: 'Switch-Wäschekeller', model: 'US8', site: UniFiSite{name: 'default', desc: 'default'}}, guest: false, blocked: false}

 - UniFiClient{mac: '00:05:cd:ed:9a:18', ip: '192.168.0.70', hostname: 'marantz-sr7012', alias: 'verstärker thomas wohnzimmer', wired: true, device: UniFiDevice{mac: 'f0:9f:c2:1a:2f:47', name: 'Switch-Wäschekeller', model: 'US8', site: UniFiSite{name: 'default', desc: 'default'}}, guest: false, blocked: false}

 - UniFiClient{mac: 'ac:5f:3e:fd:54:1e', ip: '192.168.0.176', hostname: 'galaxy-s6', alias: 'handy marlon', wired: false, device: UniFiDevice{mac: 'b4:fb:e4:f6:2d:19', name: 'AP-Markus', model: 'U7LR', site: UniFiSite{name: 'default', desc: 'default'}}, guest: false, blocked: false}

 - UniFiClient{mac: 'b8:27:eb:1f:cb:8c', ip: '192.168.0.16', hostname: 'ambilight', alias: 'null', wired: false, device: UniFiDevice{mac: '80:2a:a8:c6:06:97', name: 'AP-Wohnzimmer', model: 'U7LR', site: UniFiSite{name: 'default', desc: 'default'}}, guest: false, blocked: false}

 - UniFiClient{mac: '34:2d:0d:e3:66:97', ip: '192.168.0.169', hostname: 'galaxy-a3-2017', alias: 'handy traudel', wired: false, device: UniFiDevice{mac: '80:2a:a8:19:86:0b', name: 'AP-Dachboden', model: 'U7LT', site: UniFiSite{name: 'default', desc: 'default'}}, guest: false, blocked: false}

 - UniFiClient{mac: '00:0c:29:00:a1:0b', ip: '192.168.0.167', hostname: 'de-fra-tkranz1', alias: 'null', wired: true, device: UniFiDevice{mac: 'f0:9f:c2:1a:2f:47', name: 'Switch-Wäschekeller', model: 'US8', site: UniFiSite{name: 'default', desc: 'default'}}, guest: false, blocked: false}

 - UniFiClient{mac: '78:28:ca:17:c4:cc', ip: '192.168.0.114', hostname: 'sonoszp', alias: 'sonos büro 1', wired: false, device: UniFiDevice{mac: '80:2a:a8:c6:06:97', name: 'AP-Wohnzimmer', model: 'U7LR', site: UniFiSite{name: 'default', desc: 'default'}}, guest: false, blocked: false}

 - UniFiClient{mac: '78:28:ca:c1:01:7a', ip: '192.168.0.148', hostname: 'sonoszp', alias: 'sonos büro 2', wired: false, device: UniFiDevice{mac: '80:2a:a8:c6:06:97', name: 'AP-Wohnzimmer', model: 'U7LR', site: UniFiSite{name: 'default', desc: 'default'}}, guest: false, blocked: false}

 - UniFiClient{mac: '68:9a:87:b1:b8:46', ip: '192.168.0.132', hostname: 'amazon-8c87b07ee', alias: 'echo wohnzimmer', wired: false, device: UniFiDevice{mac: '80:2a:a8:c6:06:97', name: 'AP-Wohnzimmer', model: 'U7LR', site: UniFiSite{name: 'default', desc: 'default'}}, guest: false, blocked: false}

 - UniFiClient{mac: '00:10:9a:0b:00:27', ip: '192.168.0.12', hostname: 'null', alias: 'kamera garten', wired: true, device: UniFiDevice{mac: 'f0:9f:c2:1a:2f:47', name: 'Switch-Wäschekeller', model: 'US8', site: UniFiSite{name: 'default', desc: 'default'}}, guest: false, blocked: false}

 - UniFiClient{mac: '08:c5:e1:21:33:6c', ip: '192.168.0.240', hostname: 'galaxy-s8', alias: 'handy eric', wired: false, device: UniFiDevice{mac: 'fc:ec:da:10:5c:8f', name: 'AP-Florian', model: 'U7LR', site: UniFiSite{name: 'default', desc: 'default'}}, guest: false, blocked: false}

 - UniFiClient{mac: '00:04:20:ed:85:d5', ip: '192.168.0.105', hostname: 'harmonyhub', alias: 'harmony hub wohnzimmer', wired: false, device: UniFiDevice{mac: '80:2a:a8:c6:06:97', name: 'AP-Wohnzimmer', model: 'U7LR', site: UniFiSite{name: 'default', desc: 'default'}}, guest: false, blocked: false}

 - UniFiClient{mac: '74:75:48:30:da:26', ip: '192.168.0.22', hostname: 'null', alias: 'firetv wohnzimmer', wired: true, device: UniFiDevice{mac: 'f0:9f:c2:1a:2f:47', name: 'Switch-Wäschekeller', model: 'US8', site: UniFiSite{name: 'default', desc: 'default'}}, guest: false, blocked: false}

 - UniFiClient{mac: '00:1a:e8:0b:f5:a7', ip: '192.168.0.25', hostname: 'null', alias: 'telefon büro thomas', wired: true, device: UniFiDevice{mac: 'f0:9f:c2:1a:2f:47', name: 'Switch-Wäschekeller', model: 'US8', site: UniFiSite{name: 'default', desc: 'default'}}, guest: false, blocked: false}

 - UniFiClient{mac: 'f0:81:73:8d:53:1d', ip: '192.168.0.211', hostname: 'amazon-7c1903e2e', alias: 'amazon tab10', wired: false, device: UniFiDevice{mac: '80:2a:a8:c6:06:97', name: 'AP-Wohnzimmer', model: 'U7LR', site: UniFiSite{name: 'default', desc: 'default'}}, guest: false, blocked: false}

 - UniFiClient{mac: '90:98:64:01:26:7e', ip: '192.168.0.55', hostname: 'gbquad4k', alias: 'sat receiver wohnzimmer', wired: true, device: UniFiDevice{mac: 'f0:9f:c2:1a:2f:47', name: 'Switch-Wäschekeller', model: 'US8', site: UniFiSite{name: 'default', desc: 'default'}}, guest: false, blocked: false}

 - UniFiClient{mac: '34:d2:70:f3:fa:16', ip: '192.168.0.251', hostname: 'amazon-675619351', alias: 'echo jonathan', wired: false, device: UniFiDevice{mac: '80:2a:a8:c6:06:97', name: 'AP-Wohnzimmer', model: 'U7LR', site: UniFiSite{name: 'default', desc: 'default'}}, guest: false, blocked: false}

 - UniFiClient{mac: '94:de:80:ad:57:bd', ip: '192.168.0.5', hostname: 't2', alias: 'server t2', wired: true, device: UniFiDevice{mac: 'f0:9f:c2:1a:2f:47', name: 'Switch-Wäschekeller', model: 'US8', site: UniFiSite{name: 'default', desc: 'default'}}, guest: false, blocked: false}

 - UniFiClient{mac: 'b8:27:eb:30:d0:ae', ip: '192.168.0.15', hostname: 'openhabianpi', alias: 'server openhab', wired: true, device: UniFiDevice{mac: 'f0:9f:c2:1a:2f:47', name: 'Switch-Wäschekeller', model: 'US8', site: UniFiSite{name: 'default', desc: 'default'}}, guest: false, blocked: false}

 - UniFiClient{mac: 'b8:27:eb:0e:51:a0', ip: '192.168.0.166', hostname: 'raspberrypi', alias: 'raspi flo', wired: true, device: UniFiDevice{mac: 'f0:9f:c2:1a:2f:47', name: 'Switch-Wäschekeller', model: 'US8', site: UniFiSite{name: 'default', desc: 'default'}}, guest: false, blocked: false}

 - UniFiClient{mac: '00:50:c2:b8:10:ac', ip: '192.168.0.98', hostname: 'null', alias: 'server aquarium', wired: true, device: UniFiDevice{mac: 'f0:9f:c2:1a:2f:47', name: 'Switch-Wäschekeller', model: 'US8', site: UniFiSite{name: 'default', desc: 'default'}}, guest: false, blocked: false}

 - UniFiClient{mac: '34:d2:70:c8:f2:dd', ip: '192.168.0.184', hostname: 'null', alias: 'echo küche', wired: false, device: UniFiDevice{mac: '80:2a:a8:c6:06:97', name: 'AP-Wohnzimmer', model: 'U7LR', site: UniFiSite{name: 'default', desc: 'default'}}, guest: false, blocked: false}

 - UniFiClient{mac: '5c:03:39:07:00:1c', ip: '192.168.0.186', hostname: 'honor_9-f7221700cea021c5', alias: 'handy florian', wired: false, device: UniFiDevice{mac: 'fc:ec:da:10:5c:8f', name: 'AP-Florian', model: 'U7LR', site: UniFiSite{name: 'default', desc: 'default'}}, guest: false, blocked: false}

 - UniFiClient{mac: '5c:c3:07:5b:75:be', ip: '192.168.0.217', hostname: 'huawei_mate_10_pro-5898c1', alias: 'handythomas', wired: false, device: UniFiDevice{mac: '80:2a:a8:c6:06:97', name: 'AP-Wohnzimmer', model: 'U7LR', site: UniFiSite{name: 'default', desc: 'default'}}, guest: false, blocked: false}

 - UniFiClient{mac: '00:e3:5c:04:00:a6', ip: '192.168.0.10', hostname: 'null', alias: 'kamera strasse', wired: true, device: UniFiDevice{mac: 'f0:9f:c2:1a:2f:47', name: 'Switch-Wäschekeller', model: 'US8', site: UniFiSite{name: 'default', desc: 'default'}}, guest: false, blocked: false}

 - UniFiClient{mac: 'b8:27:eb:b8:ed:57', ip: '192.168.0.8', hostname: 'knxd', alias: 'server knx', wired: true, device: UniFiDevice{mac: 'f0:9f:c2:1a:2f:47', name: 'Switch-Wäschekeller', model: 'US8', site: UniFiSite{name: 'default', desc: 'default'}}, guest: false, blocked: false}

 - UniFiClient{mac: 'cc:f7:35:37:36:a1', ip: '192.168.0.215', hostname: 'amazon-de528c722', alias: 'null', wired: false, device: UniFiDevice{mac: 'b4:fb:e4:f6:2d:19', name: 'AP-Markus', model: 'U7LR', site: UniFiSite{name: 'default', desc: 'default'}}, guest: false, blocked: false}

 - UniFiClient{mac: 'b8:31:b5:0d:94:fc', ip: '192.168.0.238', hostname: 'xboxone', alias: 'null', wired: true, device: UniFiDevice{mac: 'f0:9f:c2:1a:2f:47', name: 'Switch-Wäschekeller', model: 'US8', site: UniFiSite{name: 'default', desc: 'default'}}, guest: false, blocked: false}

 - UniFiClient{mac: '7c:2f:80:db:04:e8', ip: '192.168.0.26', hostname: 'null', alias: 'telefon gigaset thomas', wired: true, device: UniFiDevice{mac: 'f0:9f:c2:1a:2f:47', name: 'Switch-Wäschekeller', model: 'US8', site: UniFiSite{name: 'default', desc: 'default'}}, guest: false, blocked: false}

 - UniFiClient{mac: '00:0c:29:64:ab:ad', ip: '192.168.0.241', hostname: 'win-1h73jffnkuq', alias: 'null', wired: true, device: UniFiDevice{mac: 'f0:9f:c2:1a:2f:47', name: 'Switch-Wäschekeller', model: 'US8', site: UniFiSite{name: 'default', desc: 'default'}}, guest: false, blocked: false}

 - UniFiClient{mac: '00:f2:5c:92:00:27', ip: '192.168.0.11', hostname: 'null', alias: 'kamera hof', wired: true, device: UniFiDevice{mac: 'f0:9f:c2:1a:2f:47', name: 'Switch-Wäschekeller', model: 'US8', site: UniFiSite{name: 'default', desc: 'default'}}, guest: false, blocked: false}

2019-03-21 07:47:58.259 [DEBUG] [i.internal.api.model.UniFiController] - Found 40 UniFi Insights(s): 

 - UniFiClient{mac: '94:65:2d:7c:f1:78', ip: 'null', hostname: 'oneplus5', alias: 'handy jutta', wired: true, device: null, guest: false, blocked: false}

 - UniFiClient{mac: '08:c5:e1:21:33:6c', ip: 'null', hostname: 'galaxy-s8', alias: 'handy eric', wired: false, device: null, guest: false, blocked: false}

 - UniFiClient{mac: 'c4:95:00:b2:5c:1e', ip: 'null', hostname: 'null', alias: 'null', wired: true, device: null, guest: false, blocked: false}

 - UniFiClient{mac: '74:d4:35:bb:04:d8', ip: 'null', hostname: 'florian-pc', alias: 'pc florian', wired: true, device: null, guest: false, blocked: false}

 - UniFiClient{mac: '00:03:78:97:03:92', ip: 'null', hostname: 'null', alias: 'null', wired: true, device: null, guest: false, blocked: false}

 - UniFiClient{mac: '70:1c:e7:fe:88:ff', ip: 'null', hostname: 'laptop-b5a49q4g', alias: 'null', wired: true, device: null, guest: false, blocked: false}

 - UniFiClient{mac: 'c0:f4:e6:65:f9:37', ip: 'null', hostname: 'huawei_p20-412dae1e3eb1d9', alias: 'handy dani', wired: false, device: null, guest: false, blocked: false}

 - UniFiClient{mac: '04:d6:aa:19:80:c9', ip: 'null', hostname: 'galaxy-s8', alias: 'handy markus', wired: true, device: null, guest: false, blocked: false}

 - UniFiClient{mac: 'b0:52:16:78:83:7f', ip: 'null', hostname: 'laptop-qv21t85c', alias: 'null', wired: true, device: null, guest: false, blocked: false}

 - UniFiClient{mac: 'fc:f1:36:79:2f:5b', ip: 'null', hostname: 'localhost', alias: 'null', wired: true, device: null, guest: false, blocked: false}

 - UniFiClient{mac: 'cc:f7:35:37:36:a1', ip: 'null', hostname: 'amazon-de528c722', alias: 'null', wired: false, device: null, guest: false, blocked: false}

 - UniFiClient{mac: '00:0c:29:64:ab:ad', ip: 'null', hostname: 'win-1h73jffnkuq', alias: 'null', wired: true, device: null, guest: false, blocked: false}

 - UniFiClient{mac: '00:24:1d:8b:87:a4', ip: 'null', hostname: 'jutta1', alias: 'pc jutta', wired: true, device: null, guest: false, blocked: false}

 - UniFiClient{mac: '04:92:26:5b:79:91', ip: 'null', hostname: 'desktop-h6hrd7h', alias: 'pc jonathan', wired: true, device: null, guest: false, blocked: false}

 - UniFiClient{mac: '5c:03:39:07:00:1c', ip: 'null', hostname: 'honor_9-f7221700cea021c5', alias: 'handy florian', wired: false, device: null, guest: false, blocked: false}

 - UniFiClient{mac: '9c:e6:5e:66:6a:31', ip: 'null', hostname: 'iphone-7', alias: 'null', wired: true, device: null, guest: false, blocked: false}

 - UniFiClient{mac: 'b8:53:ac:ca:c4:76', ip: 'null', hostname: 'emelie', alias: 'handy emelie', wired: true, device: null, guest: false, blocked: false}

 - UniFiClient{mac: '74:d4:35:bb:f6:7f', ip: 'null', hostname: 'eric-pc', alias: 'null', wired: true, device: null, guest: false, blocked: false}

 - UniFiClient{mac: '74:95:ec:0f:1e:41', ip: 'null', hostname: 'null', alias: 'null', wired: false, device: null, guest: false, blocked: false}

 - UniFiClient{mac: '74:75:48:30:da:26', ip: 'null', hostname: 'null', alias: 'firetv wohnzimmer', wired: true, device: null, guest: false, blocked: false}

 - UniFiClient{mac: 'd8:5d:4c:eb:40:ee', ip: 'null', hostname: 'null', alias: 'null', wired: false, device: null, guest: false, blocked: false}

 - UniFiClient{mac: '34:2d:0d:e3:66:97', ip: 'null', hostname: 'galaxy-a3-2017', alias: 'handy traudel', wired: false, device: null, guest: false, blocked: false}

 - UniFiClient{mac: 'b4:f7:a1:e8:35:d7', ip: 'null', hostname: 'null', alias: 'handy jonathan', wired: false, device: null, guest: false, blocked: false}

 - UniFiClient{mac: '5c:c3:07:5b:75:be', ip: 'null', hostname: 'huawei_mate_10_pro-5898c1', alias: 'handythomas', wired: false, device: null, guest: false, blocked: false}

 - UniFiClient{mac: 'c0:ee:fb:32:68:e8', ip: 'null', hostname: 'android-906cc74406f4fc33', alias: 'handy ronja', wired: true, device: null, guest: false, blocked: false}

 - UniFiClient{mac: 'cc:f7:35:8f:7b:dd', ip: 'null', hostname: 'amazon-d458ef68b', alias: 'echo emelie', wired: true, device: null, guest: false, blocked: false}

 - UniFiClient{mac: '34:d2:70:f3:fa:16', ip: 'null', hostname: 'amazon-675619351', alias: 'echo jonathan', wired: false, device: null, guest: false, blocked: false}

 - UniFiClient{mac: '00:09:34:41:9d:4b', ip: 'null', hostname: 'dm520', alias: 'sat receiver emelie', wired: true, device: null, guest: false, blocked: false}

 - UniFiClient{mac: 'ac:5f:3e:fd:54:1e', ip: 'null', hostname: 'galaxy-s6', alias: 'handy marlon', wired: false, device: null, guest: false, blocked: false}

 - UniFiClient{mac: '34:f3:9a:aa:2c:3d', ip: 'null', hostname: 'be1bs864', alias: 'pc florian arbeit', wired: false, device: null, guest: false, blocked: false}

 - UniFiClient{mac: '9c:64:5e:10:3a:9c', ip: 'null', hostname: 'null', alias: 'null', wired: true, device: null, guest: false, blocked: false}

 - UniFiClient{mac: '60:6d:c7:c6:a2:ff', ip: 'null', hostname: 'desktop-4i26eap', alias: 'null', wired: true, device: null, guest: false, blocked: false}

 - UniFiClient{mac: 'a8:06:00:c2:17:6d', ip: 'null', hostname: 'android-661f1aedf78b0229', alias: 'null', wired: false, device: null, guest: false, blocked: false}

 - UniFiClient{mac: 'f0:81:73:8d:53:1d', ip: 'null', hostname: 'amazon-7c1903e2e', alias: 'amazon tab10', wired: false, device: null, guest: false, blocked: false}

 - UniFiClient{mac: '68:9a:87:b3:50:58', ip: 'null', hostname: 'amazon-e9314bfb7', alias: 'firetv markus', wired: true, device: null, guest: false, blocked: false}

 - UniFiClient{mac: '50:f5:da:6d:0c:f5', ip: 'null', hostname: 'amazon-20608d603', alias: 'null', wired: true, device: null, guest: false, blocked: false}

 - UniFiClient{mac: '50:dc:e7:0d:44:08', ip: 'null', hostname: 'amazon-4ecc49925', alias: 'null', wired: true, device: null, guest: false, blocked: false}

 - UniFiClient{mac: '10:e7:c6:82:f8:32', ip: 'null', hostname: 'hp82f832', alias: 'null', wired: false, device: null, guest: false, blocked: false}

 - UniFiClient{mac: '00:09:b0:4a:9b:12', ip: 'null', hostname: 'null', alias: 'verstärker florian', wired: true, device: null, guest: false, blocked: false}

 - UniFiClient{mac: 'a8:c8:06:97:5c:c3', ip: 'null', hostname: 'null', alias: 'null', wired: true, device: null, guest: false, blocked: false}

2019-03-21 07:47:58.262 [DEBUG] [i.internal.api.model.UniFiController] - Could not find a matching client for id = Handy Jutta

2019-03-21 07:47:58.265 [DEBUG] [i.internal.api.model.UniFiController] - Could not find a matching client for id = Handy Florian

2019-03-21 07:47:58.267 [DEBUG] [i.internal.api.model.UniFiController] - Could not find a matching client for id = Handy Ronja

2019-03-21 07:47:58.270 [DEBUG] [i.internal.api.model.UniFiController] - Could not find a matching client for id = Handy Jonathan

2019-03-21 07:47:58.272 [DEBUG] [i.internal.api.model.UniFiController] - Could not find a matching client for id = Handy Emelie

2019-03-21 07:47:58.274 [DEBUG] [i.internal.api.model.UniFiController] - Could not find a matching client for id = Handy Dani

2019-03-21 07:47:58.276 [DEBUG] [i.internal.api.model.UniFiController] - Could not find a matching client for id = Handy Markus

2019-03-21 07:47:58.278 [DEBUG] [i.internal.api.model.UniFiController] - Could not find a matching client for id = Handy Marlon

2019-03-21 07:47:58.280 [DEBUG] [i.internal.api.model.UniFiController] - Could not find a matching client for id = Handy Eric

2019-03-21 07:47:58.283 [DEBUG] [i.internal.api.model.UniFiController] - Could not find a matching client for id = Handy Traudel

2019-03-21 07:47:58.285 [DEBUG] [i.internal.api.model.UniFiController] - Could not find a matching client for id = Handy Thomas

Can you enable TRACE logging to see what’s going on in the cache:

log4j2.logger.unifi.name = org.openhab.binding.unifi
log4j2.logger.unifi.level = TRACE

getting this for every client

2019-03-21 08:08:49.285 [TRACE] [.internal.api.cache.UniFiClientCache] - Cache MISS : 'mac:HandyMarkus'

2019-03-21 08:08:49.286 [TRACE] [.internal.api.cache.UniFiClientCache] - Cache MISS : 'ip:HandyMarkus'

2019-03-21 08:08:49.288 [TRACE] [.internal.api.cache.UniFiClientCache] - Cache MISS : 'hostname:HandyMarkus'

2019-03-21 08:08:49.289 [TRACE] [.internal.api.cache.UniFiClientCache] - Cache MISS : 'alias:HandyMarkus'

2019-03-21 08:08:49.290 [TRACE] [.internal.api.cache.UniFiClientCache] - Cache MISS : 'mac:HandyMarkus'

2019-03-21 08:08:49.292 [TRACE] [.internal.api.cache.UniFiClientCache] - Cache MISS : 'ip:HandyMarkus'

2019-03-21 08:08:49.293 [TRACE] [.internal.api.cache.UniFiClientCache] - Cache MISS : 'hostname:HandyMarkus'

2019-03-21 08:08:49.294 [TRACE] [.internal.api.cache.UniFiClientCache] - Cache MISS : 'alias:HandyMarkus'

2019-03-21 08:08:49.296 [DEBUG] [i.internal.api.model.UniFiController] - Could not find a matching client for id = HandyMarkus

You discovered a bug! The cache keys were case sensitive - they should be case insensitive!

Please upgrade to build #101: org.openhab.binding.unifi-2.5.0-SNAPSHOT.jar

Only issue I see with your config is the “Handy Thomas” thing definition:

Thing wirelessClient ThomasHandy "HandyThomas" [ cid="Handy Thomas", site="default", considerHome=180 ]

You have the spaces / no-spaces mixed. It should look like this:

Thing wirelessClient ThomasHandy "Handy Thomas" [ cid="HandyThomas", site="default", considerHome=180 ]

The first "Handy Thomas" is for OH2 and the cid="HandyThomas" is for the UniFi binding. Though IMHO, I would fix the alias in the controller to include a space (like the rest of your thing definitions) and then you would have this:

Thing wirelessClient ThomasHandy "Handy Thomas" [ cid="Handy Thomas", site="default", considerHome=180 ]

For more info on the cid parameter, check the README

The cid="..." parameter for each thing needs to be one of four things:

  1. MAC address
  2. IP address
  3. Hostname (as show by the controller)
  4. Alias (as defined by you in the controller UI)

For example, take Eric’s handy:

UniFiClient{mac: '08:c5:e1:21:33:6c', ip: '192.168.0.240', hostname: 'galaxy-s8', alias: 'handy eric', wired: false, device: UniFiDevice{mac: 'fc:ec:da:10:5c:8f', name: 'AP-Florian', model: 'U7LR', site: UniFiSite{name: 'default', desc: 'default'}}, guest: false, blocked: false}

His cid="..." could be any of the following:

  1. 08:c5:e1:21:33:6c
  2. 192.168.0.240
  3. galaxy-s8
  4. handy eric

After that you should be good to go!

1 Like

great, let me upgrade to 101, will update you on the results

issue is resolved with build #101: org.openhab.binding.unifi-2.5.0-SNAPSHOT.jar

thanks for the great support
Thomas