skillfed

pybravia

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

pybravia v0.5.1 89.5K downloads/30d#13,657 on PyPI
Permissive license MIT Active released

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 pybravia

uv

uv add pybravia

poetry

poetry add pybravia

Installing 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

sony bravia tv controlasync tv remote librarybravia api pythonnetwork tv controlsony tv automationhome automation tvbravia device integration
home-automationasync-iodevice-control

More Networking packages