Remote Two/3 WebSocket Integration APIย 0.12.1-beta

API definition of the Unfolded Circle WebSocket Integration-API for Remote Two/3 (UCR Integration-API in short).

API message status legend:

Icon Description
๐Ÿ’ก Idea, not yet official part of API definition.
๐Ÿšง Planned feature and most likely not (fully) implemented in the initial release.
๐Ÿ‘ท API definition is work in progress, not ready yet for implementation.
๐Ÿ” Api definition review & implementation.
๐Ÿงช API has been implemented in the UC Remote and is currently being tested.
๐Ÿš€ Ready to use - feedback welcomed.

Simple integrations with static entities don't need to implement all messages.
All required messages are tagged with the ๐Ÿ• emoji.

Overview

The UCR Integration-API allows writing device integration drivers for the Unfolded Circle Remotes.

โ„น๏ธ Starting with the UCR2 firmware beta release 1.9.0, custom integration drivers can be installed on the UC Remote.

The integration driver acts as server and the UC Remote as client. The remote connects to the integration when an integration instance is configured. Whenever the remote enters standby it may choose to disconnect and connect again after wakeup.

The goal of the Integration-API is to cover simple static drivers like controlling GPIOs on a Raspberry Pi, up to integrating existing home automation hubs like Home Assistant, Homey, ioBroker, openHAB etc.
The focus of the integration API is on entity integration, not on controlling or configuring the UC Remote. Please refer to the Core-API for other functionality: https://github.com/unfoldedcircle/core-api

API Versioning

The API is versioned according to SemVer.
The initial public release will be 1.0.0 once it is considered stable enough with some initial integration implementations and developer examples.

Any major version zero (0.y.z) is for initial development and may change at any time!
I.e. backward compatibility for minor releases is not yet established, anything MAY change at any time!

Servers

  • localhost:8001wstest

    Local test server.

    Security:
    • HTTP API key
      • Name: auth-token
      • In: header

      The API token is either provided in the auth-token header while upgrading to a WebSocket connection, or with an authentication message.

      • If the integration driver doesn't support header based authentication, it must send the auth_required message event after the WebSocket connection is established. The UC Remote will then authenticate with the auth request message.
      • If the driver doesn't support or require authentication, it still needs to send the authentication message with code: 200 and req_id: 0 after the WebSocket connection has been established by the UC Remote.
  • localhost:8443wsstest-wss

    Local test server.

    Security:
    • HTTP API key
      • Name: auth-token
      • In: header

      The API token is either provided in the auth-token header while upgrading to a WebSocket connection, or with an authentication message.

      • If the integration driver doesn't support header based authentication, it must send the auth_required message event after the WebSocket connection is established. The UC Remote will then authenticate with the auth request message.
      • If the driver doesn't support or require authentication, it still needs to send the authentication message with code: 200 and req_id: 0 after the WebSocket connection has been established by the UC Remote.

