skillfed

roonapi

Provides a python interface to interact with Roon

roonapi v0.1.6 76.2K downloads/30d#14,647 on PyPI63
Permissive license Apache-2.0 AGING released

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 roonapi

uv

uv add roonapi

poetry

poetry add roonapi

Installing 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

License :: OSI Approved :: Apache Software LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9

Tags

roon api python clientroon music server controlroon zone managementroon playback automationroon state monitoringroon websocket integrationroon remote control library
music-serverhome-automationwebsocket-client

More Internet packages