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', 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.1.2.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

samsungtvws-1.1.2-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: samsungtvws-1.1.2.tar.gz
  • Upload date:
  • Size: 4.7 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.1.2.tar.gz
Algorithm Hash digest
SHA256 80d1641089b085ef540be1dffc47aa4865200c540b28e8e9d13878234212fd1b
MD5 9676175e4c00f59e378fd093b021e9d1
BLAKE2b-256 fc27cf38519ff4d51f3b4b5b153bc458c7ce396d5f7461ae3a071cfc2f359993

See more details on using hashes here.

File details

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

File metadata

  • Download URL: samsungtvws-1.1.2-py3-none-any.whl
  • Upload date:
  • Size: 6.7 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.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 9fcb9e68288384b165763b4bf59aa79ddda558d6ff96601f69c59b509802d57a
MD5 32efbe150365997706795cec90eb8e84
BLAKE2b-256 de9fe8292ae2a2e1ddebb076f415986547840f11fb121cdd91b4cf09c232a588

See more details on using hashes here.

Supported by

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