Skip to content

Repository files navigation

LG TV Brightness Tray

A lightweight Windows system tray utility to control the brightness of LG webOS TVs (C-series OLED, G-series, etc.) used as PC monitors. Adjust OLED Pixel Brightness from a slider in the tray instead of digging through the TV's on-screen menu every time.

Built on top of bscpylgtv (LAN webOS API). Works where DDC/CI over HDMI fails or is missing on LG OLEDs.

Features

  • Tray icon with a popup slider (0–100) for OLED Pixel Brightness
  • One-click presets: Movie (15) / Night (30) / Day (80) / Max (100)
  • Right-click menu for quick preset selection without opening the slider
  • Debounced commits — dragging the slider only sends one command after you stop moving
  • CLI batch presets for shortcuts, scheduled tasks, or scripting
  • Auto-start on login (optional)
  • Single-file installer with embedded tray app, no separate downloads

Requirements

  • Windows 10/11
  • Python 3.8 or newer (must be on PATH)
  • An LG webOS TV on the same LAN as your PC
  • TV settings: Network → LG Connect Apps enabled, General → Devices → External Devices → Mobile TV On enabled

Install

One-liner (PowerShell)

iwr https://raw.githubusercontent.com/liuwang97/lg-tv-brightness-tray/main/install.ps1 -OutFile $env:TEMP\lg-install.ps1; powershell -ExecutionPolicy Bypass -File $env:TEMP\lg-install.ps1

Manual

  1. Download install.ps1

  2. Right-click → Run with PowerShell, or from a terminal:

    powershell -ExecutionPolicy Bypass -File install.ps1

Either way

  1. Enter your TV's IP when prompted (e.g. 192.168.1.50)
  2. Look at the TV — accept the pairing prompt with the remote (first-time only; the key is stored in %USERPROFILE%\.aiopylgtv.sqlite and reused after that)
  3. Choose whether to add the tray to Windows Startup

The installer is idempotent — re-run it any time to update the IP, refresh files, or re-pair.

Unattended

powershell -ExecutionPolicy Bypass -File install.ps1 -TVIP 192.168.1.50 -NoStartup
Parameter Default Description
-TVIP (interactive prompt) TV IP address
-InstallDir %USERPROFILE%\lg-tv Where to install
-NoStartup off Skip the Windows Startup shortcut
-NoLaunch off Don't launch the tray after install

Usage

Tray

  • Left-click the sun icon → slider popup at the bottom-right of the screen
  • Drag the slider or use arrow keys / Page Up–Down for fine control
  • Esc or click outside → hides the panel
  • Right-click the icon → preset menu, refresh from TV, exit

CLI presets

In %USERPROFILE%\lg-tv\:

day.bat            REM backlight=80
night.bat          REM backlight=30
movie.bat          REM backlight=15
set.bat 50         REM custom value 0-100
status.bat         REM print current picture settings

Add the install folder to PATH to call them globally:

[Environment]::SetEnvironmentVariable("Path", $env:Path + ";$env:USERPROFILE\lg-tv", "User")

Configuration

Edit %USERPROFILE%\lg-tv\_config.bat to change the TV IP. The tray reads this file on startup; restart it (right-click tray → Exit, then re-launch via tray.vbs or rerun install.ps1) to pick up changes.

If your TV gets a new DHCP lease, either bind its MAC to a static IP in your router or update _config.bat.

How it works

Brightness on OLED LG TVs is set via the setSystemSettings Luna call with category picture:

bscpylgtvcommand <ip> set_system_settings picture "{\"backlight\": 30}"

Despite the name backlight, on OLED panels this controls OLED Pixel Brightness — the same slider you'd find under Picture → Picture Mode Settings → OLED Pixel Brightness on the TV.

The tray app is a PowerShell + WinForms script (no compiled binary). It uses a 250 ms debounce timer so dragging the slider only fires one network call after you release.

Troubleshooting

Tray icon doesn't appear — Open Task Manager → Details and look for a powershell.exe running tray.ps1. If absent, run tray.vbs manually or invoke directly to see errors:

powershell -NoProfile -ExecutionPolicy Bypass -STA -File "$env:USERPROFILE\lg-tv\tray.ps1"

"Couldn't reach TV" — Check:

  • TV is powered on (or "Mobile TV On" is enabled, allowing wake-up)
  • Same subnet as your PC
  • No firewall blocking outbound to TV port 3000/3001
  • IP in _config.bat is correct

Slider moves but TV doesn't change — Run status.bat and confirm backlight updates. If not, the picture mode may not allow that setting (some HDR / Dolby Vision modes have separate sliders). Try changing the picture mode on the TV first.

Multiple tray icons in system tray — Old script processes; right-click → Exit on each, or kill all powershell.exe processes that have tray.ps1 in their command line.

Uninstall

# Remove install dir
Remove-Item "$env:USERPROFILE\lg-tv" -Recurse -Force

# Remove startup shortcut (if added)
Remove-Item "$([Environment]::GetFolderPath('Startup'))\LG TV Brightness.lnk" -Force -ErrorAction SilentlyContinue

# Remove pairing key (optional)
Remove-Item "$env:USERPROFILE\.aiopylgtv.sqlite" -Force -ErrorAction SilentlyContinue

# Uninstall Python lib
pip uninstall -y bscpylgtv

License

MIT — see LICENSE.

About

Windows tray app + one-click installer to control LG webOS TV (C-series OLED, etc.) brightness from your PC, via the bscpylgtv LAN API.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages