2019-02-27 10:10:09 +01:00
FastLED Light
=============
2018-05-14 21:15:49 +02:00
2018-11-14 22:12:27 +01:00
.. seo ::
2019-01-06 18:56:14 +01:00
:description: Instructions for setting up FastLED addressable lights like NEOPIXEL.
2021-11-16 03:19:33 +01:00
:image: color_lens.svg
2018-11-14 22:12:27 +01:00
2022-02-14 23:58:10 +01:00
.. warning ::
FastLED does **not** work as expected with Arduino 3 or newer for ESP8266. For now, you can either downgrade the arduino version or use :doc: `neopixelbus` .
.. code-block :: yaml
esp8266:
framework:
version: 2.7.4
See these related issues:
- https://github.com/FastLED/FastLED/issues/1322
- https://github.com/FastLED/FastLED/issues/1264
2023-06-14 08:42:23 +02:00
.. warning ::
FastLED does **not** work with ESP-IDF.
2023-09-11 04:20:15 +02:00
For addressable lights, you can use :doc: `esp32_rmt_led_strip` or for SPI LEDs see :doc: `spi_led_strip` ..
2023-06-14 08:42:23 +02:00
2019-02-27 10:10:09 +01:00
.. _fastled-clockless:
Clockless
---------
2018-05-14 21:15:49 +02:00
The `` fastled_clockless `` light platform allows you to create RGB lights
2019-02-16 23:25:23 +01:00
in ESPHome for a :ref: `number of supported chipsets <fastled_clockless-chipsets>` .
2018-05-14 21:15:49 +02:00
Clockless FastLED lights differ from the
2019-02-27 10:10:09 +01:00
:ref: `fastled-spi` in that they only have a single data wire to connect, and not separate data and clock wires.
2018-05-14 21:15:49 +02:00
2018-06-01 18:10:00 +02:00
.. figure :: images/fastled_clockless-ui.png
:align: center
:width: 60.0%
2018-05-14 21:15:49 +02:00
2018-11-19 18:32:16 +01:00
.. code-block :: yaml
2018-05-14 21:15:49 +02:00
# Example configuration entry
light:
- platform: fastled_clockless
chipset: WS2811
2024-05-07 07:40:12 +02:00
pin: GPIOXX
2018-05-14 21:15:49 +02:00
num_leds: 60
rgb_order: BRG
name: "FastLED WS2811 Light"
Configuration variables:
2019-02-27 10:10:09 +01:00
***** ***** ***** ***** *** *
2018-05-14 21:15:49 +02:00
2018-06-01 18:10:00 +02:00
- **name** (**Required** , string): The name of the light.
- **chipset** (**Required** , string): Set a chipset to use.
See :ref: `fastled_clockless-chipsets` for options.
- **pin** (**Required** , :ref: `config-pin` ): The pin for the data line of the FastLED light.
- **num_leds** (**Required** , int): The number of LEDs attached.
- **rgb_order** (*Optional* , string): The order of the RGB channels. Use this if your
light doesn't seem to map the RGB light channels correctly. For example if your light
shows up green when you set a red color through the frontend. Valid values are `` RGB `` ,
`` RBG `` , `` GRB `` , `` GBR `` , `` BRG `` and `` BGR `` . Defaults to `` RGB `` .
- **max_refresh_rate** (*Optional* , :ref: `config-time` ):
A time interval used to limit the number of commands a light can handle per second. For example
16ms will limit the light to a refresh rate of about 60Hz. Defaults to the default value for the used chipset.
2018-08-22 22:05:28 +02:00
- **effects** (*Optional* , list): A list of :ref: `light effects <light-effects>` to use for this light.
2018-06-01 18:10:00 +02:00
- **id** (*Optional* , :ref: `config-id` ): Manually specify the ID used for code generation.
2019-05-12 22:44:59 +02:00
- All other options from :ref: `Light <config-light>` .
2018-06-01 18:10:00 +02:00
.. _fastled_clockless-chipsets:
2018-05-14 21:15:49 +02:00
Supported Chipsets
2019-02-27 10:10:09 +01:00
***** ***** ***** ***
2018-05-14 21:15:49 +02:00
2018-06-01 18:10:00 +02:00
- `` NEOPIXEL ``
- `` WS2811 ``
- `` WS2811_400 `` (`` WS2811 `` with a clock rate of 400kHz)
- `` WS2812B ``
- `` WS2812 ``
- `` WS2813 ``
- `` WS2852 ``
- `` APA104 ``
- `` APA106 ``
- `` GW6205 ``
- `` GW6205_400 `` (`` GW6205 `` with a clock rate of 400kHz)
- `` LPD1886 ``
- `` LPD1886_8BIT `` (`` LPD1886 `` with 8-bit color channel values)
- `` PL9823 ``
- `` SK6812 ``
- `` SK6822 ``
- `` TM1803 ``
- `` TM1804 ``
- `` TM1809 ``
- `` TM1829 ``
- `` UCS1903B ``
- `` UCS1903 ``
- `` UCS1904 ``
- `` UCS2903 ``
2021-08-03 16:57:51 +02:00
- `` SM16703 ``
2018-05-14 21:15:49 +02:00
2019-02-27 10:10:09 +01:00
.. _fastled-spi:
SPI
---
The `` fastled_spi `` light platform allows you to create RGB lights
in ESPHome for a :ref: `number of supported chipsets <fastled_spi-chipsets>` .
2023-09-11 04:20:15 +02:00
See :doc: `/components/light/spi_led_strip` for an alternative component that works on ESP-IDF (and Arduino.)
2019-02-27 10:10:09 +01:00
SPI FastLED lights differ from the
:ref: `fastled-clockless` in that they require two pins to be connected, one for a data and one for a clock signal
whereas the clockless lights only need a single pin.
.. figure :: images/fastled_spi-ui.png
:align: center
:width: 60.0%
.. code-block :: yaml
# Example configuration entry
light:
- platform: fastled_spi
chipset: WS2801
2024-05-07 07:40:12 +02:00
data_pin: GPIOXX
clock_pin: GPIOXX
2019-02-27 10:10:09 +01:00
num_leds: 60
rgb_order: BRG
name: "FastLED SPI Light"
Configuration variables:
***** ***** ***** ***** *** *
- **name** (**Required** , string): The name of the light.
- **chipset** (**Required** , string): Set a chipset to use. See :ref: `fastled_spi-chipsets` for options.
- **data_pin** (**Required** , :ref: `config-pin` ): The pin for the data line of the FastLED light.
- **clock_pin** (**Required** , :ref: `config-pin` ): The pin for the clock line of the FastLED light.
- **num_leds** (**Required** , int): The number of LEDs attached.
- **rgb_order** (*Optional* , string): The order of the RGB channels. Use this if your
light doesn't seem to map the RGB light channels correctly. For example if your light
shows up green when you set a red color through the frontend. Valid values are `` RGB `` ,
`` RBG `` , `` GRB `` , `` GBR `` , `` BRG `` and `` BGR `` . Defaults to `` RGB `` .
- **max_refresh_rate** (*Optional* , :ref: `config-time` ):
A time interval used to limit the number of commands a light can handle per second. For example
16ms will limit the light to a refresh rate of about 60Hz. Defaults to the default value for the used chipset.
2022-02-14 23:58:10 +01:00
- **data_rate** (*Optional* , frequency): The data rate to use for shifting data to the light. Can help if you
2020-11-01 19:45:36 +01:00
have long cables or slow level-shifters.
2019-02-27 10:10:09 +01:00
- **effects** (*Optional* , list): A list of :ref: `light effects <light-effects>` to use for this light.
- **id** (*Optional* , :ref: `config-id` ): Manually specify the ID used for code generation.
2019-05-12 22:44:59 +02:00
- All other options from :ref: `Light <config-light>` .
2019-02-27 10:10:09 +01:00
.. _fastled_spi-chipsets:
Supported Chipsets
***** ***** ***** ***
- `` APA102 ``
- `` DOTSTAR ``
- `` LPD8806 ``
- `` P9813 ``
- `` SK9822 ``
- `` SM16716 ``
- `` WS2801 ``
- `` WS2803 ``
2018-06-01 18:10:00 +02:00
See Also
2018-08-24 22:44:01 +02:00
--------
2018-05-14 21:15:49 +02:00
2019-02-07 13:54:45 +01:00
- :doc: `/components/light/index`
2023-09-11 04:20:15 +02:00
- :doc: `/components/light/spi_led_strip`
2019-02-07 13:54:45 +01:00
- :doc: `/components/power_supply`
2019-05-12 22:44:59 +02:00
- :apiref: `fastled_base/fastled_light.h`
2018-08-24 22:44:01 +02:00
- `Arduino FastLED library <https://github.com/FastLED/FastLED> `__
2019-02-07 13:54:45 +01:00
- :ghedit: `Edit`