I now have my binding installed (seemingly properly) but I have a completely non-functioning bridge, it’s showing a status “ERROR:CONFIG”. I believe it is completely related to my bridge configuration and I’m not sure I’m grabbing the correct host information. My bridge thing is:
Bridge unifi:controller:home "Unifi Controller" [ host="xxx.xxx.xxx.2", port=443, unifios=true, username="username, password="mypassword", refresh=10 ]
(phone thing information not shown)
I’m using a UDM-Pro. For the host IP I tried its WAN address and had no luck; with that I get some very unhappy log entries:
2022-04-15 07:27:26.778 [ERROR] [.handler.UniFiControllerThingHandler] - Unknown error while configuring the UniFi Controller
org.openhab.binding.unifi.internal.api.UniFiException: Unknown HTTP status code 499 returned by the controller
at org.openhab.binding.unifi.internal.api.model.UniFiControllerRequest.getContent(UniFiControllerRequest.java:167) ~[bundleFile:?]
at org.openhab.binding.unifi.internal.api.model.UniFiControllerRequest.execute(UniFiControllerRequest.java:131) ~[bundleFile:?]
at org.openhab.binding.unifi.internal.api.model.UniFiController.executeRequest(UniFiController.java:226) ~[bundleFile:?]
at org.openhab.binding.unifi.internal.api.model.UniFiController.login(UniFiController.java:129) ~[bundleFile:?]
at org.openhab.binding.unifi.internal.api.model.UniFiController.start(UniFiController.java:106) ~[bundleFile:?]
at org.openhab.binding.unifi.internal.handler.UniFiControllerThingHandler.initialize(UniFiControllerThingHandler.java:92) [bundleFile:?]
at org.openhab.core.thing.binding.BaseThingHandler.thingUpdated(BaseThingHandler.java:155) [bundleFile:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
at org.openhab.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:154) [bundleFile:?]
at org.openhab.core.internal.common.Invocation.call(Invocation.java:52) [bundleFile:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
at java.lang.Thread.run(Thread.java:829) [?:?]
2022-04-15 07:27:26.779 [INFO ] [openhab.event.ThingStatusInfoEvent ] - Thing 'unifi:controller:home' updated: OFFLINE (CONFIGURATION_ERROR): Unknown HTTP status code 499 returned by the controller
I next tried the gateway IP address for the network on which my OpenHAB server resides. So if my Gateway/IP Subnet was defined as 123.456.789.111/24, I used 123.456.789.111 as the bridge “host.” With that my bridge happily loads and I’m getting no error messages in the logs. But still no change in the bridge thing status, still “ERROR:CONFIG.”
Note that in both cases I’m using port 443. When I apply 8443 the logs fill up with the same errors as above.
Unifios=true loads ok, but false gives the following log entries:
2022-04-15 07:35:36.669 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'unifi.things'
2022-04-15 07:35:36.699 [WARN ] [i.internal.api.model.UniFiController] - Not Authorized! Please make sure your controller credentials have administrator rights
2022-04-15 07:35:36.700 [INFO ] [openhab.event.ThingStatusInfoEvent ] - Thing 'unifi:controller:home' updated: ONLINE
2022-04-15 07:35:36.700 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'unifi:controller:home' changed from OFFLINE (CONFIGURATION_ERROR): Unknown HTTP status code 499 returned by the controller to ONLINE
2022-04-15 07:35:36.701 [INFO ] [openhab.event.ThingStatusInfoEvent ] - Thing 'unifi:wirelessClient:home:DavidsPhone' updated: ONLINE
2022-04-15 07:35:36.701 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'unifi:wirelessClient:home:DavidsPhone' changed from OFFLINE (BRIDGE_OFFLINE) to ONLINE
2022-04-15 07:35:36.701 [INFO ] [openhab.event.ThingUpdatedEvent ] - Thing 'unifi:controller:home' has been updated.
2022-04-15 07:35:36.704 [WARN ] [.handler.UniFiControllerThingHandler] - Unhandled exception while refreshing the UniFi Controller unifi:controller:home - Unknown HTTP status code 404 returned by the controller
2022-04-15 07:35:36.705 [INFO ] [openhab.event.ThingStatusInfoEvent ] - Thing 'unifi:controller:home' updated: OFFLINE (COMMUNICATION_ERROR): Unknown HTTP status code 404 returned by the controller
2022-04-15 07:35:36.705 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'unifi:controller:home' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): Unknown HTTP status code 404 returned by the controller
2022-04-15 07:35:36.705 [INFO ] [openhab.event.ThingStatusInfoEvent ] - Thing 'unifi:wirelessClient:home:DavidsPhone' updated: OFFLINE (BRIDGE_OFFLINE)
2022-04-15 07:35:36.705 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'unifi:wirelessClient:home:DavidsPhone' changed from ONLINE to OFFLINE (BRIDGE_OFFLINE)