UniFi Network integration - official thread

I happened to be looking in my homeassistant.log file for another issue but I noticed this log entry:

2025-07-07 14:12:14.560 WARNING (SyncWorker_4) [py.warnings] /usr/local/lib/python3.13/site-packages/urllib3/connectionpool.py:2299: InsecureRequestWarning: Unverified HTTPS request is being made to host ‘192.168.1.4’. Adding certificate verification is strongly advised. See: Advanced Usage - urllib3.future 2.12.910 documentation
warnings.warn(

it’s happening every 30 seconds so it’s making the log pretty big.

it doesn’t seem to be affecting anything other than the log filling issue.

any idea what I might need to do to stop it? the log is pretty vague about what it’s asking me to do.

Hello,
I have drafted a pull request here to disable real time updates, and rely on polling instead :

I’m interested in feedback if anyone is able to test on their configuration!

1 Like

Hello, is there a way to get the monthly data usage and the throughput as sensors ?

Make a utility meter for this.

Hi,

Can someone tell me the location of the QR code image?
I’d like to use it on an external website. Does anyone have any tips on the best way to do that?

Grtz
Edwin

Just recently upgraded from a UDMPro to a UCG Fibre, and noticing that the temperature updates very frequently, like every 10 seconds or so. Same with a number of other sensors. How would I go about reducing the update frequency? I really dont need that granualarity. Once every 5 mins would be enough for most of those sensors.

It will need a change in the integration to support that. It’s heavily requested to lower load on the system but is not currently planned. One community member did offer a solution to it but was not complete enough unfortunately

1 Like

Hey everyone!

@Sese-Schneider just got his PR merged which allow control of access point LEDS (Add LED control for supported unifi devices by Sese-Schneider · Pull Request #152649 · home-assistant/core · GitHub) try it out in the nightly build or on the next major release.

Thanks @Sese-Schneider

6 Likes

Hi @Robban ,

I have created a custom integration to test the official Unifi Network API:

The main goal is to test the API and maybe prepare its future use in this core integration - though this would require quite a lot of work (I saw Unifi protect started along this path).
For my use case it solves the CPU load issue, as it only does local polling of the API.
Feedbacks welcome !

1 Like

Nice! How about expanding aiounifi as a first step? Continue with the custom integration but migrate to aiounifi and step 2 would be merging integrations. and then look at moving that logic into the normal one. I’m busy with house renovation so currently my focus here is helping others contribute

Yes I will definitely look into that.
This will probably require users to provide an API key in addition to the user/password while bot official and unofficial APIs are used (similar to what Unifi Protect integration is doing).
Maybe provide a mode where only sensors available via the official API are created if no user/password if given.

Another concern I have is that the official API is only available via Unifi OS, if I understand correctly. Today it’s possible to connect the integration to a Unifi Network application running in Docker for example, but Unifi OS requires podman on a server. Unifi OS is supposed to be the new standard for self hosting, but it may leave some people behind. Or it would mean keeping a compatibility mode again.

Anyway I’ll look into adding the API into aiounifi and keep you updated.

It would be beneficial for a user to be able to provide api or /username or both and the integration will provide entities based on that

Also if the official unifi os container is good enough together with its api then everyone will benefit from that

1 Like

Hi gang - if this isn’t the right place to post please accept my apologies.

Just wondering how best to debug the entire Unifi Integration becoming unavailable 2-3 times every 24 hours. Causes Device Tracker devices to go unavailable and makes some automations trigger etc.

I’ve noticed this sometime since about 2025.11 I’d say. This would also be the time I enabled the PoE port stuff, so that I can turn on/off PoE ports on my Unifi switch when the UPS is running on batteries - maybe related?

Currently HA 2025.12.4 - Unifi Controller is standalone on a Proxmox LXC, version 10.0.162. I have 6 Unifi APs ( 4 x UAP-AR-LR, 1 x UAP-AC-PRO and 1 x UAP-Mesh)

If anyone can help me figure out how to debug why it’s disconnecting (Looking at some logs I see it “logs in” again after a failure) and having to reconnect I’d appreciate the help.

Kind Regards,
Tim

Ok so that was a bit of a clusterfork.

I knew this integration was going to create a lot of entities and devices so I was prepared to disable quite a few.

What I was not prepared for was that disabling the Unifi Networks device from the Devices & Services → UNifi list also disabled any other integration attached to that device. e.g. An ESPhome device, a Lifx light etc…

I wised up pretty quickly when I started getting huge numbers of missing entity alerts (a handy automation).

Is this expected behaviour?

I would have expected it to only disable the Unifi device.

Slowly getting things under control again.

One other thing I have noticed is that while I have enabled the traffic sensors, TX and RX rates are shown but not total used bytes. Is this not available?

Do I have to implement integral sensors to calculate this?

fwiw, I didnt update anything at all ( I think), and I wake up with all device_trackers being unavailable…
uhm… now what was that.

only to wait a bit and all came back. Truly scary. Couldnt that have been some update on the Unifi side of things?

Nope, theyre gone once again…and its indeed not only the trackers, any entity goes unavailable now

hmm this might be it?

Logger: aiounifi.interfaces.connectivity
Bron: components/unifi/hub/websocket.py:80
Eerst voorgekomen: 12 januari 2026 om 20:35:15 (13 gebeurtenissen)
Laatst gelogd: 11:05:46

UniFi websocket error: ‘No PONG received after 7.5 seconds’
Server handshake error connecting to UniFi websocket: ‘500, message=‘Invalid response status’, url=‘wss://192.168.1.1/proxy/network/wss/s/default/events’’

right, and now this happens:

Logger: homeassistant.components.unifi
Bron: components/unifi/hub/api.py:76
integratie: UniFi Network (documentatie, problemen)
Eerst voorgekomen: 11:31:37 (27 gebeurtenissen)
Laatst gelogd: 12:05:40

Error connecting to the UniFi Network at 192.168.1.1: Call https://192.168.1.1:443/api/auth/login received 429: b’{“code”:“AUTHENTICATION_FAILED_LIMIT_REACHED”,“message”:“You've reached the login attempt limit”,“level”:“debug”}’
Error connecting to the UniFi Network at 192.168.1.1:

Opened a feature request:

Do the sensors really need to update every two seconds?

My Recorder DB is now growing fast and that is after disabling almost all sensors. Pretty much only 2x WAN bandwidth sensors, a few network device status & update rensors are enabled.

1 Like

My intentions are to move over to a polling solution rather than using websocket because of the load the amount of data transferred has on many systems. This would also result in the amount of data points will be lower. I have no time plan for it though, its been in my head for the last year - year and a half.

2 Likes

All good. And I do appreciate the work you’ve already put into this integration, as I’m sure so do many others. :+1:

However I’ve removed it for now in favour of SNMP and derivative sensors as I only need the bandwidth totals and rates of a couple of WAN ports. Way too many other sensors created with the Unifi integration for my use case.

2 Likes

It’s good to have alternatives! There are many improvements that can be done with the integration

1 Like