Hey all,
Does anyone have the ESPHome config for the KSHE14LEDRA bulb?
Thanks
Hey all,
Does anyone have the ESPHome config for the KSHE14LEDRA bulb?
Thanks
There’s a Tasmota template here you can get the GPIOs from:
Thanks mate!
I do have that curently set up with Tasmota, but first thing is, how do I translate it to ESPHome and second, the W seems to be missing, it seems to be only RGB mixed.
Any thoughts
There are four PWM channels listed in the template, GPIO4,5,12 and 14. I suspect that will be R,G,B and W (not necessarily in that order).
Board type:
esphome:
name: "Your device name here"
platform: ESP8266
board: esp8285
Start by creating four PWM outputs. One for each of the GPIOs.
Working out which output is R, G, B, and W is the fun part.
Create four monochromatic lights named after the four PWM GPIOs and upload your config.
Add the device to Home Assistant and play around with the monochromatic lights to work out the mapping from GPIOs to RGBW. One you know which GPIO controls which LED go back to ESPHome.
Delete the monochromatic lights.
Then create an RGBW light from the PWM outputs.
Thanks mate, you’re always good with the info!
It actually looks like that tasmota template is wrong for this model.
Hopefully this will help someone, with these settings I got the white to work corectly.
Lets see if I can translate to ESP based of what you have given me and some other lights ive already done.
Ill post the config when I have it worked out
Ok,
So this is what worked for me in the end, might help someone. This works for both the E14 and E22 Kogan lights I tested. Still some issues though, which ill get to.
I have also added a preset that I use at parties, feel free to remove the effect of course.
light:
- platform: rgbw
name: ${friendly_name}
id: hall_light_1
red: pwm_r
green: pwm_g
blue: pwm_b
white: pwm_w
effects:
- lambda:
name: Breathing Red
update_interval: 16s #Finetune to your liking with the transition lenght below
lambda: |-
#define Color1 1.0, 0.0, 0.0 //These are the colors defined, feel free to change or extend the list
//if you extend the list, dont forget to add them in the switch loop below
//and remember to adjust the reset counter at the bottom
static int state = 0;
static int color = 1;
auto call = id(hall_light_1).turn_on(); //put the id for your light in here
call.set_transition_length(15000);
if (state == 0)
{
call.set_brightness(0.01);
}
else if (state == 1)
{
call.set_rgb(Color1);
call.set_brightness(1.0);
}
state ++;
if (state == 2){
state = 0;
}
call.perform();
output:
- platform: esp8266_pwm
pin: GPIO4
frequency: 1000 Hz
id: pwm_r
- platform: esp8266_pwm
pin: GPIO12
frequency: 1000 Hz
id: pwm_g
- platform: esp8266_pwm
pin: GPIO14
frequency: 1000 Hz
id: pwm_b
- platform: esp8266_pwm
pin: GPIO5
frequency: 1000 Hz
id: pwm_w
The issue is, I think, this config is too simple to deal with both the RGB and the CCT part of the light.
You cant have individual control though Alexa say of turning off the white if you ask for red.
Also I cant seem to change the colour temp.
Ive looked though the doco, but seems to be nothing for RGB+CCT so not sure about that one.