roonapi
Provides a python interface to interact with Roon
What it is and what it does
roonapi is a Python client for Roon, a music server and control system. It provides a programmatic interface to connect to a Roon server, query zone state, and receive real-time updates via WebSocket subscriptions. The library handles authentication, manages the connection lifecycle, and exposes zone information and playback state through callback-based event handling.
The package is designed for automation and integration scenarios where you want to monitor or control Roon playback from Python code. It depends on requests for HTTP communication, websocket_client for real-time updates, ifaddr for network discovery, and six for Python 2/3 compatibility. The library is straightforward to use but requires you to already have a Roon server running on your network and to manage authentication tokens yourself.
Use it for:
- Build a home automation script that pauses Roon playback when motion is detected or a room is empty.
- Create a dashboard or web interface that displays the current zone state and allows remote playback control.
- Integrate Roon with other music services or smart home systems by reacting to zone state changes.
- Log playback history or zone activity for personal music listening analytics.
- Develop a custom remote control application for Roon that runs on a headless device or server.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Python client library for the Roon music server API, enabling programmatic control and monitoring of Roon zones and playback state through WebSocket subscriptions.
Yes, if you own a Roon server and need programmatic control or monitoring from Python. The library is stable, has no known vulnerabilities, and low install friction. However, maintenance is aging—the last release was over two years ago—so be prepared to troubleshoot or fork if you encounter issues with newer Roon server versions or Python releases.
Install
roonapi on PyPI
pip
pip install roonapiuv
uv add roonapipoetry
poetry add roonapiInstalling roonapi
Before you install
Low install friction with four lightweight runtime dependencies. Maintenance is aging—last release was 2023-12-13 and the repository shows no recent activity, though it remains unarchived and has not accumulated known vulnerabilities.
License in practice
Licensed under Apache-2.0, a permissive license that allows commercial and private use with minimal restrictions, making it safe to incorporate into most projects.
Quickstart
pip install roonapi
from roonapi import RoonApi
appinfo = {"extension_id": "my_app", "display_name": "My App", "display_version": "1.0.0", "publisher": "me", "email": "me@example.com"}
roonapi = RoonApi(appinfo, token="mytoken", server="192.168.1.160")
roonapi.register_state_callback(lambda event, ids: print(f"Event: {event}"))
Requires a running Roon server on the network and a valid authentication token; discovery examples are available in the repository.
Verify before relying
- Whether the package works with Roon server versions released after 2023-12-13.
- Whether websocket_client and other dependencies have known vulnerabilities that affect roonapi indirectly.
- Compatibility with Python 3.12 or later, given the last release predates those versions.
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=3.7.2,<4.0.0) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 4 — ifaddr, requests, six, websocket_client |
| Maintenance | aging — 975 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 76,196/month — #14,647 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: roonapi-0.1.6-py3-none-any.whl
Keywords: roon, api
Tags
More Internet packages
Botocore provides low-level, data-driven access…
permissive · top 100 on PyPI
aiobotocoreProvides an async client for AWS services using…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
filelockProvides a platform-independent file locking…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
googleapis-common-protosProvides common Protocol Buffer message…
permissive · top 100 on PyPI
sonos-websocketAsync Python library for communicating with…
permissive · top 15,000 on PyPI
socoSoCo is a Python library for programmatic…
permissive · top 15,000 on PyPI
PlexAPIUnofficial Python bindings for the Plex API…
permissive · top 15,000 on PyPI
pyriscoPyrisco provides an async Python interface to…
permissive · top 15,000 on PyPI
spotifywebapipythonA Python library that wraps the Spotify Web…
permissive · top 15,000 on PyPI
plexwebsocketAsync library that connects to Plex media…
permissive · top 15,000 on PyPI
libsoundtouchControl Bose Soundtouch devices over the…
permissive · top 15,000 on PyPI
cloudflareProvides a Python client library for the…
permissive · top 5,000 on PyPI
music-assistant-clientPython async client library for connecting to…
permissive · top 15,000 on PyPI
wiimwiim provides a Python API to discover,…
permissive · top 15,000 on PyPI