Metadata-Version: 2.0
Name: ollehtv
Version: 0.1.2
Summary: Python library for controlling an Olleh TV STB
Home-page: https://github.com/pmrowla/ollehtv
Author: Peter Rowlands
Author-email: peter@pmrowla.com
License: MIT
Keywords: olleh ollehtv
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Multimedia
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 3
Requires-Dist: enum34
Requires-Dist: future
Requires-Dist: requests

ollehtv
=======

|Build Status| |Coverage Status|

Python library for controlling an Olleh TV set-top-boxes.

Installation
------------

::

    $ pip install ollehtv

If you also wish to run the development tests you will need to do

::

    $ pip install -r requirements-dev.txt

Configuration
-------------

In order to control your STB you must also authenticate a remote using
the Olleh playtv mobile app. Once you have authenticated the app, you
will need to `proxy <https://mitmproxy.org>`__ an app API request to get
the ``DEVICE_ID`` and ``SVC_PW`` values for your device.

.. figure:: http://i.imgur.com/1azSJKK.png
   :alt: mitmproxy screenshot

   mitmproxy screenshot

Example
-------

::

    >>> import ollehtv
    >>> device_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
    >>> svc_pw = "abcdef1234567890"
    >>> otv = ollehtv.OllehTV(device_id, svc_pw)
    >>> otv.turn_on()
    >>> otv.unmute()
    >>> otv.change_channel(5)
    >>> otv.input_button(ollehtv.OllehTVButton.IJEON)

This example session turns on a STB, unmutes it, switches it to channel
5 and then switches it back to the previous channel.

.. |Build Status| image:: https://travis-ci.org/pmrowla/ollehtv.svg?branch=master
   :target: https://travis-ci.org/pmrowla/ollehtv
.. |Coverage Status| image:: https://coveralls.io/repos/github/pmrowla/ollehtv/badge.svg?branch=master
   :target: https://coveralls.io/github/pmrowla/ollehtv?branch=master


