diff --git a/CHANGELOG.md b/CHANGELOG.md index 5c5a22d..8edefc8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,9 @@ All notable changes to this driver. The format follows 250 Mbit/s line was shown as 250000 (#2). - `get_system_config()` reports the box's time zone (`NewLocalTimeZoneName`) as `timezone`; it held the box's current local time (#3). +- `get_system_config()`'s `firmware_version` is documented for what it is: the + version the box offers as an update, empty when it offers none, not the running + version (that is `get_facts()["os_version"]`). Unchanged in behaviour (#3). ## [0.3.0] - 2026-10-23 diff --git a/README.md b/README.md index 5effb80..90928cb 100644 --- a/README.md +++ b/README.md @@ -66,6 +66,18 @@ d.close() FritzBox serves TR-064 over HTTPS with a self-signed certificate; `fritzconnection` does not verify it, so no separate `verify` option is needed. +## `get_system_config()` + +A snapshot of the box's settings, every field best-effort (a TR-064 service the +box does not offer leaves its fields out). Two of them are easy to misread: + +- `firmware_version` is the version the box **offers** as an update, empty when + it offers none — not the version running, which is `get_facts()["os_version"]`. + `firmware_update_available` says whether there is one. A box that only answers + `UserInterface1.GetInfo` (not `X_AVM-DE_GetInfo`) reports + `firmware_update_available` without `firmware_version`. +- `timezone` is the box's time zone name (`NewLocalTimeZoneName`). + ## Limitations - Read-only: configuration management methods (`load_merge_candidate`, diff --git a/napalm_fritzbox/fritzbox.py b/napalm_fritzbox/fritzbox.py index 0c54e9c..c83c361 100644 --- a/napalm_fritzbox/fritzbox.py +++ b/napalm_fritzbox/fritzbox.py @@ -334,11 +334,11 @@ class FritzBoxDriver(ResidentialGatewayDriver): return result def get_system_config(self) -> dict[str, Any]: - """Return a system configuration snapshot for storage as ``system_snapshot``. + """Return a best-effort snapshot of DSL statistics, firmware updates, DNS and NTP. - Collects DSL line statistics, firmware update status, upstream DNS - servers and NTP settings. All fields are best-effort: missing - TR-064 services are silently skipped. + ``firmware_version`` is the version on *offer* (empty when none), not the one + running (``get_facts()["os_version"]``); a box answering only + ``UserInterface1.GetInfo`` leaves it out. A missing TR-064 service is skipped. """ available = self.fc.services if self.fc else {} result: dict[str, Any] = {}