---
type: Attested Computation
title: roku-play
identifier: home-automation/roku-play
description: 'Search Roku''s on-device universal search for a title and play the Nth result -- Home to a known state, opens Search, types the query via Lit_ keys, arrows Right into the results grid, opens the chosen result, and presses Select to clear provider-choice/profile screens. NOTE: Roku sunset the /search/browse ECP endpoint in OS 12.0, so this deliberately drives the on-screen keyboard instead; and keypress/Enter is a documented no-op on the OS 15 search screen (focus stays parked on "A", so Select-after-Enter types a stray "a") -- do NOT re-add either. Live-verified 2026-10-03 on Roku Ultra OS 15.3.4 (Home, Down x6 to Search, type, Right x6 to result 1, Select opens result, Select picks provider -> playback); result_index beyond 1 extrapolates one more Right per position and is untested. Timing is fixed-delay and can be thrown off by slow app intro animations -- if playback doesn''t start, a manual follow-up home-automation/roku-press.py -p key=Select is the fix, same as a human would do.'
pack: home-automation
tags:
- internet
runtime: fragletc
image: ofthemachine/python3@sha256:a015b4f9f0e7c1648f8fcd4164f6a296dd3c9189404f88f333a9764d08d13522
network: required
stdin: none
execution_class: environmental
procedure_hash: sha256:ee139c8a54be6a3b878af3e9bf415b5953ff6090e74130b5b078055e8ca39907
parameters:
- name: ip
  type: string
  required: true
  description: LAN IP address of the Roku, e.g. 192.168.0.73
- name: query
  type: string
  required: true
  description: Text to search for, e.g. "stargate atlantis"
- name: result_index
  type: string
  required: false
  default: '1'
  description: Which result to open, counting from 1 (left to right in the results row). Only result_index=1 has been verified live; higher values extrapolate.
- name: confirm_selects
  type: string
  required: false
  default: '1'
  description: How many times to press Select after opening the result, to clear a provider-choice and/or profile-picker screen. Some apps need a second Select that a slow intro animation can cause to land too early -- if it doesn't stick, send one more home-automation/roku-press.py -p key=Select by hand.
computation: https://tools.ofthemachine.com/home-automation/roku-play.py
executor:
  resource: https://github.com/ofthemachine/fraglet
  receipt:
  - schema
  - fragletc
  - procedure
  - procedure_hash
  - image
  - image_digest
  - network
  - stdin_mode
  - params
  - inputs
  - argv
  - env
  - memo_key
  - started
  - finished
  - exit_code
  - stdout
  - outputs
  format: fraglet-receipt/2 (fragletc --receipt <path>, or FRAGLETC_RECEIPT_DIR)
attester:
  resource: https://tools.ofthemachine.com/receipt/attest.py
  method: 'deterministic, no re-execution: procedure_hash equals sha256 of computation; memo_key recomputes from the receipt''s own fields; claimed params and any artifact hash match the receipt'
generated:
  by: process:tools/catalog/compile.py
  at: '2026-11-13T18:27:40Z'
---

# roku-play

Search Roku's on-device universal search for a title and play the Nth result -- Home to a known state, opens Search, types the query via Lit_ keys, arrows Right into the results grid, opens the chosen result, and presses Select to clear provider-choice/profile screens. NOTE: Roku sunset the /search/browse ECP endpoint in OS 12.0, so this deliberately drives the on-screen keyboard instead; and keypress/Enter is a documented no-op on the OS 15 search screen (focus stays parked on "A", so Select-after-Enter types a stray "a") -- do NOT re-add either. Live-verified 2026-10-03 on Roku Ultra OS 15.3.4 (Home, Down x6 to Search, type, Right x6 to result 1, Select opens result, Select picks provider -> playback); result_index beyond 1 extrapolates one more Right per position and is untested. Timing is fixed-delay and can be thrown off by slow app intro animations -- if playback doesn't start, a manual follow-up home-automation/roku-press.py -p key=Select is the fix, same as a human would do.

Use when the user names a show or movie to play on a Roku without saying which app -- e.g. "play Seinfeld" -- and wants Roku's own cross-provider search used to find and start it, rather than a specific app's deep link.

# Schema

## Parameters
- `ip` (string, required) — LAN IP address of the Roku, e.g. 192.168.0.73
- `query` (string, required) — Text to search for, e.g. "stargate atlantis"
- `result_index` (string, optional, default `1`) — Which result to open, counting from 1 (left to right in the results row). Only result_index=1 has been verified live; higher values extrapolate.
- `confirm_selects` (string, optional, default `1`) — How many times to press Select after opening the result, to clear a provider-choice and/or profile-picker screen. Some apps need a second Select that a slow intro animation can cause to land too early -- if it doesn't stick, send one more home-automation/roku-press.py -p key=Select by hand.

## Outputs
- stdout (the anonymous result)

# Execution

The computation is [`home-automation/roku-play.py`](https://tools.ofthemachine.com/home-automation/roku-play.py) (frontmatter `computation`; in `tools.tar.gz` the same file sits at `home-automation/roku-play.py` beside this bundle), run by `fragletc` in `ofthemachine/python3@sha256:a015b4f9f0e7c1648f8fcd4164f6a296dd3c9189404f88f333a9764d08d13522` with network `required`. Its identity is `procedure_hash` = sha256 of that file, shebang included — the same value every receipt records. Parameters are passed as `-p name=value`; `--receipt run.json` (or `FRAGLETC_RECEIPT_DIR`) writes the receipt, a `fraglet-receipt/2` JSON document with the fields listed under `executor.receipt`.

# Attestation

A run's receipt is attested with [`receipt/attest.py`](https://tools.ofthemachine.com/receipt/attest.py): the computation that ran is this script (`procedure_hash`), the receipt is internally consistent (`memo_key` recomputes from its own fields), the claimed parameters are the ones that ran, and an artifact claimed as an output hashes to what the receipt recorded. No re-execution: attestation is provenance fidelity, not reproduction.

Environmental: the tool reaches the network, so outputs depend on state outside its inputs; the receipt records exactly what ran and what came out and makes no reproduction claim.

Skill: [SKILL.md](https://tools.ofthemachine.com/home-automation/SKILL.md)
