driver / standard (pull_request) Successful in 17s
driver / lint (pull_request) Successful in 14s
driver / types (pull_request) Successful in 1m21s
driver / test (3.12) (pull_request) Successful in 3m44s
driver / test (3.13) (pull_request) Successful in 3m19s
driver / lowest (pull_request) Successful in 2m49s
driver / build (pull_request) Successful in 37s
driver / security (pull_request) Successful in 1m16s
CI / driver (pull_request) Successful in 5m32s
driver / publish (pull_request) Skipped
get_volume, get_mute, get_playback_state and get_current_track
answered 0, False, "STOPPED" and {} when the driver was not connected
or the read failed, so an unreachable speaker looked like a silent,
stopped one. They now raise ConnectionClosedException, or
ConnectionException / CommandErrorException with the SoCo error as
the cause.
get_playback_state called get_playback_state() on the SoCo object,
which SoCo does not have; the AttributeError was swallowed and every
speaker read as STOPPED. It now reads current_transport_state from
get_current_transport_info(). The tests mock the speaker with
MagicMock(spec=soco.SoCo), so a call to a method SoCo lacks fails.
Closes #9
2.5 KiB
2.5 KiB
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()andset_mute()raiseConnectionClosedExceptionwhen the driver is not connected, instead of returning as if the speaker had done it (#2).get_arp_table()takes NAPALM'svrfargument (#2).- The driver module carries its docstring again (
__doc__wasNone) (#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 answeredSTOPPEDfor every speaker (#9).get_volume(),get_mute(),get_playback_state()andget_current_track()raise instead of answering0,False,STOPPEDor{}:ConnectionClosedExceptionwhen the driver is not connected,ConnectionExceptionwhen the speaker cannot be reached,CommandErrorExceptionwhen 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 methodsplay(),set_volume()and the others.
[0.1.0] - 2026-06-13
Added
sonosdriver: facts, interfaces and media controls for Sonos speakers through SoCo.