Samsumgs机顶盒SMT-G7400和SMT-G7401的异步API包装。
horimote的Python项目详细描述
Horimote===
Horimote是用于机顶盒SMT C7400和SMT的API包装器 C7401号。在荷兰,这些箱子是由一家荷兰大电报公司出售的。 “地平线”框下的运算符。Einder这个名字是荷兰语的同义词 为了地平线。
我要感谢OrangeTux&;kuijp他们在horizoncontrol上的einder工作。这只是又一次无耻的Python抢劫。关注德国Unitymedia的Horzion Box。
安装
$ pip install horimote
用法
horimote.Client
通过发送字节来控制机顶盒。这些字节
表示遥控器的按钮。你可以找到所有支持的
horimote.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()
horimote.Client
也可以用作上下文管理器:
from horimote import Client with Client("192.168.1.245") as c: c.select_channel(501)
许可证
此软件是根据MIT license授权的。