Franck Nijhof 1833c32a2c Cleans up front matter (#9835)
* Sets front matter defaults

* Removes default front matter from section templates/pages

* Removes default front matter from addon pages

* Removes default front matter from integration pages

* Removes default front matter from posts

* Removes default front matter from docs pages

* Removes default front matter from other pages

* Fixes blog category pages
2019-07-11 14:35:08 -07:00

3.0 KiB

title, description, logo, ha_category, ha_iot_class, ha_release, redirect_from
title description logo ha_category ha_iot_class ha_release redirect_from
Roku Instructions how to integrate Roku devices into Home Assistant. roku.png
Hub
Media Player
Remote
Local Polling 0.86
/components/remote.roku/
/components/media_player.roku/

The Roku integration allows integration of Roku, which will be automatically discovered if you enable the discovery component.

There is currently support for the following device types within Home Assistant:

  • Media Player
  • Remote

The roku integration can also be forced to load by adding the following lines to your configuration.yaml:

# Example configuration.yaml entry
roku:
  - host: IP_ADDRESS

{% configuration %} host: description: Set the IP address of the Roku device. Use only if you don't want to autodiscover devices. required: false type: string {% endconfiguration %}

Services

Service roku_scan

Scans the local network for Rokus. All found devices are presented as a persistent notification.

Remote

The roku remote platform allows you to send remote control buttons to a Roku device. It is automatically set up when a Roku is configured.

At the moment, the following buttons are supported:

  • back
  • backspace
  • channel_down
  • channel_up
  • down
  • enter
  • find_remote
  • forward
  • home
  • info
  • input_av1
  • input_hdmi1
  • input_hdmi2
  • input_hdmi3
  • input_hdmi4
  • input_tuner
  • left
  • literal
  • play
  • power
  • replay
  • reverse
  • right
  • search
  • select
  • up
  • volume_down
  • volume_mute
  • volume_up

A typical service call for pressing several buttons looks like this.

service: remote.send_command
data:
  entity_id: remote.roku
  command:
    - left
    - left
    - select

Media Player

When the Home Assistant Roku integration is enabled and has found a Roku device, in the Home Assistant GUI the Roku media player will show a listing of the installed channels, or apps, under “source”. Select one and it will attempt to launch the channel on your Roku device. This action can also be automated, but it requires you to acquire an extra piece of information; the appID for the channel specific to your Roku. Although this information is gathered by the Roku integration, at the moment it is not exposed to the end user. This item might be added in a future release. For now though, you can easily get the information yourself. All you need to do is a simple GET API call on the same network as your device.

The api calls are like this:

GET http:// ROKU_IP:8060/query/apps
POST http://ROKU_IP:8060/launch/APP_ID

More details can be found on the Roku dev pages

To use this in Home Assistant, for instance in an automation, the format is as follows. Note that source: is the appID you discovered in the API call:

  action:
  - data:
      entity_id: media_player.roku
      source: 20197
    service: media_player.select_source