Skip to main content

Library for remotely interfacing with Sony Bravia TV's.

Project description

https://scrutinizer-ci.com/g/Photonios/py-sony-bravia-remote/badges/build.png https://scrutinizer-ci.com/g/Photonios/py-sony-bravia-remote/badges/quality-score.png https://img.shields.io/:license-mit-blue.svg https://badge.fury.io/py/py-sony-bravia-remote.svg

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.

Installation

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('192.168.0.23', 'my device name')
tv = TV(config, on_auth)

tv.is_on() # true/false
tv.wake_up()
tv.power_off()
tv.netflix()
tv.home()
tv.enter()
tv.confirm()
tv.pause()
tv.play()
tv.confirm()
tv.mute()
tv.volume_up()
tv.volume_down()

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 details)

Uploaded Source

File details

Details for the file py-sony-bravia-remote-1.1.tar.gz.

File metadata

File hashes

Hashes for py-sony-bravia-remote-1.1.tar.gz
Algorithm Hash digest
SHA256 3890188ff9f8a2789e6cc065b82ddefacb17d1ee4dc3bc26f4ac3ce017710762
MD5 b32ef43aab2620cc10797e17ae997722
BLAKE2b-256 f1278316c29720ca31233ae77c4479195e611c05049f5e0aeb35d910b7a136e1

See more details on using hashes here.

Supported by

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