fix(driver): refuse media controls when not connected (#2) #8

Merged
christianmanivong merged 1 commits from fix/bugs-2026-11 into main 2026-11-01 22:00:44 +00:00
Owner

Part of #2: media controls refuse when not connected, get_arp_table takes NAPALM's vrf argument, and the module docstring is the module's __doc__ again.

  • play, pause, stop, next_track, previous_track, set_volume, set_mute raise ConnectionClosedException when not connected instead of returning silently.

Still open in #2 (so it stays open): wired speakers still never report eth0. Renaming the attribute does not help — in SoCo 0.31.2 deviceProperties is a UPnP service object, not a dict with WifiMode, and nothing in SoCo exposes wired vs. wireless. A real fix needs a recording from a wired speaker (e.g. ZoneGroupTopology GetZoneGroupState).

Tested: fixtures only. pytest 33 passed, ruff, mypy, napalm-standard check/ratchet green.

Refs #2

Part of #2: media controls refuse when not connected, `get_arp_table` takes NAPALM's `vrf` argument, and the module docstring is the module's `__doc__` again. - `play`, `pause`, `stop`, `next_track`, `previous_track`, `set_volume`, `set_mute` raise `ConnectionClosedException` when not connected instead of returning silently. **Still open in #2 (so it stays open):** wired speakers still never report `eth0`. Renaming the attribute does not help — in SoCo 0.31.2 `deviceProperties` is a UPnP service object, not a dict with `WifiMode`, and nothing in SoCo exposes wired vs. wireless. A real fix needs a recording from a wired speaker (e.g. ZoneGroupTopology `GetZoneGroupState`). Tested: fixtures only. pytest 33 passed, ruff, mypy, `napalm-standard check`/`ratchet` green. Refs #2
christianmanivong added 1 commit 2026-11-01 20:57:59 +00:00
fix(driver): refuse media controls when not connected
driver / standard (pull_request) Successful in 16s
driver / lint (pull_request) Successful in 15s
driver / types (pull_request) Successful in 1m18s
driver / test (3.12) (pull_request) Successful in 3m14s
driver / test (3.13) (pull_request) Successful in 2m54s
driver / lowest (pull_request) Successful in 2m23s
driver / build (pull_request) Successful in 35s
driver / security (pull_request) Successful in 1m11s
CI / driver (pull_request) Successful in 4m53s
driver / publish (pull_request) Skipped
322b7cd688
play() and the other controls returned silently without a device, so
a control that did nothing looked like it had worked. They now raise
ConnectionClosedException. get_arp_table() takes NAPALM's vrf
argument, and the module docstring moves above the imports so
__doc__ is set again.

The wired-speaker part of the issue stays open: SoCo's
deviceProperties is a UPnP service, not a dict with WifiMode, so
renaming the attribute alone would still never report eth0.

Refs #2
christianmanivong merged commit 8d5ed7e2c4 into main 2026-11-01 22:00:44 +00:00
christianmanivong deleted branch fix/bugs-2026-11 2026-11-01 22:00:44 +00:00
Sign in to join this conversation.