Python async library for remote control of Sony Bravia TVs 2013 and newer.
Project description
pybravia
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, BraviaTVError
async with BraviaTV("192.168.1.20") as client:
try:
connected = await client.connect(psk="sony")
info = await client.get_system_info()
print(info)
await client.volume_up()
except BraviaTVError:
print("could not connect")
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:
try:
await client.pair("CLIENTID", "NICKNAME")
except BraviaTVError:
print("could not connect")
Connect and usage
from pybravia import BraviaTV
async with BraviaTV("192.168.1.20") as client:
try:
connected = await client.connect("PIN", "CLIENTID", "NICKNAME")
info = await client.get_system_info()
print(info)
await client.volume_up()
except BraviaTVError:
print("could not connect")
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
Release history Release notifications | RSS feed
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.2.4.tar.gz
(8.1 kB
view hashes)