PairBeam
PairBeam turns your phone into a touch remote for a Sony Bravia TV — and the PC connected to it — without installing any app. You just open a page in the browser.
How it works
The system is made of three pieces that talk to each other:
- Relay (
server.js) — a small bridge server that forwards commands from the web page to the agent, and serves the remote's web page. - Agent (
desktop-agent.js) — runs on the PC connected to the TV. It finds the TV on the network (SSDP / subnet scan), authenticates with the Sony Bravia IRCC API, and executes the commands it receives. On startup it prints a 6-digit pairing code in its console window. - Web page (
public/mobile.html) — the touch remote itself: opens in a browser (phone or PC) and connects using the code shown by the agent.
A desktop-app/ folder packages the relay and the agent into a single Electron
desktop app that opens a dedicated window already connected to the remote — no browser, no
code to type.
Features
- Power on/off with Wake-on-LAN, volume, channels, numeric keypad, navigation, colored keys
- Smart app shortcuts (Netflix, SEN) and PC control (Linux) from the same page
- Automatic TV discovery on the local network, with manual IP/MAC fallback
- A diagnostic mode that logs every IRCC command's HTTP response for troubleshooting
- Standalone Windows installer (
PairBeam-Setup.exe), or a classic two-process (relay + agent) distribution for splitting relay and agent across two machines
Waking the TV (Wake-on-LAN)
Most Bravia TVs only power on over the network via a Wake-on-LAN packet, not a regular API
call, so the agent needs the TV's MAC address. It tries to detect it automatically from the
OS's ARP table after the first contact with the TV; if that fails (e.g. TV on a different
subnet), the MAC can be set manually in tv-config.json. The TV's Wake on LAN
setting must also be enabled (Settings → Network).
Security
tv-config.json stores the TV's IP, MAC address and auth cookie — it's git-ignored
and should never be shared or committed.
Build from source
Requires Node.js 18+.
npm installthennpm start— run the relay locallynpm run agent— run the agent locallynpm run build— generate the two classic Windows executables indist/- In
desktop-app/:npm installthennpm run dist— build the Electron installer