Home

Awesome

UniFi Hotspot Manager

License Project Maintenance GitHub Activity

hacs Discord Community Forum

GitHub Release issues release-badge validate-badge lint-badge

UniFi Hotspot Manager as a Custom Component for Home Assistant.

This integration facilitates user-friendly management of guest Wi-Fi vouchers. By integrating with Home Assistant, users can swiftly and easily generate and display personalized access codes. These vouchers can then be shared with guests, granting temporary access to the Wi-Fi network.

Key features of the integration include:

The UniFi Hotspot Manager Integration provides a practical solution for the temporary provision of Wi-Fi access, seamlessly integrating into the Home Assistant environment for intuitive use.

The most UniFi Network Controller by Ubiquiti Networks, inc., e.g. Cloud Key 2, UDM, UDM Pro are supported.

Example of use

The voucher can be presented together with the QR code on a lovelace card:

Lovelace Card

<details> <summary>Blueprint of the example</summary> The example shown can be implemented as follows. The image file for the background must be stored in the `/config/www/` folder.
type: picture-elements
image: /local/hotspot-bg.jpg
elements:
  - type: state-label
    entity: image.123456789073fdb051c706194_qr_code
    attribute: wlan_name
    style:
      top: 15%
      left: 50%
      color: white
      font-size: 200%
      font-weight: bold
      cursor: default
    tap_action:
      action: none
    hold_action:
      action: none
  - type: image
    entity: image.123456789073fdb051c706194_qr_code
    style:
      top: 53%
      left: 20%
      width: 30%
      cursor: default
  - type: state-label
    entity: sensor.123456789073fdb051c706194_voucher
    style:
      top: 53%
      left: 67%
      background: rgba(11, 11, 11, 70%)
      padding: 10px
      height: 60px
      color: white
      border-radius: 12px
      font-size: 275%
      font-weight: bold
      cursor: default
    tap_action:
      action: none
    hold_action:
      action: none
  - type: state-label
    entity: sensor.123456789073fdb051c706194_voucher
    attribute: duration
    prefix: 'Duration: '
    style:
      top: 61%
      left: 67%
      color: white
      cursor: default
    tap_action:
      action: none
    hold_action:
      action: none
  - type: service-button
    title: Refresh
    style:
      transform: none
      bottom: 5%
      left: 5%
    service: button.press
    service_data:
      entity_id: button.123456789073fdb051c706194_update
  - type: service-button
    title: Create
    style:
      transform: none
      bottom: 5%
      right: 5%
    service: button.press
    service_data:
      entity_id: button.123456789073fdb051c706194_create
</details>

Installation

[!IMPORTANT] Requires Home Assistant 2024.8.0 or newer.

Installation through HACS

Installation using Home Assistant Community Store (HACS) is recommended.

  1. If HACS is not installed, follow HACS installation and configuration at https://hacs.xyz/.

  2. Click the button below or visit HACS and search for "UniFi Hotspot Manager" (make sure no type filter is set).

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

  3. Install the integration.

  4. Restart Home Assistant!

  5. Make sure that you refresh your browser window too.

Manual installation

  1. Download the unifi_voucher.zip file from the repository release section.

    Do not download directly from the main branch.

  2. Extract and copy the content into the path /config/custom_components/unifi_voucher of your HA installation.

  3. Restart Home Assistant!

  4. Make sure that you refresh your browser window too.

Setup integration

Start setup:

Configuration

Available components

Buttons

Images

This entity is disabled by default. You have to activate it if you want to use it.

Numbers

These entities are disabled by default. You have to activate it if you want to use it.

Sensors

Services

Debugging

To enable debug logging for this integration you can control this in your Home Assistant configuration.yaml file.

Set the logging to debug with the following settings in case of problems:

logger:
  default: warn
  logs:
    aiounifi: debug
    custom_components.unifi_voucher: debug

After a restart detailed log entries will appear in /config/home-assistant.log.