Operations

  • PUB /intg

    Integration API for the UC Remote to interact with custom devices.
    The publish channel lists all messages that the UC Remote sends to an integration driver server.

    Operation IDpubIntegrationMessage

    Accepts one of the following messages:

    • #0auth

      ๐Ÿš€ Authenticate a connection.

      Sent by the UC Remote after an auth_required request by the integration driver.

      object allOf
      uid: authRequestMsg

      Examples

    • #1get_driver_version

      ๐Ÿš€ ๐Ÿ• Get version information about the integration driver.

      object allOf
      uid: getDriverVersionMsg
      • #required

      Examples

    • #2get_driver_metadata

      ๐Ÿš€ ๐Ÿ• Retrieve the integration driver metadata.

      The metadata is used to setup the driver in the remote / web-configurator and start the setup flow.

      object allOf
      uid: getDriverMetadataMsg
      • #metadata
      • #required

      Examples

    • #3connect

      ๐Ÿงช Event to establish connection to entities or devices.

      Optional: this event instructs the integration to establish the required connections to interact with the provided entities or devices.

      The integration should send device_state events to inform the UC Remote about the connection state.

      object allOf
      uid: connectEvent

      For simple drivers without dynamic devices the msg_data object can be omitted. In this case, the connect event is for the overall integration driver and not for a specific device.

      • #device
      • #event

      Examples

    • #4disconnect

      ๐Ÿงช Event to stop the connection to entities or devices.

      Optional: this event instructs the integration to stop the interactions with the provided entities or devices, because the UC Remote temporarily doesn't need the entities. It's up to the integration what to do, but it needs to be prepared to react on a connect event.

      The integration should send device_state events to inform the UC Remote about the connection state.

      object allOf
      uid: disconnectEvent

      For simple drivers without dynamic devices the msg_data object can be omitted. In this case, the disconnect event is for the overall integration driver and not for a specific device.

      • #device
      • #event

      Examples

    • #5get_device_state

      ๐Ÿš€ ๐Ÿ• Get the current integration driver or device state.

      Called by the UC Remote when it needs to synchronize the device state, e.g. after waking up from standby, or if it doesn't receive regular device_state events.

      The device_id property is only required if the driver supports multiple device instances.

      Note: this request will not be answered with a response message but with an event.

      object allOf
      uid: getDeviceStateMsg

      For simple drivers without dynamic devices the msg_data object can be omitted. In this case, the request is for the overall integration driver and not for a specific device.

      • #device
      • #required

      Examples

    • #6setup_driver

      ๐Ÿš€ Start driver setup.

      If a driver includes a setup_data_schema object in its driver metadata, it enables the dynamic driver setup process. The setup process can be a simple "start-confirm-done" between the UC Remote and the integration driver, or a fully dynamic, multi-step process with user interactions, where the user has to provide additional data or select different options.

      The reconfigure flag indicates if the user wants to reconfigure an already configured driver in the Remote. It's up to the driver on how to handle a reconfiguration request and run a different logic. For example, this allows to show an options screen to change certain values, or present the option to modify, add or delete provided device entities.

      After confirming the setup_driver request, the integration driver has to send driver_setup_change events:

      • event_type: SETUP with state: SETUP is a progress event to keep the process running, see below.
      • event_type: SETUP with state: WAIT_USER_ACTION can be sent to the UC Remote to request a user interaction: either a confirmation to press next to continue the process, or input values.
      • event_type: STOP with event: OK finishes the setup process and the UC Remote creates an integration instance.
      • event_type: STOP with event: ERROR aborts the setup process.

      โš ๏ธ If the setup process takes more than a few seconds, the integration should send driver_setup_change events with state: SETUP to the UC Remote to show a setup progress to the user and prevent an inactivity timeout.
      Default setup timeouts:

      • Setup progress (watchdog): 60 seconds. If no setup message is received within that time, the setup process is aborted.
      • User action timeout: 3 minutes. If there's no user response within that time, the setup process is aborted.
      • Overall setup timeout: 5 minutes. The setup process is automatically aborted if it is still running after that time.

      If no setup is needed, but the integration driver requires to show additional information to the user before the integration is setup (e.g. terms & conditions, further help information or web links, etc.), it can define an "information settings page" with text labels in setup_data_schema without any input fields. In this case the integration simply has to respond with a driver_setup_change event message with event_type: STOP and state: OK after confirming the setup_driver request message.

      object allOf
      uid: setupDriverMsg
      • #setup

      Examples

    • #7set_driver_user_data

      ๐Ÿš€ Provide requested driver setup data.

      Set required data to configure the integration driver or continue the setup process.

      Defined user actions to set in the request body action field:

      • input_values: if the user was requested to enter settings, e.g. connection or credential parameters to a device or service.
      • confirm: response to the user action confirmation. Set to true if the user had to perform an action like pressing a button on a device and then confirms the action with continuing the setup process.
        โš ๏ธ The false value is not yet used but might be used in the future for yes / no choices.

      The state field in the response message indicate the current state of the setup process.

      object allOf
      uid: setDriverUserDataMsg
      • #setup

      Examples

    • #8abort_driver_setup

      ๐Ÿš€ Abort a driver setup.

      If the user aborts the setup process, the UC Remote sends this event. Further messages from the integration from the setup process will be ignored afterwards.

      object allOf
      uid: abortDriverSetupEvent
      • #setup
      • #event

      Examples

    • #9get_available_entities

      ๐Ÿš€ ๐Ÿ• Retrieve the available entities from the integration driver.

      Called while configuring profiles and assigning entities to pages or groups in the web-configurator or the embedded editor of the remote UI.

      With the optional filter, only entities of a given type can be requested.

      object allOf
      uid: getAvailableEntitiesMsg
      • TODO add paging: worst case this could include hundreds if not thousands of entities!
      • #entity
      • #required

      Examples

    • #10subscribe_events

      ๐Ÿš€ ๐Ÿ• Subscribe to events.

      Subscribe to entity state change events to receive entity_change events from the integration driver.

      If no entity IDs are specified then events for all available entities are sent to the UC Remote.

      object allOf
      uid: subscribeEventsMsg
      • #entity
      • #required

      Examples

    • #11unsubscribe_events

      ๐Ÿงช Unsubscribe from events.

      If no entity IDs are specified then all events for all available entities are stopped.

      This message is sent by the UC Remote if a previously configured entity is no longer used and therefore no longer interested in entity updates. If the integration driver keeps sending events for the unsubscribed entities then they are simply discarded.

      object allOf
      uid: unsubscribeEventsMsg
      • #entity

      Examples

    • #12get_entity_states

      ๐Ÿš€ ๐Ÿ• Get the current state of the configured entities.

      Called by the UC Remote when it needs to synchronize the dynamic entity attributes, e.g. after connection setup or waking up from standby.

      The integration should only send the state of the configured entities to reduce communication overhead, especially if there are many available entities, from which only a few are getting configured on the remote.
      Any additional data will be ignored.

      Furthermore, the integration driver is free to decide which entity states it wants to send back. It's even advisable to use dirty flags in the integration driver if there are a lot of entities, and only return the changed data.

      โš ๏ธ Future change announcement: this request will be enhanced with a force flag (or the like) to signal that all entity states are required, and no data should be suppressed. This will happen for example after the remote is restarted.

      object allOf
      uid: getEntityStatesMsg

      For simple drivers without dynamic devices the msg_data.device_id property can be omitted. In this case, the request is for the overall integration driver and not for a specific device.

      • #entity
      • #required

      Examples

    • #13entity_command

      ๐Ÿš€ ๐Ÿ• Execute an entity command.

      Instruct the integration driver to execute a command like "turn on" or "change temperature". Optional command data like temperature value or channel number can be provided in the params array. The parameter objects are described in the entity feature definitions.

      The result response is to acknowledge the command and to return any immediate failures in case the driver already knows it's unable to perform the command due to invalid data, device communication issues etc.

      After successfully executing a command, the UC Remote expects an entity_change event with the updated feature value(s).

      object allOf
      uid: entityCommandMsg
      • #entity
      • #required

      Examples

    • #14enter_standby

      ๐Ÿš€ UC Remote goes into standby event.

      Notification event that the UC Remote goes into standby mode and won't process incoming events anymore.

      object allOf
      uid: enterStandbyEvent

      TODO add standby type in msg_data? E.g. "screen off" & "sleep" for the integration to be notified that the UC Remote is no longer reachable? While the screen is off, the remote API is still running, but might soon go into sleep state.

      • #device
      • #entity
      • #event

      Examples

    • #15exit_standby

      ๐Ÿš€ UC Remote leaves standby event.

      Notification event that the UC Remote is out of standby. The integration should resume operation if it suspended it while receiving the enter_standby event.
      This allows the integration to submit any entity state changes. Otherwise the UC Remote will likely request an entity state update.

      object allOf
      uid: exitStandbyEvent
      • #device
      • #entity
      • #event

      Examples

    • #16version

      ๐Ÿงช Remote version information response.

      object allOf
      uid: versionMsg

      Examples

    • #17supported_entity_types

      ๐Ÿš€ Supported entity types response.

      object allOf
      uid: supportedEntityTypesMsg
      • #entity
      • #metadata

      Examples

    • #18configured_entities

      ๐Ÿš€ Configured entities response.

      The returned entity identifiers are configured in the Remote.

      object allOf
      uid: configuredEntitiesMsg
      • #entity

      Examples

    • #19localization_cfg

      ๐Ÿงช Active localization settings of the UC Remote.

      allOf
      uid: localizationMsg
      • #metadata

      Examples

    • #20runtime_info

      ๐Ÿ” Driver runtime information from the UC Remote.

      allOf
      uid: runtimeInfoMsg
      • #metadata

      Examples

  • SUB /intg

    Integration API for the UC Remote to receive messages from integration drivers.
    The subscribe channel lists all messages that the integration driver server sends to the UC Remote.

    Operation IDsubIntegrationMessage

    Accepts one of the following messages:

    • #0auth_required

      ๐Ÿš€ Authentication request event after connection is established.

      This event is only sent if the integration doesn't support header based authentication during connection setup.
      The UC Remote will then authenticate with the auth request message.

      object allOf
      uid: authRequiredEvent
      • #event

      Examples

    • #1authentication

      ๐Ÿš€ ๐Ÿ• Authentication response.

      The authentication result is provided in the code attribute:

      • 200: success, API can be used and message requests are accepted.
      • 401: authentication failed, the provided token is not valid.
        The UC Remote will close the connection. The driver should also close the connection after sending this response.

      If the driver doesn't support or require authentication, it still needs to send the authentication message with code: 200 and req_id: 0 after the WebSocket connection has been established by the UC Remote.

      It's recommended to send the optional driver version object in the the msg_data payload to avoid eventual additional message exchanges.

      object allOf
      uid: authMsg
      • #required

      Examples

    • #2result

      ๐Ÿš€ ๐Ÿ• Command result message.

      A result message is a response message containing a result code and optional error information without further payload.

      object
      uid: commonResp

      Common response message properties.

      • #required

      Examples

    • #3driver_version

      ๐Ÿš€ ๐Ÿ• Integration driver version information response.

      object allOf
      uid: driverVersionMsg
      • #required

      Examples

    • #4driver_metadata

      ๐Ÿงช ๐Ÿ• Integration driver metadata response.

      object allOf
      uid: driverMetadataMsg
      • #metadata
      • #required

      Examples

    • #5device_state

      ๐Ÿš€ ๐Ÿ• Current integration driver or device state event.

      If there's a device communication issue or other error, this state will inform the user with a UI notification about the issue.

      This event should be triggered by the integration driver whenever the state changes. Furthermore, the UC Remote can request the current state with the get_device_state request.

      object allOf
      uid: deviceStateEventMsg
      • #device
      • #required

      Examples

    • #6driver_setup_change

      ๐Ÿš€ Driver setup state change event.

      Emitted for all driver setup flow state changes.

      Different change events:

      • SETUP: send progress, setup is still running
      • WAIT_USER_ACTION: integration driver requires user input
      • OK: integration setup successfully completed
      • ERROR: integration setup failed
      object allOf
      uid: driverSetupChangeEvent
      • #setup
      • #event

      Examples

    • #7entity_states

      ๐Ÿš€ ๐Ÿ• Current state of the entities.

      Response message of the get_entity_states request. Contains the dynamic attributes of all entities.

      object allOf
      uid: entityStatesMsg

      The msg_data payload is an array of the entity_change event.

      • #entity
      • #required

      Examples

    • #8available_entities

      ๐Ÿš€ ๐Ÿ• Available entities response.

      This message contains the available entities from the integration driver the UC Remote can configure.

      If the get_available_entities request included a filter, it is returned in the message data with only the matching entities.

      object allOf
      uid: availableEntitiesMsg
      • #entity
      • #required

      Examples

    • #9entity_change

      ๐Ÿš€ ๐Ÿ• Entity state change event.

      Emitted when an attribute of an entity changes, e.g. is switched off. Either after an entity_command or if the entity is updated manually through a user or an external system. This keeps the UC Remote in sync with the real state of the entity without the need of constant polling.

      object allOf
      uid: entityStateChangedEvent

      An entity attribute has changed.

      • #entity
      • #event
      • #required

      Examples

    • #10entity_available

      ๐Ÿ” New entity available event.

      Optional event to notify the UC Remote that new entities are available.

      object allOf
      uid: entityAvailableEvent
      • #entity
      • #event

      Examples

    • #11entity_removed

      ๐Ÿ” Entity removed event.

      Optional event to notify the UC Remote that entities were removed and no longer available.

      object allOf
      uid: entityRemovedEvent
      • #entity
      • #event

      Examples

    • #12get_version

      ๐Ÿงช Get UC Remote version information.

      โ„น๏ธ๏ธ implemented in firmware 0.9.2.

      object allOf
      uid: getVersionMsg

      Examples

    • #13get_supported_entity_types

      ๐Ÿงช Get supported entities in the UC Remote.

      โ„น๏ธ๏ธ implemented in firmware 0.9.2.

      This is a metadata request for supported entities in the UC Remote and allows the client to check if it's still compatible. New releases can support new entities or entities might get renamed in major updates.

      object allOf
      uid: getSupportedEntityTypesMsg
      • #entity
      • #metadata

      Examples

    • #14get_configured_entities

      ๐Ÿงช Retrieve configured entities from this integration.

      โ„น๏ธ๏ธ implemented in firmware 0.9.2.

      Request the configured entities in the UC Remote originating from this integration. These are all the entities which have been configured in the UC Remote.
      โš ๏ธ This doesn't mean that all entities are actively being used (assigned in a profile and shown in the user interface).

      This allows the driver e.g. to optimize its device communication and only consider actively used entities.
      Another option for the driver to be notified about used entities is through the subscribe_events requests.

      object allOf
      uid: getConfiguredEntitiesMsg
      • #entity

      Examples

    • #15get_localization_cfg

      ๐Ÿงช Retrieve the localization settings of the UC Remote.

      โ„น๏ธ๏ธ implemented in firmware 0.9.2.

      The active localization settings of the UC Remote can be used if the integration driver requires localized settings for texts or units of measurements.

      For language texts the driver should always provide an english option in addition to any localized texts.

      object allOf
      uid: getLocalizationMsg
      • #metadata

      Examples

    • #16get_runtime_info

      ๐Ÿ” Retrieve driver runtime information from the Remote.

      โ„น๏ธ๏ธ implemented in firmware 0.9.2.

      Request driver runtime information from the Remote. This returns driver and instance identifiers for advanced usage of the REST Core-API. These identifiers could also be propagated to a home automation system to interact with the Remote and REST Core-API.

      object allOf
      uid: getRuntimeInfoMsg
      • #metadata

      Examples

