UNPKG

homebridge-risco-lite

Version:

A simple homebridge plugin to arm and disarm Risco alarm systems.

43 lines (42 loc) 1.09 kB
import { Logger, PlatformConfig } from 'homebridge'; /** * Enum representing the possible arm states of the system */ export declare enum ArmState { NotArmed = 1, StayArmed = 2, AwayArmed = 3 } /** * Client for interacting with the Risco Cloud API */ export declare class RiscoClient { private readonly config; private readonly log; private accessToken?; private refreshToken?; private sessionId?; constructor(config: PlatformConfig, log: Logger); /** * Initialize the client and authenticate with Risco Cloud */ init(): Promise<void>; reAuthenticate(): Promise<void>; /** * Login to Risco Cloud and get access token */ private login; /** * Get a session ID from Risco Cloud */ private getSession; /** * Get the current armed state of the system */ getArmedState(): Promise<ArmState>; /** * Set the arm state of the system * @param state The desired arm state (NotArmed, StayArmed, or AwayArmed) */ setArmedState(state: ArmState): Promise<void>; }