Skip to content

Commit

Permalink
Merge pull request #43 from stain3565/master
Browse files Browse the repository at this point in the history
Adding Roku Premiere remote
  • Loading branch information
dimagoltsman authored Sep 9, 2024
2 parents 2fdac14 + f9b5d41 commit 0efd403
Show file tree
Hide file tree
Showing 43 changed files with 696 additions and 0 deletions.
91 changes: 91 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1805,6 +1805,97 @@ type: custom:generic-remote-control-card

</details>

<details>
<summary>Roku Premiere using mqtt call to smart IR blaster (Design and codes by stain3565): (Click to expand!)</summary>

An example of a Roku Premiere remote that sends an mqtt ir code to (in my case) a ZS-06 / Zigbee IR Remote Control / TS1201.
I use Zigbee2MQTT in Home Assistant to learn the appropriate ir codes for the remote.

For flexibilty, this calls a generic script that allows an input_text to be passed, containing the ir code value.
This allows simple reuse for other remotes.
I have also ensured these ir codes are in the secrets.yaml
Example yaml entries are in the yaml folder.

My example overlays the four generic app buttons with images representing my specific remote buttons.

<img src="https://github.com/stain3565/generic-remote-control-card/blob/master/rokupremiere.png" height="578">

```
type: custom:generic-remote-control-card
name: Roku Premiere Remote
remote_template: rokupremiere
buttons:
leftarrow:
call: script.living_room_ir_button
data:
button_pressed: '{{ states("input_text.rokupremiere_leftarrow_text") }}'
home:
call: script.living_room_ir_button
data:
button_pressed: '{{ states("input_text.rokupremiere_home_text") }}'
up:
call: script.living_room_ir_button
data:
button_pressed: '{{ states("input_text.rokupremiere_up_text") }}'
down:
call: script.living_room_ir_button
data:
button_pressed: '{{ states("input_text.rokupremiere_down_text") }}'
left:
call: script.living_room_ir_button
data:
button_pressed: '{{ states("input_text.rokupremiere_left_text") }}'
right:
call: script.living_room_ir_button
data:
button_pressed: '{{ states("input_text.rokupremiere_right_text") }}'
ok:
call: script.living_room_ir_button
data:
button_pressed: '{{ states("input_text.rokupremiere_ok_text") }}'
replay:
call: script.living_room_ir_button
data:
button_pressed: '{{ states("input_text.rokupremiere_replay_text") }}'
asterisk:
call: script.living_room_ir_button
data:
button_pressed: '{{ states("input_text.rokupremiere_asterisk_text") }}'
rewind:
call: script.living_room_ir_button
data:
button_pressed: '{{ states("input_text.rokupremiere_rewind_text") }}'
playpause:
call: script.living_room_ir_button
data:
button_pressed: '{{ states("input_text.rokupremiere_playpause_text") }}'
forward:
call: script.living_room_ir_button
data:
button_pressed: '{{ states("input_text.rokupremiere_forward_text") }}'
netflix:
call: script.living_room_ir_button
data:
button_pressed: '{{ states("input_text.rokupremiere_netflix_text") }}'
googleplay:
call: script.living_room_ir_button
data:
button_pressed: '{{ states("input_text.rokupremiere_googleplay_text") }}'
rakuten:
call: script.living_room_ir_button
data:
button_pressed: '{{ states("input_text.rokupremiere_rakuten_text") }}'
spotify:
call: script.living_room_ir_button
data:
button_pressed: '{{ states("input_text.rokupremiere_spotify_text") }}'
```

</details>


# Contribution

if you want to add your own remote template, you can do it in a new folder near the 'simple' and 'lg' remotes and
Expand Down
90 changes: 90 additions & 0 deletions dist/remotes/rokupremiere/README (suggested entry)
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
<details>
<summary>Roku Premiere using mqtt call to smart IR blaster (Design and codes by stain3565): (Click to expand!)</summary>

An example of a Roku Premiere remote that sends an mqtt ir code to (in my case) a ZS-06 / Zigbee IR Remote Control / TS1201.
I use Zigbee2MQTT in Home Assistant to learn the appropriate ir codes for the remote.

For flexibilty, this calls a generic script that allows an input_text to be passed, containing the ir code value.
This allows simple reuse for other remotes.
I have also ensured these ir codes are in the secrets.yaml
Example yaml entries are in the yaml folder.

My example overlays the four generic app buttons with images representing my specific remote buttons.

<img src="https://github.com/stain3565/generic-remote-control-card/blob/master/rokupremiere.png" height="578">

