homenet-plugin-zway
Version:
Homenet plugin for Z-Way connected Z-Wave devices
27 lines (23 loc) • 621 B
TypeScript
declare module ZWay {
export class DeviceApi {
constructor(host: string);
constructor(opts: {host: string, port: number, user: string, password: string});
refresh() : void;
poll(inverval: number) : void;
on(device: number, className: string, event: string, callback: Function);
onAny(Function);
getDevice(deviceId: number, classId?: number) : IDevice;
}
export interface IDevice {
DoorLock?: IDoorLock;
}
export interface IDoorLock {
lock() : void;
unlock() : void;
refresh() : void;
isLocked() : boolean;
}
}
declare module 'node-zway' {
export = ZWay;
}