I’ve got a cheap salt lamp with a LED inside and it runs on a 5V wall wart. I think it originally had a USB plug but I cut that off and connected it to an old 5V power supply.

I’ve never used esp32, but I’ve been doing some reading and it seems like an esp32-c6 will allow me to do this with ZigBee.

Does this sound reasonable? Are there other options I should consider?

  • GreatBlueHeron@piefed.caOP
    link
    fedilink
    English
    arrow-up
    1
    arrow-down
    1
    ·
    4 days ago

    I have a bit of an aversion to smart plugs - they seem like a bit of a kludge. I totally understand there are lots of cases where there’s no other option, but I don’t think this is one. I’m also looking to learn about esp32 and I’m just sanity checking that this is a reasonable thing to do with one.

    • IsoKiero@sopuli.xyz
      link
      fedilink
      English
      arrow-up
      2
      ·
      4 days ago

      I’m also looking to learn about esp32 and I’m just sanity checking that this is a reasonable thing to do with one.

      It sure can do what you’re after. Most likely not on it’s own, you’ll need a mosfet or a transistor as esp32 likely can’t handle the current your light uses. There’s plenty of tutorials on how to do the electronics, but cat least you need a mosfet with gate voltage below 5V and a resistor, both are very cheap. Just be careful with the esp32, it’s pretty easy to accidentally kill it with a short circuit or miswire.

      And while you’re at it, esp32 can manage a ton of stuff beyond just blinking an led. You can add light/temperature/movement/whatever sensors, a button to manually toggle the light and whatever else you might think is useful and/or fun to have. It’s pretty much a generic purpose computer after all.