SM2135 LED driver¶
Component/Hub¶
The SM2135 component represents a SM2135 LED driver chain (SM2135 description, SM2135 description) in ESPHome. Communication is done with two GPIO pins (MOSI and SCLK). It is used in some smart light bulbs:
Calex Smart RGB Reflector LED lamp (GU10)
LSC Smart GU10
To use the channels of this components, you first need to setup the
global sm2135
hub and give it an id, and then define the
individual output channels.
# Example configuration entry
sm2135:
data_pin: GPIOXX
clock_pin: GPIOXX
Configuration variables:¶
data_pin (Required, Pin Schema): The pin used for MOSI.
clock_pin (Required, Pin Schema): The pin which SCLK is connected to.
id (Optional, ID): The id to use for this
sm2135
component. Use this if you have multiple SM2135 chains connected at the same time.cw_current (Optional, current): The current used for the white channel. Defaults to
10mA
. Can be one of10mA
,15mA
,20mA
,25mA
,30mA
,35mA
,40mA
,45mA
,50mA
,55mA
,60mA
.rgb_current (Optional, current): The current used for the RGB channel. Defaults to
20mA
. Can be one of10mA
,15mA
,20mA
,25mA
,30mA
,35mA
,40mA
,45mA
.separate_modes (Optional, bool): Use separate RGB/CW modes instead of writing all 5 values as RGB. Defaults to
true
, keep it attrue
if your SM2135 chip variant does not support simultaneous CW and RGB modes (e.g. SM2135E). Set this tofalse
when your SM2135 chip variant supports having CW and RGB leds on at the same time (e.g. SM2135EH/SM2135EJ).
Output¶
The SM2135 output component exposes a SM2135 channel of a global Component/Hub as a float output.
# Individual outputs
output:
- platform: sm2135
id: output_red
channel: 0
max_power: 0.8
- platform: sm2135
id: output_green
channel: 1
max_power: 0.8
- platform: sm2135
id: output_blue
channel: 2
max_power: 0.8
- platform: sm2135
id: output_white
channel: 3
max_power: 0.8
- platform: sm2135
id: output_warmwhite
channel: 4
max_power: 0.8
Configuration variables:¶
id (Required, ID): The id to use for this output component.
channel (Required, int): Chose the channel of the SM2135 chain of this output component.
sm2135_id (Optional, ID): Manually specify the ID of the Component/Hub. Use this if you have multiple SM2135 chains you want to use at the same time.
All other options from Output.
Note
The white LEDs are much brighter than the color LEDs. To get uniform brightness for both color and white you will need to limit the white led power.
Warning
Setting to high currents (either RGB, CW or both) could damage your bulb.
Note
This driver does not support enabling of both the color and the white channels at the same time. Therefore, the Color Interlock should be set to true when using this driver.