Samsung Smart TV WS API wrapper
Project description
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.
Based on https://github.com/marysieek/samsung-tv-api work
Install
$ 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
# Toggle power
tv = SamsungTVWS('192.168.xxx.xxx')
tv.power()
# Power On
wakeonlan.send_magic_packet('CC:6E:A4:xx:xx:xx')
# 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)
tv.power()
# Open web in browser
tv = SamsungTVWS('192.168.xxx.xxx')
tv.open_browser('https://duckduckgo.com/')
# Open Spotify
# https://github.com/Ape/samsungctl/issues/75
tv = SamsungTVWS('192.168.xxx.xxx')
tv.run_app('rJeHak5zRg.Spotify')
License
MIT
Project details
Release history Release notifications | RSS feed
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.0.0.tar.gz
(4.5 kB
view hashes)
Built Distribution
Close
Hashes for samsungtvws-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b75f98aee8ed76411b509a83b40c20a3a85cabf2c33ff7f9a3bbe6b25c9bfac5 |
|
MD5 | e9d6cc9e247491d313955b774c4d5bb8 |
|
BLAKE2b-256 | ad222d0e4738c3fdbf83d7af47ca9b9cc72a39b2eb52df6c8e2ab8c7b53b87b8 |