Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Smart TV
  3. lgtv2

lgtv2

MITJavaScript

A Node.js module to remotely control LG WebOS smart TVs via WebSocket.

GitHubGitHub
344 stars46 forks0 contributors

What is lgtv2?

LGTV2 is a Node.js module that allows developers to control LG WebOS smart TVs programmatically. It connects to the TV via WebSocket and provides an API to send commands, subscribe to events, and automate TV functions like power, volume, app launching, and media playback.

Target Audience

Developers building home automation systems, IoT projects, or integrations that require remote control of LG WebOS TVs, such as with Node-RED, Homebridge, or MQTT-based setups.

Value Proposition

It offers a straightforward, event-driven interface specifically for LG WebOS TVs, with support for real-time subscriptions and custom authentication, making it a reliable choice for automation scenarios over proprietary apps.

Overview

Control LG WebOS TV using node.js :tv:

Use Cases

Best For

  • Integrating LG WebOS TVs into Node-RED automation flows
  • Building home automation systems with MQTT-based control
  • Creating custom remote controls for LG TVs via Node.js scripts
  • Developing Homebridge plugins for Apple HomeKit integration
  • Automating TV power and volume in smart home setups
  • Subscribing to real-time TV status changes in IoT applications

Not Ideal For

  • Projects requiring control of non-LG or non-WebOS smart TVs (e.g., Samsung or Sony TVs)
  • Applications needing a built-in GUI or mobile app frontend without additional development
  • Environments where network latency or WebSocket reliability is critical for instantaneous control
  • Systems that cannot run Node.js or prefer languages like Python or Java for TV automation

Pros & Cons

Pros

Lightweight and Simple API

Offers a straightforward Node.js interface for sending commands like turning off the TV or adjusting volume, as demonstrated in the concise usage examples with minimal boilerplate code.

Real-time Event Subscription

Enables subscribing to TV events such as volume changes via WebSocket, allowing responsive automation without polling, as shown in the subscription example for audio updates.

Extensible for Home Automation

Integrates seamlessly with popular platforms like Node-RED, MQTT, and Homebridge, as listed in the 'Projects using this Module' section, making it ideal for IoT setups.

Custom Authentication Handling

Supports custom key storage and authentication methods through options like saveKey and clientKey, providing flexibility for persistent connections in diverse environments.

Cons

LG WebOS Lock-in

Only compatible with LG WebOS TVs, limiting its use in multi-brand smart home systems where control across different TV manufacturers is needed.

Breaking Changes in Updates

The README warns that v1.4.0 changed the keyFile location, requiring re-authorization on the TV, which can disrupt existing deployments and add maintenance overhead.

Manual TV Configuration Required

Users must enable 'LG Connect Apps' on the TV beforehand, adding a non-trivial setup step that might confuse less technical users or in automated deployments.

Network Dependency Issues

Relies on WebSocket connections over the network, so control can fail if the TV is offline or experiences network instability, with error handling that may require custom logic.

Frequently Asked Questions

Quick Stats

Stars344
Forks46
Contributors0
Open Issues23
Last commit4 years ago
CreatedSince 2015

Tags

#iot#home-automation#lg#remote-control#smart-tv#tv#websocket#nodejs#node-module#webos#smarthome#automation

Built With

N
Node.js

Included in

Smart TV1.3k
Auto-fetched 1 day ago

Related Projects

homebridge-webos-tvhomebridge-webos-tv

Homebridge plugin for LG webOS TVs

Stars699
Forks86
Last commit4 months ago
LGWebOSRemoteLGWebOSRemote

Command line webOS remote for LGTVs

Stars646
Forks113
Last commit27 days ago
PyWebOSTVPyWebOSTV

Python API for controlling LG TVs (Web OS)

Stars313
Forks57
Last commit9 months ago
lgtv2mqttlgtv2mqtt

Interface between LG WebOS Smart TVs and MQTT :tv:

Stars109
Forks35
Last commit3 years ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub