LED
The LED module provides an interface to control WS2812 and similar LEDs using custom Animations.
Don’t forget to install the requirements
You will only need to install requirements for the output method you are using.
Supported Outputs
Paths
Array IDs are used as the nodes in this module, giving paths like
{array-id}/{property-id}
.
Path |
Description |
---|---|
|
The number of pixels in the array will be published
here with |
|
The number of LED chips per pixel will be published
here with |
|
The name of the currently running animation will be published here. An empty message will be published if no animation is running. |
|
See Triggering for details on running animations. |
Configuration
Optional settings are commented out with default values shown.
led:
#anim dir: []
#anim startup: 'test.array'
array-id:
output: ''
#name: '{array_id}'
count:
#leds per pixel: 1
#brightness: 255
#color order: '{default}'
#anim fps: 60
Module Settings
Option |
Description |
---|---|
|
A directory or list of directories to look for
custom animations in. These will be searched for
animations as well as the default directory
Optional. |
|
The name of an animation to play when MQTTany loads.
By default it will play the array test animation,
for production you will probably want to change this
to Optional, default |
Array Definition
Array configuration section names must be unique throughout the config file as they
are used as node IDs. Node IDs can only contain lowercase letters a-z
, numbers
0-9
, and hyphens -
. The following settings are for array definitions:
Option |
Description |
---|---|
|
Output method to send LED data with, see Supported Outputs for available options. |
|
Friendly name for the array.
Optional, default |
|
Number of pixels in the array. |
|
How many LED chips make up each ‘pixel’. This allows you to have an array with multiple LEDs being treated as a single pixel, Ex. a bulb with several LEDs that you want to address as a single pixel. An example: You have 10 bulbs with 3 LEDs each, set
Optional, default |
|
Initial brightness for the array, can be in the range 0-255. Optional, default |
|
The order in which color information should be sent to the LEDs. If you aren’t sure what your color order is and the default is incorrect, see the test.order animation for how to determine the correct order for your LEDs. Optional, default |
|
Frame rate used by the built-in animations. You may need to reduce this value if you see log entries indicating frames were skipped. This is made available to animations as the global variable
Optional, default |