LED Ring

Homey's LED ring consists of 24 RGB LED's that apps can control and supply new animations for.

Your app may control Homey's LED Ring to give visual feedback when your app is doing something. It is also possible to take control of the LED Ring when Homey is idling, this is called a screensaver.

In order to access the LED Ring your app will need the homey:manager:ledring permission. For more information about permissions read the Permissions guide.

Playing a LED Ring animation

To keep the user interaction of Homey consistent, you can play a system-provided animation.

/app.js
const Homey = require('homey');

class App extends Homey.App {
  async onInit() {
    const pulseAnimation = await this.homey.ledring.createSystemAnimation("pulse");
    await pulseAnimation.start();
  }
}

module.exports = App;

Creating your own LED Ring animation

An animation is essentially a JavaScript object with frames and settings about the frame speed and rotation speed.

The animation object is an Array, which contains frames. A frame is an Array with 24 Object values, that represent the color of that pixel. The pixel object is contains the properties r, g and b, respectively red, green and blue on a scale of 0 - 255.

For example, to create a spinning red dot:

Screensaver

Your app can register a screensaver, which can be chosen by going to Settings β†’ LED Ring, and executed when Homey is idling.

Define your screensaver(s) in your App Manifest as follows:

And from within your app, register your animation instance as follows:

For live animations, simply update your animation using LedringAnimation#updateFrames() when needed.

Last updated

Was this helpful?