Skip to content

JackJPowell/hass-unfoldedcircle

Repository files navigation

Discord GitHub Release GitHub Downloads (all assets, all releases) Buy Me A Coffee/Beer

hass-unfoldedcircle

Unfolded Circle logo

Unfolded Circle for Home Assistant

Home Assistant integration for Unfolde Circle Remote Two.

Installation

There are two main ways to install this custom component within your Home Assistant instance:

  1. Using HACS (see https://hacs.xyz/ for installation instructions if you do not already have it installed):

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

    Or

    1. From within Home Assistant, click on the link to HACS
    2. Click on Integrations
    3. Click on the vertical ellipsis in the top right and select Custom repositories
    4. Enter the URL for this repository in the section that says Add custom repository URL and select Integration in the Category dropdown list
    5. Click the ADD button
    6. Close the Custom repositories window
    7. You should now be able to see the Unfolde Circle card on the HACS Integrations page. Click on INSTALL and proceed with the installation instructions.

    Restart your Home Assistant instance and then proceed to the Configuration section below.

  2. Manual Installation:

    1. Download or clone this repository
    2. Copy the contents of the folder custom_components/unfoldedcircle into the same file structure on your Home Assistant instance
    3. Restart your Home Assistant instance and then proceed to the Configuration section below.

While the manual installation above seems like less steps, it's important to note that you will not be able to see updates to this custom component unless you are subscribed to the watch list. You will then have to repeat each step in the process. By using HACS, you'll be able to see that an update is available and easily update the custom component. Trust me, HACS is the worth the small upfront investment to get it setup.

Configuration

There is a config flow for this integration. After installing the custom component and restarting:

  1. You should receive a notification that a new device was discovered.
  2. Navigate to Settings -> Devices & Services and click Configure on the newly discovered Remote Two Device.
  3. You will now begin the configuration flow process
  4. PIN can be found on the remote by enabling the web configurator
    1. Enable the web configurator by tapping in the upper right on your profile icon
    2. Make sure the toggle is 'ON' and a PIN will be displayed. If not, click the refresh button
    3. The PIN is only required during initial setup. You are free to change it immediately after
  5. Click Submit and select your device area.

Alternatively, if you do not have zeroconf discovery enabled, or your remote was not automatically discovered:

  1. Go to Settings -> Devices & Services -> Integrations
  2. Click + ADD INTEGRATION to setup a new integration
  3. Search for Unfolded Circle and select it
  4. You will now begin the configuration flow process
  5. PIN can be found on the remote by enabling the web configurator
    1. Enable the web configurator by tapping in the upper right on your profile icon
    2. Make sure the toggle is 'ON' and a PIN will be displayed. If not, click the refresh button
    3. The PIN is only required during initial setup. You are free to change it immediately after
  6. Host is the IP address or hostname of your remote
    1. (Optional) If you have a custom api url, you can pass in the full endpoint address

Usage

After the device is configured, the integration will expose 22 entities plus the number of activities you have defined on your remote. These are grouped by device. Four of these entities will be disabled by default. These are all diagnostic in nature and report the device stats and if polling of the remote is enabled. (This is only true if any of the three device stat entities are enabled.)

  • Sensors

    • Battery Level: Reporting current charge percentage
    • Illuminance: Reporting current lux value from ambient light sensor
    • Resource Usage**: CPU load, Memory, and Storage Statistics
    • Configuration Sensors: All boolean settings are now controllable via the integration
  • Binary Sensor

    • Battery Charging Status: Charging state of device: Helpful in automations to tell if the device is charging (online and available)
  • Update

    • Verion info: Reports the current and latest version of the remote firware
    • The ability to install Remote Two firmware from within home assistant including progress and release notes
    • If the firmware has not been downloaded when the install is initiated, the first 10% of the progress bar will be used to show download progress. If no progress has been made in 30 seconds, the update will stop and not be applied
  • Switches

    • A switch is created for every activity defined that is not apart of an activity group.
      • An option exists to create a switch for each activity regardless of activity group.
  • Select

    • A select is created for every activity group defined.
      • An option exists to suppress the creation of activity groups
  • Button

    • A button is available to restart the remote.
  • Remote

    • A remote is available to send pre-configured IR commands from the dock (See Below). It also provides a select to activate an activity and extra state about the status of activities and media player entities
  • Media player

    • A media player entity is created providing controls and information about currently playing media. If multiple media player entities are active, the integration attempts to select the most appropriate based on activity and recency.
      • You can override this behavior by selecting a different media source from the sound mode menu in the Media Player control
      • Options exist to create a media player per activity group or per activity.
    • Update The media player controls are now mapped to the selected activity's button mapping on the remote. The default is still the active media player, but if you have defined custom volume, next, previous, or power button commands, those will be executed when interacting with the control within home assistant.
  • Number

    • Configuration Controls: All numerical settings are now controllable via the integration.

    ** Disabled by default to avoid polling the remote every thirty seconds to read data. If one of these sensors is enabled, polling only for that specific data will also be enabled.

IR Remote Commands

How to interact with the Remote Service: The remote entity supports sending IR commands using the remote.send_command service.

service: remote.send_command
data:
  device: Receiver
  command: Power
target:
  entity_id: remote.remote_two_remote

[!TIP] > device: will match the case-sensitive name of your remote defined in the web configurator on the remote page. command will match the case-senstitive name of the pre-defined (custom or codeset) command defined for that remote. num_repeats is optional.

Additional Services

There is now a service to update defined activities. This will be initially released with the option to enable/disable the 'prevent sleep' option within the selected activity.

service: unfoldedcircle.update_activity
target:
  entity_id: switch.remote_two_control_projector
data:
  prevent_sleep: true

Update Activity

Options

Additional options have been added to the intergration for further customization:

  • Activity Options:
    • Create all activities as switches
    • Suppress the creation of activity groups as selects (best combined with the previous option)
  • Media Player Options:
    • Create a global media player
    • Create a media player for each activity group on your remote
    • Create a media player for each activity on your remote

Zeroconf

Your Remote Two will now be automatically discovered on the network. Zeroconf handling has been significantly improved and should now properly detect when a device has already been configured.

Future Ideas

  • Once WOL is added by the remote developers, implement it in the hass integration to wake the remote prior to sending commands

Notes

  • The remote entity does not need to be "on" for it to send commands.
  • The Remote Two will go to sleep when unpowered. When this occurs, Home Assistant is unable to communicate with the remote and retrieve updates.
  • The remote can now generate its own diagnostic data to aid in debugging via the overflow menu in the Device Info section
  • The integration supports multiple Languages: English, French
  • The integration will now identify a repair and prompt for a new PIN if it can no longer authenticate to the remote

About This Project

I am not associated with Unfolded Circle, and provide this custom component purely for your own enjoyment and home automation needs. Those guys are awesome though!