pybravia
Python async library for remote control of Sony Bravia TVs 2013 and newer.
What it is and what it does
pybravia is an async Python library that lets you remotely control Sony Bravia TVs over your network. It wraps the Bravia API with a clean, easy-to-use interface built on aiohttp, supporting both PSK (pre-shared key) and PIN-based authentication methods. The library is designed primarily to support Home Assistant integrations but works standalone for any Python 3.10+ application that needs to automate TV operations like power, volume, and system queries.
The package handles the low-level HTTP communication and authentication handshake, letting you focus on what you want the TV to do. It uses async/await patterns throughout, making it suitable for concurrent control of multiple devices or integration into event-driven applications. With only two dependencies (aiohttp and yarl), it has minimal footprint and low install friction.
Use it for:
- Integrate Sony Bravia TV control into Home Assistant for voice-activated or automation-triggered TV commands.
- Build a custom home automation dashboard that controls TV power, volume, and input selection alongside other smart devices.
- Automate TV operations in a media room or commercial display setup (e.g., turn on for presentations, adjust volume for events).
- Monitor TV system information and status programmatically for logging or alerting in a networked environment.
- Develop a multi-room entertainment system that coordinates TV playback across several Bravia devices.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides an async Python interface to control Sony Bravia TVs (2013 and newer) over the network using PSK or PIN-based authentication.
Yes. The package is actively maintained, has low install friction, carries a permissive MIT license, and solves a specific problem (Bravia TV control) with a clean async API. It's well-suited for Home Assistant users and anyone building Python-based home automation. No known vulnerabilities. Verify TV model compatibility and network stability requirements before deploying to production.
Install
pybravia on PyPI
pip
pip install pybraviauv
uv add pybraviapoetry
poetry add pybraviaInstalling pybravia
Before you install
Low install friction with only two runtime dependencies (aiohttp and yarl). Marked active with a recent release 23 days ago, supporting current Python versions (3.10+).
License in practice
MIT license is permissive; you can use, modify, and distribute this package with minimal restrictions, provided you retain the license notice.
Quickstart
import asyncio
from pybravia import BraviaClient
async def main():
async with BraviaClient("192.168.1.20") as client:
await client.connect(psk="sony")
info = await client.get_system_info()
print(info)
asyncio.run(main())
Requires Python 3.10 or higher; TV must be on the same network and support Bravia API (2013 and newer models).
Verify before relying
- Whether all Sony Bravia TV models from 2013 onward are equally well-supported or if there are known compatibility gaps.
- Performance characteristics under high-frequency command scenarios (e.g., rapid volume or channel changes).
- Whether the library handles network timeouts and reconnection gracefully in production environments.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — aiohttp, yarl |
| Maintenance | actively maintained — 23 days since the last release |
| First released | |
| Downloads | 89,483/month — #13,657 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pybravia-0.5.1-py3-none-any.whl
Tags
More Networking packages
h11 is a pure-Python HTTP/1.1 protocol…
permissive · top 100 on PyPI
psutilpsutil retrieves real-time information about…
permissive · top 1,000 on PyPI
pyOpenSSLpyOpenSSL wraps OpenSSL's SSL/TLS functionality…
permissive · top 1,000 on PyPI
uvloopuvloop is a drop-in replacement for Python's…
permissive · top 1,000 on PyPI
execnetexecnet lets you spawn and communicate with…
permissive · top 1,000 on PyPI
pyzmqPyZMQ provides Python bindings for ZeroMQ…
permissive · top 1,000 on PyPI
afsapiAsynchronous Python client for controlling…
permissive · top 15,000 on PyPI
aiowebostvAsync Python library for controlling LG…
permissive · top 15,000 on PyPI
samsungtvwsA Python library for remotely controlling…
copyleft · top 15,000 on PyPI
pyatvAn asyncio Python library for controlling Apple…
permissive · top 15,000 on PyPI
pyps4-2ndscreenUnofficial Python library to control…
copyleft · top 15,000 on PyPI
pysensiboProvides an asyncio-friendly Python API client…
permissive · top 15,000 on PyPI
pymata-expressAn asyncio-based Python client for controlling…
agpl · top 15,000 on PyPI
rokuecpAn asynchronous Python client for controlling…
permissive · top 15,000 on PyPI
pyeconetProvides an async Python interface to the…
permissive · top 15,000 on PyPI
aioasuswrtAsync Python wrapper for querying ASUS router…
permissive · top 15,000 on PyPI