skillfed

samsungtvws

Samsung Smart TV WS API wrapper

samsungtvws v3.0.5 117.7K downloads/30d#12,154 on PyPI419
Copyleft license LGPL-3.0 Active released

What it is and what it does

Samsungtvws is a Python wrapper around Samsung Smart TV control APIs, letting you remotely control Tizen OS TVs (2016+) and older Orsay models via WebSocket or REST. It handles both synchronous and asynchronous control flows, with optional support for encrypted connections on legacy hardware. The library exposes remote key commands, app management, device information queries, Wake-on-LAN, and Art Mode control for Frame TVs—either programmatically from Python code or via a command-line interface.

The package depends on websocket-client, requests, and yarl for core networking, with optional extras for async I/O (aiohttp, websockets), encryption (cryptography, py3rijndael), and CLI tooling (typer, wakeonlan). It is actively maintained, marked as production-stable, and requires Python 3.9 or later. No known security vulnerabilities are recorded.

Use it for:

  • Automate TV power, volume, and input switching in a home automation system without a dedicated remote.
  • Launch apps or open URLs on the TV programmatically from a Python application or script.
  • Integrate Samsung TV control into a larger smart-home orchestration platform via async APIs.
  • Manage Art Mode on Frame TVs—upload images or toggle the feature from a custom application.
  • Build CLI tooling to quickly test TV connectivity and send remote commands for debugging or scripting.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

A Python library for remotely controlling Samsung Smart TVs via WebSocket and REST APIs, supporting both modern Tizen OS TVs and older Orsay-based models with sync, async, and encrypted API options.

Yes, if you own a compatible Samsung TV and need programmatic control. The library is actively maintained, has low install friction, and covers a broad range of TV models and control scenarios. The LGPL-3.0 license is permissive for most use cases but requires derivative works to remain open-source. The main gotcha is the subnet restriction—your TV must be on the same network as your client.

Install

samsungtvws on PyPI

pip

pip install samsungtvws

uv

uv add samsungtvws

poetry

poetry add samsungtvws

Installing samsungtvws

Before you install

Low install friction with a pure-Python wheel distribution. Active maintenance with a recent commit on 2026-08-08 and 419 repository stars. Requires Python >= 3.9.

License in practice

Licensed under LGPL-3.0 (copyleft). Any derivative work or modification must remain open-source under the same license; proprietary applications using this library must comply with copyleft obligations.

Quickstart

pip install samsungtvws

from samsungtvws import SamsungTVWS

tv = SamsungTVWS(host="192.168.1.50")
tv.power()

TV must be on the same subnet as the client; WebSocket connections across different subnets or VLANs are not supported by Samsung TVs.

Verify before relying

  • Whether the library works reliably with all Tizen OS TVs from 2016 onward or if specific TV models have known compatibility issues.
  • Performance characteristics when controlling multiple TVs concurrently or sending rapid command sequences.
  • Whether the encrypted v1 API for older Orsay TVs (H series 2014, J series 2015) is actively maintained or deprecated.

Package facts

License LGPL-3.0 (copyleft)
Python support supports the current Python release (>=3.9)
Install friction low — pure-Python wheel
Runtime dependencies 3 — websocket-client, requests, yarl
Maintenance actively maintained — 78 days since the last release
Last repo commit
First released
Downloads 117,705/month — #12,154 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: samsungtvws-3.0.5-py3-none-any.whl

Development Status :: 5 - Production/StableIntended Audience :: DevelopersProgramming Language :: Python :: 3

Tags

samsung tv remote control pythonwebsocket tv api wrappersmart tv automation librarysamsung tizen os controltv device integration python
home-automationdevice-controlwebsocket-api

More Networking packages