コード例 #1
0
ファイル: server_pi.py プロジェクト: schdef/clicker
def command_tv():
    command = request.args.get('command', '')

    if command == "on":
        remote_sky.standby()
        remote_tv.standby()
        remote_audio.optical()

    if command == "off":
        remote_sky.standby()
        remote_tv.standby()
        remote_audio.standby()

    if command == "switch":
        channel = request.args.get('channel', '')
        remote_sky.switch(channel)

    sys.stdout.flush()

    return redirect(url_for('index'))
コード例 #2
0
ファイル: server_pi.py プロジェクト: schdef/clicker
def channelSwitch(channel):
    remote_sky.switch(channel)
    return channel