Trouble setting up unifi integration / component - Cloud Key Gen 2

I had mine working perfectly with unifi controller and separate router
since geting a UDM not a UDM pro
it only works for about 2 hours then the logging starts stating that the devices cant be detected or updated
it aggresivly loggs this to the point that within 5 hours the log file is over 10gigs and HASS becomes unresponive until i reboot HASS and the log clears
while it states that the devices can not be detected or updated
it is in fact detecting them and updating their status
i tried switching back to the old unifi controller and router
the issue does not happen
put the UDM back in place and within 2 hours same issue

1- something must be different in the UDM compared to a stand alone controller
2- how do i go about disabling logging for the unifi add on so this does not happen

any help is appreciated

What log messages are you getting?

managed to enable it remotely

the error started right away this time
the very first error is in regards to communication all together, then the devices over and over again
however despite the errors stating it cant get info
the trackers are reporting correctly

here is the first error and 1 device

Unknown UniFi communication error occurred
4:05 PM components/unifi/controller.py (ERROR)

Update for device_tracker.op2_ac fails
4:07 PM components/unifi/controller.py (ERROR) - message first occurred at 4:06 PM and shows up 6 times

until we firegure out why this is happening, how can i disable logging for unifi integration?

in the span of 6 minutes every device logged that it failed 24 times
and the log file grew from 28kb to 180MB

@Robban
what are your thoughts?

I started it again this time keeping a very close eye on it so i can disable the integration before the log is so large i cant open it.

when it happens
each individual device fails
it seems to go over each line of the .py over and over again with the below error
await self.async_update()
it eventually gives up and moves to the next device

each occurence takes up 2986 lines in the log
this repeats non stop for each device
this explains why the log gets so massive
each occurence takes less than 1 ms
about 3-4 occurences per ms

i have extracted 1 occurence to a separate file
with the first 2 lines of the next occurence
just to show how it all took 1ms
would you like to see it?
i cant attach it, how do i send it to you?

Having the same issue with UDM + Home assistant. Any news about this?

Some refactoring of UniFi is part of 0.110 also with regards to logging. I can’t do much with the current amount of data here. Please enable debug logging and share proper logs.

I was trying to get the Ubiquiti UniFi integration working together with the Ubiquiti Controller add-on. I was getting “Invalid authentication” in the UI and “Connected to UniFi at 192.168.1.254 but not registered” in the log. In the Ubiquiti Controller, I went into Settings > Remote Access and unchecked “Enable Local Login with UBNT Account” and tried again using the same credentials as before and it started working. :crossed_fingers:

Hey guys - I stumbled across this thread as I was experiencing the same issues in trying to get Home Assistant Integration to work with my UDM.
It looks like I finally managed to solve it by going to the “UniFi Network” mobile App -> Settings ->More -> Settings ->Controller and Turning ON “Make Controller Discoverable on L2 Network”

I’m not sure if there’s a way of enabling the same option from the web UI - it might be buried somewhere there to.

Anyway as soon as I enabled that switch, Home Assistant automatically detected the controller and I was able to enter my credentials (the same ones I use to access the web UI) and I could see the discovered devices.

Hope this works for you guys too.