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.3.tar.gz (6.1 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.3-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pybravia-0.1.3.tar.gz
  • Upload date:
  • Size: 6.1 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.3.tar.gz
Algorithm Hash digest
SHA256 41555aaf1a86ec973554f0478bf2699796d951158be63e8ef74883307ee3e2bc
MD5 ecc815d8d548303341b00db7e130a04d
BLAKE2b-256 5b22d2d897a9d5817b73b7f202c482d85e14c344d838154957933c0c729d1014

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pybravia-0.1.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 77f1d5a72154428694e1ffd8034f734a7f21c877df6f61c6f6bed619548ee581
MD5 2be34a9516053902ac0646c31fe95084
BLAKE2b-256 1ca8b9d8a056eb697e9f61ba990eee32cf9d831cbe8ef1fc0353ff311c15814e

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