```
type: custom:generic-remote-control-card
name: Roku Premiere Remote
remote_template: rokupremiere
buttons:
leftarrow:
call: script.living_room_ir_button
data:
button_pressed: '{{ states("input_text.rokupremiere_leftarrow_text") }}'
home:
call: script.living_room_ir_button
data:
button_pressed: '{{ states("input_text.rokupremiere_home_text") }}'
up:
call: script.living_room_ir_button
data:
button_pressed: '{{ states("input_text.rokupremiere_up_text") }}'
down:
call: script.living_room_ir_button
data:
button_pressed: '{{ states("input_text.rokupremiere_down_text") }}'
left:
call: script.living_room_ir_button
data:
button_pressed: '{{ states("input_text.rokupremiere_left_text") }}'
right:
call: script.living_room_ir_button
data:
button_pressed: '{{ states("input_text.rokupremiere_right_text") }}'
ok:
call: script.living_room_ir_button
data:
button_pressed: '{{ states("input_text.rokupremiere_ok_text") }}'
replay:
call: script.living_room_ir_button
data:
button_pressed: '{{ states("input_text.rokupremiere_replay_text") }}'
asterisk:
call: script.living_room_ir_button
data:
button_pressed: '{{ states("input_text.rokupremiere_asterisk_text") }}'
rewind:
call: script.living_room_ir_button
data:
button_pressed: '{{ states("input_text.rokupremiere_rewind_text") }}'
playpause:
call: script.living_room_ir_button
data:
button_pressed: '{{ states("input_text.rokupremiere_playpause_text") }}'
forward:
call: script.living_room_ir_button
data:
button_pressed: '{{ states("input_text.rokupremiere_forward_text") }}'
netflix:
call: script.living_room_ir_button
data:
button_pressed: '{{ states("input_text.rokupremiere_netflix_text") }}'
googleplay:
call: script.living_room_ir_button
data:
button_pressed: '{{ states("input_text.rokupremiere_googleplay_text") }}'
rakuten:
call: script.living_room_ir_button
data:
button_pressed: '{{ states("input_text.rokupremiere_rakuten_text") }}'
spotify:
call: script.living_room_ir_button
data:
button_pressed: '{{ states("input_text.rokupremiere_spotify_text") }}'


```

</details>

Binary file added dist/remotes/rokupremiere/asterisk.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dist/remotes/rokupremiere/asterisk_over.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
68 changes: 68 additions & 0 deletions dist/remotes/rokupremiere/card.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
type: custom:generic-remote-control-card
name: Roku Premiere Remote
remote_template: rokupremiere
buttons:
leftarrow:
call: script.living_room_ir_button
data:
button_pressed: '{{ states("input_text.rokupremiere_leftarrow_text") }}'
home:
call: script.living_room_ir_button
data:
button_pressed: '{{ states("input_text.rokupremiere_home_text") }}'
up:
call: script.living_room_ir_button
data:
button_pressed: '{{ states("input_text.rokupremiere_up_text") }}'
down:
call: script.living_room_ir_button
data:
button_pressed: '{{ states("input_text.rokupremiere_down_text") }}'
left:
call: script.living_room_ir_button
data:
button_pressed: '{{ states("input_text.rokupremiere_left_text") }}'
right:
call: script.living_room_ir_button
data:
button_pressed: '{{ states("input_text.rokupremiere_right_text") }}'
ok:
call: script.living_room_ir_button
data:
button_pressed: '{{ states("input_text.rokupremiere_ok_text") }}'
replay:
call: script.living_room_ir_button
data:
button_pressed: '{{ states("input_text.rokupremiere_replay_text") }}'
asterisk:
call: script.living_room_ir_button
data:
button_pressed: '{{ states("input_text.rokupremiere_asterisk_text") }}'
rewind:
call: script.living_room_ir_button
data:
button_pressed: '{{ states("input_text.rokupremiere_rewind_text") }}'
playpause:
call: script.living_room_ir_button
data:
button_pressed: '{{ states("input_text.rokupremiere_playpause_text") }}'
forward:
call: script.living_room_ir_button
data:
button_pressed: '{{ states("input_text.rokupremiere_forward_text") }}'
netflix:
call: script.living_room_ir_button
data:
button_pressed: '{{ states("input_text.rokupremiere_netflix_text") }}'
googleplay:
call: script.living_room_ir_button
data:
button_pressed: '{{ states("input_text.rokupremiere_googleplay_text") }}'
rakuten:
call: script.living_room_ir_button
data:
button_pressed: '{{ states("input_text.rokupremiere_rakuten_text") }}'
spotify:
call: script.living_room_ir_button
data:
button_pressed: '{{ states("input_text.rokupremiere_spotify_text") }}'
Binary file added dist/remotes/rokupremiere/down.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dist/remotes/rokupremiere/down_over.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dist/remotes/rokupremiere/forward.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dist/remotes/rokupremiere/forward_over.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dist/remotes/rokupremiere/googleplay.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dist/remotes/rokupremiere/googleplay_over.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dist/remotes/rokupremiere/home.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dist/remotes/rokupremiere/home_over.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dist/remotes/rokupremiere/left.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dist/remotes/rokupremiere/left_over.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dist/remotes/rokupremiere/leftarrow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dist/remotes/rokupremiere/leftarrow_over.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dist/remotes/rokupremiere/netflix.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dist/remotes/rokupremiere/netflix_over.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dist/remotes/rokupremiere/ok.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dist/remotes/rokupremiere/ok_over.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dist/remotes/rokupremiere/playpause.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dist/remotes/rokupremiere/playpause_over.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dist/remotes/rokupremiere/rakuten.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dist/remotes/rokupremiere/rakuten_over.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 0efd403

Please sign in to comment.