""" FranklinWH AGATE Device Client Reverse engineered from com.Franklinwh.FamilyEnergy Android app. Provides access to Bluetooth and Wi-Fi network I/O stack for AGATE devices. """ from .client import AgateClient from .bluetooth import BluetoothManager from .wifi import ( DEVICE_GATEWAY_IP, FALLBACK_PASSWORD, VALID_SN_LENGTH, HotspotJoinError, HotspotProfile, NoOpWifiBackend, NmcliWifiBackend, WifiBackend, WifiManager, derive_hotspot_credentials, ) from .api import ApiClient __version__ = "0.1.0" __all__ = [ "AgateClient", "BluetoothManager", "ApiClient", "WifiManager", "WifiBackend", "NmcliWifiBackend", "NoOpWifiBackend", "HotspotProfile", "HotspotJoinError", "derive_hotspot_credentials", "extract_soc", "get_battery", "probe_device", "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", "probe_device", "SOCKET_PORT_CANDIDATES"}: from . import battery as _battery return getattr(_battery, name) raise AttributeError(f"module {__name__!r} has no attribute {name!r}")