/// import events from 'events'; import { TsType as AdapterTsType } from '../adapter'; import { Device } from './model'; import { DeviceType } from './tstype'; import Group from './model/group'; interface Options { network: AdapterTsType.NetworkOptions; serialPort: AdapterTsType.SerialPortOptions; databasePath: string; databaseBackupPath: string; backupPath: string; adapter: AdapterTsType.AdapterOptions; /** * This lambda can be used by an application to explictly reject or accept an incoming device. * When false is returned zigbee-herdsman will not start the interview process and immidiately * try to remove the device from the network. */ acceptJoiningDeviceHandler: (ieeeAddr: string) => Promise; } /** * @noInheritDoc */ declare class Controller extends events.EventEmitter { private options; private database; private adapter; private greenPower; private permitJoinTimer; private backupTimer; private databaseSaveTimer; private touchlink; /** * Create a controller * * To auto detect the port provide `null` for `options.serialPort.path` */ constructor(options: Options); /** * Start the Herdsman controller */ start(): Promise; touchlinkIdentify(ieeeAddr: string, channel: number): Promise; touchlinkScan(): Promise<{ ieeeAddr: string; channel: number; }[]>; touchlinkFactoryReset(ieeeAddr: string, channel: number): Promise; touchlinkFactoryResetFirst(): Promise; permitJoin(permit: boolean, device?: Device): Promise; getPermitJoin(): boolean; stop(): Promise; private databaseSave; private backup; reset(type: 'soft' | 'hard'): Promise; getCoordinatorVersion(): Promise; getNetworkParameters(): Promise; /** * Get all devices */ getDevices(): Device[]; /** * Get all devices with a specific type */ getDevicesByType(type: DeviceType): Device[]; /** * Get device by ieeeAddr */ getDeviceByIeeeAddr(ieeeAddr: string): Device; /** * Get device by networkAddress */ getDeviceByNetworkAddress(networkAddress: number): Device; /** * Get group by ID */ getGroupByID(groupID: number): Group; /** * Get all groups */ getGroups(): Group[]; /** * Create a Group */ createGroup(groupID: number): Group; /** * Check if the adapters supports LED */ supportsLED(): Promise; /** * Set transmit power of the adapter */ setTransmitPower(value: number): Promise; /** * Enable/Disable the LED */ setLED(enabled: boolean): Promise; private onNetworkAddress; private onDeviceAnnounce; private onDeviceLeave; private onAdapterDisconnected; private onDeviceJoinedGreenPower; private onDeviceJoined; private isZclDataPayload; private onZclOrRawData; } export default Controller; //# sourceMappingURL=controller.d.ts.map