Skip to content

Latest commit

 

History

History
364 lines (206 loc) · 9.81 KB

_src_controller_controller_.controller.md

File metadata and controls

364 lines (206 loc) · 9.81 KB

zigbee-herdsman

Globals / "src/controller/controller" / Controller

Class: Controller

Hierarchy

  • EventEmitter

    Controller

Index

Constructors

Methods

Constructors

constructor

+ new Controller(options: Options): Controller

Overrides void

Defined in src/controller/controller.ts:69

Create a controller

To auto detect the port provide null for options.serialPort.path

Parameters:

Name Type
options Options

Returns: Controller

Methods

createGroup

createGroup(groupID: number): Group

Defined in src/controller/controller.ts:307

Create a Group

Parameters:

Name Type
groupID number

Returns: Group


getCoordinatorVersion

getCoordinatorVersion(): Promise<CoordinatorVersion>

Defined in src/controller/controller.ts:254

Returns: Promise<CoordinatorVersion>


getDeviceByIeeeAddr

getDeviceByIeeeAddr(ieeeAddr: string): Device

Defined in src/controller/controller.ts:279

Get device by ieeeAddr

Parameters:

Name Type
ieeeAddr string

Returns: Device


getDeviceByNetworkAddress

getDeviceByNetworkAddress(networkAddress: number): Device

Defined in src/controller/controller.ts:286

Get device by networkAddress

Parameters:

Name Type
networkAddress number

Returns: Device


getDevices

getDevices(): Device[]

Defined in src/controller/controller.ts:265

Get all devices

Returns: Device[]


getDevicesByType

getDevicesByType(type: DeviceType): Device[]

Defined in src/controller/controller.ts:272

Get all devices with a specific type

Parameters:

Name Type
type DeviceType

Returns: Device[]


getGroupByID

getGroupByID(groupID: number): Group

Defined in src/controller/controller.ts:293

Get group by ID

Parameters:

Name Type
groupID number

Returns: Group


getGroups

getGroups(): Group[]

Defined in src/controller/controller.ts:300

Get all groups

Returns: Group[]


getNetworkParameters

getNetworkParameters(): Promise<NetworkParameters>

Defined in src/controller/controller.ts:258

Returns: Promise<NetworkParameters>


getPermitJoin

getPermitJoin(): boolean

Defined in src/controller/controller.ts:209

Returns: boolean


permitJoin

permitJoin(permit: boolean, device?: Device): Promise<void>

Defined in src/controller/controller.ts:183

Parameters:

Name Type
permit boolean
device? Device

Returns: Promise<void>


reset

reset(type: "soft" | "hard"): Promise<void>

Defined in src/controller/controller.ts:250

Parameters:

Name Type
type "soft" | "hard"

Returns: Promise<void>


setLED

setLED(enabled: boolean): Promise<void>

Defined in src/controller/controller.ts:328

Enable/Disable the LED

Parameters:

Name Type
enabled boolean

Returns: Promise<void>


setTransmitPower

setTransmitPower(value: number): Promise<void>

Defined in src/controller/controller.ts:321

Set transmit power of the adapter

Parameters:

Name Type
value number

Returns: Promise<void>


start

start(): Promise<void>

Defined in src/controller/controller.ts:99

Start the Herdsman controller

Returns: Promise<void>


stop

stop(): Promise<void>

Defined in src/controller/controller.ts:213

Returns: Promise<void>


supportsLED

supportsLED(): Promise<boolean>

Defined in src/controller/controller.ts:314

Check if the adapters supports LED

Returns: Promise<boolean>


touchlinkFactoryReset

touchlinkFactoryReset(ieeeAddr: string, channel: number): Promise<boolean>

Defined in src/controller/controller.ts:175

Parameters:

Name Type
ieeeAddr string
channel number

Returns: Promise<boolean>


touchlinkFactoryResetFirst

touchlinkFactoryResetFirst(): Promise<boolean>

Defined in src/controller/controller.ts:179

Returns: Promise<boolean>


touchlinkIdentify

touchlinkIdentify(ieeeAddr: string, channel: number): Promise<void>

Defined in src/controller/controller.ts:167

Parameters:

Name Type
ieeeAddr string
channel number

Returns: Promise<void>


touchlinkScan

touchlinkScan(): Promise<{ channel: number ; ieeeAddr: string }[]>

Defined in src/controller/controller.ts:171

Returns: Promise<{ channel: number ; ieeeAddr: string }[]>