API wrapper for Samsumgs set-top boxes SMT-G7400 and SMT-G7401.
Project description
Einder
Einder is an API wrapper for the set-top boxes SMT C7400 and SMT C7401. In the Netherlands these boxes are sold by a big Dutch cable operator under the name Horizon Box. The name Einder is a Dutch synonym for horizon.
I’d like to thank kuijp for his work on horizoncontrol. This is just a shameless Python rip off.
Installation
$ pip install einder
Usage
einder.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 einder.keys. The example shows how to send keys.
import time
import logging
from einder import Client
from einder 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 einder.Client offers a small helper function.
c.select_channel(501)
# No watch some TV...
c.power_off()
c.disconnect()
The einder.Client can also be used as a context manager:
from einder import Client
with Client("192.168.1.245") as c:
c.select_channel(501)
License
This software is licensed under the MIT license.
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
Built Distribution
File details
Details for the file einder-0.3.1.tar.gz
.
File metadata
- Download URL: einder-0.3.1.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 966d852bbe8554cbd5584e87f62ec3e185d31110c4b77b32f6650a3ae14f7276 |
|
MD5 | 1faafcd3f274d6c945e946f2d28fd9fb |
|
BLAKE2b-256 | 80d0d8acc8060a95e4a9f2377f73f0751a2aa131ef31f44040d7081ebe54136f |
File details
Details for the file einder-0.3.1-py3-none-any.whl
.
File metadata
- Download URL: einder-0.3.1-py3-none-any.whl
- Upload date:
- Size: 4.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b2c2d0145c803e195ddf043f96285e521af20c196e365881dce0617d63c13cc7 |
|
MD5 | b4100d574cfccee2505d3afcf3835afb |
|
BLAKE2b-256 | b27d97401ed9597ac36c9327a52de1af80cc481dbf44a6775b8372b57394e001 |