homebridge-eqiva-swift-bridge
Version:
Homebridge Eqiva Plugin Bridge for Swift Eqiva eQ-3 Bluetooth Lock Controller.
18 lines (17 loc) • 586 B
TypeScript
import { EventEmitter } from 'events';
import { Logging } from 'homebridge';
type Command = 'lock' | 'unlock' | 'open';
/**
* SwiftBridge wraps a bare WebSocketServer and turns it into an EventEmitter
* that speaks in domain events: 'status' and 'connected'.
*/
export declare class SwiftBridge extends EventEmitter {
readonly log: Logging;
private swift?;
private queuedCommand?;
constructor(log: Logging, port: number);
/** Send a command to the Swift app (or queue if not connected). */
send(cmd: Command): void;
private handleConnection;
}
export {};