tools / home-automation

Home Automation

internet8 tools

Control and query home-automation devices on the LAN -- starting with Roku's ECP remote-control API.

Tools

hue-lights.py

● networkpython3

List the lights on a Philips Hue bridge via its local v1 API -- one "id\tname\ton\tbri%\treachable\thex" line per light. hex is the bulb's color as #rrggbb at full brightness (brightness stays in its own column), or "-" when the bulb has no color. hs mode is the inverse of hue-set's hex encoding, so a hex this prints can be sent back.

hue-set.py

● networkpython3

Set a Philips Hue light (or all lights) via the bridge's local v1 API -- on/off/toggle, brightness percent, white temperature (kelvin or mired), color by hue degrees + saturation percent or by hex (e.g. hex=#ff8000). Light by numeric id or by name (exact then substring match, like home-automation/roku-launch.py); id=all drives group 0. Pairs with home-automation/hue-lights.py for discovery.

12 paramsdetails →

roku-apps.py

● networkpython3

List the apps installed on a Roku device via its ECP API -- one "id\tname\tversion" line per app, so a caller can find an app's numeric id for home-automation/roku-launch.py.

roku-launch.py

● networkpython3

Launch an app on a Roku device via its ECP API, optionally deep-linking straight into a piece of content when the app supports it (e.g. a Netflix title id) -- pairs with home-automation/roku-apps.py for the app_id.

4 paramsdetails →

roku-play.py

● networkpython3

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.

4 paramsdetails →

roku-press.py

● networkpython3

Send one or more remote-control key presses to a Roku device over its ECP API (no auth, LAN only) -- the same buttons as the physical remote: navigation, Select, Home, Back, playback, volume, channel. Pass a comma-separated list (e.g. "Down,Down,Down,Select") to send a whole sequence in one call instead of one fraglet run per key.

2 paramsdetails →

roku-status.py

● networkpython3

Ask a Roku what it is doing right now via ECP queries -- the foreground app (query/active-app) plus player state/position/duration when the app reports them (query/media-player). Read-only: touches nothing on screen, safe to run mid-playback.

roku-type.py

● networkpython3

Type free text into a Roku device's currently focused on-screen keyboard field (e.g. a search box) over its ECP API -- sends one keypress/Lit_<char> per character in a single call, instead of one fraglet run per letter. Pairs with home-automation/roku-press.py to navigate to the field first.

2 paramsdetails →

Get it

This directory is the skill — SKILL.md lists the tools and the tools sit beside it. As one file, into any Agent Skills directory:

curl -fsSL https://tools.ofthemachine.com/home-automation.tar.gz | tar xz -C ~/.claude/skills