Skip to content

Releases

MagicRemoteService 3.3.0

Choose a tag to compare

@github-actions github-actions released this 26 Nov 10:33

Everything in one exe

A new PC needs nothing besides MagicRemoteService.exe:

  • SSH is built in. Pairing and installing the TV app used Windows' OpenSSH Client, which is an optional feature that many PCs don't have. The exe now has its own SSH client.
  • The C runtime is built in. 3.1 and 3.2 needed the Microsoft Visual C++ Redistributable, which a fresh Windows may lack. This exe doesn't.
  • Still not needed: .NET, Node.js and the webOS CLI.

The TV still needs what LG requires for any app installed this way: the Developer Mode app, signed in with an LG developer account, with Key Server on while you pair.

Public networks

The firewall lets the TV in on private networks only. If Windows calls your network Public, the remote can't connect, and Setup used to say you were all set anyway. Setup now names the network and offers Make it private, one click and the Windows prompt. Do it only on a network you trust, such as your home's.

Notes

  • Updating from 3.1 or 3.2: run this exe and click Update in Setup. TVs you paired before stay paired. The TV app didn't change, so there's no need to reinstall it.
  • SmartScreen. The exe isn't code-signed, so Windows may warn the first time you run it. Choose More info, then Run anyway.
  • The exe is larger (about 16 MB) because the SSH client and the C runtime are now inside it.

MagicRemoteService 3.2.0

Choose a tag to compare

@github-actions github-actions released this 26 Nov 08:30

Set up by double-clicking

Download MagicRemoteService.exe, double-click it, and the settings open on Setup. There are three steps:

  1. Install on this PC. One click and the Windows prompt. The remote then works as soon as Windows starts.
  2. Pair your TV. Your LG TV is found on the network by itself: pick it and type the passphrase its Developer Mode app shows. Typing the IP still works.
  3. Install the TV app. Pick the HDMI input the PC is plugged into. The network and the device token are chosen for you.

Setup also offers Update when you run a newer exe, and Repair when the service isn't answering. Once everything is done, the settings open on the Overview.

One click is enough

Buttons, tabs, switches, check boxes and the remote's buttons in the settings window used to need two clicks: the first only gave them keyboard focus. Now they respond to the first click, and still work with Tab, Space and Enter.

Notes

  • Running it by hand now opens the settings. To run without the service, use MagicRemoteService.exe --standalone. "Start with Windows" entries saved by earlier versions keep working.
  • SmartScreen. The exe isn't code-signed, so Windows may warn the first time you run it. Choose More info, then Run anyway.
  • Updating from 3.1: run this exe and click Update. The TV app didn't change, so there's no need to reinstall it.

MagicRemoteService 3.1.0

Choose a tag to compare

@github-actions github-actions released this 26 Nov 07:20

A native settings window

Double-click the tray icon to open the new settings window: a dark, native app with four pages.

  • Overview: service status, each connected TV (connected for, last input, latency, activity counts) and recent events.
  • Remote: the Magic Remote drawn on screen. Pick any button to map it to a click, key, shortcut, command or TV action.
  • TVs: pair a TV, install the TV app, and tune the pointer.
  • PC: startup, shutdown timers, port, and which monitor each TV's pointer lands on.

It runs as you, never as SYSTEM, works with the keyboard and screen readers, and uses about 28 MB. The web page at http://localhost:41231 is still there (Open in browser).

No Node.js needed for the TV app

The service builds the TV app's package itself and installs it over the TV's Developer Mode connection, using the SSH client built into Windows. Reinstall TV App takes seconds.

  • Pair a TV from the TVs page or the installer: enter its IP and the passphrase its Developer Mode app shows (turn Key Server on while pairing, and off afterwards).
  • A TV you already set up with the webOS CLI is picked up automatically.
  • The TV's key stays encrypted, readable only by SYSTEM and administrators.

New features

  • Live TV settings: cursor speed, scroll speed and long-press time reach a connected TV the moment you save, with no reinstall.
  • Per-app profiles: buttons can do something different while particular apps (such as vlc) are in front.
  • Connected TVs diagnostics: latency, last input and activity per TV, never which keys or text.

More reliable on the TV

  • The TV notices a PC that went quiet (asleep, unplugged) within 15 seconds and reconnects, thanks to a heartbeat.
  • Fixed the TV service's WebSocket framing (masking, frames split across reads, 64-bit lengths, pings).
  • Toasts no longer swallow clicks, and their text is translated (French, Spanish).

Security

  • The device token never leaves the service: the API only says whether one is set, and tv-config.json is readable only by SYSTEM and administrators. New token generates a fresh one.
  • Web pages (any http/https origin) can no longer open the TV connection, even in open mode.
  • The firewall lets TVs in only on Private and Domain networks.

