Add SoftAP battery PoC (apower/BMS/EMS socket read) with docs and tests

Probes 10.100.1.1:9000,18000, sends 0x19/0x1D/0x1E envelopes, extracts
currentBatterySoc/soc/avg(socArray). Includes offline extract_soc tests,
BATTERY_POC docs, README usage, and empirical port-9000 RE notes.
This commit is contained in:
kfj001 committed 2026-10-15 01:26:28 +00:00
1 parent 4c0b9de3df
commit 2438a04ed5
6 files changed
+359 -3

No files matched your search

+13
View File
@@ -33,7 +33,20 @@ __all__ = [
"HotspotProfile",
"HotspotJoinError",
"derive_hotspot_credentials",
"extract_soc",
"get_battery",
"SOCKET_PORT_CANDIDATES",
"DEVICE_GATEWAY_IP",
"FALLBACK_PASSWORD",
"VALID_SN_LENGTH",
]
def __getattr__(name: str):
# Lazy so `python -m franklinwh_agate_client.battery` does not import
# the submodule twice (avoids a runpy RuntimeWarning).
if name in {"extract_soc", "get_battery", "SOCKET_PORT_CANDIDATES"}:
from . import battery as _battery
return getattr(_battery, name)
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")