Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

sonosify

Latest version: v0.6.0

Overview

Last scanned
29 Nov 2026
Published
29 Nov 2026
PyPI package Publisher: mathis.arends
1 Versions
23 Downloads

Scan summary

sonosify was last scanned on 29 Nov 2026 at version 0.6.0. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: First and only release on 29 Nov 2026.
  • Findings: No rules fired in version 0.6.0.
  • Downloads: 23 downloads.

Versions

1 version published
Versions and the rules that fired in each
VersionPublishedStatus
0.6.0 LATEST 29 Nov 2026 No rules fired

No rules fired in 0.6.0

Findings

Findings for v0.6.0. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 0.6.0; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

🔊 sonosify

CI Python PyPI License

Async Python API for Sonos speakers. Find a room by name, control it, react to what it does, and play your own audio over the music. Everything talks directly to the speakers on your local network: no cloud account, no API keys.

Installation

Requires Python 3.13 or 3.14 and speakers on the same network. Discovery uses UDP multicast.

uv add sonosify
# or: pip install sonosify

Quickstart

import asyncio

from sonosify import SonosController


async def main():
    async with SonosController() as sonos:
        kitchen = await sonos.speaker("Kitchen")
        await kitchen.set_volume(25)
        await kitchen.play()
        print(await kitchen.now_playing())

        for speaker in await sonos.speakers():
            print(await speaker.get_room_name(), await speaker.get_volume())


asyncio.run(main())

How it works

Type Role
SonosController Your household. Discovers speakers on first use and owns their connections
SpeakerClient One room. Carries every command
SonosSystem Snapshot of speakers and groups, returned by discover()

Address rooms and let the controller handle groups. Volume, mute, and audio clips apply to the room you asked for. Playback, queue, and group volume go to its group coordinator automatically. After changing groups, call await sonos.discover() to refresh that routing.

The controller owns its speakers. Asking for the same room twice returns the same client. All clients, connections, and event streams close with the async with block.

If you already know the address, await sonos.speaker(ip="192.168.1.42") skips discovery. SpeakerClient("192.168.1.42") works without a controller and targets exactly that device.

What a speaker can do

Area Methods
Playback play, pause, stop, next, previous, seek, now_playing
Sources open, play_uri, favorites, open_favorite, line_in, tv
Volume get_volume, set_volume, adjust_volume
Group volume get_group_volume, set_group_volume, adjust_group_volume
Mute and ducking get_mute, set_mute, toggle_mute, duck, unduck
Queue queue, enqueue_uri, seek_queue, remove_queue_item, clear_queue
Modes set_shuffle, set_repeat, set_crossfade, configure_sleep_timer
Groups join, unjoin
Audio clips play_pcm, play_audio_clip, play_audio_clip_data, stream_audio_clip
Events watch

Live events

watch() streams typed events as they happen. By default it covers playback and volume; pass services=ALL_SERVICES for all supported services.

import asyncio

from sonosify import AVTransportEvent, RenderingControlEvent, SonosController


async def main():
    async with SonosController() as sonos:
        async for event in sonos.watch("Kitchen"):
            match event:
                case AVTransportEvent(transport_state=state, track=track):
                    print(state, track.title if track else "")
                case RenderingControlEvent(volume=volume, muted=muted):
                    print(volume, muted)


asyncio.run(main())
  • Fields can be None. An event only carries the values that changed.
  • Subscriptions renew themselves. If renewal fails, the stream yields SubscriptionLost, then SubscriptionRestored once it recovers. Events in between are lost, so re-read the state you need.
  • Stopping early: wrap the stream in contextlib.aclosing() to unsubscribe as soon as you break.
  • Speakers connect back to your machine. Your firewall must allow it. Set callback_host or callback_port if the automatic choice does not fit.

Audio clips

A clip plays over the current music and restores it afterwards, which suits text-to-speech, voice agents, and notifications. Pick a method by where the audio comes from:

Your audio Method
PCM chunks from an async iterator play_pcm
A URL the speaker can reach play_audio_clip (without a URL: built-in chime)
A complete WAV or MP3 in memory play_audio_clip_data
A stream you write to yourself stream_audio_clip
from collections.abc import AsyncIterable

from sonosify import AudioClipOptions, ClipPriority, SonosController


async def speak(pcm_chunks: AsyncIterable[bytes]) -> None:
    async with SonosController() as sonos:
        kitchen = await sonos.speaker("Kitchen")
        await kitchen.play_pcm(
            pcm_chunks,
            sample_rate=24_000,
            options=AudioClipOptions(
                app_id="com.example.voice-agent",
                volume=30,
                priority=ClipPriority.HIGH,
            ),
        )

play_pcm expects interleaved little-endian PCM, 16-bit mono by default. It waits until playback ends and aborts the clip on errors, cancellation, or timeout. timeout_seconds covers the whole clip and defaults to 60; pass None for longer audio. Call prepare_audio() ahead of time to cut the startup delay of the first clip.

If your audio plays outside of Sonos, duck() lowers the music meanwhile and unduck() restores it.

Errors

Every library error derives from SonosifyError, and error_details() returns a dictionary with a stable machine-readable code.

Examples

examples/ has runnable scripts, including low-latency PCM streaming. Usage is at the top of each file.

uv run python examples/discover.py
uv run python examples/now_playing.py Kitchen
uv run python examples/watch.py Kitchen
uv run python examples/group.py join Kitchen "Living Room"

More

Changelog · Contributing · MIT License

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • pypi-releases sonosify

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Ethersphere Hijacked With Crypto Stealing Malware (1)
npm

Ethersphere Hijacked With Crypto Stealing Malware Via Github & npm

Copy of Template Design OX Blog (1)
Research

Thousands Of GitHub Accounts Hijacked With wfx-loot CI Secret Stealing Malware Via GitHub Actions & npm

Copy of Template Design OX Blog (3)
Research

Ruby2Shell: Ruby Memory Corruption Flaws Expose Applications to Remote Code Execution, But is it an Actual Risk?

Frame 2085668439 (1)
Group 1261154229