Messages

  • #1request

    ๐Ÿš€ Generic request message.

    This message defines the common structure of a request message. The receiver must reply with a response message.

    object
    uid: commonReq

    Common request message properties.

  • #2response

    ๐Ÿš€ Generic response message.

    This message defines the common structure of a response message which is sent back after receiving a request message.

    object
    uid: commonResp

    Common response message properties.

  • #3event

    ๐Ÿš€ Generic event message.

    object
    uid: commonEvent

    Common event message properties.

  • #4result

    ๐Ÿš€ ๐Ÿ• Command result message.

    A result message is a response message containing a result code and optional error information without further payload.

    object
    uid: commonResp

    Common response message properties.

    • #required
  • #5auth_required

    ๐Ÿš€ Authentication request event after connection is established.

    This event is only sent if the integration doesn't support header based authentication during connection setup.
    The UC Remote will then authenticate with the auth request message.

    object allOf
    uid: authRequiredEvent
    • #event
  • #6auth

    ๐Ÿš€ Authenticate a connection.

    Sent by the UC Remote after an auth_required request by the integration driver.

    object allOf
    uid: authRequestMsg
  • #7authentication

    ๐Ÿš€ ๐Ÿ• Authentication response.

    The authentication result is provided in the code attribute:

    • 200: success, API can be used and message requests are accepted.
    • 401: authentication failed, the provided token is not valid.
      The UC Remote will close the connection. The driver should also close the connection after sending this response.

    If the driver doesn't support or require authentication, it still needs to send the authentication message with code: 200 and req_id: 0 after the WebSocket connection has been established by the UC Remote.

    It's recommended to send the optional driver version object in the the msg_data payload to avoid eventual additional message exchanges.

    object allOf
    uid: authMsg
    • #required
  • #8get_driver_version

    ๐Ÿš€ ๐Ÿ• Get version information about the integration driver.

    object allOf
    uid: getDriverVersionMsg
    • #required
  • #9driver_version

    ๐Ÿš€ ๐Ÿ• Integration driver version information response.

    object allOf
    uid: driverVersionMsg
    • #required
  • #10get_driver_metadata

    ๐Ÿš€ ๐Ÿ• Retrieve the integration driver metadata.

    The metadata is used to setup the driver in the remote / web-configurator and start the setup flow.

    object allOf
    uid: getDriverMetadataMsg
    • #metadata
    • #required
  • #11driver_metadata

    ๐Ÿงช ๐Ÿ• Integration driver metadata response.

    object allOf
    uid: driverMetadataMsg
    • #metadata
    • #required
  • #12enter_standby

    ๐Ÿš€ UC Remote goes into standby event.

    Notification event that the UC Remote goes into standby mode and won't process incoming events anymore.

    object allOf
    uid: enterStandbyEvent

    TODO add standby type in msg_data? E.g. "screen off" & "sleep" for the integration to be notified that the UC Remote is no longer reachable? While the screen is off, the remote API is still running, but might soon go into sleep state.

    • #device
    • #entity
    • #event
  • #13exit_standby

    ๐Ÿš€ UC Remote leaves standby event.

    Notification event that the UC Remote is out of standby. The integration should resume operation if it suspended it while receiving the enter_standby event.
    This allows the integration to submit any entity state changes. Otherwise the UC Remote will likely request an entity state update.

    object allOf
    uid: exitStandbyEvent
    • #device
    • #entity
    • #event
  • #14connect

    ๐Ÿงช Event to establish connection to entities or devices.

    Optional: this event instructs the integration to establish the required connections to interact with the provided entities or devices.

    The integration should send device_state events to inform the UC Remote about the connection state.

    object allOf
    uid: connectEvent

    For simple drivers without dynamic devices the msg_data object can be omitted. In this case, the connect event is for the overall integration driver and not for a specific device.

    • #device
    • #event
  • #15disconnect

    ๐Ÿงช Event to stop the connection to entities or devices.

    Optional: this event instructs the integration to stop the interactions with the provided entities or devices, because the UC Remote temporarily doesn't need the entities. It's up to the integration what to do, but it needs to be prepared to react on a connect event.

    The integration should send device_state events to inform the UC Remote about the connection state.

    object allOf
    uid: disconnectEvent

    For simple drivers without dynamic devices the msg_data object can be omitted. In this case, the disconnect event is for the overall integration driver and not for a specific device.

    • #device
    • #event
  • #16get_device_state

    ๐Ÿš€ ๐Ÿ• Get the current integration driver or device state.

    Called by the UC Remote when it needs to synchronize the device state, e.g. after waking up from standby, or if it doesn't receive regular device_state events.

    The device_id property is only required if the driver supports multiple device instances.

    Note: this request will not be answered with a response message but with an event.

    object allOf
    uid: getDeviceStateMsg

    For simple drivers without dynamic devices the msg_data object can be omitted. In this case, the request is for the overall integration driver and not for a specific device.

    • #device
    • #required
  • #17device_state

    ๐Ÿš€ ๐Ÿ• Current integration driver or device state event.

    If there's a device communication issue or other error, this state will inform the user with a UI notification about the issue.

    This event should be triggered by the integration driver whenever the state changes. Furthermore, the UC Remote can request the current state with the get_device_state request.

    object allOf
    uid: deviceStateEventMsg
    • #device
    • #required
  • #18setup_driver

    ๐Ÿš€ Start driver setup.

    If a driver includes a setup_data_schema object in its driver metadata, it enables the dynamic driver setup process. The setup process can be a simple "start-confirm-done" between the UC Remote and the integration driver, or a fully dynamic, multi-step process with user interactions, where the user has to provide additional data or select different options.

    The reconfigure flag indicates if the user wants to reconfigure an already configured driver in the Remote. It's up to the driver on how to handle a reconfiguration request and run a different logic. For example, this allows to show an options screen to change certain values, or present the option to modify, add or delete provided device entities.

    After confirming the setup_driver request, the integration driver has to send driver_setup_change events:

    • event_type: SETUP with state: SETUP is a progress event to keep the process running, see below.
    • event_type: SETUP with state: WAIT_USER_ACTION can be sent to the UC Remote to request a user interaction: either a confirmation to press next to continue the process, or input values.
    • event_type: STOP with event: OK finishes the setup process and the UC Remote creates an integration instance.
    • event_type: STOP with event: ERROR aborts the setup process.

    โš ๏ธ If the setup process takes more than a few seconds, the integration should send driver_setup_change events with state: SETUP to the UC Remote to show a setup progress to the user and prevent an inactivity timeout.
    Default setup timeouts:

    • Setup progress (watchdog): 60 seconds. If no setup message is received within that time, the setup process is aborted.
    • User action timeout: 3 minutes. If there's no user response within that time, the setup process is aborted.
    • Overall setup timeout: 5 minutes. The setup process is automatically aborted if it is still running after that time.

    If no setup is needed, but the integration driver requires to show additional information to the user before the integration is setup (e.g. terms & conditions, further help information or web links, etc.), it can define an "information settings page" with text labels in setup_data_schema without any input fields. In this case the integration simply has to respond with a driver_setup_change event message with event_type: STOP and state: OK after confirming the setup_driver request message.

    object allOf
    uid: setupDriverMsg
    • #setup
  • #19abort_driver_setup

    ๐Ÿš€ Abort a driver setup.

    If the user aborts the setup process, the UC Remote sends this event. Further messages from the integration from the setup process will be ignored afterwards.

    object allOf
    uid: abortDriverSetupEvent
    • #setup
    • #event
  • #20driver_setup_change

    ๐Ÿš€ Driver setup state change event.

    Emitted for all driver setup flow state changes.

    Different change events:

    • SETUP: send progress, setup is still running
    • WAIT_USER_ACTION: integration driver requires user input
    • OK: integration setup successfully completed
    • ERROR: integration setup failed
    object allOf
    uid: driverSetupChangeEvent
    • #setup
    • #event
  • #21set_driver_user_data

    ๐Ÿš€ Provide requested driver setup data.

    Set required data to configure the integration driver or continue the setup process.

    Defined user actions to set in the request body action field:

    • input_values: if the user was requested to enter settings, e.g. connection or credential parameters to a device or service.
    • confirm: response to the user action confirmation. Set to true if the user had to perform an action like pressing a button on a device and then confirms the action with continuing the setup process.
      โš ๏ธ The false value is not yet used but might be used in the future for yes / no choices.

    The state field in the response message indicate the current state of the setup process.

    object allOf
    uid: setDriverUserDataMsg
    • #setup
  • #22get_available_entities

    ๐Ÿš€ ๐Ÿ• Retrieve the available entities from the integration driver.

    Called while configuring profiles and assigning entities to pages or groups in the web-configurator or the embedded editor of the remote UI.

    With the optional filter, only entities of a given type can be requested.

    object allOf
    uid: getAvailableEntitiesMsg
    • TODO add paging: worst case this could include hundreds if not thousands of entities!
    • #entity
    • #required
  • #23available_entities

    ๐Ÿš€ ๐Ÿ• Available entities response.

    This message contains the available entities from the integration driver the UC Remote can configure.

    If the get_available_entities request included a filter, it is returned in the message data with only the matching entities.

    object allOf
    uid: availableEntitiesMsg
    • #entity
    • #required
  • #24subscribe_events

    ๐Ÿš€ ๐Ÿ• Subscribe to events.

    Subscribe to entity state change events to receive entity_change events from the integration driver.

    If no entity IDs are specified then events for all available entities are sent to the UC Remote.

    object allOf
    uid: subscribeEventsMsg
    • #entity
    • #required
  • #25unsubscribe_events

    ๐Ÿงช Unsubscribe from events.

    If no entity IDs are specified then all events for all available entities are stopped.

    This message is sent by the UC Remote if a previously configured entity is no longer used and therefore no longer interested in entity updates. If the integration driver keeps sending events for the unsubscribed entities then they are simply discarded.

    object allOf
    uid: unsubscribeEventsMsg
    • #entity
  • #26get_version

    ๐Ÿงช Get UC Remote version information.

    โ„น๏ธ๏ธ implemented in firmware 0.9.2.

    object allOf
    uid: getVersionMsg
  • #27version

    ๐Ÿงช Remote version information response.

    object allOf
    uid: versionMsg
  • #28get_supported_entity_types

    ๐Ÿงช Get supported entities in the UC Remote.

    โ„น๏ธ๏ธ implemented in firmware 0.9.2.

    This is a metadata request for supported entities in the UC Remote and allows the client to check if it's still compatible. New releases can support new entities or entities might get renamed in major updates.

    object allOf
    uid: getSupportedEntityTypesMsg
    • #entity
    • #metadata
  • #29supported_entity_types

    ๐Ÿš€ Supported entity types response.

    object allOf
    uid: supportedEntityTypesMsg
    • #entity
    • #metadata
  • #30get_configured_entities

    ๐Ÿงช Retrieve configured entities from this integration.

    โ„น๏ธ๏ธ implemented in firmware 0.9.2.

    Request the configured entities in the UC Remote originating from this integration. These are all the entities which have been configured in the UC Remote.
    โš ๏ธ This doesn't mean that all entities are actively being used (assigned in a profile and shown in the user interface).

    This allows the driver e.g. to optimize its device communication and only consider actively used entities.
    Another option for the driver to be notified about used entities is through the subscribe_events requests.

    object allOf
    uid: getConfiguredEntitiesMsg
    • #entity
  • #31configured_entities

    ๐Ÿš€ Configured entities response.

    The returned entity identifiers are configured in the Remote.

    object allOf
    uid: configuredEntitiesMsg
    • #entity
  • #32get_localization_cfg

    ๐Ÿงช Retrieve the localization settings of the UC Remote.

    โ„น๏ธ๏ธ implemented in firmware 0.9.2.

    The active localization settings of the UC Remote can be used if the integration driver requires localized settings for texts or units of measurements.

    For language texts the driver should always provide an english option in addition to any localized texts.

    object allOf
    uid: getLocalizationMsg
    • #metadata
  • #33localization_cfg

    ๐Ÿงช Active localization settings of the UC Remote.

    allOf
    uid: localizationMsg
    • #metadata
  • #34get_runtime_info

    ๐Ÿ” Retrieve driver runtime information from the Remote.

    โ„น๏ธ๏ธ implemented in firmware 0.9.2.

    Request driver runtime information from the Remote. This returns driver and instance identifiers for advanced usage of the REST Core-API. These identifiers could also be propagated to a home automation system to interact with the Remote and REST Core-API.

    object allOf
    uid: getRuntimeInfoMsg
    • #metadata
  • #35runtime_info

    ๐Ÿ” Driver runtime information from the UC Remote.

    allOf
    uid: runtimeInfoMsg
    • #metadata
  • #36get_entity_states

    ๐Ÿš€ ๐Ÿ• Get the current state of the configured entities.

    Called by the UC Remote when it needs to synchronize the dynamic entity attributes, e.g. after connection setup or waking up from standby.

    The integration should only send the state of the configured entities to reduce communication overhead, especially if there are many available entities, from which only a few are getting configured on the remote.
    Any additional data will be ignored.

    Furthermore, the integration driver is free to decide which entity states it wants to send back. It's even advisable to use dirty flags in the integration driver if there are a lot of entities, and only return the changed data.

    โš ๏ธ Future change announcement: this request will be enhanced with a force flag (or the like) to signal that all entity states are required, and no data should be suppressed. This will happen for example after the remote is restarted.

    object allOf
    uid: getEntityStatesMsg

    For simple drivers without dynamic devices the msg_data.device_id property can be omitted. In this case, the request is for the overall integration driver and not for a specific device.

    • #entity
    • #required
  • #37entity_states

    ๐Ÿš€ ๐Ÿ• Current state of the entities.

    Response message of the get_entity_states request. Contains the dynamic attributes of all entities.

    object allOf
    uid: entityStatesMsg

    The msg_data payload is an array of the entity_change event.

    • #entity
    • #required
  • #38entity_command

    ๐Ÿš€ ๐Ÿ• Execute an entity command.

    Instruct the integration driver to execute a command like "turn on" or "change temperature". Optional command data like temperature value or channel number can be provided in the params array. The parameter objects are described in the entity feature definitions.

    The result response is to acknowledge the command and to return any immediate failures in case the driver already knows it's unable to perform the command due to invalid data, device communication issues etc.

    After successfully executing a command, the UC Remote expects an entity_change event with the updated feature value(s).

    object allOf
    uid: entityCommandMsg
    • #entity
    • #required
  • #39entity_change

    ๐Ÿš€ ๐Ÿ• Entity state change event.

    Emitted when an attribute of an entity changes, e.g. is switched off. Either after an entity_command or if the entity is updated manually through a user or an external system. This keeps the UC Remote in sync with the real state of the entity without the need of constant polling.

    object allOf
    uid: entityStateChangedEvent

    An entity attribute has changed.

    • #entity
    • #event
    • #required
  • #40entity_available

    ๐Ÿ” New entity available event.

    Optional event to notify the UC Remote that new entities are available.

    object allOf
    uid: entityAvailableEvent
    • #entity
    • #event
  • #41entity_removed

    ๐Ÿ” Entity removed event.

    Optional event to notify the UC Remote that entities were removed and no longer available.

    object allOf
    uid: entityRemovedEvent
    • #entity
    • #event

