You are currently viewing the Homey Apps SDK v2 documentation. New apps should use Homey Apps SDK v3 ››

Homey.LedringAnimationSystem

const { LedringAnimationSystem } = require('homey');

This class contains a system animation that can be played on Homey's LED Ring.

Table of Contents

Constructor

new Homey.LedringAnimationSystem(systemId, opts)

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.

Extends

Methods

register(callbackopt) → {Promise}

Register the animation. This is a shorthand method to ManagerLedring#registerAnimation.

Overrides:
Parameters:
Name Type Attributes Description
callback function <optional>
Name Type Description
err Error
animation LedringAnimation
Returns:
Type:
Promise

registerScreensaver(screensaverName, callbackopt) → {Promise}

Register this animation as a screensaver. This is a shorthand method to ManagerLedring#registerScreensaver.

Overrides:
Parameters:
Name Type Attributes Description
screensaverName String

The name of the screensaver, as defined in /app.json

callback genericCallbackFunction <optional>
Returns:
Type:
Promise

start(callbackopt) → {Promise}

Start the animation.

Overrides:
Parameters:
Name Type Attributes Description
callback genericCallbackFunction <optional>
Returns:
Type:
Promise

stop(callbackopt) → {Promise}

Stop the animation.

Overrides:
Parameters:
Name Type Attributes Description
callback genericCallbackFunction <optional>
Returns:
Type:
Promise

unregister(callbackopt) → {Promise}

Unregister the animation. This is a shorthand method to ManagerLedring#unregisterAnimation.

Overrides:
Parameters:
Name Type Attributes Description
callback function <optional>
Name Type Description
err Error
animation LedringAnimation
Returns:
Type:
Promise

unregisterScreensaver(screensaverName, callbackopt) → {Promise}

Unregister this animation as a screensaver. This is a shorthand method to ManagerLedring#unregisterScreensaver.

Overrides:
Parameters:
Name Type Attributes Description
screensaverName String

The name of the screensaver, as defined in /app.json

callback genericCallbackFunction <optional>
Returns:
Type:
Promise

updateFrames(frames, callbackopt) → {Promise}

Update the animation frames.

Overrides:
Parameters:
Name Type Attributes Description
frames Array
callback genericCallbackFunction <optional>
Returns:
Type:
Promise

Events

.on('finish')

When the animation has finished (duration has been reached)

Overrides:

.on('start')

When the animation has started

Overrides:

.on('stop')

When the animation has stopped

Overrides: