This is a JS library that implements TCP network control for LG TVs manufactured since 2018. It utilizes encryption rules based on a guide found on the internet. A non-encrypted mode is provided for older models, but hasn't been tested.
This library is not provided by LG, and it is not a complete implementation for every TV model.
According to LG's own documentation, this tool should generally work with all models after 2018, though not every feature included here may work on every TV. Due to scarce documentation by LG, functionality specific to some model variants may be missing.
All models since 2018 should require encryption and will generate a keycode that needs to be used by the client to initialize the encryption. Some LG docs indicate that there were older models that supported this interface without encryption. A non-encrypted mode is provided in an attempt to support these models, but hasn't been tested.
- OLED65B9PUA
- OLED42C2PUA
Users report that CX models work, but with the limitation that the Freesat input can't be directly selected.
Before the TV can be controlled using this library, Network IP Control needs to be enabled. It's found in a hidden menu that can be easily accessed.
- Open the "All Settings" menu on the TV.
- Using the remote arrows, navigate the focus to "Connection" but do not enter it. For some TVs, this may say "Network" instead.
- Quickly, press
82888
using the remote numeric buttons. - Note the MAC and IP addresses for client configuration. The MAC address is required to remotely power on the TV.
- Select and enable "Network IP Control".
- For TVs that require encryption, there is a "Generate Keycode" option. Click it and note the 8 characters code displayed for client configuration. This keycode is required for all commands except power on. A new keycode can be generated at any time.
- To allow the TV to be powered on remotely, enable "Wake On LAN".
See CLI's README.md
On a terminal, run:
yarn install
Before committing, make sure to check the code is formatted, linted, and tests and building work:
yarn check:format
yarn check:types
yarn test
yarn build