Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

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

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Smart TV
  3. PyWebOSTV

PyWebOSTV

MITPython

A Python library for controlling LG WebOS TVs via WebSocket API, enabling automation and integration.

GitHubGitHub
312 stars57 forks0 contributors

What is PyWebOSTV?

PyWebOSTV is a Python library that enables programmatic control of LG WebOS smart TVs through a WebSocket API. It solves the problem of automating TV interactions for home automation, custom remote applications, and integration with other systems by providing a clean, extensible interface to TV features like media playback, app launching, and input simulation.

Target Audience

Python developers building home automation systems, custom remote controls, or applications that need to integrate with LG WebOS TVs, such as media centers or IoT projects.

Value Proposition

Developers choose PyWebOSTV for its comprehensive feature set, support for both blocking and non-blocking calls, subscription-based event handling, and extensible architecture that makes it easy to add new TV APIs not yet covered by the library.

Overview

Python API for controlling LG TVs (Web OS)

Use Cases

Best For

  • Building custom remote control applications for LG WebOS TVs
  • Automating TV actions in home automation systems (e.g., turning off TV at bedtime)
  • Integrating TV control into media center software like Kodi or Plex
  • Developing scripts to launch specific apps or content on LG TVs
  • Creating accessibility tools that simulate remote button presses
  • Monitoring TV state changes (e.g., volume, foreground app) via subscriptions

Not Ideal For

  • Projects requiring control over smart TVs from brands other than LG (e.g., Samsung or Sony TVs)
  • Applications that need to power on the TV from a completely off state without integrating external Wake-on-LAN tools
  • Real-time interactive systems where sub-second latency for input simulation is critical, due to WebSocket overhead
  • Environments with strict dependency management, as macOS setup requires manual OpenSSL configuration

Pros & Cons

Pros

Comprehensive API Coverage

Supports media playback, system controls, app management, input simulation, TV channels, and source switching, with subscription-based event handling for real-time updates like volume changes.

Extensible Architecture

Base class design allows easy addition of new WebOS APIs not yet supported, avoiding assumptions about storage or concurrency for flexibility, as highlighted in the philosophy section.

Pythonic and Flexible

Offers both blocking and non-blocking calls with callback support, making it adaptable to different application styles and performance needs, demonstrated in the API usage examples.

Credential Storage Agnostic

Doesn't enforce a specific storage method for authentication tokens, letting developers choose their own persistence strategy, unlike libraries that assume file-based storage.

Cons

No Built-in Power-On

Lacks native support for turning on the TV from off; requires external Wake-on-LAN libraries and setup, which isn't integrated into the SDK, as admitted in the FAQs.

Complex Authentication Flow

Manual management of the 'store' object for credentials is error-prone, leading to repeated TV prompts if not handled correctly, a common issue addressed in the troubleshooting section.

Platform-Specific Installation Hurdles

On macOS, installation requires extra steps to configure OpenSSL via brew and environment variables, adding complexity and potential for setup failures, as noted in the installation guide.

Frequently Asked Questions

Quick Stats

Stars312
Forks57
Contributors0
Open Issues19
Last commit7 months ago
CreatedSince 2017

Tags

#iot#home-automation#lg#remote-control#smart-tv#python#media-control#api-client#webos#websocket-api

Built With

P
Python

Included in

Smart TV1.3k
Auto-fetched 18 hours ago

Related Projects

homebridge-webos-tvhomebridge-webos-tv

Homebridge plugin for LG webOS TVs

Stars699
Forks86
Last commit2 months ago
LGWebOSRemoteLGWebOSRemote

Command line webOS remote for LGTVs

Stars645
Forks114
Last commit1 month ago
lgtv2lgtv2

Control LG WebOS TV using node.js :tv:

Stars343
Forks46
Last commit4 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