homenet-plugin-zway
Version:
Homenet plugin for Z-Way connected Z-Wave devices
19 lines (18 loc) • 695 B
TypeScript
/// <reference path="../src/node-zway.d.ts" />
import { IDevice } from 'node-zway';
export interface DeviceEvent {
deviceId: string;
}
export interface DeviceEventCallback {
(event: DeviceEvent): void;
}
export declare class ZwayController {
private _deviceApi;
constructor(id: string, host?: string, user?: string, password?: string, port?: number);
start(): void;
onSensorEvent(deviceId: number, callback: DeviceEventCallback): void;
onLockEvent(deviceId: number, callback: DeviceEventCallback): void;
onAlarmEvent(deviceId: number, callback: DeviceEventCallback): void;
getDevice(deviceId: number): IDevice;
getLockDevice(deviceId: number): IDevice;
}