https://github.com/domalab/ha-unifi-insights
Home Assistant integration that uses the UniFi Network API to monitor and manage UniFi devices
https://github.com/domalab/ha-unifi-insights
hacs home-assistant unifi
Last synced: about 1 month ago
JSON representation
Home Assistant integration that uses the UniFi Network API to monitor and manage UniFi devices
- Host: GitHub
- URL: https://github.com/domalab/ha-unifi-insights
- Owner: domalab
- License: apache-2.0
- Created: 2025-01-17T01:40:56.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2025-03-07T03:21:40.000Z (about 2 months ago)
- Last Synced: 2025-03-07T04:25:49.509Z (about 2 months ago)
- Topics: hacs, home-assistant, unifi
- Language: Python
- Homepage:
- Size: 61.5 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# UniFi Insights Integration for Home Assistant
[![HACS Integration][hacsbadge]][hacs]
[](https://github.com/domalab/ha-unifi-insights/commits/main)
[](./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)
[](https://my.home-assistant.io/redirect/hacs_repository/?owner=domalab&repository=ha-unifi-insights&category=integration)
### 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](https://unifi.ui.com)
2. Navigate to **Control Plane** → **Admins & 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 **Settings** → **Devices & Services**
2. Click the "+" button to add a new integration
3. Search for "UniFi Insights"
4. Enter your:
- API Key
- Host URL (e.g., )## 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.
```yaml
service: unifi_insights.refresh_data
data:
site_id: optional-site-id # Optional
```### `unifi_insights.restart_device`
Restart a UniFi device.
```yaml
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`:
```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](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.
[hacs]: https://github.com/custom-components/hacs
[hacsbadge]: https://img.shields.io/badge/HACS-Default-orange.svg?style=for-the-badge