HomeyAPI~ManagerDevices

Since:
  • 1.0.0

Methods

async getDevices(optsopt) → {Object.<string, HomeyAPI.ManagerDevices.Device>}

Required OAuth scopes:
- homey.device.readonly

Parameters:
Name Type Attributes Description
opts object <optional>
Named parameters
Properties
Name Type Attributes Description
filter HomeyAPI.ManagerDevices.Device <optional>
A response filter (Using a filter will bypass all caches, use sparingely)
Returns:
Object.<string, HomeyAPI.ManagerDevices.Device> - Successful response

async getDevice(optsopt) → {HomeyAPI.ManagerDevices.Device}

Required OAuth scopes:
- homey.device.readonly

Parameters:
Name Type Attributes Description
opts object <optional>
Named parameters
Properties
Name Type Description
id string
Returns:
HomeyAPI.ManagerDevices.Device - Successful response

async updateDevice(optsopt) → {HomeyAPI.ManagerDevices.Device}

Required OAuth scopes:
- homey.device

Parameters:
Name Type Attributes Description
opts object <optional>
Named parameters
Properties
Name Type Description
id string
device HomeyAPI.ManagerDevices.Device
Returns:
HomeyAPI.ManagerDevices.Device - Successful response

async deleteDevice(optsopt)

Required OAuth scopes:
- homey.device

Parameters:
Name Type Attributes Description
opts object <optional>
Named parameters
Properties
Name Type Description
id string

async setCapabilityValue(optsopt) → {object}

Required OAuth scopes:
- homey.device.control

Parameters:
Name Type Attributes Description
opts object <optional>
Named parameters
Properties
Name Type Attributes Description
deviceId string
capabilityId string
value object
opts object <optional>
transactionId string <optional>
Returns:
object - Successful response

async getDeviceSettingsObj(optsopt)

Required OAuth scopes:
- homey.device.readonly

Parameters:
Name Type Attributes Description
opts object <optional>
Named parameters
Properties
Name Type Description
id string

async setDeviceSettings(optsopt) → {object}

Required OAuth scopes:
- homey.device

Parameters:
Name Type Attributes Description
opts object <optional>
Named parameters
Properties
Name Type Description
id string
settings object
Returns:
object - returns an object containing the actual changed settings and an optional message

async getCapabilities(optsopt) → {Array.<HomeyAPI.ManagerDevices.Capability>}

Required OAuth scopes:
- homey.device.readonly

Parameters:
Name Type Attributes Description
opts object <optional>
Named parameters
Properties
Name Type Attributes Description
filter HomeyAPI.ManagerDevices.Capability <optional>
A response filter (Using a filter will bypass all caches, use sparingely)
Returns:
Array.<HomeyAPI.ManagerDevices.Capability> - Successful response

async getCapability(optsopt) → {HomeyAPI.ManagerDevices.Capability}

Required OAuth scopes:
- homey.device.readonly

Parameters:
Name Type Attributes Description
opts object <optional>
Named parameters
Properties
Name Type Description
uri string
id string
Returns:
HomeyAPI.ManagerDevices.Capability - Successful response

destroy()

Unsubscribes to realtime events, clear all caches, and remove all event listeners for this manager and it's managed objects

Events

device.create

Fired when a managed Device is created
Parameters:
Name Type Description
device HomeyAPI.ManagerDevices.Device The affected Device

device.update

Fired when a managed Device is changed
Parameters:
Name Type Description
device HomeyAPI.ManagerDevices.Device The affected Device

device.delete

Fired when a managed Device has been deleted
Parameters:
Name Type Description
device HomeyAPI.ManagerDevices.Device The affected Device

capability.create

Fired when a managed Capability is created
Parameters:
Name Type Description
capability HomeyAPI.ManagerDevices.Capability The affected Capability

capability.update

Fired when a managed Capability is changed
Parameters:
Name Type Description
capability HomeyAPI.ManagerDevices.Capability The affected Capability

capability.delete

Fired when a managed Capability has been deleted
Parameters:
Name Type Description
capability HomeyAPI.ManagerDevices.Capability The affected Capability

Classes

Error

Device

Capability