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 https://github.com/marysieek/samsung-tv-api work

Install

$ pip3 install samsungtvws

or

$ pip3 install git+https://github.com/xchwarze/samsung-tv-ws-api.git

or...!

$ git clone https://github.com/xchwarze/samsung-tv-ws-api
$ pip3 install ./samsung-tv-ws-api

Usage

import sys
import os
import wakeonlan

sys.path.append('../')

from samsungtvws import SamsungTVWS

# Normal constructor
tv = SamsungTVWS('192.168.xxx.xxx')

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

# Toggle power
tv.shortcuts().power()

# Power On
wakeonlan.send_magic_packet('CC:6E:A4:xx:xx:xx')

# Open web in browser
tv.open_browser('https://duckduckgo.com/')

# View installed apps (Spotify)
tv.app_list()

# Open apps (Spotify)
tv.run_app('3201606009684')

License

MIT

Project details


Download files

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

Source Distribution

samsungtvws-1.2.0.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

samsungtvws-1.2.0-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

Details for the file samsungtvws-1.2.0.tar.gz.

File metadata

  • Download URL: samsungtvws-1.2.0.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.8.0

File hashes

Hashes for samsungtvws-1.2.0.tar.gz
Algorithm Hash digest
SHA256 c0a14267f5f5b619c21a9b2f36c31170eea32d87a22c0ee36e5baa558f30fbbc
MD5 7c1f4e83e9251e51c7ff68a0c72a3f0a
BLAKE2b-256 e87e919d84a84d7c3297719082a177c60712f2c1fced3654f4ece038a27bbcb5

See more details on using hashes here.

Provenance

File details

Details for the file samsungtvws-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: samsungtvws-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 7.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.8.0

File hashes

Hashes for samsungtvws-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cfb41b04dc6b260d25f69a5f6948f50e6921181d7815052d3944540619fdc9af
MD5 cc9e338bf04e61871277f71b3b017609
BLAKE2b-256 6da26b39727c1c33c5ae1ccb41f831cc65cdb5401a6036f92bf8f7accc8d9a3e

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page