So far, so good…
I installed the binding, added the things from PaperUI and then created a new Unifi.items file.
I defined only 1 item there and I put the binding in DEBUG:
/* Unifi Items */
Switch Angelos_S6_Pre "Angelos Presence" <switch> (gUnifi) {channel="unifi:client:Angelos_S6:online"}
2017-04-27 18:45:52.834 [INFO ] [unifi.handler.UniFiControllerHandler] - UniFi Binding v2.1.0.201704270844
2017-04-27 18:58:33.105 [DEBUG] [unifi.handler.UniFiControllerHandler] - Refreshing the UniFi Controller unifi:controller:Unifi_Ctrl
2017-04-27 18:58:33.116 [DEBUG] [nding.unifi.internal.UniFiController] - Found 1 UniFi Site(s):
2017-04-27 18:58:33.116 [DEBUG] [nding.unifi.internal.UniFiController] - Site{name: 'default', path: 'default'}
2017-04-27 18:58:33.132 [DEBUG] [nding.unifi.internal.UniFiController] - Found 4 UniFi Device(s):
2017-04-27 18:58:33.132 [DEBUG] [nding.unifi.internal.UniFiController] - UniFiDevice{mac: '44:d9:e7:51:XX:XX', name: 'LAN-SW1', model: 'US24P250', site: Site{name: 'default', path: 'default'}}
2017-04-27 18:58:33.133 [DEBUG] [nding.unifi.internal.UniFiController] - UniFiDevice{mac: '44:d9:e7:80:XX:XX', name: 'WLAN-AP0', model: 'U7O', site: Site{name: 'default', path: 'default'}}
2017-04-27 18:58:33.133 [DEBUG] [nding.unifi.internal.UniFiController] - UniFiDevice{mac: '44:d9:e7:fc:XX:XX', name: 'WLAN-AP2', model: 'U7LR', site: Site{name: 'default', path: 'default'}}
2017-04-27 18:58:33.133 [DEBUG] [nding.unifi.internal.UniFiController] - UniFiDevice{mac: '44:d9:e7:fc:XX:XX', name: 'WLAN-AP1', model: 'U7LR', site: Site{name: 'default', path: 'default'}}
2017-04-27 18:58:33.137 [DEBUG] [nding.unifi.internal.UniFiController] - Found 22 UniFi Client(s):
2017-04-27 18:58:33.137 [DEBUG] [nding.unifi.internal.UniFiController] - UniFiClient{mac: '44:d9:e7:94:XX:XX', hostname: 'UVC-G3-XXXX', wired: true, device: UniFiDevice{mac: '44:d9:e7:51:XX:XX', name: 'LAN-SW1', model: 'US24P250', site: Site{name: 'default', path: 'default'}}}
[...]
It seems to read all info correctly from the Unifi Controller (version 5.4.14).
I am trying to see now why I can’t get my switch item to update.
I disconnected my mobile phone from the local WLAN but I see that the Unifi controller is still reporting it online (and as a result the binding gets this wrong status from the controller). I am sure that if the controller gets updated faster, it will report back to the 10sec polling interval to the binding the correct situation.
Edit1: After almost 10 minutes from disconnecting my phone, the controller reported it offline to the binding and the switch turned to off. All is ok. Is there a way to force the Unifi Controller to update the clients’ status faster?
Edit2: Status updates in the scenario where I go online from offline seem to work really fast (within seconds the OH2 switch turns to “On”)