UNPKG

homebridge-boschcontrolpanel_bgseries

Version:
135 lines 6.01 kB
/// <reference types="node" /> import { BGPoint } from './BGPoint'; import { BGUserType, BGPanelType, BGAlarmPriority } from './BGConst'; import { BGOutput } from './BGOutput'; import { BGArea } from './BGArea'; import { BGProtocolVersion } from './BGProtocolVersion'; import { BGArmingType } from './BGConst'; import { TypedEmitter } from 'tiny-typed-emitter'; import { BGFirmwareVersion } from './BGFirmwareVersion'; import { BGProtocolHandler01 } from './BGProtocolHandler01'; import { BGProtocolHandler02 } from './BGProtocolHandler02'; import { PromiseSocket } from 'promise-socket'; import net = require('net'); export declare enum BGControllerError { InvalidProtocol = "Invalid Protocol", InvalidProtocolLength = "Invalid Protocol Length", InvalidProtocolVersion = "Invalid Protocol Version", InvalidCommandLength = "Invalid Command Length", InvalidCommandFormatLength = "Invalid Command Format Length", InvalidResponseArgumentLength = "Invalid Response Length", CommandLengthOverflow = "Command Length Over Maximum Allowed Value", ResponseLengthOverflow = "Response Length Over Maximum Allowed Value", NotificationLengthOverflow = "Notification Length Over Maximum Allowed Value", InvalidResponseLength = "Invadid Response Length (Length argument)", InvalidNotificationLength = "Invadid Notification Length (Length argument)", BoschPanelError = "Bosch Panel Error", UndefinedError = "Undefined Error", UserNotAuthentificated = "User not authentificated", PanelBusy = "Panel is busy, cannot accept new connection", PasscodeLengthError = "Passcode supplied to controller is of invalid length", MaxAreaNumberError = "Number of configured areas over controller maximum area number", MaxOutputNumberError = "Number of configured outputs over controller maximum output number", ConnectionError = "Control Panel Connection Error" } export declare enum MaxConnectionsInUseFlags { MaxUserBasedRemoteAccessUsersInUse = 4, MaxAutomationUsersInUse = 2, MaxRPSAlinkusersInUse = 1 } export interface BoschControllerMode2Event { 'PanelReadyForOperation': (PanelReady: boolean) => void; 'PanelReceivingNotifiation': (PanelReceivingNotification: boolean) => void; 'ControllerError': (Error: BGControllerError, ErrorString: string) => void; 'PointStatusChange': (Point: BGPoint) => void; 'AreaReadyStateChange': (Area: BGArea) => void; 'AreaOnOffStateChange': (Area: BGArea) => void; 'AreaAlarmStateChange': (Area: BGArea) => void; 'OutputStateChange': (Output: BGOutput) => void; 'ConfidenceMessage': () => void; } export declare class BGController extends TypedEmitter<BoschControllerMode2Event> { Util: any; Semaphore: any; private Host; private Port; private Socket; private SocktetTimeout; PromiseS: PromiseSocket<net.Socket>; UserType: BGUserType; Passcode: string; MinPasscodeLength: number; MaxPassCodeLength: number; readonly BoschMaxAreas = 128; readonly BoschMaxPoints = 600; readonly BoschMaxOutputs = 600; readonly BoschMaxNotificationMessageBytes = 480; PanelRPSProtocolVersion: BGProtocolVersion; PanelExecuteProtocolVersion: BGProtocolVersion; PanelIIPVersion: BGProtocolVersion; FirmwareVersion: BGFirmwareVersion; PanelBusyFlag: boolean; PanelType: BGPanelType; MaxAreas: number; MaxPoints: number; MaxOutputs: number; MaxUsers: number; MaxKeypads: number; MaxDoors: number; Areas: Record<number, BGArea>; Outputs: Record<number, BGOutput>; Points: Record<number, BGPoint>; PanelReadyForOperation: boolean; PanelReceivingNotifcation: boolean; Protocol01: BGProtocolHandler01; Protocol02: BGProtocolHandler02; private semaphore; LegacyMode: boolean; InitialRun: boolean; PoolInterval: number; FeatureProtocol01: boolean; FeatureProtocol02: boolean; FeatureProtocol03: boolean; FeatureProtocol04: boolean; FeatureProtocol05: boolean; Feature512BytesPacket: boolean; Feature1460BytesPacket: boolean; FeatureCommandWhatAreYouCF01: boolean; FeatureCommandWhatAreYouCF02: boolean; FeatureCommandWhatAreYouCF03: boolean; FeatureCommandWhatAreYouCF04: boolean; FeatureCommandWhatAreYouCF05: boolean; FeatureCommandWhatAreYouCF06: boolean; FeatureCommandWhatAreYouCF07: boolean; FeatureCommandRequestAreaTextCF01: boolean; FeatureCommandRequestAreaTextCF03: boolean; FeatureCommandRequestOuputTextCF01: boolean; FeatureCommandRequestOuputTextCF03: boolean; FeatureCommandRequestPointTextCF01: boolean; FeatureCommandRequestPointTextCF03: boolean; FeatureCommandRequestConfiguredAreaCF01: boolean; FeatureCommandArmPanelAreasCF01: boolean; FeatureCommandRequestConfiguredOutputsCF01: boolean; FeatureCommandRequestPointsInAreaCF01: boolean; FeatureCommandSetOutputStateCF01: boolean; FeatureCommandSetOutputStateCF02: boolean; FeatureCommandSetSubscriptionCF01: boolean; FeatureCommandSetSubscriptionCF02: boolean; FeatureCommandSetSubscriptionCF03: boolean; FeatureCommandSetSubscriptionCF04: boolean; FeatureCommandSetSubscriptionCF05: boolean; FeatureCommandReqAlarmAreasByPriorityCF01: boolean; FeatureCommandReqAlarmMemorySummaryCF01: boolean; FeatureCommandReqAlarmMemoryDetailCF01: boolean; constructor(Host: string, Port: number, UserType: BGUserType, Passcode: string, ForceLegacyMode: boolean); Connect(): void; Configure(): Promise<void>; StartOperation(): Promise<void>; private PoolPanel; GetPanelUsingSubscription(): boolean; GetAlarmMemoryDetail(AlarmPriority: BGAlarmPriority, LastArea: number, LastPoint: number): Promise<void>; GetOutputState(): Promise<void>; SetOutputState(OutputNumer: number, State: boolean): Promise<void>; ArmArea(AreaToArm: number[], ArmingType: BGArmingType): Promise<void>; } //# sourceMappingURL=BGController.d.ts.map