Unifi cannot send command after a while

I have an UCG Ultra.
It is possible to send a command to it when the Unifi-controller-thing-bridge has been disabled/enabled. But then it stops working after a while. A disable/enable makes it work again, for a while.
WARN: “Not Authorized! Please make sure your controller credentials have administrator rights”
I have tried to re-install the binding, but nothing helps.

It has been like this since I got the UCG Ultra a year ago. Please help!

Can confirm

Was thinking of running a rule periodically to disable / enable the bridge thing.
However, I can’t really make out how long it takes for the binding to ‘fail’.
Do you know what interval the disable / enable cycle should be triggered at?

Edit: I’ve created an issue over at github for this bug. Hopefully it can be resolved. I’m happy to assist eg. if further logging is needed.

I also have the issue that the command part of this binding is faulty. It looses authorization after some time.

But as others has mentioned, by dissabling and reenabling the bridge thing the commands start to work again.

So, how do I in a rule disable and enable a thing?
If I do this before issuing my commands it would work and I would be happy. :slight_smile:

How often do you re-activate the binding as a workaround?

Here is a Javascript rule that I use to reset an Ecobee thing:

var ecobeeAccountThingId = "(your thing ID)";

var ecobeeAccountThing = things.getThing(ecobeeAccountThingId);

ecobeeAccountThing.setEnabled(false);
ecobeeAccountThing.setEnabled(true);

I started with 30 min but that was not often enough.
Have now run with 15 min interval for a few months, and that seems to be working.

What Unify Network version are you using? With Openhab 5.1.1 and Unify Network 10 I do not get offline change of devices any more, even after binding restart (also every 15 min).

I also noticed this problem after updating to Unifi OS Server with Unifi Network 10.1.85.

After restarting the controller thing I can send commands, but shortly after it does not work anymore.

Maybe something has changed regarding the api token lifetime?

I found this in the log:

2026-02-17 12:20:22.002 [DEBUG] [ternal.handler.UniFiBaseThingHandler] - Handling command = ON for channel = unifi:accessPoint:masshardt:71a76710:enable
2026-02-17 12:20:22.002 [DEBUG] [.internal.api.UniFiControllerRequest] - Body parameters for request ‘/proxy/network/api/s/gvxbs9uw/rest/device/69924dc25846be6071a76710’: {“disabled”:“false”,“_id”:“69924dc25846be6071a76710”}
2026-02-17 12:20:22.008 [WARN ] [g.unifi.internal.api.UniFiController] - Not Authorized! Please make sure your controller credentials have administrator rights