A lightweight, self-closing, OLED-optimized LG webOS TV application that broadcasts a Wake-on-LAN (WOL) magic packet to your NAS (or other local servers) and immediately returns to the TV Home Screen.
- Background Magic Broadcaster: Uses a native, sandboxed Node.js background service (
dgramandBuffer) to construct and send a raw UDP magic packet. - Auto-Closes in 3s: Wakes the NAS, displays a 3-second visual feedback countdown bar, and exits automatically back to the Home Screen launcher.
- Smart Hybrid Settings:
- Displays the configuration form automatically on first launch.
- Allows you to press [Edit Settings] with the remote during subsequent countdowns to update device addresses.
- Autocorrects and inserts colons in the MAC address field—simply type 12 alphanumeric characters (e.g.
001122334455) on the TV remote!
- 10-Foot UI / OLED Optimized: A high-contrast dark theme (pure black
#000000) designed specifically to look gorgeous on LG OLED TVs (like the G4) and keep pixels resting. Features high-visibility GPU-accelerated spatial focus D-pad and Magic Remote pointer states.
lg-wakes-nas/
├── README.md # This documentation
├── .gitignore # Configured Git ignore rules for build files
├── package.json # Root build/sideload automation scripts
├── logo.svg # Standard vector SVG logo for the project
├── app/ # webOS Web Application (Frontend UI)
│ ├── appinfo.json # App manifest
│ ├── index.html # UI HTML markup
│ ├── css/
│ │ └── style.css # OLED-friendly black theme and focus styles
│ ├── js/
│ │ ├── app.js # Client logic and remote spatial navigation
│ │ ├── webOSTV.js # Local copy of webOS TV API library
│ │ └── webOSTV-LICENSE.txt# Apache 2.0 license for the webOS TV library
│ ├── icon.png # 80x80 App launcher icon
│ └── largeIcon.png # 130x130 App detail icon
└── service/ # webOS JavaScript Service (Backend)
├── package.json # Node.js service descriptor
├── services.json # Luna Bus method registration
└── wake_service.js # Node.js raw UDP magic packet broadcaster
- Node.js installed on your development machine.
- webOS TV CLI Tools (
@webos-tools/cli) installed globally. You can install it via:npm install -g @webos-tools/cli
- Go to the LG Content Store / App Store on your TV, search for Developer Mode, and install the app.
- Open the Developer Mode app, log in with your LG Developer Account, and toggle Dev Mode Status to ON (this will restart your TV).
- Toggle Key Server to ON in the Dev Mode app.
On your development machine:
- Register your TV in the CLI:
ares-setup-device
- Choose
add. - Device Name:
default(or any name you prefer). - IP Address: Enter the IP shown in the TV's Developer Mode app.
- Port:
9908(Default). - SSH Port:
22(Default).
- Choose
- Fetch the SSH key from the TV:
ares-novacom --device default --getkey
- When prompted for a passphrase, enter the 6-character Passphrase shown on your TV's Developer Mode app (case sensitive).
- Verify connection:
ares-device --system-info default
We've packaged the standard CLI lifecycle tasks into simple npm scripts:
| Command | Action |
|---|---|
npm run build |
Cleans old packages and bundles app/ and service/ into a single installable .ipk file. |
npm run install |
Deploys the packaged .ipk to your default TV device. |
npm run launch |
Launches the "Wake My NAS" app on your TV screen. |
npm run close |
Force closes the app from your TV screen. |
npm run all |
Bundles, installs, and launches the app in one single step! |
Simply run:
npm run all- When you first launch the app on your TV, it will open directly to the WOL Configuration page.
- Enter your NAS details:
- MAC Address: 12 alphanumeric characters (e.g.
708bcd89ef01). Colons are auto-inserted. - Broadcast IP Address: (Optional) Defaults to
255.255.255.255. If your router isolates subnet broadcasts, you can specify your subnet broadcast (e.g.192.168.1.255). - UDP Port: (Optional) Defaults to
9. Some machines listen on7.
- MAC Address: 12 alphanumeric characters (e.g.
- Click [Save & Wake] (focused by default).
- On future launches, the app will instantly broadcast the packet and close back to the Home Screen within 3 seconds!
To change settings at any time:
- Open the app from your TV Home Screen.
- Press [Edit Settings] using your remote before the 3-second timer expires.
- Make changes and click [Save & Wake].