Metadata-Version: 2.1
Name: samsungtvws
Version: 1.4.0
Summary: Samsung Smart TV WS API wrapper
Home-page: https://github.com/xchwarze/samsung-tv-ws-api
Author: Xchwarze
License: MIT
Description: <p align="center">
            <img src="https://user-images.githubusercontent.com/5860071/47255992-611d9b00-d481-11e8-965d-d9816f254be2.png" width="300px" border="0" />
            <br/>
            <a href="https://github.com/xchwarze/samsung-tv-ws-api/releases/latest">
                <img src="https://img.shields.io/badge/version-1.4.0-brightgreen.svg?style=flat-square" alt="Version">
            </a>
            Samsung Smart TV WS API wrapper
        </p>
        
        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
        
        ```bash
        $ pip3 install samsungtvws
        ```
        or
        ```bash
        $ pip3 install git+https://github.com/xchwarze/samsung-tv-ws-api.git
        ```
        or...!
        ```bash
        $ git clone https://github.com/xchwarze/samsung-tv-ws-api
        $ pip3 install ./samsung-tv-ws-api
        ```
        
        ## Usage
        
        ```python
        import sys
        import os
        import logging
        import wakeonlan
        
        sys.path.append('../')
        
        from samsungtvws import SamsungTVWS
        
        # Increase debug level
        logging.basicConfig(level=logging.INFO)
        
        # 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
        apps = tv.app_list()
        logging.info(apps)
        
        # Open app (Spotify)
        tv.run_app('3201606009684')
        
        # Get app status (Spotify)
        app = tv.rest_app_status('3201606009684')
        logging.info(app)
        
        # Open app (Spotify)
        app = tv.rest_app_run('3201606009684')
        logging.info(app)
        
        # Close app (Spotify)
        app = tv.rest_app_close('3201606009684')
        logging.info(app)
        
        # Install from official store (Spotify)
        app = tv.rest_app_install('3201606009684')
        logging.info(app)
        
        # Get device info (device name, model, supported features..)
        info = tv.rest_device_info()
        logging.info(info)
        
        ```
        
        ## License
        
        MIT
        
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Requires-Python: >=3.0.0
Description-Content-Type: text/markdown
