Unifi OS 6.0.43/Cloud Key 2.0.24 not compatible with Unifi Integration?

It appears after upgrading my Unifi Cloud Key to v2.0.24 which upgrades the network OS to v6.0.43, the integration breaks. From my understanding and observations on the network side, the ports for the controller change from 8443 to 443 & 80.

Attempting to reintegrate with the new ports either is futile as HomeAssistant says the integration already exists or HomeAssistant locks up while the integration is trying to be installed.

Here are the Logs:

Config entry for unifi not ready yet. Retrying in 5 seconds

8:14:54 AM – config_entries.py (WARNING) - message first occurred at 7:45:39 AM and shows up 26 times

Error connecting to the UniFi controller at 192.168.1.XX

8:14:54 AM – Ubiquiti UniFi (ERROR) - message first occurred at 7:45:39 AM and shows up 26 times

Anybody else have this issue? It’s broken my device tracking for home/away modes thus I’d like to get this issue addressed.

If it is a bug, what further information should I gather and where can I submit it?

1 Like

Just upgraded to Gen2+ Cloud Key today and have this exact issue.

If you remove the integration from HA and then re-add it you should find everything works as before - the device_tracker entities will be recreated.

I upgraded my cloud key at the end of December, removed the integration and re-added it and there have been no issues since.

NB: note the differences per the integration page https://www.home-assistant.io/integrations/unifi/ - port (as you’ve mentioned) and that a local user is required.

Got it, and yes, the full removal of the integration, port change to 443 during reinstall worked.

There’s still an issue where I was unable to change the port on the old integration as HA just froze when “Options” was clicked. Perhaps this is the bug that needs to be address so to prevent a full reinstall of the integration.

It is also possible to manually edit port in the .storage/core.config_entries file.

You can’t access options if the integration is not running and there is no option to re-configure the main service configuration from the GUI. I will look to remedy that in the future.

I updated the firmware for my cloudkey after reading this thread and I got a similar behavior (HA would never start due to Unifi errors). I then tried to do the port update by editing the config file and it seemed to work because HA started up fine with no more errors.

But then later I noticed that the Unifi gateway monitoring entities (firmware_upgradable, alerts, lan, vpn, etc.) never got re-created.

So I deleted the integration and re-installed it. But I end up with the same thing.

Maybe I don’t understand what a “local user” is. However, those were all working before and I could log in with the superadmin user I created on the controller in the old software.

Am I missing something to get those working again?

I don’t believe those sensors are provided by the Unifi controller integration - I’ve certainly never seen them.
Are you by chance also using the GitHub - custom-components/sensor.unifigateway: High level health status of UniFi Security Gateway devices via UniFi Controller custom component? That has a relevant open issue: Unifi Cloudkey firmware 2.0.24 support · Issue #22 · custom-components/sensor.unifigateway · GitHub

2 Likes

Well, I’ll be…

You are completely right. I completely forgot about that custom integration.

Since I saw this thread I just assumed they were related somehow.

Never mind…