mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-25 02:07:15 +00:00
Improve roku documentation (#21231)
This commit is contained in:
parent
c99018dd9a
commit
5eca384ab9
@ -83,30 +83,29 @@ data:
|
||||
|
||||
## Media Player
|
||||
|
||||
When the Home Assistant Roku integration is enabled and a Roku device has been configured, in the Home Assistant UI 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. Channels can be launched by `name` using a configuration similar to the one below:
|
||||
When the Home Assistant Roku integration is enabled and a Roku device has been configured, in the Home Assistant UI 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.
|
||||
|
||||
## Source Automation
|
||||
|
||||
The `media_player.select_source` service may be used to launch specific applications/streaming channels on your Roku device.
|
||||
|
||||
| Service data attribute | Optional | Description | Example |
|
||||
| ---------------------- | -------- | ----------- | ------- |
|
||||
| `entity_id` | no | Target a specific media player. |
|
||||
| `source` | no | An application name or application ID. | Prime Video
|
||||
|
||||
### Examples
|
||||
|
||||
```yaml
|
||||
action:
|
||||
- target:
|
||||
- service: media_player.select_source
|
||||
target:
|
||||
entity_id: media_player.
|
||||
data:
|
||||
source: "Prime Video"
|
||||
service: media_player.select_source
|
||||
```
|
||||
|
||||
Alternatively, the `appID` for the channel can be used for `source:` 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, you can easily get the information yourself. All you need to do is a GET API call on the same network as your device.
|
||||
|
||||
The API calls are like this:
|
||||
|
||||
```txt
|
||||
GET http://ROKU_IP:8060/query/apps
|
||||
POST http://ROKU_IP:8060/launch/APP_ID
|
||||
```
|
||||
|
||||
One method of performing the GET request is to open `http://ROKU_IP:8060/query/apps` in your web browser of choice. The Roku will return an XML-formatted list of available channels, including their full name and appID.
|
||||
|
||||
More details can be found on the [Roku dev pages](https://developer.roku.com/docs/developer-program/debugging/external-control-api.md)
|
||||
|
||||
To use this information in Home Assistant, the format is as follows. Note that `source:` is the appID you discovered in the API call:
|
||||
Alternatively, the application id can be used for `source`. See [Obtaining Application IDs](#obtaining-application-ids).
|
||||
|
||||
```yaml
|
||||
action:
|
||||
@ -117,7 +116,23 @@ action:
|
||||
source: 20197
|
||||
```
|
||||
|
||||
It is also possible to tune directly to specific channels if you have a Roku TV and use an OTA antenna. This service only supports `media_channel_type` of 'channel'. `media_content_id` corresponds to the TV channel, which you should see when navigating to these on your TV UI.
|
||||
### Obtaining Application IDs
|
||||
|
||||
The currently active application ID can be found in the `Active App ID` diagnostic sensor.
|
||||
|
||||
Alternatively, you can make a manual HTTP request (GET) to `http://ROKU_IP:8060/query/apps`, in either your browser or terminal, to retrieve a complete list of installed applications in XML format.
|
||||
|
||||
## TV Channel Tuning
|
||||
|
||||
The `media_player.play_media` service may be used to tune to specific channels on your Roku TV device with OTA antenna.
|
||||
|
||||
| Service data attribute | Optional | Description | Example |
|
||||
| ---------------------- | -------- | ----------- | ------- |
|
||||
| `entity_id` | no | Target a specivic media player. |
|
||||
| `media_content_id` | no | A channel number. | 5.1
|
||||
| `media_content_type` | no | A media type. | `channel`
|
||||
|
||||
### Example
|
||||
|
||||
```yaml
|
||||
action:
|
||||
@ -164,7 +179,7 @@ The `media_player.play_media` service may be used to deep link to content within
|
||||
| ---------------------- | -------- | ----------- | ------- |
|
||||
| `entity_id` | no | Target a specific media player. To target all media players, use `all`. | |
|
||||
| `media_content_id` | no | A media identifier. | 291097
|
||||
| `media_content_type` | no | A media type. | channel
|
||||
| `media_content_type` | no | A media type. | `app`
|
||||
| `extra.content_id` | no | A unique content identifier passed to app. | 8e06a8b7-d667-4e31-939d-f40a6dd78a88
|
||||
| `extra.media_type` | no | A media type passed to app. Should be one of `movie`, `episode`, `season`, `series`, `shortFormVideo`, `special`, `live` | movie
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user