Skip to content

Commit 2e4faf1

Browse files
committed
Added WoL for set top box devies
1 parent ea44eb7 commit 2e4faf1

File tree

11 files changed

+703
-278
lines changed

11 files changed

+703
-278
lines changed

lgtv-tray-remote/README.md

Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ A system tray application for controlling LG webOS TVs. Works on **Windows**, **
1010
- D-pad navigation (Up, Down, Left, Right, OK)
1111
- Volume control (Up, Down, Mute, Unmute)
1212
- Power On (Wake-on-LAN) and Power Off
13+
- **Wake streaming device** (Android TV / NVIDIA Shield via Wake-on-LAN, or Roku via ECP)
1314
- Home and Back buttons
1415
- Keyboard shortcuts
1516
- Auto-reconnect on startup
@@ -21,12 +22,14 @@ A system tray application for controlling LG webOS TVs. Works on **Windows**, **
2122
### NixOS / Nix
2223

2324
**Enable binary cache** (recommended - avoids building from source):
25+
2426
```bash
2527
# One-time setup
2628
nix run nixpkgs#cachix -- use lgtv-tray-remote
2729
```
2830

2931
Or add to your NixOS configuration:
32+
3033
```nix
3134
nix.settings = {
3235
substituters = [ "https://lgtv-tray-remote.cachix.org" ];
@@ -35,16 +38,19 @@ nix.settings = {
3538
```
3639

3740
**Run directly** (no install):
41+
3842
```bash
3943
nix run github:jaredcat/plasmoid-lgtv-remote?dir=lgtv-tray-remote
4044
```
4145

4246
**Install to profile**:
47+
4348
```bash
4449
nix profile install github:jaredcat/plasmoid-lgtv-remote?dir=lgtv-tray-remote
4550
```
4651

4752
**Add to NixOS configuration** (flake-based):
53+
4854
```nix
4955
# flake.nix
5056
{
@@ -60,6 +66,7 @@ nix profile install github:jaredcat/plasmoid-lgtv-remote?dir=lgtv-tray-remote
6066
```
6167

6268
**Build locally**:
69+
6370
```bash
6471
cd lgtv-tray-remote
6572
nix build
@@ -105,30 +112,35 @@ cargo tauri build
105112

106113
##### Prerequisites
107114

108-
1. **Rust** (1.70+): https://rustup.rs/
115+
1. **Rust** (1.70+): <https://rustup.rs/>
109116
2. **Tauri CLI**:
117+
110118
```bash
111119
cargo install tauri-cli
112120
```
113121

114-
4. **Platform-specific dependencies**:
122+
3. **Platform-specific dependencies**:
115123

116124
**Linux (Debian/Ubuntu)**:
125+
117126
```bash
118127
sudo apt install libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
119128
```
120129

121130
**Linux (Fedora)**:
131+
122132
```bash
123133
sudo dnf install webkit2gtk4.1-devel libappindicator-gtk3-devel librsvg2-devel
124134
```
125135

126136
**Linux (Arch)**:
137+
127138
```bash
128139
sudo pacman -S webkit2gtk-4.1 libappindicator-gtk3 librsvg
129140
```
130141

131142
**macOS**: Xcode Command Line Tools
143+
132144
```bash
133145
xcode-select --install
134146
```
@@ -175,7 +187,7 @@ Build outputs are in `src-tauri/target/release/bundle/`.
175187
### Keyboard Shortcuts
176188

177189
| Key | Action |
178-
|-----|--------|
190+
| ----- | -------- |
179191
| Arrow keys | Navigate |
180192
| Enter | Select/OK |
181193
| Backspace/Escape | Back |
@@ -187,39 +199,55 @@ Build outputs are in `src-tauri/target/release/bundle/`.
187199
### Power On (Wake-on-LAN)
188200

189201
For **Power On** to work:
202+
190203
1. Enable "Wake on LAN" in your TV's network settings
191204
2. The TV must have been authenticated at least once while powered on (to save its MAC address)
192205
3. Your computer must be on the same network as the TV
193206

207+
### Streaming device (Android TV, Roku)
208+
209+
If you use a set-top box (e.g. **NVIDIA Shield**, other Android TV, or **Roku**) on an HDMI input, you can wake it from standby so the remote works when the box was off.
210+
211+
- **Wake-on-LAN (Android TV / Shield)**: In Settings → Streaming device, choose "Wake-on-LAN", enter the device’s **MAC address** (from your router, or Shield: Settings → Device preferences → About → Network). Optionally set **Subnet broadcast IP** (e.g. `10.0.0.255` for a 10.0.0.x network) — some networks only deliver WoL to the subnet broadcast; try this if the default (255.255.255.255) doesn’t wake the device. Works best when the device is on Ethernet.
212+
- **ADB (Android TV / Shield)**: Choose "ADB" and enter the device’s **IP address** (and port, default 5555). Requires **Network debugging** enabled on the device (Shield: Settings → Developer options → Network debugging). The app uses the system `adb` (install Android platform tools if needed, e.g. `brew install android-platform-tools`). ADB wake works when the device is in standby but still listening on the network.
213+
- **Roku**: Choose "Roku" and enter the Roku’s **IP address**. The app sends a power-on command over the local network (Roku ECP). Ensure "Control by mobile apps" is enabled on the Roku (Settings → System → Advanced system settings).
214+
215+
You can enable **"Also wake streaming device when using Power On"** so one Power On action wakes both the TV and the streaming device. You can also assign a keyboard shortcut to "Wake streaming device" in the shortcuts panel.
216+
194217
### Configuration
195218

196219
Settings are stored in:
220+
197221
- **Linux**: `~/.config/lgtv-remote/config.json`
198222
- **macOS**: `~/Library/Application Support/lgtv-remote/config.json`
199223
- **Windows**: `%APPDATA%\lgtv-remote\config.json`
200224

201225
## Troubleshooting
202226

203227
### Power On not working
228+
204229
- The saved MAC address might be incorrect
205230
- Try manually setting the MAC address from the settings in the TV
206231

207232
### "MAC address not saved" (Power On fails)
233+
208234
- Power on the TV manually
209235
- Re-authenticate using the Settings panel
210236
- The app will save the MAC address for future Wake-on-LAN
211237

212238
### Connection drops frequently
239+
213240
- Some TVs close WebSocket connections after inactivity
214241
- The app will auto-reconnect when you send a command
215242

216-
217243
### "Connection timeout"
244+
218245
- Verify the TV IP address is correct
219246
- Ensure your computer and TV are on the same network
220247
- Check if the TV is powered on
221248

222249
### "Registration timeout - check TV for pairing prompt"
250+
223251
- Look at your TV screen for the pairing dialog
224252
- Accept the connection request within 60 seconds
225253

lgtv-tray-remote/flake.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777

7878
packages.default = pkgs.rustPlatform.buildRustPackage {
7979
pname = "lgtv-tray-remote";
80-
version = "1.1.1";
80+
version = "1.2.0";
8181

8282
src = ./.;
8383

lgtv-tray-remote/screenshot.png

237 KB
Loading

0 commit comments

Comments
 (0)