/// import { ClientConfiguration, Logger } from 'freeathome-api'; import { Subscriber } from 'freeathome-api/dist/lib/Subscriber'; import { BroadcastMessage } from 'freeathome-api/dist/lib/BroadcastMessage'; import { EventEmitter } from 'events'; import { LogInterface } from './LogInterface'; export declare enum ConnectionEvent { CONNECT = "connect", CONNECTED = "connected", DISCONNECT = "disconnect", DISCONNECTED = "disconnected", READY = "ready", DEVICES = "devices", BROADCAST = "broadcast" } export declare type Devices = { [deviceSerial: string]: DeviceInfo; }; export declare type DeviceInfo = { serialNumber: string; deviceId: string; typeName?: string; typeId?: string; channels: { [channel: string]: ChannelInfo; }; }; export declare type ChannelInfo = { datapoints: { [k: string]: string; }; displayName: string; floor: string; room: string; iconId: string; functionId: string; }; /** * @event ConnectionEvent.READY * @event ConnectionEvent.CONNECT * @event ConnectionEvent.CONNECTED * @event ConnectionEvent.DISCONNECT * @event ConnectionEvent.DISCONNECTED * @event ConnectionEvent.BROADCAST */ export declare class Connection extends EventEmitter implements Subscriber, Logger { private readonly config; private readonly logger; private readonly autoReconnect; private readonly silenceTimeoutDuration; private readonly sysAccessPoint; debugEnabled: boolean; infoEnabled: boolean; private connected; private ready; private _lastUpdate?; private silenceTimeoutId?; get lastUpdate(): Date | undefined; constructor(config: ClientConfiguration, logger?: LogInterface, autoReconnect?: boolean, silenceTimeoutDuration?: number); start(): Promise; stop(): Promise; onReady(): Promise; listDevices(): Promise; broadcastMessage(message: BroadcastMessage): void; setDatapoint(serialNo: string, channel: string, datapoint: string, value: string): Promise; debug(...messages: string[] | number[] | Record[]): void; error(...messages: string[] | number[] | Record[]): void; warn(...messages: string[] | number[] | Record[]): void; log(...messages: string[] | number[] | Record[]): Promise; private breakSilence; private handleSilenceTimout; private reconnect; } //# sourceMappingURL=Connection.d.ts.map