Files
napalm-sonos/CHANGELOG.md
T
Christian Manivong 53ea5f051f fix(driver): stop guessing whether a speaker is wired
The wired check read device_properties, which SoCo does not have
(deviceProperties is the UPnP service, and none of its actions says
wired or wireless), and swallowed the AttributeError, so eth0 was never
reported and the guess served nothing. It is gone: a speaker reports
its one connection as wlan0, described as of unknown medium, and the
README and the getter docstrings say that wired vs. wireless is not
known.

Closes #2
2026-11-02 09:26:58 +01:00

2.8 KiB
Raw Blame History

Changelog

All notable changes to this driver. The format follows Keep a Changelog, versions follow Semantic Versioning.

[Unreleased]

Changed

  • Python 3.12 is the floor (requires-python = ">=3.12"): netOrk runs every driver on 3.12, so 3.10 and 3.11 are no longer tested (NAPALM/driver-standard#6).
  • The floor on napalm is 5.1: older releases import pkg_resources, which a Python 3.12 venv no longer has.

Fixed

  • play(), pause(), stop(), next_track(), previous_track(), set_volume() and set_mute() raise ConnectionClosedException when the driver is not connected, instead of returning as if the speaker had done it (#2).
  • get_arp_table() takes NAPALM's vrf argument (#2).
  • The driver module carries its docstring again (__doc__ was None) (#2).
  • get_facts(), get_interfaces() and get_interfaces_ip() no longer guess whether the speaker is wired: SoCo offers no reading for it, and the check looked for an attribute SoCo does not have, so it never found eth0 anyway. The speaker reports one interface, wlan0, described as "Network (wired or wireless unknown)" (#2).
  • get_playback_state() reports the speaker's real transport state (PLAYING, PAUSED_PLAYBACK, STOPPED, TRANSITIONING); it called a method SoCo does not have and answered STOPPED for every speaker (#9).
  • get_volume(), get_mute(), get_playback_state() and get_current_track() raise instead of answering 0, False, STOPPED or {}: ConnectionClosedException when the driver is not connected, ConnectionException when the speaker cannot be reached, CommandErrorException when it refuses the request. An unreachable speaker no longer reads as a silent, stopped one (#9).

[0.3.0] - 2026-10-23

The first release on PyPI.

Changed

  • The driver follows the NAPALM driver standard (https://git.netork.io/NAPALM/driver-standard): CI on Gitea runs ruff, mypy, the tests on Python 3.10–3.13 and at the lowest declared versions, bandit, pip-audit and a build check, and a release tag publishes to PyPI. The package now ships py.typed, a README and a LICENSE file. Python 3.9 is no longer supported; napalm-device-types never ran on it.
  • napalm-device-types (4.21.1 or later, from PyPI) is now a declared dependency; the driver always imported it.
  • A failure to read the speaker's device properties (wired or wireless) is now logged at debug level.

[0.2.0] - 2026-10-17

Removed

  • Breaking: run_device_action(). The media controls it dispatched by string (play, pause, stop, next/previous track, volume, mute) are the typed methods play(), set_volume() and the others.

[0.1.0] - 2026-06-13

Added

  • sonos driver: facts, interfaces and media controls for Sonos speakers through SoCo.