Skip to content

biofects/HA-UniFi-Site-Manager

🌐 UniFi Site Manager for Home Assistant

πŸ” About

A powerful Home Assistant integration that provides comprehensive monitoring and management capabilities for UniFi network devices across multiple sites through the UI.com API.

hacs_badge GitHub Release Project Maintenance


πŸ’Έ Donations Appreciated!

If you find this plugin useful, please consider donating. Your support is greatly appreciated!

Sponsor me on GitHub

Sponsor Me

or

Paypal

paypal

✨ Features

  • 🌐 Multi-Site Support: Monitor and manage multiple UniFi sites from a single dashboard
  • πŸ“Š ISP Metrics: Track network performance metrics including:
    • Latency (average, minimum, maximum)
    • Packet Loss (percentage and count)
    • Bandwidth (download and upload speeds)
    • WAN Status (uptime, downtime)
    • ISP Information (name, ASN)
  • πŸ”Œ Device Management:
    • Real-time device status monitoring
    • Detailed device information (model, version, IP)
    • Online/Offline state tracking
  • πŸ“ˆ Site Statistics:
    • Total and offline device counts
    • Client statistics (WiFi, wired, guest)
    • WAN uptime percentage
    • ISP information
  • πŸ”„ SD-WAN Configuration Monitoring:
    • Monitor SD-WAN configuration status
    • View configuration details and settings
    • Track configuration updates and changes
    • Support for multiple SD-WAN configs per site

πŸ“Έ Screenshots

Example Dashboard Devices View Device Example
Example Dashboard Devices View Device Example

πŸš€ Installation

HACS Installation (Recommended)

  1. Open HACS in your Home Assistant instance
  2. Click on "Integrations"
  3. Click the three dots in the top right corner
  4. Select "Custom repositories"
  5. Add this repository URL
  6. Select "Integration" as the category
  7. Click "Add"
  8. Find "UniFi Site Manager" in the integration list
  9. Click "Download"
  10. Restart Home Assistant

Manual Installation

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

βš™οΈ Configuration

  1. Go to Settings > Devices & Services
  2. Click "Add Integration"
  3. Search for "UniFi Site Manager"
  4. Enter your UI.com API key

πŸ“‘ Sensors

Site Sensor

  • State: Online/Offline (based on device status)
  • Attributes:
    • Site ID and Host ID
    • Description and Gateway MAC
    • Timezone
    • Device counts (total, offline)
    • Client counts (WiFi, wired, guest)
    • WAN uptime percentage
    • ISP information

Device Sensor

  • State: Online/Offline
  • Attributes:
    • Device ID and MAC address
    • Model and version
    • IP address
    • Last seen timestamp
    • Uptime

ISP Metrics Sensor

  • State: Current timestamp
  • Attributes:
    • Latency metrics (avg, min, max)
    • Packet loss (percentage, count)
    • Bandwidth (download/upload Mbps)
    • WAN metrics:
      • Latency (avg, max)
      • Bandwidth (download/upload kbps)
      • Packet loss
      • Uptime/downtime
      • ISP details (name, ASN)

SD-WAN Configuration Sensor

  • State: Configuration status (active, inactive, etc.)
  • Attributes:
    • Configuration ID and name
    • Description and type
    • Creation and last updated timestamps
    • Detailed configuration settings

πŸ“ˆ Changelog

Version 0.2.0

  • ✨ NEW: Added SD-WAN configuration monitoring support
  • ✨ NEW: Support for List SD-WAN Configs endpoint
  • ✨ NEW: Support for Get SD-WAN Config by ID endpoint
  • ✨ NEW: Support for Get SD-WAN Config Status endpoint
  • πŸ”§ IMPROVED: Enhanced error handling for missing SD-WAN configurations
  • πŸ”§ FIXED: Resolved device registry warnings for via_device references
  • πŸ”§ OPTIMIZED: Only creates SD-WAN sensors when configurations are available

Version 0.1.0

  • πŸŽ‰ Initial release
  • ✨ Multi-site support
  • ✨ ISP metrics monitoring
  • ✨ Device status tracking
  • ✨ Site statistics

⏱️ Update Interval

The integration updates every 15 minutes by default. This interval is configurable through the const.py file if needed.

πŸ”’ API Authentication

The integration uses API key authentication with the UI.com API. The API key is stored securely in Home Assistant's encrypted storage and is never exposed in plain text.

⚠️ Error Handling

The integration includes comprehensive error handling for:

  • API connection issues
  • Authentication failures
  • Missing or incomplete data
  • Network timeouts

πŸ”§ Debugging

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

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

🀝 Contributing

Feel free to contribute to this project. Please read the contributing guidelines before making a pull request.

πŸ“œ License

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

βš–οΈ Disclaimer

This integration is not affiliated with Ubiquiti Inc. or UI.com. All product names, logos, and brands are property of their respective owners.

About

Home Assistant plugin to gather details on multiple Ubiquiti Sites

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages