Access this instance at HomeyAPIV3Cloud.drivers
.
Extends
Classes
Instance Properties
homey
homey: HomeyAPIV3uri
uri: StringThe URI of the Item, e.g. homey:manager:bar
.
Type
- String
Instance Methods
addListener
addListener(event, callback)Parameters
Name | Type | Description |
---|---|---|
event
|
string | |
callback
|
function |
connect
(async) connect(): Promise.<void>Connect to this manager's Socket.io namespace.
Returns
createPairSession
(async) createPairSession(opts): Promise.<HomeyAPIV3Cloud.ManagerDrivers.PairSession>Scopes
homey.device
HTTP
POST /api/manager/drivers/pairsession
Parameters
Name | Type | Description |
---|---|---|
opts
|
object | |
pairsession
|
object | |
type
|
string | |
driverId
|
string | |
deviceId
|
string
<optional> |
|
zoneId
|
string
<optional> |
|
|
||
|
Returns
createPairSessionDevice
(async) createPairSessionDevice(opts): Promise.<any>Scopes
homey.device
HTTP
POST /api/manager/drivers/pairsession/:id/device
Parameters
Name | Type | Description |
---|---|---|
opts
|
object | |
id
|
string | |
device
|
object | |
name
|
string
<optional> |
|
data
|
* | |
zone
|
string
<optional> |
|
store
|
object
<optional> |
|
capabilities
|
array
<optional> |
|
capabilitiesOptions
|
object
<optional> |
|
class
|
string
<optional> |
|
icon
|
string
<optional> |
|
iconOverride
|
string
<optional> |
|
settings
|
object
<optional> |
|
energy
|
object
<optional> |
|
|
||
|
Returns
deletePairSession
(async) deletePairSession(opts)Scopes
homey.device
HTTP
DELETE /api/manager/drivers/pairsession/:id
Parameters
Name | Type | Description |
---|---|---|
opts
|
object | |
id
|
string | |
|
deletePairSessionDevice
(async) deletePairSessionDevice(opts): Promise.<any>Scopes
homey.device
HTTP
DELETE /api/manager/drivers/pairsession/:id/device
Parameters
Name | Type | Description |
---|---|---|
opts
|
object | |
id
|
string | |
|
Returns
destroy
destroy()Destroy this Manager by cleaning up all references, unbinding event listeners and disconnecting from the Socket.io namespace.
disconnect
(async) disconnect(): Promise.<void>Disconnect from this manager's Socket.io namespace.
Returns
emit
emit(event, …data)Parameters
Name | Type | Description |
---|---|---|
event
|
string | |
data
|
any
<repeatable> |
emitPairingCallback
(async) emitPairingCallback(opts): Promise.<any>Scopes
homey.device
HTTP
POST /api/manager/drivers/pairsession/:id/callback
Parameters
Name | Type | Description |
---|---|---|
opts
|
object | |
id
|
string | |
callbackId
|
string | |
data
|
*
<optional> |
|
|
Returns
emitPairingEvent
(async) emitPairingEvent(opts): Promise.<any>Scopes
homey.device
HTTP
POST /api/manager/drivers/pairsession/:id/emit
Parameters
Name | Type | Description |
---|---|---|
opts
|
object | |
id
|
string | |
event
|
string | |
data
|
*
<optional> |
|
|
Returns
emitPairingHeartbeat
(async) emitPairingHeartbeat(opts): Promise.<any>Scopes
homey.device
HTTP
POST /api/manager/drivers/pairsession/:id/heartbeat
Parameters
Name | Type | Description |
---|---|---|
opts
|
object | |
id
|
string | |
|
Returns
getDrivers
(async) getDrivers(): Promise.<Object.<string, HomeyAPIV3Cloud.ManagerDrivers.Driver>>Scopes
homey.device.readonly
HTTP
GET /api/manager/drivers/driver
Returns
getPairSession
(async) getPairSession(opts): Promise.<HomeyAPIV3Cloud.ManagerDrivers.PairSession>Scopes
homey.device
HTTP
GET /api/manager/drivers/pairsession/:id
Parameters
Name | Type | Description |
---|---|---|
opts
|
object | |
id
|
string | |
|
Returns
getState
(async) getState(): Promise.<any>Scopes
homey.system.readonly
HTTP
GET /api/manager/drivers/state
Returns
isConnected
isConnected(): BooleanIf this manager's namespace is connected to Socket.io.
Returns
off
off(event, callback)Parameters
Name | Type | Description |
---|---|---|
event
|
string | |
callback
|
function |
on
on(event, callback)Parameters
Name | Type | Description |
---|---|---|
event
|
string | |
callback
|
function |
once
once(event, callback)Parameters
Name | Type | Description |
---|---|---|
event
|
string | |
callback
|
function |
removeAllListeners
removeAllListeners(eventopt)Parameters
Name | Type | Description |
---|---|---|
event
|
string
<optional> |
removeListener
removeListener(event, callback)Shortcut to EventEmitter#off
Parameters
Name | Type | Description |
---|---|---|
event
|
string | |
callback
|
function |
Events
driver.create
.on('driver.create')Parameters
Name | Type | Description |
---|---|---|
driver
|
HomeyAPIV3Cloud.ManagerDrivers.Driver |
driver.delete
.on('driver.delete')Parameters
Name | Type | Description |
---|---|---|
driver
|
HomeyAPIV3Cloud.ManagerDrivers.Driver |
driver.update
.on('driver.update')Parameters
Name | Type | Description |
---|---|---|
driver
|
HomeyAPIV3Cloud.ManagerDrivers.Driver |
pairsession.create
.on('pairsession.create')Parameters
Name | Type | Description |
---|---|---|
pairsession
|
HomeyAPIV3Cloud.ManagerDrivers.PairSession |
pairsession.delete
.on('pairsession.delete')Parameters
Name | Type | Description |
---|---|---|
pairsession
|
HomeyAPIV3Cloud.ManagerDrivers.PairSession |
pairsession.update
.on('pairsession.update')Parameters
Name | Type | Description |
---|---|---|
pairsession
|
HomeyAPIV3Cloud.ManagerDrivers.PairSession |