Globals / "src/controller/controller" / Controller
-
EventEmitter
↳ Controller
- createGroup
- getCoordinatorVersion
- getDeviceByIeeeAddr
- getDeviceByNetworkAddress
- getDevices
- getDevicesByType
- getGroupByID
- getGroups
- getNetworkParameters
- getPermitJoin
- permitJoin
- reset
- setLED
- setTransmitPower
- start
- stop
- supportsLED
- touchlinkFactoryReset
- touchlinkFactoryResetFirst
- touchlinkIdentify
- touchlinkScan
+ 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
Name | Type |
---|---|
options |
Options |
Returns: Controller
▸ createGroup(groupID
: number): Group
Defined in src/controller/controller.ts:307
Create a Group
Name | Type |
---|---|
groupID |
number |
Returns: Group
▸ getCoordinatorVersion(): Promise<CoordinatorVersion>
Defined in src/controller/controller.ts:254
Returns: Promise<CoordinatorVersion>
▸ getDeviceByIeeeAddr(ieeeAddr
: string): Device
Defined in src/controller/controller.ts:279
Get device by ieeeAddr
Name | Type |
---|---|
ieeeAddr |
string |
Returns: Device
▸ getDeviceByNetworkAddress(networkAddress
: number): Device
Defined in src/controller/controller.ts:286
Get device by networkAddress
Name | Type |
---|---|
networkAddress |
number |
Returns: Device
▸ getDevices(): Device[]
Defined in src/controller/controller.ts:265
Get all devices
Returns: Device[]
▸ getDevicesByType(type
: DeviceType): Device[]
Defined in src/controller/controller.ts:272
Get all devices with a specific type
Name | Type |
---|---|
type |
DeviceType |
Returns: Device[]
▸ getGroupByID(groupID
: number): Group
Defined in src/controller/controller.ts:293
Get group by ID
Name | Type |
---|---|
groupID |
number |
Returns: Group
▸ getGroups(): Group[]
Defined in src/controller/controller.ts:300
Get all groups
Returns: Group[]
▸ getNetworkParameters(): Promise<NetworkParameters>
Defined in src/controller/controller.ts:258
Returns: Promise<NetworkParameters>
▸ getPermitJoin(): boolean
Defined in src/controller/controller.ts:209
Returns: boolean
▸ permitJoin(permit
: boolean, device?
: Device): Promise<void>
Defined in src/controller/controller.ts:183
Name | Type |
---|---|
permit |
boolean |
device? |
Device |
Returns: Promise<void>
▸ reset(type
: "soft" | "hard"): Promise<void>
Defined in src/controller/controller.ts:250
Name | Type |
---|---|
type |
"soft" | "hard" |
Returns: Promise<void>
▸ setLED(enabled
: boolean): Promise<void>
Defined in src/controller/controller.ts:328
Enable/Disable the LED
Name | Type |
---|---|
enabled |
boolean |
Returns: Promise<void>
▸ setTransmitPower(value
: number): Promise<void>
Defined in src/controller/controller.ts:321
Set transmit power of the adapter
Name | Type |
---|---|
value |
number |
Returns: Promise<void>
▸ start(): Promise<void>
Defined in src/controller/controller.ts:99
Start the Herdsman controller
Returns: Promise<void>
▸ stop(): Promise<void>
Defined in src/controller/controller.ts:213
Returns: Promise<void>
▸ supportsLED(): Promise<boolean>
Defined in src/controller/controller.ts:314
Check if the adapters supports LED
Returns: Promise<boolean>
▸ touchlinkFactoryReset(ieeeAddr
: string, channel
: number): Promise<boolean>
Defined in src/controller/controller.ts:175
Name | Type |
---|---|
ieeeAddr |
string |
channel |
number |
Returns: Promise<boolean>
▸ touchlinkFactoryResetFirst(): Promise<boolean>
Defined in src/controller/controller.ts:179
Returns: Promise<boolean>
▸ touchlinkIdentify(ieeeAddr
: string, channel
: number): Promise<void>
Defined in src/controller/controller.ts:167
Name | Type |
---|---|
ieeeAddr |
string |
channel |
number |
Returns: Promise<void>
▸ touchlinkScan(): Promise<{ channel: number ; ieeeAddr: string }[]>
Defined in src/controller/controller.ts:171
Returns: Promise<{ channel: number ; ieeeAddr: string }[]>