Just installed unpoller in a container within HA using Portainer, installed the HA Community Addons Influx and Grafana, and with a little bit of tinkering around, now have beautiful Grafana dashboards in HA. It works out of the box, all latest versions of everything, and latest unifi software versions.
Now to use some of the above posts to put the values into some entities.
Thank you for all your work and sharing. Happy to share configuration steps or docker compose files if anyone needs. the instructions on the various websites were not super clear, so took a few hours trying things to get working.
key points
add user to unifi with local only read only access
install influx and grafana from the addon store in HA
setup a influx db with user name and password for unpoller to put data
I’d love to have a peek at some more of the details for that! I was pretty surprised that it wasn’t already available as a community add-on (sorry if that sounds terribly entitled, it’s not intended as such).
add user to unifi with local only read only access
For this, I’ve noticed when setting up a local user, you have a choice of picking what Role the user will have. For example a Unifi Protect View Only user, or a Unifi Talk View Only user. So when you set this read only user up, and a role for it, did you just do it for the Unifi Network portion?
I don’t know if a camera is required for the protect integration but it supplies mem temp and cpu for the udm pro. You can try enabling protect on the udm and then add the integration in hacs.
You can also add the following SNMP sensors. Just make sure SNMP is enabled on your Unifi devices.
# SNMP sensors
# if you have more ap/switches you can copy paste the code.
# change name and ip and you are ready to go
#
sensor:
- platform: snmp
host: xxx.xxx.xxx.xxx
name: Unifi Switch Uptime
baseoid: 1.3.6.1.2.1.1.3.0
value_template: >
{%- set time = value | int // 100 %}
{%- set minutes = ((time % 3600) // 60) %}
{%- set minutes = '{}min'.format(minutes) if minutes > 0 else '' %}
{%- set hours = ((time % 86400) // 3600) %}
{%- set hours = '{}hr '.format(hours) if hours > 0 else '' %}
{%- set days = (time // 86400) %}
{%- set days = '{}d '.format(days) if days > 0 else '' %}
{{ 'Less than 1 min' if time < 60 else days + hours + minutes }}
- platform: snmp
host: xxx.xxx.xxx.xxx
name: Unifi Switch Firmware Version
baseoid: 1.3.6.1.4.1.4413.1.1.1.1.1.13.0
- platform: snmp
host: xxx.xxx.xxx.xxx
name: Unifi Switch Model
baseoid: 1.3.6.1.4.1.4413.1.1.1.1.1.2.0
- platform: snmp
host: xxx.xxx.xxx.xxx
name: Unifi AP Uptime
baseoid: 1.3.6.1.2.1.1.3.0
value_template: >
{%- set time = value | int // 100 %}
{%- set minutes = ((time % 3600) // 60) %}
{%- set minutes = '{}min'.format(minutes) if minutes > 0 else '' %}
{%- set hours = ((time % 86400) // 3600) %}
{%- set hours = '{}hr '.format(hours) if hours > 0 else '' %}
{%- set days = (time // 86400) %}
{%- set days = '{}d '.format(days) if days > 0 else '' %}
{{ 'Less than 1 min' if time < 60 else days + hours + minutes }}
- platform: snmp
host: xxx.xxx.xxx.xxx
name: Unifi AP Model
baseoid: 1.3.6.1.4.1.41112.1.6.3.3.0
- platform: snmp
host: xxx.xxx.xxx.xxx
name: Unifi AP Firmware Version
baseoid: 1.3.6.1.4.1.41112.1.6.3.6.0
Thanks for the help . unifi_status is working very well.
and one help, I cont find UDM pro temperature … how to get that …?
my UDMP is always overheating due to its position. I’m using an external fan to cool it. if I got a temperature, that will very help full to monitor.
Got it setup and working using unifi-stats which was great, but for some reason it was causing my node-red integration to forcefully disconnect from the supervisor every few seconds… So had to turn it off.
Hi, I’ve added the custom component, added it to my config but the entities stay empty.
It gives me health errors in the logs, but it doesn’t show any connection issues, however all the entities remain status ‘unknown’. Any idea?
Here is the compose file. I just use this in Portainer, and it works fine.
Recreates do updates too.
make sure you update your specific info that you have setup in influxdb
influxdb ip address,
influxdb db name,
username,
password
and your Unifi console read only user name, and the console IP Address.
create a stack, add this into the editor, click create, and away you go.
and then follow the other instructions above to add your dashboards to graphana, once the data is going to influxdb. you can check int eh container logs that its working too.
There is an addon for portainer. I have the original one that was in the community store, that’s not there now so I think there is another respository that provides it now. Maybe in hacs