mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-21 08:16:53 +00:00
Update roku.markdown for Roku async update (#13629)
This commit is contained in:
parent
dcd633cf66
commit
4c0c755f56
@ -93,21 +93,32 @@ 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, 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.
|
||||
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:
|
||||
```yaml
|
||||
action:
|
||||
- data:
|
||||
entity_id: media_player.roku
|
||||
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
|
||||
GET http://ROKU_IP:8060/query/apps
|
||||
POST http://ROKU_IP:8060/launch/APP_ID
|
||||
|
||||
YouTube example:
|
||||
POST http://YOUR_ROKU_IP:8060/launch/837?contentID=YOUR_YOUTUBE_VIDEOS_CONTENT_ID&MediaType=live
|
||||
```
|
||||
|
||||
More details can be found on the [Roku dev pages](https://developer.roku.com/docs/developer-program/discovery/external-control-api.md)
|
||||
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.
|
||||
|
||||
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:
|
||||
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:
|
||||
|
||||
```yaml
|
||||
action:
|
||||
|
Loading…
x
Reference in New Issue
Block a user