skillfed

pysqueezebox

Asynchronous library to control Logitech Media Server

pysqueezebox v0.14.0 74.6K downloads/30d#14,815 on PyPI17
Permissive license Active released

What it is and what it does

pysqueezebox is an async Python client for controlling Logitech Media Server (LMS) and its connected Squeezebox players. It wraps the LMS API in coroutines, making it suitable for event-driven applications like Home Assistant that need to query player status, retrieve metadata, and issue playback commands without blocking. The library exposes Server and Player classes; you instantiate a Server with an aiohttp session and the LMS IP address, then retrieve Player objects by name or enumerate all connected players. Player objects cache state (album, artist, playback status) and must be refreshed with async_update() to reflect current server state.

The library is built on aiohttp for HTTP communication and requires Python 3.11 or later. Most interaction happens through the Player class, which offers methods like async_play(), async_pause(), and async_update() to control playback and fetch current metadata. Function names follow LMS API conventions rather than Home Assistant naming, so familiarity with the underlying API is helpful. The code was adapted from Home Assistant's original squeezebox integration and is maintained as a separate PyPI package to keep API-specific logic out of Home Assistant itself.

Use it for:

  • Integrate Squeezebox players into Home Assistant automation workflows for voice control and scheduled playback
  • Build a custom dashboard or mobile app to control multiple networked Squeezebox players from a single interface
  • Monitor player status and metadata (current album, artist, playback state) in real-time for logging or display
  • Automate multi-room audio scenarios by coordinating playback across several players asynchronously

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Asynchronous Python library to control Logitech Media Server and its connected players over the network, designed for integration with Home Assistant and other automation systems.

Yes. The package is actively maintained, has no known vulnerabilities, low install friction, and fills a clear niche for async control of Logitech Media Server. It is well-suited for Home Assistant and other event-driven applications. The permissive Apache license removes licensing concerns. Install if you need programmatic control of Squeezebox players; skip if you only use the LMS web interface.

Install

pysqueezebox on PyPI

pip

pip install pysqueezebox

uv

uv add pysqueezebox

poetry

poetry add pysqueezebox

Installing pysqueezebox

Before you install

Low install friction with a single runtime dependency (aiohttp). Actively maintained with recent commits and a stable release cadence; requires Python 3.11 or later.

License in practice

Licensed under Apache Software License (permissive), allowing commercial and private use with minimal restrictions.

Quickstart

pip install pysqueezebox

from pysqueezebox import Server
import aiohttp
import asyncio

async def main():
    async with aiohttp.ClientSession() as session:
        lms = Server(session, '192.168.1.2')
        player = await lms.async_get_player(name="Bedroom")
        await player.async_update()
        print(player.album)
        await player.async_play()

asyncio.run(main())

Requires Python 3.11 or later and a running Logitech Media Server instance on the network.

Verify before relying

  • Whether the library supports all Logitech Media Server API endpoints or only a subset
  • Performance characteristics when controlling multiple players simultaneously
  • Compatibility with specific Logitech Media Server versions

Package facts

License not declared (permissive)
Python support supports the current Python release (>=3.11)
Install friction low — pure-Python wheel
Runtime dependencies 1 — aiohttp
Maintenance actively maintained — 154 days since the last release
Last repo commit
First released
Downloads 74,577/month — #14,815 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: pysqueezebox-0.14.0-py3-none-any.whl

License :: OSI Approved :: Apache Software License

Tags

logitech media server controlsqueezebox async librarylms player automationhome assistant squeezeboxasync media server clientnetwork audio player control
async-iohome-automationmedia-server

More Internet packages