Commit Graph
3 Commits
Author SHA1 Message Date
Christian Manivong 218e2c7a7b fix(driver): follow the media contract's shapes, raise on failed reads
driver / standard (pull_request) Successful in 19s
driver / lint (pull_request) Successful in 15s
driver / types (pull_request) Successful in 1m9s
driver / test (3.12) (pull_request) Successful in 4m21s
driver / test (3.13) (pull_request) Successful in 4m16s
driver / lowest (pull_request) Successful in 3m46s
driver / build (pull_request) Successful in 32s
driver / security (pull_request) Successful in 1m14s
CI / driver (pull_request) Successful in 6m10s
driver / publish (pull_request) Skipped
get_playback_state returned SoCo's transport string and get_zone_info
the speaker's details, where napalm-device-types' MediaDriver declares
{"state", "source"} and a list of {"name", "coordinator", "members"}.
Both now return those shapes; the speaker's details stay in get_facts.

get_group_info and get_zone_info caught every exception and answered
{}, so a failed read looked like a speaker in no group. They now raise
like the other getters (#9); {} and [] mean no group.

Closes #11
2026-11-02 09:28:39 +01:00
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
Christian Manivong 168841ebb8 chore: adopt the NAPALM driver standard
driver / standard (pull_request) Successful in 13s
driver / lint (pull_request) Successful in 12s
driver / types (pull_request) Successful in 45s
driver / test (3.10) (pull_request) Successful in 2m40s
driver / test (3.11) (pull_request) Successful in 2m40s
driver / test (3.12) (pull_request) Successful in 2m37s
driver / test (3.13) (pull_request) Successful in 2m34s
driver / lowest (pull_request) Successful in 2m16s
driver / security (pull_request) Successful in 47s
driver / build (pull_request) Successful in 22s
CI / driver (pull_request) Successful in 15m6s
driver / publish (pull_request) Skipped
- CI moves to .gitea/workflows/ci.yml and calls the shared driver workflow
  of NAPALM/driver-standard; .github/ is gone.
- napalm-device-types >=4.21.1 is now declared: the driver imports
  MediaDriver, PortSpec and FingerprintRule from it, and CI used to
  install it by hand.
- requires-python >=3.10 (napalm-device-types needs it), LICENSE, README,
  CHANGELOG, py.typed, SPDX license string, setuptools>=77, version floors
  on the dev extra, links to git.netork.io; .gitignore as in the template.
- mypy strict for the package; napalm_sonos.sonos_driver is exempt for now
  (5 errors, two of them return types that differ from MediaDriver's),
  recorded in the quality baseline.
- Coverage floor 71 % (measured 71.30 %).
2026-10-23 09:00:07 +02:00