Dumb IR Curtain Lights Smart

Hi all, I have some curtain lights that used to be controlled by a broadlink, but one of the wires ripped off the controller so I figured I’d use this opportunity to replace it with an esp32. I need some help figuring out which platform and pins to use to get this to work though.

Here’s front and back of the original controller, and this is powered by a usb port. 2 wires come into the controller, 2 wires go out to the lights.


I don’t really need the buttons anymore so I’m not worried about them, just need to know how to get these lights to light up and be a dimmer.

Hi

Are you doing this as a learning project? Only reason for asking is by the time you have done you could probably have bought something ready made e.g. a single channel Zigbee controller.

If you want to try as a bit of a learning experience then you will need a mosfet to drive the LEDs, the existing board has one bottom left QR and R3. You may be able to drive this with an ESP and even use the buttons but it would be a bit messy. There are plenty of examples on the internet of driving LED strips with a mosfet and if you use the output component with the monochromatic light you can drive the brightness, links below. Personally I’d just buy a Zigbee or matter controller.

Honestly I’ve set up a bunch of other led strips through esphome and figured this would be very similar. Those used the ledc platform, but this one doesn’t have rgb. I’m just looking to control brightness. The problem is I’m not sure which pins to hook up or which platform to use for something like this. Do I just push 3.3 and ground through it, or do I have to use a GPIO? The links you sent are confusing because I don’t know what float I would use.

Edit: reading some more it looks like this might do what I want, but how do I tie thr output to a specific gpio pin?

You need a driver, transistor, mosfet or constant current driver. Depends on your LEDs. Do you have some specs?

I don’t unfortunately, all I have is that it runs off 5v usb and that board I sent pics of.

Foto of the LED? Output voltage of the board at max brightness?

You could try something like below, the GPIO you use will depend on the ESP you use, you will still need something to drive the LED’s with. Below is for an ESP32.

output:
  - platform: ledc
    pin: GPIO27
    id: gpio_output

# Example usage in a light
light:
  - platform: monochromatic
    output: gpio_output
    name: "Curtain Light"

If you want to use an 8266 try

output:
  - platform: esp8266_pwm
    pin: GPIOXX
    frequency: 1000 Hz
    id: pwm_output

# Example usage in a light
light:
  - platform: monochromatic
    output: pwm_output
    name: "Curtain Light"