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

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.178.1.2'
mac_address = "XX:XX:XX:XX:XX:XX"

# IP address is required. mac address is required
# to turn on TV
braviarc = BraviaRC(ip_address, mac_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()

Release files for bravia-tv-koying 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bravia-tv-koying 1.0.1
File Size Uploaded
bravia_tv-koying-1.0.1.tar.gz 5.8 kB Details

Release files / bravia_tv-koying-1.0.1.tar.gz

Download URL bravia_tv-koying-1.0.1.tar.gz
Size 5.8 kB
Tags Source
SHA-256 checksum
How to use checksums
1651d0911d4c570859e7d07d32bfcfa3eed5f15f4cd88a458ee2890e626ae146
BLAKE2b-256 checksum
How to use checksums
6fcecec02e848c0d0eed40d1f7050aef412bef065ebdf2e56c89773b0e1b7b78
Upload date
Uploaded using Trusted Publishing?
What is 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.6.9

Release history Release notifications | RSS feed

This release

1.0.1 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page