Unifi AP - how to get a count of connected clients per AP?

The title says it all - does any one know a way to get a statistic (a sensor, for example) of the total number of clients connected to each AP?

The end goal is to create a kind of heat-map of where people are in the premises. But I’m not looking at individual presence detection, just an overall view that also includes strangers and visitors that have wi-fi access, but don’t have any HASS account.


Check out this post: Monitoring your Unifi AP.
I didn’t try it myself yet, but using a Python module and command_line sensor it looks like you can get the number of clients connected.

1 Like

Thanks. Your link led me to a bunch of different possibilities, I just managed to get one to work - a simple one,

it seems to give me the AP client counts I need (and not much more :sweat_smile: )

Do you (or anyone else) have any ideas about the “show these values on a map” thing? I never tried any of that.

Do you use the unifi Integration ? That has device trackers with a connected ap Mac attribute. You could use that to count them up