Upgrading

Run install.bat from the zip and accept the administrator prompt. Your bindings, TV config and registry settings are kept. Then click Reinstall TV App in the settings so the TV gets the matching app (live settings and the heartbeat need it).

Needs Windows 10 1809 or later (for the built-in OpenSSH Client) and the Developer Mode app on the TV. The exe is now about 14 MB, because it contains the settings window.

v3.0.1

Choose a tag to compare

@github-actions github-actions released this 26 Nov 03:31

What's Changed

  • Make the repository Rust-first: retire C#, new installer, README and CI by @rokogan in #1

New Contributors

Full Changelog: v3.0.0...v3.0.1

v3.0.0 — Rust rewrite

Choose a tag to compare

@rokogan rokogan released this 26 Nov 01:16

The PC service, rebuilt in Rust

The Windows side is now a single 1.4 MB MagicRemoteService.exe with the web UI, TV app, cursor and icon built in. It speaks the same protocol to the same TV app and reads your existing bindings.json, tv-config.json and registry settings, so it replaces 2.x in place.

Install or upgrade

  1. Download MagicRemoteService.exe below.
  2. In an administrator PowerShell, in the download folder, run:
    .\MagicRemoteService.exe install | Out-Host
    
    It copies itself to C:\Program Files\MagicRemoteService, brings bindings.json and tv-config.json over from where the old service ran, registers the service (restarted automatically if it fails), adds the firewall rules and starts it. Registry settings carry over as they are.
  3. Open http://localhost:41231 and click Reinstall TV App to put this release's TV fixes on your TV. This needs Node.js, @webos-tools/cli and your TV set up with ares-setup-device, as before.

Windows may warn that the exe is from an unknown publisher: it is not code-signed.

What's new

  • One file, no build chain: no .NET Framework, MSBuild, Visual Studio Build Tools or NuGet.
  • Lighter: about 2 MB of private memory for the idle worker, against about 50 MB for the two 2.x processes.
  • Self-healing: the service keeps one worker in the signed-in session and restarts it after a crash or when the console moves to another session.
  • Settings apply live: bindings, scroll exclusions, the device token and the shutdown timeouts take effect without a restart, including for TVs already connected.
  • Web UI:
    • PC settings: port, shutdown timeouts, start with Windows
    • which display each TV's pointer maps to
    • every connected TV
    • a Recent Events log
      The WinForms settings window is gone.
  • Safer:
    • The service runs only from Program Files, where only administrators can change it.
    • Command bindings, ares-cli and the browser run as the signed-in user, not as SYSTEM.
    • The web UI listens on loopback only and refuses foreign Host names and origins.
    • The device token is compared in constant time.
    • A connection must finish its WebSocket handshake within 10 seconds.
  • Exact pointing: per-monitor DPI awareness, so the TV's pointer lands on exact pixels on high-DPI and multi-monitor PCs.

Fixes

PC:

  • Your mouse speed is restored when the remote's pointer hides; 2.x never restored it.
  • One TV hiding its pointer no longer resets the cursor for another.
  • /api/pcinfo lists the network with a gateway first, so the auto-detected PC IP is no longer a VPN or virtual adapter.
  • Two ares-cli runs at once (a reinstall while the web UI lists TVs) no longer break each other.

TV app:

  • Wake-on-LAN no longer wakes the PC right after it shuts down or sleeps. It wakes the PC when you open the app, or come back to its input, while the PC is off, and gives up after 15 seconds.
  • Reconnect timers no longer stack up and keep replacing a working connection.
  • Holding Back to exit no longer sends Escape to the PC; a short press is sent on release.
  • The TV service retries when the TV refuses its SSAP connection, instead of crashing.

Web UI:

  • Saves report server errors.
  • Reset no longer restarts the service.
  • "Start with Windows" is not sent while its box is disabled.

Commands

Command What it does
MagicRemoteService.exe install Install or upgrade (administrator)
MagicRemoteService.exe uninstall Stop and remove the service (administrator)
MagicRemoteService.exe status Service state, port and connected TVs
MagicRemoteService.exe --port 41330 --no-ssdp Run a second copy on its own, beside the service, to try a build

Known limitations

  • install.bat and build.bat in the source still build the C# 2.x service; use the exe above instead.
  • Deploying the TV app still needs Node.js and @webos-tools/cli.
  • The exe is not code-signed.

Tested on Windows 10 with an LG C2 (webOS 25).

SHA-256 of MagicRemoteService.exe: 22826960e3a821355c4c4e53fef6f6d0ea6f8d88064f8cf46d2268b46a687d90 (built from 5a091d3; the tagged commit only adds a README change).

