RGB Recessed lighting

I wanted 6 recessed RGB lights for my living room so that I could have Circadian lighting and also movie lighting and party lighting. And also just for fun. I wanted to avoid radio signal control and have Ethernet connection for control.
So I bought a few recessed lights, cracked them open and finally found one that is easy to hack for my purpose. I used a little help from AI along the way to build YAML code and choose the best materials.

What I ended buying was 10 cheap recessed lights from Amazon that were originally intended to be controlled by Alexa via bluetooth.
I snipped the bluetooth module out, solder a USB connector to the light and then use a USB cable to carry Clock, Data and Ground to my ESP32-S3-ETH board.
Here are the hardware steps that took me about 30 minutes to modify 4 lights:


Use a sharp blade tip to pry off light filter.


Remove 2 screws


Unplug lighting disc from power board.


Use a flush cutter to snip solder joints between BT module and power PCB.


Then wiggle and remove BT.


Note the connections and BP5758 LED control chip that our ESP board will be talking to.


Here is a mark where our USB socket PCB will sit. This is area with most clearance.


Drill two 1/4" holes close together for USB.


Solder 2" of 26ga silicone wire to pin connections of lights power PCB and USB PCB:
Black = Gnd ( - ) to G
Red = SDA ( S ) to D+
Yellow = Clk ( C ) to D-


Connect USB cord to protect plug and use Hot glue to hold USB in place to reassembly of light.
Be sure to make sure wire is not pinched by any components during reassembly of lighting disc and power PCB.

Here is the ESP board side of things:

  • Black is GND ( Same as on lights )
  • Yellow is to D+ ( Red used on lights )
  • White is to D- ( Yellow used on lights )

Connections that I used for ESP32-S3-ETH:

bp5758d:
  # Light 1 Hub
  - id: bp5758d_light1
    data_pin: GPIO1   # DATA for Light 1
    clock_pin: GPIO0  # CLK for Light 1

  # Light 2 Hub
  - id: bp5758d_light2
    data_pin: GPIO3   # DATA for Light 2
    clock_pin: GPIO2  # CLK for Light 2

  # Light 3 Hub
  - id: bp5758d_light3
    data_pin: GPIO17    # DATA for Light 3
    clock_pin: GPIO16   # CLK for Light 3

Then the YAML for controls:


# --- Outputs for Light 1 (linked to bp5758d_light1) ---
# Define the 5 outputs
output:
- platform: bp5758d
  id: light1_red
  channel: 5   #3  # Adjust this channel number based on your mapping
  current: 60     # Enter the current you measured in mA (e.g., 60mA)
  bp5758d_id: bp5758d_light1

- platform: bp5758d
  id: light1_green
  channel: 4 #5
  current: 60
  bp5758d_id: bp5758d_light1

- platform: bp5758d
  id: light1_blue
  channel: 3 #4
  current: 60
  bp5758d_id: bp5758d_light1

- platform: bp5758d
  id: light1_cold_white
  channel: 1
  current: 60
  bp5758d_id: bp5758d_light1

- platform: bp5758d
  id: light1_warm_white
    channel: 2
    current: 60
    bp5758d_id: bp5758d_light1



  # --- Outputs for Light 2 (linked to bp5758d_light2) ---# Define the 5 outputs
  - platform: bp5758d
    id: light2_red
    channel: 5   #3  # Adjust this channel number based on your mapping
    current: 60     # Enter the current you measured in mA (e.g., 60mA)
    bp5758d_id: bp5758d_light2

  - platform: bp5758d
    id: light2_green
    channel: 4 #5
    current: 60
    bp5758d_id: bp5758d_light2

  - platform: bp5758d
    id: light2_blue
    channel: 3 #4
    current: 60
    bp5758d_id: bp5758d_light2

  - platform: bp5758d
    id: light2_cold_white
    channel: 1
    current: 60
    bp5758d_id: bp5758d_light2

  - platform: bp5758d
    id: light2_warm_white
    channel: 2
    current: 60
    bp5758d_id: bp5758d_light2



  # --- Outputs for Light 3 (linked to bp5758d_light3) ---# Define the 5 outputs
  - platform: bp5758d
    id: light3_red
    channel: 5   #3  # Adjust this channel number based on your mapping
    current: 60     # Enter the current you measured in mA (e.g., 60mA)
    bp5758d_id: bp5758d_light3

  - platform: bp5758d
    id: light3_green
    channel: 4 #5
    current: 60
    bp5758d_id: bp5758d_light3

  - platform: bp5758d
    id: light3_blue
    channel: 3 #4
    current: 60
    bp5758d_id: bp5758d_light3

  - platform: bp5758d
    id: light3_cold_white
    channel: 1
    current: 60
    bp5758d_id: bp5758d_light3

  - platform: bp5758d
    id: light3_warm_white
    channel: 2
    current: 60
    bp5758d_id: bp5758d_light3



# --- Light Entities (RGBWW) ---
light:
  - platform: rgbww
    name: "Living Light 1"
    id: rgb_light_1
    red: light1_red
    green: light1_green
    blue: light1_blue
    cold_white: light1_cold_white
    warm_white: light1_warm_white
    cold_white_color_temperature: 6500 K
    warm_white_color_temperature: 2700 K
    color_interlock: true       # Prevents weird behavior with RGB+White

  - platform: rgbww
    name: "Living Light 2"
    id: rgb_light_2
    red: light2_red
    green: light2_green
    blue: light2_blue
    cold_white: light2_cold_white
    warm_white: light2_warm_white
    cold_white_color_temperature: 6500 K
    warm_white_color_temperature: 2700 K
    color_interlock: true

  - platform: rgbww
    name: "Living Light 3"
    id: rgb_light_3
    red: light3_red
    green: light3_green
    blue: light3_blue
    cold_white: light3_cold_white
    warm_white: light3_warm_white
    cold_white_color_temperature: 6500 K
    warm_white_color_temperature: 2700 K
    color_interlock: true