Skip to content

Home Assistant integration that uses the UniFi Network API to monitor and manage UniFi devices

License

Notifications You must be signed in to change notification settings

domalab/ha-unifi-insights

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

UniFi Insights Integration for Home Assistant

HACS Integration GitHub Last Commit License

This custom integration allows you to monitor your UniFi devices through the UniFi Network API. Get detailed insights into your UniFi infrastructure directly in Home Assistant.

Features

  • Monitor device status (online/offline)
  • Track CPU and memory usage
  • Monitor device uplink rates (TX/RX)
  • Track device uptime
  • Restart devices through Home Assistant services
  • Support for multiple UniFi sites

Installation

HACS (Recommended)

Open your Home Assistant instance and open a repository inside the Home Assistant Community Store.

Manual Installation

  1. Download the latest release
  2. Copy the custom_components/unifi_insights folder to your Home Assistant's custom_components directory
  3. Restart Home Assistant

Configuration

Prerequisites

  1. A UniFi Network controller (local or cloud)
  2. API access enabled on your UniFi controller
  3. An API key with appropriate permissions

Getting an API Key

  1. Open your site in UniFi Site Manager at unifi.ui.com
  2. Navigate to Control PlaneAdmins & Users
  3. Select your Admin
  4. Click Create API Key
  5. Provide a name for your API Key and copy it
  6. Click Done to securely store the key

Setting up the Integration

  1. In Home Assistant, go to SettingsDevices & Services
  2. Click the "+" button to add a new integration
  3. Search for "UniFi Insights"
  4. Enter your:

Available Entities

Sensors

  • CPU Usage (%)
  • Memory Usage (%)
  • Uptime (seconds)
  • TX Rate (bytes/second)
  • RX Rate (bytes/second)

Binary Sensors

  • Device Status (online/offline)

Switches

  • Device Restart

Services

unifi_insights.refresh_data

Force an immediate refresh of UniFi Insights data.

service: unifi_insights.refresh_data
data:
  site_id: optional-site-id  # Optional

unifi_insights.restart_device

Restart a UniFi device.

service: unifi_insights.restart_device
data:
  site_id: your-site-id
  device_id: device-id-to-restart

Troubleshooting

Debug Logging

To enable debug logging, add the following to your configuration.yaml:

logger:
  default: info
  logs:
    custom_components.unifi_insights: debug

Common Issues

  • Cannot Connect: Verify your host URL and ensure your UniFi controller is accessible
  • Authentication Failed: Verify your API key and ensure it has the necessary permissions
  • No Data: Check that your devices are properly adopted in your UniFi controller

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the Apache License - see the LICENSE file for details.

Disclaimer

This integration is not officially affiliated with or endorsed by Ubiquiti Inc.

Support

For bugs and feature requests, please create an issue on GitHub.

About

Home Assistant integration that uses the UniFi Network API to monitor and manage UniFi devices

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages