ManagerLedring

You can access this manager through the Homey instance as this.homey.ledring

Table of Contents

Methods

(async) createAnimation(opts) → {Promise.<LedringAnimation>}

Requires the homey:manager:ledring permission. For more information about permissions read the Permissions tutorial.

Parameters:
Name Type Description
opts object
Name Type Description
frames Array.<LedringAnimation.Frame>

An array of frames. A frame is an Array of 24 objects with a r, g and b property, which are numbers between 0 and 255.

priority string

How high the animation will have on the priority stack. Can be either INFORMATIVE, FEEDBACK or CRITICAL.

transition number

Transition time (in ms) how fast to fade the information in. Defaults to 300.

duration number | Boolean

Duration (in ms) how long the animation should be shown. Defaults to false. false is required for screensavers.

options object
Name Type Description
fps number

Frames per second

tfps number

Target frames per second (must be divisible by fps)

rpm number

Rotations per minute

Returns:
Type:
Promise.<LedringAnimation>

(async) createProgressAnimation(opts)

Requires the homey:manager:ledring permission. For more information about permissions read the Permissions tutorial.

Parameters:
Name Type Description
opts object
Name Type Description
priority string

How high the animation will have on the priority stack. Can be either INFORMATIVE, FEEDBACK or CRITICAL.

options object
Name Type Default Description
color string #0092ff

A HEX string

(async) createSystemAnimation(systemId, opts) → {Promise.<LedringAnimation>}

Requires the homey:manager:ledring permission. For more information about permissions read the Permissions tutorial.

Parameters:
Name Type Description
systemId string

The system animation's ID. Can be either colorwipe, loading, off, progress, pulse, rainbow, rgb or solid.

opts object
Name Type Description
priority string

How high the animation will have on the priority stack. Can be either INFORMATIVE, FEEDBACK or CRITICAL.

duration number | boolean

Duration (in ms) how long the animation should be shown. Defaults to false. false is required for screensavers.

Returns:
Type:
Promise.<LedringAnimation>

(async) registerAnimation(animation) → {Promise.<LedringAnimation>}

Register a LED Ring animation.

Requires the homey:manager:ledring permission. For more information about permissions read the Permissions tutorial.

Parameters:
Name Type Description
animation LedringAnimation
Returns:
Type:
Promise.<LedringAnimation>

(async) registerScreensaver(name, animation) → {Promise.<any>}

Register a LED Ring screensaver.

Requires the homey:manager:ledring permission. For more information about permissions read the Permissions tutorial.

Parameters:
Name Type Description
name string

Name of the animation as defined in your app's app.json.

animation LedringAnimation
Returns:
Type:
Promise.<any>

(async) unregisterAnimation(animation) → {Promise.<LedringAnimation>}

Unregister a LED Ring animation.

Requires the homey:manager:ledring permission. For more information about permissions read the Permissions tutorial.

Parameters:
Name Type Description
animation LedringAnimation
Returns:
Type:
Promise.<LedringAnimation>

(async) unregisterScreensaver(name, animation) → {Promise.<any>}

Unregister a LED Ring screensaver.

Requires the homey:manager:ledring permission. For more information about permissions read the Permissions tutorial.

Parameters:
Name Type Description
name string

Name of the animation as defined in your app's app.json.

animation LedringAnimation
Returns:
Type:
Promise.<any>