Emulated Roku
The Emulated Roku integration integrates an emulated Roku API into Home Assistant, so remotes such as Harmony and Android apps can connect to it through Wi-Fi as if it were a Roku player. Home Assistant will see key presses and app launches as Events, which you can use as triggers for automations. Multiple Roku servers may be started if you run out of buttons by specifying multiple server entries.
Windows is not supported because Home Assistant uses ProactorEventLoop which does not support UDP sockets.
:::
:::caution
This integration opens an unauthenticated API on the host, allowing anything on the local network to access
your Home Assistant instance through the automations you create with emulated Roku as the trigger.
Using a proxy with whitelisted IP addresses is recommended. (set advertise_ip to the proxy's IP or DNS name)
::: :::note 配置 此集成可通过 UI 配置。前往 设置 > 设备与服务 添加。
Manual configuration
If you wish to configure advanced options, you can add the following entry in your "configuration.yaml" file.
:::tip
更改配置后需要重启 Home Assistant。
:::
After starting up, you can check if the emulated Roku is reachable at the specified ports on your Home Assistant instance (eg.: http://192.168.1.101:8060/).
Events
Event roku_command
All Roku commands are sent as roku_command events.
Automations
The following is an example implementation of an automation:
Video tutorial
This comprehensive video tutorial explains how events work in Home Assistant and how you can set up Emulated Roku to control a media player using a physical remote control.
Troubleshooting
If you change your advertised IP or ports, you will have to re-add the emulated Roku in your app.
When using Harmony, the app should auto-discover any changes via UPnP discovery (if name is unchanged) once it detects that the device is unreachable.
Alternatively, you can trigger the 'Fix' page by pressing a button on the unreachable device's remote in the app and wait ~10 seconds, then click 'Fix it'.
Known limitations:
- Some Android remotes send key up/down events instead of key presses.
- Functionality other than key presses and app launches are not implemented yet.
- App ids are limited between 1-10. (The emulated API reports 10 dummy apps)
- Harmony uses UPnP discovery (UPnP is not needed after pairing), which might not work in Docker. You can:
- Change Docker to host networking temporarily, then revert after pairing.
- Run the
advertise.pyhelper script from the emulated_roku library directly somewhere else and point it to the emulated Roku API.
- Harmony cannot launch apps as it uses IR instead of the Wi-Fi API and will not display the custom dummy app list.
- Home control buttons cannot be assigned to emulated Roku on the Harmony Hub Companion remote as they are limited to Hue (and possibly other APIs) within Harmony.
- Harmony will not set the name of the added emulated Roku device to the specified
name.

