Skip to main content

Samsung Smart TV WS API wrapper

Project description

Version Samsung Smart TV WS API wrapper

This project is a library for remote controlling Samsung televisions via a TCP/IP connection.

It currently supports modern (post-2016) TVs with Ethernet or Wi-Fi connectivity. They should be all models with TizenOs.

Based on work


$ pip3 install samsungtvws


$ pip3 install git+


$ git clone
$ pip3 install ./samsung-tv-ws-api


import sys
import os
import logging
import wakeonlan


from samsungtvws import SamsungTVWS

# Increase debug level

# Normal constructor
tv = SamsungTVWS('')

# Autosave token to file 
token_file = os.path.dirname(os.path.realpath(__file__)) + '/tv-token.txt'
tv = SamsungTVWS(host='', port=8002, token_file=token_file)

# Toggle power

# Power On

# Open web in browser

# View installed apps
apps = tv.app_list()

# Open app (Spotify)

# Get app status (Spotify)
app = tv.rest_app_status('3201606009684')

# Open app (Spotify)
app = tv.rest_app_run('3201606009684')

# Close app (Spotify)
app = tv.rest_app_close('3201606009684')

# Install from official store (Spotify)
app = tv.rest_app_install('3201606009684')

# Get device info (device name, model, supported features..)
info = tv.rest_device_info()

Supported TVs

List of support TV models.

2017 : M5500 and above
2016 : K4300, K5300 and above
2015 : J5500 and above (except J6203)
2014 : H4500, H5500 and above (except H6003/H6103/H6153/H6201/H6203)
Supported TV models may vary by region.

For complete list



Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for samsungtvws, version 1.6.0
Filename, size File type Python version Upload date Hashes
Filename, size samsungtvws-1.6.0.tar.gz (6.8 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page