A simple Node.js application to control LG WebOS TVs from the command line ๐บ
This application is targeting the LG Smart TVs running WebOS, i.e. later 2014 or 2015 models. Previous models used another OS and other protocols and won't work with this. โ
This makes use of lgtv2 APIs under the hood ๐ ๏ธ
- Clone this repo ๐
- cd to the cloned directory ๐
- Run npm install ๐ฆ
- Find the local IP address of the TV ๐ก
- Set the ip variable (in the first line of index.js) to that IP address ๐ง
- Save the file and run node ./index.js to get started ๐
You need to allow "LG Connect Apps" or "Mobile TV Connect" or something similar on your TV
The first time you run it against the TV, you need to give the program access to the TV by answering yes to the prompt on the TV. From then on, the received client key is used, so you don't have to perform this step again.
This cannot be used to turn on your TV, unlike the official LG remote app ๐ฑ
- Launch an app ๐
- Switch between inputs ๐
- Send keys -> Up, down, left, right, enter, back, exit ๐ฎ
- Get/set volume ๐
- Increase/decrease volume by one unit ๐
- Toggle mute ๐
- Turn TV off ๐ด
- Show a toast message ๐