I’ve developed a sensor to monitor a UniFi Security Gateway/CloudKey setup.
The idea is that while the CloudKey is the place to delve deeply into the configuration and status of the network, my sensor provides a top-level overview to confirm that everything is operating correctly. If any sensors flag an issue you can then log into the CloudKey to resolve, so replicating the top level of the CloudKey controller:
Beyond the high level ‘ok’ of the sensor there are a bunch of other stats set as attributes, e.g for the WWW sensor:
drops 9 gw mac fc:ec:da:02:d8:83 latency 9 rx bytes-r 3705 speedtest lastrun 1538603628 speedtest ping 9 speedtest status Success status ok subsystem www tx bytes-r 3207 uptime 38651 xput down 23.157 xput up 7.128
A template sensor can be setup to access any other specific fields that a particular user wants.
The component has needed an update to the pyunifi library which needs a pull request before that can be accessed by HA, so I’ll hold off publishing the code until then, but in the meantime wanted to check for any feedback from anyone else with a UniFi setup with regard to any suggestions on any other key info that would be useful.
Update: The PyUnifi library is now updated and the code can be downloaded here: