Roku Smart-Home-Integration, kostenlos und Open Source

Steuere deine Roku-Player und Roku TVs lokal: Ein/Aus, Apps, Wiedergabe, Tasten, Eingänge.
Die Dokumentation dieser Integration wird von ihrem Autor geschrieben und ist bisher nur auf Englisch verfügbar.
Control your Roku streaming players (Express, Streaming Stick, Ultra…) and your Roku TVs (TCL, Hisense, onn., Sharp, Philips, Westinghouse, Roku-made TVs…) from Gladys: power, the app on screen, playback, remote keys, volume and inputs, on the dashboard and in your scenes.
Everything stays on your home network: Gladys talks to the Roku with the External Control Protocol (ECP) Roku documents for its devices. No Roku account, no cloud, no API key.
Developed without the hardware: feedback welcome. This integration was built from Roku's documentation and from real answers of Roku devices recorded by other open-source projects, not on a Roku in a living room. If something does not work as described here, please open an issue (see Reporting a problem): it will get fixed fast.
Before you start: allow control from your network
Recent versions of Roku OS block control from other devices by default. On each Roku:
- Press Home on the Roku remote, open Settings > System > Advanced system settings > Control by mobile apps.
- Open Network access and choose Enabled.
- Limited (the default on recent Roku OS versions) only allows launching apps and typing text: the remote keys are refused, and depending on the Roku OS version, so is what Gladys reads.
- Disabled refuses everything.
- Permissive works too, but opens the Roku to any device, even outside your network: Enabled is enough for Gladys.
On a Roku TV, also turn on Settings > System > Power > Fast TV start. Without it, a TV in standby goes deaf to the network: Gladys can neither turn it on nor tell that it is off rather than unplugged.
Give each Roku a fixed address in your router (a "DHCP reservation"): Gladys finds a Roku that changed address again, but it takes a scan.
Installation
- Install the Roku integration from the integration store of Gladys.
- Open its Discovery tab and run a scan: every Roku on the same network as Gladys answers within a few seconds.
- Click Add to Gladys on each Roku you want. Done.
A Roku the scan does not find (another subnet or VLAN, a mesh network that filters discovery…)? In the Configuration tab, type its IP address in Roku addresses (several addresses separated by commas), save, and scan again. The Test the connection to a Roku action takes an address too: it tells you right away whether the Roku answers and accepts control, and adds it to the Discovery tab when it does.
The address of a Roku is shown on the Roku in Settings > Network > About.
What you get
Each Roku becomes one Gladys device:
| Feature | Roku players | Roku TVs |
|---|---|---|
| Power | state (on / standby) | on / off, and its state |
| Application | the app on screen, and a list to open another one (or Home) | same |
| Input | – | HDMI 1-4, antenna (Live TV), AV, or Roku streaming, with the names you gave them on the TV |
| Playback | playing or not | playing or not |
| Remote keys | Home, Back, arrows, OK, Options (*), Play/Pause, Rewind, Fast forward, Instant replay | same, plus Volume up, Volume down, Mute, Channel up/down (with a tuner) |
States are refreshed every 10 seconds. The list of apps is read again every 15 minutes, and as soon as an app the list did not have comes to the screen.
What a Roku cannot do (and so Gladys neither)
- No volume level. Roku's protocol only has the Volume up, Volume down and Mute keys: there is no "set the volume to 20", no way to read the current level, nor to know whether the sound is muted. Gladys offers the keys, and tells nothing it cannot know.
- Roku players cannot be turned off. A Roku Express, Stick or Ultra has no real power state: Gladys shows whether it is active or in standby, but only a Roku TV can be turned on and off.
- Turning on a TV in deep standby needs Fast TV start (see above). When the TV does not answer, Gladys sends it a Wake-on-LAN packet first: whether the TV wakes up depends on the model, and works more often over Ethernet than over Wi-Fi.
- Volume and power keys of a player (Roku Voice Remote buttons that drive your TV through HDMI-CEC or infrared) are not reachable over the network.
- Typing text goes through a scene only (see Typing a text): no dashboard field can send text to an integration yet.
Dashboard
Four widgets come with the integration (Gladys 5.1 or later). Each one shows the Roku picked in its settings, or the first one.
- Roku remote — power and app on screen, then Power (Roku TV) or Play/Pause (player), Home, Back and OK.
- Roku navigation — the four arrows: Up, Down, Left, Right.
- Roku playback — the icon and name of the app on screen, playing or paused, the position in the video while one is open, and Play/Pause, Rewind, Fast forward.
Gladys limits a widget to four buttons: place Roku remote and Roku navigation one under the other to get a full remote. Every other key (volume, mute, Instant replay…) is on the device page and in the "Press a Roku remote key" scene action.
In the menus of the apps (a profile, a film, a setting), OK selects. Play/Pause only acts while a video plays, and how depends on the app: in Arte, for instance, Play does not start the film you picked, OK does.
- Roku apps — four app shortcuts at most per widget, with their icons
(a limit of the Gladys dashboard). Left empty, the settings show the first
four apps installed; type the names you want in the widget settings
(e.g.
Disney+,KiKA,YouTube: case and accents do not matter). For more, add a second Roku apps widget with four other names. The app on screen is marked.
Every installed app, without limit, is in the Application feature of the device: add the device to a regular Devices box to pick any app from a list, or use it in a scene with "Set device value" (the TV inputs are in the Input feature of a Roku TV).
The features of the device can also be added to any regular dashboard box.
Scenes
The integration adds its own cards to the scene editor, under the Integrations category:
-
Roku app changed (trigger) — starts the scene when an app comes to the screen, within about 10 seconds. Optionally pick the Roku and type the app name exactly as the Roku shows it (e.g.
Netflix, orHomefor the home screen). The next actions can use the app name and its Roku id. Example: when Netflix starts on the living room TV, dim the lights. -
Open an app on a Roku (action) — opens an installed app by its name. Example: movie night: turn the TV on, open Netflix.
-
Press a Roku remote key (action) — any key, as many times as needed, including Turn on and Turn off for a Roku TV. Example: when the doorbell rings, press Play/Pause.
-
Type a text on a Roku (action) — types a text in the field shown on the Roku, see below.
The power and playback states are regular device features: a scene can start when the TV turns off, or check that something is playing.
Typing a text (search, login)
Gladys has no text field on the dashboard that an integration can receive yet. The workaround:
- On the Roku, open the field (a search, the email of a login…).
- In Gladys, create a scene with the Type a text on a Roku action and the text to type (100 characters at most).
- Add a Scene box to your dashboard with that scene: one tap types the text.
Do not put a sensitive password in a scene: every Gladys user can read the scenes. The integration never writes the typed text in its logs.
Troubleshooting
"… refuses remote control" (in the Configuration tab, a widget or an action): the Roku is set to Limited or Disabled. Set **Control by mobile apps
Network access** to Enabled (see Before you start), then run Test the connection to a Roku.
The scan finds nothing. Gladys and the Roku must be on the same network (same subnet, no guest Wi-Fi, no client isolation). Type the address of the Roku in Roku addresses, save, and scan again.
The Roku shows as off while it is on. It does not answer anymore: check its address (it may have changed), then run Test the connection to a Roku.
A Roku TV does not turn on. Turn on Fast TV start on the TV. If it is connected by Wi-Fi, Wake-on-LAN may not reach it while asleep.
An app is missing from the list. The list is read every 15 minutes: wait, or open the app once on the Roku.
Reporting a problem
- In the Configuration tab, turn on Debug logs and save.
- Reproduce the problem, then copy the logs of the integration (Integration page > Logs).
- Open an issue on github.com/guim31/gladys-roku with the logs, your Roku model and its Roku OS version (Settings > System > About). The logs hold no password; they show the Roku model, its address on your network and its serial number.
Turn the debug logs off afterwards: they are verbose.
Not affiliated with Roku, Inc. Roku is a trademark of Roku, Inc.
Konfigurationseinstellungen
Diese Einstellungen fragt Roku in seinem Konfigurationsbildschirm in Gladys ab.
| Einstellung | Typ | Pflichtfeld | Beschreibung |
|---|---|---|---|
| Bevor du beginnst | section | Nein | Öffne auf jedem Roku Einstellungen > System > Erweiterte Systemeinstellungen > Steuerung durch mobile Apps > Netzwerkzugriff (Settings > System > Advanced system settings > Control by mobile apps > Network access) und wähle „Aktiviert“ (Enabled): Neuere Versionen von Roku OS stellen „Eingeschränkt“ (Limited) ein, was Gladys blockiert. Starte dann eine Gerätesuche (Tab „Entdecken“): Rokus im selben Netzwerk werden automatisch gefunden. Gib unten nur für einen Roku eine Adresse ein, den die Suche nicht findet. |
| Roku-Adressen (optional) | string | Nein | IP-Adressen der Rokus, die die Gerätesuche nicht findet, durch Kommas getrennt. Gib ihnen eine feste Adresse in deinem Router (DHCP-Reservierung). |
| Debug-Protokolle | boolean | Nein | Schreibt jede an die Rokus gesendete Anfrage und eine Zusammenfassung ihrer Antworten in die Protokolle der Integration. Schalte es ein, bevor du ein Problem meldest. |
So installierst du Roku in Gladys
- Öffne in Gladys Integrationen: Roku erscheint im Katalog neben den nativen Integrationen, mit einem Community-Badge.
- Klicke auf Installieren. Gladys lädt das Docker-Image (
ghcr.io/guim31/gladys-roku:1.1.0) herunter, startet es in einer vom Kern isolierten Sandbox und erzeugt die Oberfläche der Integration (Geräte, Erkennung und Konfiguration). - Öffne den Bildschirm Konfiguration der Integration, fülle die Einstellungen aus und speichere.
- Du kannst sie auch direkt über die URL ihres Repositorys installieren: https://github.com/guim31/gladys-roku.
Roku benötigt Gladys >=5.1.0. Der Katalog in Gladys wird stündlich aktualisiert, eine neue Version ist also spätestens eine Stunde nach ihrer Veröffentlichung verfügbar.
Du nutzt Gladys noch nicht? Es ist kostenlos und Open Source: folge der Installationsanleitung, um loszulegen.
Über externe Integrationen
Roku ist eine externe Integration: eine Community-Integration, die als Docker-Container verpackt und auf GitHub veröffentlicht wird. Gladys installiert sie mit einem Klick und führt sie in einer vom Kern isolierten Sandbox aus. Sie wird von guim31 veröffentlicht und gepflegt, nicht vom Gladys-Kernteam.
- Alle externen Integrationen durchsuchen
- Die nativen Integrationen entdecken, die in Gladys eingebaut sind
- Deine eigene externe Integration bauen und veröffentlichen
- Quellcode auf GitHub — Quelle dieser Dokumentation