Chris Collins

Tools · home

TV remotes: LG webOS, Roku, Samsung

A phone-sized remote for LG webOS (SSAP and its pointer socket), Roku (External Control Protocol) and Samsung Tizen TVs on your network — apps, inputs, volume, text entry and toasts — plus developer-mode notes for each.

Added

How to use it

Add your TV by its IP address, connect, and use the remote from your phone or computer. The TV talks to the page through the gitwebsite app’s LAN relays (WebSocket and HTTP) on the computer running it. A web page on its own cannot reach most TVs. They use plain ws:// and http://, which an https page may not open, or self-signed wss://, which the browser refuses, and they send no CORS headers.

How to use it

  1. Add TV: choose LG webOS, Roku or Samsung, give it a name, and enter its IP address or hostname. You can find the address in the TV’s network settings. Nothing on your network is scanned.

  2. Press Connect. The first time, an LG or Samsung TV shows a prompt on screen asking to allow the remote: accept it with the TV’s own remote. The TV then hands out a pairing key (a webOS client-key, a Samsung token), which skips the prompt next time. For a Roku, turn on Settings → System → Advanced system settings → Control by mobile apps.

  3. Remote: the D-pad, OK, Home, Back, Menu, Info, play/pause, rewind and fast-forward, volume, mute, channel, power, and Send for text, which types into the TV’s focused field. On webOS there are also the coloured keys and a touchpad (drag to move the pointer, tap to click). The buttons follow the TV: keys a TV does not have are hidden. With the Remote tab open, a keyboard’s arrows, Enter, Backspace (Back) and Escape (Home) work too.

  4. Apps: the TV’s apps (webOS launch points, Roku channels, Samsung apps), and the one in front. Tap an app to launch it.

  5. TV: on webOS, model and firmware, a volume slider, mute, screen off and on, inputs, the current channel, and a toast, which shows a message on the TV. On Roku, device info, inputs (Roku TVs) and Find my remote. On Samsung, the device info from port 8001.

  6. Developer: how to turn on developer mode and sideload apps on each platform, with the command lines: ares-cli for webOS, the plugin_install page for Roku, and sdb/tizen for Samsung.

Pairing keys stay in memory (they are lost when the page closes) unless you tick Remember the pairing key in this browser. A remembered key lets anyone using this browser control the TV. Forget key on the Add TV tab deletes it. Keys are never put in links, and this tool has no share links.

Protocols

  • LG webOS: SSAP, which is JSON over a WebSocket on wss://TV:3001 (or ws://TV:3000 on older firmware). The page sends a register message with a permissions manifest. The TV answers pairingType: PROMPT and, once you accept, registered with a client-key. Commands are request messages to ssap:// URIs (audio/volumeUp, system.launcher/launch, system.notifications/createToast, …). Remote buttons go through the pointer input socket (from getPointerInputSocket), which takes type:button / name:UP lines.

  • Roku: the External Control Protocol, plain HTTP on port 8060. Keys are POST /keypress/Home, a typed character is Lit_<char>, an app is started with POST /launch/<id>, and the TV is read with GET /query/device-info, /query/apps and /query/active-app (XML).

  • Samsung Tizen: wss://TV:8002/api/v2/channels/samsung.remote.control?name=…&token=…. The TV asks to allow the remote, and its ms.channel.connect message carries the token. Keys are ms.remote.control messages (KEY_VOLUP, KEY_HOME, …). Text is SendInputString (base64).

Limits

  • The gitwebsite app with its LAN relays (relay.ws, relay.lan, companion v1.2) is needed in most cases. The first time a page reaches a new TV address, the app asks you to approve it. Without the app, the tool can still try a direct connection. Only a page served over http (the app’s own preview, or a local copy) can open ws://TV:3000. Roku keypresses are then sent blind, because the replies cannot be read.

  • Power on is not possible over the network: webOS and Samsung need Wake-on-LAN, which a browser cannot send. Power off works. On a Roku, PowerOn works only on Roku TVs with fast start.

  • webOS: this tool sends an unsigned permissions manifest. Some newer firmware refuses a few permissions to unsigned clients (screen off, some settings). The SSAP calls for those then fail with an error.

  • Samsung: some 2020+ firmware ignores the app list request, and some models need Settings → General → External Device Manager → Device Connection Manager → Access notification turned on before they prompt.

  • Developer-mode installs (webOS IPK over SSH on 9922, Tizen’s sdb, Roku’s digest-authenticated installer) are not driven from the page. The Developer tab gives the commands to run instead.

How it is tested: the tool’s SSAP, ECP and Tizen clients run in node tests against fake TVs that implement each handshake: webOS register/PROMPT/registered with a client-key and the pointer socket, Roku’s XML queries and keypresses, and Samsung’s token prompt, keys and app list. The tests reach the fakes directly and through a fake gitwebsite companion’s relay/ws and relay/lan. The tool has not been tried against a real TV here.

Runs entirely in your browser — network requests go only to the services named on this page.