horimote

Async API wrapper for Samsumgs set-top boxes SMT-G7400 and SMT-G7401.


License
MIT
Install
pip install horimote==0.4.1

Documentation

Build Status PyPI

Horimote

Horimote is a simple Python library for the Horizon HD-Recorder sold by Unitymedia Germany.

Thanks to OrangeTux & kuijp for their work on einder & horizoncontrol. This is just another Python fork focussing on the Horzion HD-Recorder from Unitymedia Germany.

Installation

$ pip install horimote

Usage

horimote.Client controls the set-top box by sending bytes. These bytes represent the buttons of a remote control. You can find all supported keys in horimote.keys. The example shows how to send keys.

import time

import logging
from horimote import Client
from horimote import keys

# Enable logging.
logging.basicConfig(level=logging.DEBUG)

# Replace IP with the IP of your set-top box. The port parameter is optional,
# by default its 5900.
c = Client("192.168.1.245", port=5900)

c.power_on()

# Wait a few seconds to let the set-top box have some time to start.
time.sleep(5)

# Select channel 501.
c.send_key(keys.NUM_5)
c.send_key(keys.NUM_0)
c.send_key(keys.NUM_1)

# For selecting a channel horimote.Client offers a small helper function.
c.select_channel(501)

# No watch some TV...

c.power_off()
c.disconnect()

The horimote.Client can also be used as a context manager:

from horimote import Client

with Client("192.168.1.245") as c:
    c.select_channel(501)

License

This software is licensed under the MIT license.