Skip to main content

Python async library for remote control of Sony Bravia TVs 2013 and newer.

Project description

pybravia

Latest release GitHub Workflow Status MIT License Code style

Python Bravia provides an easy-to-use async interface for controlling of Sony Bravia TVs 2013 and newer.

This library primarily being developed with the intent of supporting Home Assistant.

For more information, take a look at BRAVIA Professional Display Knowledge Center.

Requirements

This library supports Python 3.8 and higher.

Installation

pip install pybravia

Connect and API usage

With PSK (recommended)

from pybravia import BraviaTV

async with BraviaTV("192.168.1.20") as client:
    connected = await client.connect(psk="sony")

    if not connected:
        print("could not connect")
        return

    info = await client.get_system_info()

    print(info)

    await client.volume_up()

With PIN code

Start pairing process and display PIN on the TV

from pybravia import BraviaTV

async with BraviaTV("192.168.1.20") as client:
    await client.pair("CLIENTID", "NICKNAME")

Connect and usage

from pybravia import BraviaTV

async with BraviaTV("192.168.1.20") as client:
    connected = await client.connect("PIN", "CLIENTID", "NICKNAME")

    if not connected:
        print("could not connect")
        return

    info = await client.get_system_info()

    print(info)

    await client.volume_up()

Contributing

See an issue? Have something to add? Issues and pull requests are accepted in this repository.

License

This project is released under the MIT License. Refer to the LICENSE file for details.

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

pybravia-0.1.7.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

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

pybravia-0.1.7-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

Details for the file pybravia-0.1.7.tar.gz.

File metadata

  • Download URL: pybravia-0.1.7.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for pybravia-0.1.7.tar.gz
Algorithm Hash digest
SHA256 637cb548c4ab06cac50f0486e3456cc7dd04c0694245f98dccd95256ea18bd5e
MD5 4c85bc80760b587f5bb5f156c33716c6
BLAKE2b-256 18ce83510b4d87ac182b83532061874d4e824a4e3ac631169ec05dfbed9f756e

See more details on using hashes here.

File details

Details for the file pybravia-0.1.7-py3-none-any.whl.

File metadata

  • Download URL: pybravia-0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 6.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for pybravia-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 a6adf30f0824d3cbc06068ef302028dfb95736a51fe258e46da5dcae49a8b4ed
MD5 1390d2c51737946629bdfea809bab3e3
BLAKE2b-256 25391316b8f3c27e2df08fff5b1e65a10ea3c3f5adaa9d4f2a0d7fb8ecba1eeb

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