Nothing in this guide is really relevant anymore as the home assistant Roku platform has remote control buttons and is setup automatically now when Roku is configured.
Additionally, floor-plan was much more cumbersome to setup compared to an easier setup using service-buttons within a picture card in Lovelace.
I created this Floorplan card using scripts, shell commands, and the source services from the roku component to mimic the physical remote.
https://github.com/moistgun/Roku-Remote
The reasons I went with this over using the Roku mobile app are,
- Failing to connect
- Ramping volume to 100%
- No volume control
- No power control
Thought I would share.
For the Shell command yaml:
Note you will need to replace RokuLocalIP with your Rokuâs IP address
</s> <s>roku_on: 'curl -X POST http://RokuLocalIP:8060/keypress/PowerOn'</s> <s>roku_off: 'curl -X POST http://RokuLocalIP:8060/keypress/PowerOff'</s> <s>roku_volume_up: 'curl -X POST http://RokuLocalIP:8060/keypress/VolumeUp'</s> <s>roku_volume_down: 'curl -X POST http://RokuLocalIP:8060/keypress/VolumeDown'</s> <s>roku_home: 'curl -X POST http://RokuLocalIP:8060/keypress/Home'</s> <s>roku_reverse: 'curl -X POST http://RokuLocalIP:8060/keypress/Rev'</s> <s>roku_select: 'curl -X POST http://RokuLocalIP:8060/keypress/Select'</s> <s>roku_left: 'curl -X POST http://RokuLocalIP:8060/keypress/Left'</s> <s>roku_right: 'curl -X POST http://RokuLocalIP:8060/keypress/Right'</s> <s>roku_down: 'curl -X POST http://RokuLocalIP:8060/keypress/Down'</s> <s>roku_up: 'curl -X POST http://RokuLocalIP:8060/keypress/Up'</s> <s>roku_back: 'curl -X POST http://RokuLocalIP:8060/keypress/Back'</s> <s>roku_info: 'curl -X POST http://RokuLocalIP:8060/keypress/Info'</s> <s>
Note you could use shell commands for the sources/apps, however it doesnt seem like the App IDs used are standard and would require you to first query the app IDs for your device.
For the top four to work, you need to have setup the roku component within home assistant, and you need to know your rokuâs entity ID.
Script Yaml:
```
roku_hulu:
sequence:
- service: media_player.select_source
entity_id: media_player.RokuEntityName
data:
source: Hulu
roku_netflix:
sequence:
- service: media_player.select_source
entity_id: media_player.RokuEntityName
data:
source: Netflix
roku_hbo_now:
sequence:
- service: media_player.select_source
entity_id: media_player.RokuEntityName
data:
source: HBO NOW
roku_plex:
sequence:
- service: media_player.select_source
entity_id: media_player.RokuEntityName
data:
source: Plex
roku_on:
sequence:
- service: shell_command.roku_on
roku_off:
sequence:
- service: shell_command.roku_off
roku_volume_up:
sequence:
- service: shell_command.roku_volume_up
roku_volume_down:
sequence:
- service: shell_command.roku_volume_down
roku_home:
sequence:
- service: shell_command.roku_home
roku_reverse:
sequence:
- service: shell_command.roku_reverse
roku_select:
sequence:
- service: shell_command.roku_select
roku_left:
sequence:
- service: shell_command.roku_left
roku_right:
sequence:
- service: shell_command.roku_right
roku_down:
sequence:
- service: shell_command.roku_down
roku_up:
sequence:
- service: shell_command.roku_up
roku_back:
sequence:
- service: shell_command.roku_back
roku_info:
sequence:
- service: shell_command.roku_info
```
The following is included in the Floorplan Yaml within groups to use the above scripts:
```
- name: roku_volume_up
entities:
- script.roku_volume_up
action:
domain: script
service: roku_volume_up
- name: roku_volume_down
entities:
- script.roku_volume_down
action:
domain: script
service: roku_volume_down
- name: roku_back
entities:
- script.roku_back
action:
domain: script
service: roku_back
- name: roku_home
entities:
- script.roku_home
action:
domain: script
service: roku_home
- name: roku_up
entities:
- script.roku_up
action:
domain: script
service: roku_up
- name: roku_right
entities:
- script.roku_right
action:
domain: script
service: roku_right
- name: roku_down
entities:
- script.roku_down
action:
domain: script
service: roku_down
- name: roku_left
entities:
- script.roku_left
action:
domain: script
service: roku_left
- name: roku_reverse
entities:
- script.roku_reverse
action:
domain: script
service: roku_reverse
- name: roku_select
entities:
- script.roku_select
action:
domain: script
service: roku_select
- name: roku_info
entities:
- script.roku_info
action:
domain: script
service: roku_info
- name: roku_on
entities:
- script.roku_on
action:
domain: script
service: roku_on
- name: roku_off
entities:
- script.roku_off
action:
domain: script
service: roku_off
- name: roku_netflix
entities:
- script.roku_netflix
action:
domain: script
service: roku_netflix
- name: roku_hbo_now
entities:
- script.roku_hbo_now
action:
domain: script
service: roku_hbo_now
- name: roku_hulu
entities:
- script.roku_hulu
action:
domain: script
service: roku_hulu
- name: roku_plex
entities:
- script.roku_plex
action:
domain: script
service: roku_plex
```