I’ve got an antique lamp that needs a new switch knob, but then scope-creep happened and now I want to “smartify” it. I started off thinking that, since it has a metal body, I’d install a capacitive touch switch, but now it’s escalated to wanting to put an ESP8266 or ESP32 in it to handle the capacitive sensing, Home Assistant connectivity/control, and maybe even switching to some kind of low-voltage RGBW LED instead of a 120VAC Edison-base bulb (especially since I suspect I’d need some kind of antenna sticking out the top, since the metal lamp body would presumably otherwise block the ESP32’s signal).

The lamp, BTW:

(Apparently it’s a Genie lamp by Laurel Lamp Company, in case anybody cares. Also, the lamp shown is the same model, but it’s not my picture.)

I’m aware that the “easy” way would probably be to just screw a smart light bulb into the socket and wiring I already have, but (a) I’m picky about both avoiding “clouds” and using FOSS firmware, and I don’t feel like sorting through the junk on Amazon to figure out which ones can be flashed with ESPHome, and more practically (b) that wouldn’t let me turn it on and off just by touching the lamp body, which is what sent me down this rabbit-hole in the first place.

Anyway, I know this sort of thing can be done, but I’m not completely sure how. I know I could figure it out myself eventually, but I figured it couldn’t hurt to ask for advice in case somebody happens to be able to rattle off part numbers for the whole BOM off the top of their head, or knows exactly the right ESPHome howto to point me towards, or something like that. Any advice is welcome!

(In case it’s relevant: my level of experience is that I programmed an Arduino to run neopixels (WS2812 RGB addressable LEDs) once, I’ve flashed ESPHome on some Sonoff S31 smart switches, and I’m a software engineer by trade but have never worked on anything IoT related professionally.)

  • v1605@lemmy.world
    link
    fedilink
    English
    arrow-up
    2
    ·
    11 months ago

    I missed the part about switching to RGB LED, but I’m not sure if any products are bright enough to be useful. You are right that if you powered the Shelly with ac, it outputs ac, which goes against your Edison bulb replacement idea. If you can find something that runs on 12v (like a light strip), that case no relay would be needed. You could replace the AC cord with a 12v DC adapter to power the lights and use a cheap 5-30v to 5v buck converter to power the esp32.

    • grue@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      11 months ago

      I’m not sure if any products are bright enough to be useful.

      I mean, the components they put inside smart bulbs have to come from somewhere, right? As far as the LED part goes, I think I’m probably looking for the kinds of things sold by industrial suppliers, not a consumer product.

      Or maybe I should be thinking in terms of taking apart a smart bulb and soldering on extra GPIO…?

      • v1605@lemmy.world
        link
        fedilink
        English
        arrow-up
        2
        ·
        11 months ago

        I would caution going too far down the custom rabbit hole for something like a light bulb, just because you will eventually have to replace it. At that point I would look at a zigbee/zwave lightbulb with a esp32 in the base powered by a AC to DC converter to control the bulb. You would need a stick to control it but the trade off is a much easier replacement later on.

        • grue@lemmy.worldOP
          link
          fedilink
          English
          arrow-up
          2
          ·
          11 months ago

          That is a good point. If I did do something custom, I should probably budget to build some spares. Settling for a smart bulb running ESPHome (and giving up on the touch activation) is also looking better and better.