# LGWebOSRemote **Repository Path**: mirrors_samcday/LGWebOSRemote ## Basic Information - **Project Name**: LGWebOSRemote - **Description**: Command line webOS remote for LGTVs - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2022-10-24 - **Last Updated**: 2026-02-01 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # LGWebOSRemote Command line webOS remote for LGTVs. This tool uses a connection via websockets to port 3000 on newer LG TVs, there are other tools which use a restful connection to port 8080 however that port is closed on newer firmware versions. ## Supported models ### Tested with * 43LM6300PSB * 43UN73003LC * HU80KG.AEU (CineBeam 4K) * OLED55B7 * OLED55C9 * OLED55CX5LB * OLED55CXAUA * OLED65B9PUA * OLED77CX9LA * SK8500PLA * SM9010PLA * UF776V * UF830V * UH650V * UJ6309 * UJ635V * UJ6570 * UJ701V * 60UJ6300-UA * [please add more!] Tested with python 2.7 on mac/linux and works fine, your mileage may vary with windows, patches welcome. Tested with python 3.9 on Debian Unstable. ### Likely supports All devices with firmware major version 4, product name "webOSTV 2.0" ## Available Commands lgtv scan lgtv auth MyTV lgtv MyTV audioStatus lgtv MyTV audioVolume lgtv MyTV closeApp lgtv MyTV execute lgtv MyTV getCursorSocket lgtv MyTV getForegroundAppInfo lgtv MyTV getPictureSettings lgtv MyTV getPowerState lgtv MyTV getSoundOutput lgtv MyTV getSystemInfo lgtv MyTV getTVChannel lgtv MyTV input3DOff lgtv MyTV input3DOn lgtv MyTV inputChannelDown lgtv MyTV inputChannelUp lgtv MyTV inputMediaFastForward lgtv MyTV inputMediaPause lgtv MyTV inputMediaPlay lgtv MyTV inputMediaRewind lgtv MyTV inputMediaStop lgtv MyTV listApps lgtv MyTV listLaunchPoints lgtv MyTV listChannels lgtv MyTV listInputs lgtv MyTV listServices lgtv MyTV mute lgtv MyTV notification lgtv MyTV notificationWithIcon lgtv MyTV off lgtv MyTV on lgtv MyTV openAppWithPayload lgtv MyTV openBrowserAt lgtv MyTV openYoutubeId lgtv MyTV openYoutubeURL lgtv MyTV openYoutubeLegacyId lgtv MyTV openYoutubeLegacyURL lgtv MyTV serialise lgtv MyTV setInput lgtv MyTV setSoundOutput lgtv MyTV screenOff lgtv MyTV screenOn lgtv MyTV setTVChannel lgtv MyTV setVolume lgtv MyTV startApp lgtv MyTV swInfo lgtv MyTV volumeDown lgtv MyTV volumeUp ## Install Requires wakeonlan, websocket for python (python3-websocket for python3), and getmac. python-pip (python3-pip for python3) and git are required for the installation process. python -m venv lgtv-venv source lgtv-venv/bin/activate pip install git+https://github.com/klattimer/LGWebOSRemote To install it system wide: sudo mkdir -p /opt sudo python -m venv /opt/lgtv-venv source /opt/lgtv-venv/bin/activate sudo pip install git+https://github.com/klattimer/LGWebOSRemote ## Example usage # Scan/Authenticate $ lgtv scan { "count": 1, "list": [ { "address": "192.168.1.31", "model": "UF830V", "uuid": "10f34f86-0664-f223-4b8f-d16a772d9baf" } ], "result": "ok" } $ lgtv auth 192.168.1.31 MyTV # At this point the TV will request pairing, follow the instructions on screen # Commands are basically #$ lgtv TVNAME COMMAND COMMAND ARGS $ lgtv MyTV on $ lgtv MyTV off # If you have the youtube plugin $ lgtv MyTV openYoutubeURL https://www.youtube.com/watch?v=dQw4w9WgXcQ # Otherwise, this works reasonably well $ lgtv MyTV openBrowserAt https://www.youtube.com/tv#/watch?v=dQw4w9WgXcQ ## Caveats You need to auth with the TV before being able to use the on command as it requires the mac address. ## TODO Implement the following features: closeToast createAlert closeAlert getSystemSettings ## Bugs I couldn't test youtube because it seems the app isn't installed and not available to download right now maybe they're updating it?