python-songpal
Python library for interfacing with Sony's Songpal devices
Decision gist · record as of 2026-08-14
Yes, if you own a supported Sony audio device and need programmatic control. The library is stable, has no known vulnerabilities, and low install friction. However, maintenance is dormant—expect no active support for new Sony models or breaking changes in dependencies. Verify your device is in the supported list before committing; if it is, the library is reliable for automation and CLI use.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires the device's SongPal endpoint URL (typically discovered via UPnP); device must be on the same network and support the SongPal protocol.
- Low install friction with a pure-Python wheel.
- Maintenance is dormant (last release 2024-03-31, last commit 2024-12-17); the project remains functional but receives infrequent updates.
License · maintenance · safety
GPL-3.0 (copyleft) — GPL-3.0 copyleft license. Any software that uses this library must also be distributed under a compatible open-source license; proprietary or closed-source applications cannot incorporate it.
last release 2024-03-31 (866 days) · last repo commit 2024-12-17 · 77 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 87,521 downloads/mo, #13,791 on PyPI
Alternatives
Verify before relying
pip install python-songpal
from songpal import Device
import asyncio
async def main():
device = Device('http://192.168.1.1:10000/sony')
await device.power.set_power(True)
asyncio.run(main())- Whether all listed Sony device models (BDV-N9200W, HT-XT3, STR-DN1080, etc.) are still actively supported or if support has regressed.
- Current state of async/await stability and error handling in dormant maintenance state.
- Whether aiohttp and async_upnp_client versions are pinned or have known compatibility issues with modern releases.
What it is and what it does
python-songpal is a Python 3 library that implements Sony's SongPal protocol, allowing programmatic control of Sony audio devices like soundbars, receivers, and speakers over a network. It uses UPnP discovery to locate devices and communicates via HTTP to their ScalarWebAPI endpoints. The library is built on async I/O (aiohttp and async_upnp_client) and provides both a Python API for integration into scripts or applications and a command-line tool (songpal) for direct device control.
The library supports a range of Sony devices including the HT-XT3, HT-ZF9, HT-ST5000, and STR-series receivers. It can control power, volume, input selection, sound settings (night mode, subwoofer level), zones, and grouping. The project is in alpha stage and dormant—last release was 2024-03-31 with a recent commit in December 2024—meaning it works but receives infrequent updates and may not cover all newer Sony devices.
Use it for
- Automate power on/off and volume control for a Sony soundbar or receiver from a home automation script.
- Switch audio inputs and manage multi-zone playback programmatically in a networked audio setup.
- Query device status (power state, volume, active input) from a monitoring or dashboard application.
- Create a CLI tool to control Sony audio devices without a remote or mobile app.
- Integrate Sony device control into a larger home theater automation system.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you own a supported Sony audio device and need programmatic control.
The library is stable, has no known vulnerabilities, and low install friction. However, maintenance is dormant—expect no active support for new Sony models or breaking changes in dependencies. Verify your device is in the supported list before committing; if it is, the library is reliable for automation and CLI use.
Install
python-songpal on PyPI
Before you install
Low install friction with a pure-Python wheel. Maintenance is dormant (last release 2024-03-31, last commit 2024-12-17); the project remains functional but receives infrequent updates. Supports Python 3.8 through 3.12.
Requires the device's SongPal endpoint URL (typically discovered via UPnP); device must be on the same network and support the SongPal protocol.
License in practice
GPL-3.0 copyleft license. Any software that uses this library must also be distributed under a compatible open-source license; proprietary or closed-source applications cannot incorporate it.
Quickstart
pip install python-songpal
from songpal import Device
import asyncio
async def main():
device = Device('http://192.168.1.1:10000/sony')
await device.power.set_power(True)
asyncio.run(main())
Verify before relying
- Whether all listed Sony device models (BDV-N9200W, HT-XT3, STR-DN1080, etc.) are still actively supported or if support has regressed.
- Current state of async/await stability and error handling in dormant maintenance state.
- Whether aiohttp and async_upnp_client versions are pinned or have known compatibility issues with modern releases.
Package facts
| License | GPL-3.0 copyleft |
| Python support | Supports the current Python release <4.0,>=3.8 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 4 packagesaiohttpasync_upnp_clientattrsclick |
| Maintenance | Dormant 866 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 87,521 / month, #13,791 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | License :: OSI Approved :: GNU General Public License v3 (GPLv3)Programming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9 |
Evidence: python_songpal-0.16.2-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “sony soundbar control python”
- python-songpalPython library for controlling Sony audio devices (soundbars,…
- pybraviaProvides an async Python interface to control Sony Bravia TVs (2013…
- pyps4-2ndscreenUnofficial Python library to control PlayStation 4 consoles remotely,…
Give your agent the search over MCP, or paste the wish link into any chat.
More Utilities packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Detects and normalizes text encoding from unknown or ambiguous sources, supporting all IANA character sets that Python's core library provides codecs for, with the ability to register custom codecs.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.
Install it if you're building an extensible application or framework.
Pygments is a syntax highlighter that colorizes source code and text in over 500 languages and formats, outputting to HTML, LaTeX, RTF, SVG, images, or ANSI terminal sequences.
Install it if you need to display or transform source code.
Six provides utility functions to write Python code that runs on both Python 2.7 and Python 3.3+, smoothing over language differences between the two versions.
See also libsoundtouch · pyps4-2ndscreen · miniupnpc · sonos-websocket · wiim · rxv · soco · pulsectl · async-upnp-client · python-osc