Schemas

  • object
    uid: commonReq

    Common request message properties.

  • object
    uid: commonResp

    Common response message properties.

  • object
    uid: commonEvent

    Common event message properties.

  • object allOf
    uid: authRequiredEvent
  • object allOf
    uid: authRequestMsg
  • object allOf
    uid: authMsg
  • object allOf
    uid: getDriverVersionMsg
  • object allOf
    uid: driverVersionMsg
  • object allOf
    uid: getDriverMetadataMsg
  • object allOf
    uid: driverMetadataMsg
  • object allOf
    uid: getVersionMsg
  • object allOf
    uid: versionMsg
  • object allOf
    uid: getDeviceStateMsg

    For simple drivers without dynamic devices the msg_data object can be omitted. In this case, the request is for the overall integration driver and not for a specific device.

  • object allOf
    uid: deviceStateEventMsg
  • object allOf
    uid: setupDriverMsg
  • object allOf
    uid: driverSetupChangeEvent
  • object allOf
    uid: abortDriverSetupEvent
  • object allOf
    uid: setDriverUserDataMsg
  • object allOf
    uid: getAvailableEntitiesMsg
    • TODO add paging: worst case this could include hundreds if not thousands of entities!
  • object allOf
    uid: availableEntitiesMsg
  • object allOf
    uid: subscribeEventsMsg
  • object allOf
    uid: unsubscribeEventsMsg
  • object allOf
    uid: getSupportedEntityTypesMsg
  • object allOf
    uid: supportedEntityTypesMsg
  • object allOf
    uid: getConfiguredEntitiesMsg
  • object allOf
    uid: configuredEntitiesMsg
  • object allOf
    uid: getLocalizationMsg
  • allOf
    uid: localizationMsg
  • object allOf
    uid: getRuntimeInfoMsg
  • allOf
    uid: runtimeInfoMsg
  • object allOf
    uid: getEntityStatesMsg

    For simple drivers without dynamic devices the msg_data.device_id property can be omitted. In this case, the request is for the overall integration driver and not for a specific device.

  • object allOf
    uid: entityStatesMsg

    The msg_data payload is an array of the entity_change event.

  • object allOf
    uid: entityCommandMsg
  • object
    uid: error
  • object allOf
    uid: connectEvent

    For simple drivers without dynamic devices the msg_data object can be omitted. In this case, the connect event is for the overall integration driver and not for a specific device.

  • object allOf
    uid: disconnectEvent

    For simple drivers without dynamic devices the msg_data object can be omitted. In this case, the disconnect event is for the overall integration driver and not for a specific device.

  • object allOf
    uid: enterStandbyEvent

    TODO add standby type in msg_data? E.g. "screen off" & "sleep" for the integration to be notified that the UC Remote is no longer reachable? While the screen is off, the remote API is still running, but might soon go into sleep state.

  • object allOf
    uid: exitStandbyEvent
  • object allOf
    uid: entityStateChangedEvent

    An entity attribute has changed.

  • object
    uid: entityStateChanged

    See entity documentation for attributes payload.

  • object allOf
    uid: entityAvailableEvent
  • object allOf
    uid: entityRemovedEvent
  • msgId
    integer
    >= 0uid: msgId

    Request message ID which is reflected in response message.

    Default value:0
  • object
    uid: driverVersion
  • object
    uid: driverMetadata

    Integration driver metadata.

  • object
    uid: driverDeveloper

    Optional information about the integration developer.

  • intgAuthMethod
    string
    uid: intgAuthMethod

    Integration driver authentication method if a token is required.

    The JSON auth message is used if a token is configured but no authentication method is set.

      Allowed values:
    • "HEADER"
    • "MESSAGE"
  • object
    uid: deviceState
  • object
    uid: availableEntityFilter

    Optional filters

  • object
    uid: entity

    Common definition of an entity. Concrete entities are: cover, button, climate, ir_emitter, light, media_player, remote,sensor, switch.

    See entity documentation for more information.

    The entity_type value acts as discriminator for the entity type, which defines the supported features and options of an entity.
    E.g. a simple button entity supports on / off, whereas a cover entity can be a simple window cover with only the ability to open / close, or a venetian blind with position and tilting features.
    See polymorphism support in AsyncAPI specification for more information.

  • allOf
    uid: button

    A button entity can fire an event or start an action which cannot be further controlled once started.

    This can be used for "fire and forget" commands, e.g. running a system command, sending an IR code, restart a device, reset something etc.

    A button is stateless. To represent something that can be turned on and off, then the switch entity should be used.

    See button entity documentation for more information.

  • allOf
    uid: switch

    A switch entity can turn something on or off and the current state should be readable by the integration driver.

    If the state can't be read, the readable option property can be set to false. This should be avoided whenever possible, because the UC Remote either has to assume the current state, or the UI needs to ask the user for the current state.

    If the switch controls a light source, then the 'light' entity is usually a better choice.

    See switch entity documentation for more information.

  • allOf
    uid: climate

    A climate entity controls heating, ventilation and air conditioning (HVAC) devices. This can range from simple fans to personal air conditioning units to integrated building devices.

    See climate entity documentation for more information.

  • allOf
    uid: cover

    Entity for covering or opening things like blinds, window covers, curtains, etc. The entity features specify the abilities of the cover and the controllable properties, whereas the device_class specifies the UI representation.

    See cover entity documentation for more information.

  • allOf
    uid: ir_emitter

    An IR-emitter entity allows to send IR commands in PRONTO hex format.

    This entity allows to integrate external IR blasters and emitters. Once added to a Remote, a new IR-emitter output is registered which can be used for IR-remote entities. Similar as adding a new dock.

    See IR-emitter entity documentation for more information.

  • allOf
    uid: light

    A light entity can be switched on and off and depending on its features, the light source can be further controlled like setting brightness, hue, color saturation and color temperature.

    The HSV color model is used for adjusting color and brightness.

    See light entity documentation for more information.

  • allOf
    uid: media_player

    A media player entity controls playback of media on a device. This could be an online music streaming service, a TV, a stereo or a video player.

    See media player entity documentation for more information.

  • allOf
    uid: remote

    A remote entity can send commands to a controllable device.

    See remote entity documentation for more information.

  • allOf
    uid: sensor

    A sensor entity provides measured values from devices or dedicated hardware sensors.
    The device class specifies the type of sensor and links it with a default unit of measurement to display in the user interface.

    • The custom device class allows arbitrary UI labels and units.
    • The temperature device class performs automatic conversion between ยฐC and ยฐF.

    See sensor entity documentation for more information.

  • string anyOf
    uid: entityType

    Supported entities, defined as extensible enum: already known entity types are in the enum, but other string values are allowed for forward compatability.

  • SimpleCommand
    string
    format: ^[A-Z0-9/_.:+#*ยฐ@%()?-]{1,20}$uid: SimpleCommand
  • SimpleRemoteCommand
    string
    format: ^\S{1,20}$uid: SimpleRemoteCommand
  • object
    uid: driverSetupChange
  • integrationSetupState
    string
    uid: integrationSetupState
    • SETUP: setup in progress
    • WAIT_USER_ACTION: setup flow is waiting for user input. See require_user_action for requested input.
    • OK: setup finished successfully
    • ERROR: setup error
      Allowed values:
    • "SETUP"
    • "WAIT_USER_ACTION"
    • "OK"
    • "ERROR"
  • integrationSetupError
    string
    uid: integrationSetupError

    More detailed error reason for state: ERROR condition.

      Allowed values:
    • "NONE"
    • "NOT_FOUND"
    • "CONNECTION_REFUSED"
    • "AUTHORIZATION_ERROR"
    • "TIMEOUT"
    • "OTHER"
  • object
    uid: ConfirmationPage

    Confirmation screen

  • object
    uid: SettingsPage

    Settings definition page, e.g. to configure an integration driver.

  • object
    uid: Setting

    An input setting is of a specific type defined in field.type which defines how it is presented to the user.

    Inspired by the Homey SDK settings concept.

  • object
    uid: SettingTypeNumber

    Number input with optional min, max, steps and decimals properties. The default value must be specified in value. An optional unit of the number setting can be specified in units, which will be displayed next to the input field.

  • object
    uid: SettingTypeText

    Single line of text input.

    TODO: format specifier for e.g. email, url, date, datetime etc.?

  • object
    uid: SettingTypeTextArea

    Multi-line text input, e.g. for providing a description.

  • object
    uid: SettingTypePassword

    Password or pin entry field with the input text hidden from the user. Otherwise the same as text input.

  • object
    uid: SettingTypeCheckbox

    Checkbox setting with true / false values.

  • object
    uid: SettingTypeDropdown

    Dropdown setting to pick a single value from a list. All values must be strings.

  • object
    uid: SettingTypeLabel

    Additional read-only text for information purpose between other settings. Supports Markdown formatting.

  • object
    uid: SettingsValues

    User input result of a SettingsPage as key values.

    • key: id of the field
    • value: entered user value as string. This is either the entered text or number, selected checkbox state or the selected dropdown item id.
      โš ๏ธ Non native string values as numbers or booleans are represented as string values!
  • object
    uid: languageText
  • object
    uid: versionInfo
  • object
    uid: localizationSettings
  • languageCode
    string
    must match: ^[a-z]{2}(_\w+)?$uid: languageCode

    Language culture code: starting with the two-letter ISO-639-1 code, followed by an optional ISO-3166 country code, separated by an underscore. Examples: en, en_UK, en_US, de, de_DE, de_CH etc.

  • countryCode
    string
    format: iso-3166uid: countryCode

    Two-letter country codes defined in ISO-3166-1-alpha-2

  • measurementUnit
    string
    uid: measurementUnit
      Allowed values:
    • "METRIC"
    • "US"
    • "UK"
  • object
    uid: runtimeInfo
  • iconIdentifier
    string
    <= 255 charactersuid: iconIdentifier

    Optional icon identifier. If specified the icon will be set. An empty identifier while updating the object removes the existing icon.

  • object
    uid: DeviceButtonMapping
  • object
    uid: EntityCommand
  • object
    uid: UserInterface
  • object
    uid: UserInterfacePage
  • object
    uid: UserInterfaceItem

    A user interface item is either an icon, text or media information from a media-player entity.

    • Icon and text items can be static or linked to a command specified in the command field.
    • Default size is 1x1 if not specified.
  • object
    uid: Grid

    Grid layout size.

  • object
    uid: GridItemSize

    Item size in the button grid. Default size if not specified: 1 x 1

  • object
    uid: GridLocation

    Button placement in the grid with 0-based coordinates.

  • object
    uid: EmitterPort
  • IrFormat
    string
    uid: IrFormat

    Supported IR formats by the emitter

      Allowed values:
    • "PRONTO"
    • "HEX"