ManagerDevices

Access this instance at HomeyAPIV3Cloud.devices.

Extends

Classes

Methods

connect

(async) connect(): Promise.<void>

Connect to the realtime namespace.

Returns

Promise.<void>

deleteDevice

(async) deleteDevice(opts)

Scopes

homey.device

HTTP

delete /api/manager/devices/device/:id

Parameters

Name Type Description
opts
object
id
string
}

disconnect

(async) disconnect(): Promise.<void>

Disconnect from the realtime namespace.

Returns

Promise.<void>

getCapabilityValue

(async) getCapabilityValue(opts): Promise.<any>

Scopes

homey.device.readonly

HTTP

get /api/manager/devices/device/:deviceId/capability/:capabilityId

Parameters

Name Type Description
opts
object
capabilityId
string
deviceId
string
}

Returns

Promise.<any>

getDevice

(async) getDevice(opts): Promise.<HomeyAPIV3Cloud.ManagerDevices.Device>

Scopes

homey.device.readonly

HTTP

get /api/manager/devices/device/:id

Parameters

Name Type Description
opts
object
id
string
}

Returns

getDevices

(async) getDevices(): Promise.<HomeyAPIV3Cloud.ManagerDevices.Device>

Scopes

homey.device.readonly

HTTP

get /api/manager/devices/device

Returns

getDeviceSettingsObj

(async) getDeviceSettingsObj(opts): Promise.<any>

Scopes

homey.device.readonly

HTTP

get /api/manager/devices/device/:id/settings_obj

Parameters

Name Type Description
opts
object
id
string
}

Returns

Promise.<any>

getState

(async) getState(): Promise.<any>

Scopes

homey.system.readonly

HTTP

get /api/manager/devices/state

Returns

Promise.<any>

isConnected

isConnected(): Boolean

If this manager's namespace is connected to Socket.io.

Returns

Boolean

setCapabilityValue

(async) setCapabilityValue(opts): Promise.<any>

Scopes

homey.device.control

HTTP

put /api/manager/devices/device/:deviceId/capability/:capabilityId

Parameters

Name Type Description
opts
object
capabilityId
string
deviceId
string
value
*
opts
object <optional>
transactionId
string <optional>
}

Returns

Promise.<any>

setDeviceSettings

(async) setDeviceSettings(opts): Promise.<any>

Scopes

homey.device

HTTP

put /api/manager/devices/device/:id/settings

Parameters

Name Type Description
opts
object
id
string
settings
*
}

Returns

Promise.<any>

updateDevice

(async) updateDevice(opts): Promise.<HomeyAPIV3Cloud.ManagerDevices.Device>

Scopes

homey.device

HTTP

put /api/manager/devices/device/:id

Parameters

Name Type Description
opts
object
id
string
device
*
}

Returns

Events

capability.create

.on('capability.create')

Parameters

Name Type Description
capability
HomeyAPIV3Cloud.ManagerDevices.Capability

capability.delete

.on('capability.delete')

Parameters

Name Type Description
capability
HomeyAPIV3Cloud.ManagerDevices.Capability

capability.update

.on('capability.update')

Parameters

Name Type Description
capability
HomeyAPIV3Cloud.ManagerDevices.Capability

device.create

.on('device.create')

Parameters

Name Type Description
device
HomeyAPIV3Cloud.ManagerDevices.Device

device.delete

.on('device.delete')

Parameters

Name Type Description
device
HomeyAPIV3Cloud.ManagerDevices.Device

device.update

.on('device.update')

Parameters

Name Type Description
device
HomeyAPIV3Cloud.ManagerDevices.Device