2018-05-14 21:15:49 +02:00
|
|
|
FastLED SPI Light
|
|
|
|
=================
|
|
|
|
|
2018-11-14 22:12:27 +01:00
|
|
|
.. seo::
|
|
|
|
:description: Instructions for setting up other FastLED addressable lights.
|
2018-11-19 18:32:16 +01:00
|
|
|
:image: color_lens.png
|
2018-11-14 22:12:27 +01:00
|
|
|
|
2018-05-14 21:15:49 +02:00
|
|
|
The ``fastled_spi`` 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_spi-chipsets>`.
|
2018-05-14 21:15:49 +02:00
|
|
|
|
|
|
|
SPI FastLED lights differ from the
|
2018-06-01 18:10:00 +02:00
|
|
|
:doc:`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.
|
2018-05-14 21:15:49 +02:00
|
|
|
|
2018-06-01 18:10:00 +02:00
|
|
|
.. figure:: images/fastled_spi-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_spi
|
|
|
|
chipset: WS2801
|
|
|
|
data_pin: GPIO23
|
|
|
|
clock_pin: GPIO22
|
|
|
|
num_leds: 60
|
|
|
|
rgb_order: BRG
|
|
|
|
name: "FastLED SPI Light"
|
|
|
|
|
|
|
|
Configuration variables:
|
2018-08-24 22:44:01 +02: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_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.
|
|
|
|
- **gamma_correct** (*Optional*, float): The `gamma correction
|
|
|
|
factor <https://en.wikipedia.org/wiki/Gamma_correction>`__ for the light. Defaults to ``2.8``.
|
2018-10-20 12:56:58 +02:00
|
|
|
- **color_correct** (*Optional*, list of percentages): The color correction for each channel. This denotes
|
|
|
|
the maximum brightness of the red, green and blue channel. Defaults to ``color_correct: [100%, 100%, 100%]``.
|
2018-06-01 18:10:00 +02:00
|
|
|
- **default_transition_length** (*Optional*, :ref:`config-time`): The length of
|
|
|
|
the transition if no transition parameter is provided by Home Assistant. Defaults to ``1s``.
|
2019-02-07 13:54:45 +01:00
|
|
|
- **power_supply** (*Optional*, :ref:`config-id`): The :doc:`/components/power_supply` to connect to
|
2018-06-01 18:10:00 +02:00
|
|
|
this light. When the light is turned on, the power supply will automatically be switched on too.
|
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.
|
|
|
|
- All other options from :ref:`MQTT Component <config-mqtt-component>`.
|
|
|
|
|
|
|
|
.. _fastled_spi-chipsets:
|
2018-05-14 21:15:49 +02:00
|
|
|
|
|
|
|
Supported Chipsets
|
2018-08-24 22:44:01 +02:00
|
|
|
------------------
|
2018-05-14 21:15:49 +02:00
|
|
|
|
2018-06-01 18:10:00 +02:00
|
|
|
- ``APA102``
|
|
|
|
- ``DOTSTAR``
|
|
|
|
- ``LPD8806``
|
|
|
|
- ``P9813``
|
|
|
|
- ``SK9822``
|
|
|
|
- ``SM16716``
|
|
|
|
- ``WS2801``
|
|
|
|
- ``WS2803``
|
2018-05-14 21:15:49 +02:00
|
|
|
|
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`
|
|
|
|
- :doc:`/components/light/fastled_clockless`
|
|
|
|
- :doc:`/components/power_supply`
|
|
|
|
- :apiref:`light/fast_led_light_output.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`
|
2018-10-12 16:33:22 +02:00
|
|
|
|
|
|
|
.. disqus::
|