Skip to main content

Library for remotely interfacing with Sony Bravia TV's.

Project description

py-sony-bravia-remote is a Python 3 library for interfacing remotely with Sony Bravia TV’s. It utilizes a undocumented HTTP API that the TV exposes. This allows you to control things like changing the volume, channel or turn the TV on and off.

This API is the exact same API that the “Sony Remote” app uses to control the TV.


For inclusion in another project, install through pip:

pip install py-sony-bravia-remote

Example usage

from sonybraviaremote import TV, TVConfig

# called the very first time you attempt to connect to your
# tv... the tv will display a pincode that you need to enter
# after the first connection attempt, you'll never have to do this again
def on_auth():
    return input('Pincode: ')

# ip address of your tv... the device name is the name under which
# your program will be registered... note that if you change the device
# name, you have to re-auth
config = TVConfig('', 'my device name')
tv = TV(config, on_auth)

tv.is_on() # true/false

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

py-sony-bravia-remote-1.1.tar.gz (4.8 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page