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. For more information on the api used in this library, refer to BRAVIA Professional Display Knowledge Center

This library was forked from 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")

    # Get scenes (video modes)
    scenes = braviarc.load_scene_list()
    print (scenes)

    # Get current scene (video mode)
    current_scene = braviarc.get_current_scene()
    print (current_scene)

    # Set scene (video mode) to 'Cinema'
    braviarc.set_scene('Cinema')

    # Turn off the TV
    braviarc.turn_off()

Metadata

Release files for bravia-tv 1.0.11

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 1.0.11
File Size Uploaded Provenance
bravia_tv-1.0.11.tar.gz 7.2 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for bravia-tv 1.0.11
File Interpreter ABI Platform
bravia_tv-1.0.11-py3-none-any.whl Python 3 none any Details

Total release size: 14.5 kB

Release files / bravia_tv-1.0.11.tar.gz

Download URL bravia_tv-1.0.11.tar.gz
Size 7.2 kB
Tags Source
SHA-256 checksum
How to use checksums
e01df188dba621f0fb99e6ecce6e639748c247d1d597f8ff13095883219d81c0
BLAKE2b-256 checksum
How to use checksums
b25c4a241ca2a959bf6ca179caf8d54c8255df1c62319e2aad55338907d8994c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.0

Release files / bravia_tv-1.0.11-py3-none-any.whl

Download URL bravia_tv-1.0.11-py3-none-any.whl
Size 7.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
585d582eb8a9aff82f494d885bdd79fe540cb1cdf47ef8ee471ae91f37f8fe02
BLAKE2b-256 checksum
How to use checksums
938c47fbb98592472cc4048807cb4e3d00be75798993c8f12f98ee3eecf45723
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.0

Security for bravia-tv 1.0.11

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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