v2.2.0 — Security & Stability

Choose a tag to compare

@rokogan rokogan released this 17 Apr 15:27

28 Bug Fixes from Deep Code Review

Critical (4)

  • Buffer overflow protection — bounds check before WebSocket unmask loop prevents heap corruption
  • 64-bit frame length — proper handling of large WebSocket frames in TV service
  • Race condition fixed — screen display assignment now synchronous, eliminates null dereference
  • Division by zero — guarded absolute position calculation when no displays available

High Severity (6)

  • WebSocket stale reference — checks readyState before reconnecting, prevents stuck connections
  • Command injection blocked — shell metacharacters (&|;><) rejected in key binding commands
  • Named pipe secured — PipeSecurity restricts access to authenticated users only
  • Socket cleanup — catch-all ensures cursor and resources reset on any error
  • XSS prevention — scroll exclusion names use textContent instead of innerHTML
  • Cursor counter — clamped to prevent negative values corrupting cursor state

Medium Severity (7)

  • Timer disposal race — 50ms delay between Stop and Dispose prevents use-after-free
  • Thread-safe scroll exclusions — Interlocked.Exchange for concurrent access
  • Duplicate WoL prevention — guard prevents multiple Wake-on-LAN intervals
  • SSDP double-response — flag prevents responding twice to discovery
  • SSAP reconnect stacking — clears pending timeout before new reconnect
  • CSRF headers — X-Requested-With on all POST requests
  • Input validation — port 1-65535, cursor speed 0.1-5.0 in web UI

Low Severity (6)

  • Synchronous XHR documented as intentional
  • Thread-safe client IP tracking
  • Error log capped at 10K chars
  • Font fallback chain added
  • Long-click threshold now configurable
  • Toast timeout properly cleared

Architecture (2)

  • Connection state machine — DISCONNECTED/CONNECTING/CONNECTED/CLOSING prevents race conditions
  • Named constants — 10 magic numbers replaced with descriptive variables

Upgrade

Download and extract over existing install. Run install.bat as Admin to rebuild, or just replace the exe and settings-ui.html.

v2.1.0

Choose a tag to compare

@rokogan rokogan released this 17 Apr 15:27

What's New in v2.1.0

Config Injection (Breaking Change)

  • config.json replaces sed/PowerShell injection — main.js and service.js are no longer modified during install. All config loaded from config.json at runtime.
  • Install can now run multiple times without breaking
  • No more const vs var mismatch bugs

Auto-Detection

  • PC IP, MAC, subnet auto-detected — no manual entry needed
  • HDMI port selector in web UI
  • /api/pcinfo endpoint returns all network interfaces

Web UI Enhancements

  • TV App Configuration panel — edit HDMI port, IP, MAC, cursor speed
  • Reinstall TV App button — one-click deploy from browser
  • Per-app scroll exclusions — configurable from web UI (e.g. PotPlayer)
  • Visual remote configurator — click buttons to remap them
  • Save & Restart Service — apply changes immediately

Other

  • Node.js v22+ polyfill for ares-cli compatibility
  • Cleaned up repo (removed debug scripts, temp files)
  • Updated README with full documentation

Upgrade from v2.0.0

Download and extract over existing install. Run install.bat as Admin to rebuild and redeploy.

Fresh Install

  1. Extract zip
  2. Run install.bat as Administrator
  3. Follow the prompts
  4. Open http://localhost:41231 to configure

v2.0.0

Choose a tag to compare

@rokogan rokogan released this 17 Apr 15:27

What's New

Features

  • Visual Remote Web UI — Configure key bindings at http://localhost:41231
  • Auto-discovery (SSDP) — TV finds your PC automatically
  • Smooth scrolling — Mac-style momentum with per-app exclusions
  • Per-app scroll exclusions — Disable smooth scroll for media players (e.g. PotPlayer)
  • Connection toasts — Small non-blocking status notifications on TV
  • JSON key bindings — bindings.json synced between web UI and Windows Settings
  • Windows installer — install.bat handles everything (prerequisites, build, deploy)
  • Service keepalive — Prevents webOS 25 from killing the TV service

Bug Fixes

  • Screensaver suppression (fixes Cathwyler#66)
  • webOS 25 sensor 1003 auto-retry
  • CPU usage reduced from 20%+ to ~0%
  • WebSocket security hardening
  • Resource leak fixes
  • ares-cli PATH auto-discovery

Installation

Option 1 (recommended): Clone the repo and run install.bat as Administrator
Option 2: Download the zip, extract, register the service manually (see README)

Requires LG TV with Developer Mode enabled.