Initial commit: Hybrid polling, interactive log modal and 3-second hard reset

This commit is contained in:
cheveguerra
2026-07-24 15:31:56 +00:00
commit 7808501bf4
16 changed files with 34739 additions and 0 deletions
+25
View File
@@ -0,0 +1,25 @@
import json
from total_connect_client.client import TotalConnectClient
from total_connect_client.const import make_http_endpoint
creds = json.load(open('credentials.json', encoding='utf-8'))['accounts'][0]
client = TotalConnectClient(creds['username'], creds['password'], load_details=False)
client.authenticate()
location_id = 1417027
endpoint = make_http_endpoint(f"api/v3/locations/{location_id}/partitions/fullStatus")
res = client.http_request(endpoint=endpoint, method="GET")
print("Keys at root of fullStatus response:")
print(list(res.keys()))
print("\nValue of ArmingState at root:")
print(res.get("ArmingState"))
print("\nValue of PanelStatus -> ArmingState:")
panel_status = res.get("PanelStatus", {})
print(panel_status.get("ArmingState"))
print("\nPartitions data:")
for p in panel_status.get("Partitions", []):
print(f" PartitionID={p.get('PartitionID')}, ArmingState={p.get('ArmingState')}")