UniFi Network integration - official thread

It’s being done by a community member. Unfortunately (sic) he got a kid and it’s paused right now. Add Traffic Rule switches to UniFi Network by ViViDboarder · Pull Request #104671 · home-assistant/core · GitHub

1 Like

Oh no :frowning: yep, definitely needed to pause. I appreciate the status update thank you :slight_smile:

Sorry, maybe I’m missing out on something, but why doesn’t this integration provide any useful status sensors? Like current WAN IP, current WAN download throughput, current WAN upload throughput, etc. There used to be a custom integration called “unifi status” which was able to provide this kind of data to monitor the network, but it doesn’t work anymore. If anyone has an idea how to get these kind of values into Home Assistant, I would be grateful. Thanks!

5 Likes

As you say other components provided that value previously and my interest so far has been more in tracking and controlling devices. It can of course be expanded to do more.

4 Likes

As said above, I would highly appreciate some status sensors to monitor the network.

2 minutes of googling showed me the Unifi PHP APi, that surely has the statistics. It would be amazing if you would put in the effort to get this going yourself, or give @Robban a ton of money for the (free!) work he’s done so far.

3 Likes

Your aggressive tone is completely inappropriate. Do this stuff elsewhere on the Internet.

3 Likes

Feature Request:
Additional information regarding the state of devices.

Backstory:
The U7 Pro AP still has a memory leak resulting in downstream meshed APs losing their adoption. I have created an automation to resolve this issue once the meshed AP is in an “Adoption Failed” state, but I would like to be proactive. Currently this is not possible due to the lack of information available within the Home Assistant integration.

Ask:
Would it be possible to add additional sensors for device details such as (most important to least):

  • Memory usage
  • Channel usage
  • Load average
  • Mesh Child(ren)
  • WiFi Experience (2.4 / 5 / 6)

2 Likes

I’ve added your request here Additional information regarding the state of devices · Issue #622 · Kane610/aiounifi · GitHub this is not a promise of implementation, I’ve spent quite a lot of time on UniFi over the last year and I’m trying to improve my other integrations as well

2 Likes

As a new user of the integration, I’d like to check something that I couldn’t find on this post, the forum or the docs.

I’ve enabled rx/tx sensors and disabled the bulk of them, because I’m just looking for overall values.

I saw the sensor.rx and sensor.tx sensors and it looks like it’s what I’m looking for (having looked at the history now for those sensors).

Are those the overall rx/tx sensors?

As a related question, I also saw sensor.none_rx and sensor.none_tx. What could that be referring to?

Note: My network is set up with a single site (“Default”), in case that matters.

There are no common reporting of rx/tx right now, its probably a client without a name.

Also probably a client with a bad name

1 Like

Thanks for the feedback.

Is this a future possibility, or something that’s fundamentally not possible for this integration?

Unfortunately, my UDR doesn’t support SNMP out of the box. I’ve considered installing it manually, since using it is my first choice.

I’ve also come across a Python script using the router’s API, but haven’t had time to test it. It will require polling though, which is also not ideal. I suppose, if implemented, the integration would do it this way too.

It depends on how it is provided from the network app

Hey all!

Another month and Home Assistant 2024.4.0 release with changes in the UniFi integration.

@xconverge identified an issue with how the integration identifies if UniFi is hosted on Unifi OS or not. Lets hope some of the reconnection issues previously reported was caused by this. Thanks!

This release brings a lot of internal improvements to support expanding the integration in the future.

Just to re-iterate that use local accounts for your Home Assistant connection as cloud accounts will get mandatory MFA and will not be supported.

Try these features out during the beta, feedback is appreciated.

Cheers!

/Robban


Home Assistant 2024.4.0

Home Assistant 2024.4.0 Beta

aiounifi library v76 change log

For feature requests of the integration post an issue at aiounifi github

If you appreciate my work I’m on Github Sponsors.

5 Likes

Hey all!

Another month and Home Assistant 2024.5.0 release with changes in the UniFi integration.

Just to iterate one final time: Cloud accounts with MFA will not be supported, please use a local account instead see this thread

This release we got a few power players providing new functionality, @brunohenrique provided a button to regenerate passwords which fit perfectly with the QR code image entities, now guests can easily get the password and you can always make sure they don’t keep the password longer than you expect. Two requested features was brought in by @kimdv sensor for CPU and Memory utilisation as well as the means to read RX/TX from UniFi device ports, this solves among other things the common request to view WAN data usage. An old issue has been remedied by @wittypluck which is that of old devices laying around not being able to clean up, but now you can.

Honorable mentioning of @mkmer doing an improvement to login hopefully fixing those restart issues where the integration would need a manual retry Handle login non JSON response by mkmer · Pull Request #640 · Kane610/aiounifi · GitHub . This was released with 2024.4.4 just before beta cut off.

Thanks guys!

Try these features out during the beta, feedback is appreciated.

Cheers!

/Robban


Home Assistant 2024.5.0

aiounifi library v76 change log

For feature requests of the integration post an issue at aiounifi github

If you appreciate my work I’m on Github Sponsors.

5 Likes

wow, especially looking forward to this.
tried to add a heart on the PR in the repo, but it cant be done because of already Merged and closed.
Showing my appreciation here :wink:

thank you very much!

1 Like

Kudos to @wittypluck

I believe I misunderstood the new option…

had hoped we would be able to delete all of these individual device_trackers that once might have existed, but are not on the Unifi machine at all:

but we can ‘only’ delete actual devices, can we?

3 Likes

even the latter seems not too straighforward, because the 1 device I would like to delete (it’s a somehow doubly listed Apple TV) wont go, and throws an error on the delete action:

Logger: homeassistant.components.websocket_api.http.connection
Bron: components/websocket_api/connection.py:307
integratie: Home Assistant WebSocket API (documentatie, problemen)
Eerst voorgekomen: 09:09:36 (2 gebeurtenissen)
Laatst gelogd: 09:09:52

[140510836850112] Error handling message: Failed to remove device entry, rejected by integration (home_assistant_error) Marijn from feredacted5c (Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.4.1 Safari/605.1.15)
[140511011429184] Error handling message: Failed to remove device entry, rejected by integration (home_assistant_error) Marijn from feredacted5c (Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.4.1 Safari/605.1.15)

besides that, and this might be repeating from above:
I have a lot of ghost device_trackers, and many of them will never ever return to my network, so I want to delete them (not only disable them). I cant from the UI, so I tried to edit the entity_registry, but upon restart, they some how are re-created…

Meaning we can never get rid of these entities in our HA system??

And yes, I checked the Unifi network app itself, they are not listed in the Routers system at all. either on or offline a https://192.168.1.1/network/default/clients/offline

Only way I have found to remove them is to delete the integration and re-add, not ideal.

1 Like