Closed palazzem closed 5 months ago
This PR introduces two changes:
client.auth()
/api/login
client.query(q.PANEL)
Query Example
client.query(q.PANEL) # Returns { "last_id": 0, "panel": { "description": "T-800 1.0.1", "last_connection": "01/01/1984 13:27:28", "last_disconnection": "01/10/1984 13:27:18", "major": 1, "minor": 0, "source_ip": "10.0.0.1", "connection_type": "EthernetWiFi", "device_class": 92, "revision": 1, "build": 1, "brand": 0, "language": 0, "areas": 4, "sectors_per_area": 4, "total_sectors": 16, "inputs": 24, "outputs": 24, "operators": 64, "sectors_in_use": [ True, True, True, True, False, False, False, False, False, False, False, False, False, False, False, False, ], "model": "T-800", "login_without_user_id": True, "additional_info_supported": 1, "is_fire_panel": False, }, }
Authenticate the client and call the query method:
client.auth("username", "password") client.query(q.PANEL)
n/a
Related Issues
Proposed Changes:
This PR introduces two changes:
client.auth()
(/api/login
), the client stores the response that includes the panel detailsclient.query(q.PANEL)
returns the panel details response that is cached after the first callQuery Example
Testing:
Authenticate the client and call the query method:
Extra Notes (optional):
n/a
Checklist