Skip to main content

Python Bravia TV

Python Bravia TV is a Python library to perform remote communication via http protocol with Sony Bravia TVs 2013 and newer: list of tvs For more information on the api used in this library, refer to BRAVIA Professional Display Knowledge Center

This library is a fork of BraviaRC and is primarily being developed with the intent of supporting home-assistant

Installation

# Installing from PyPI
$ pip install bravia-tv
# Installing latest development
$ pip install git+https://github.com/dcnielsen90/python-bravia-tv@master

Initializing and Connecting

from bravia_tv import BraviaRC

ip_address = '192.168.1.2'

# IP address is required. The active NIC's mac will be acquired dynamically
# if mac is left None.
braviarc = BraviaRC(ip_address)


# The pin can be a pre-shared key (PSK) or you can
# receive a pin from the tv by making the pin 0000
pin = '1878'

# Connect to TV
braviarc.connect(pin, 'my_device_id', 'my device name')

Command Examples

# Check connection
if braviarc.is_connected():

    # Get power status
    power_status = braviarc.get_power_status()
    print (power_status)

    # Get playing info
    playing_content = braviarc.get_playing_info()

    # Print current playing channel
    print (playing_content.get('title'))

    # Get volume info
    volume_info = braviarc.get_volume_info()

    # Print current volume
    print (volume_info.get('volume'))

    # Change channel
    braviarc.play_content(uri)

    # Get app list
    app_info = braviarc.load_app_list()
    print (app_info)

    # Start a given app
    braviarc.start_app("Netflix")

    # Turn off the TV
    braviarc.turn_off()

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bravia_tv-1.0.3.tar.gz (5.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bravia_tv-1.0.3-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file bravia_tv-1.0.3.tar.gz.

File metadata

  • Download URL: bravia_tv-1.0.3.tar.gz
  • Upload date:
  • Size: 5.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.5

File hashes

Hashes for bravia_tv-1.0.3.tar.gz
Algorithm Hash digest
SHA256 0e73cc3c0af0f5a70e99629b3c785d4121a77c45af24b7eb4e6a64e0466e3275
MD5 527d6941b1289dea65026cc2b26cb827
BLAKE2b-256 7bc3cbc5223092358ae88cb401b40da04121085126b8410154cc33f3c4f9b355

See more details on using hashes here.

File details

Details for the file bravia_tv-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: bravia_tv-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 7.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.5

File hashes

Hashes for bravia_tv-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 78351cc1fbc4e44a3fe9c085c133c4b751ffaca1089783afb24cc8c5b60cb5f8
MD5 5078ce3c228d878264738b37e9d9cd73
BLAKE2b-256 f94e3d87cdf813802a5cf09d0a090a18657f4af5462422fd9f464e7dbddded7b

See more details on using hashes here.

Supported by

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