this post was submitted on 29 Dec 2025
21 points (95.7% liked)

Home Automation

1038 readers
1 users here now

Home Automation, smart home, and related topics.

founded 2 years ago
MODERATORS
 

I felt my diffuser's timer was too basic - needing to be manually turned on, then manually turned off by repeatedly pressing a button. So I connected an ESP8266 to the momentary switch, added some very simple ESPHome code, and now I have a diffuser that can operate for a few minutes at a time, or from any automation in Home Assistant that can be dreamed of.

I love that it's so easy to do this even to quite dumb devices. It turns something that was staying in a drawer and not being used into something that is now genuinely useful in providing a nicer space for my family.

EDIT: Sorry, seems the link didn't make it into the subject, so here's the full step by step https://digdilem.org/home-automation/smarter-diffuser/

you are viewing a single comment's thread
view the rest of the comments
[–] wizzor@sopuli.xyz 5 points 3 days ago (1 children)

How did you connect the esp board to the momentary switch?

[–] digdilem@lemmy.ml 3 points 3 days ago (1 children)

Sorry - looks like I forgot to include the link to the step by step I wrote about the thing, daft of me.

Anyway, soldering onto the back of the momentary switch PCB - here's the guide with pics too https://digdilem.org/home-automation/smarter-diffuser/

[–] wizzor@sopuli.xyz 1 points 2 days ago (1 children)

Hmm, so if I'm understanding you correctly, you are pulling a normally high pin low with the GPIO pin? And by connecting the ground pins you ensure that both grounds are the same? Sorry for the basic questions, I am a beginner.

One of the images showing the PCB wasn't working for me.

[–] digdilem@lemmy.ml 1 points 1 day ago

It's just using the ESP to close a NO (normally open) circuit to closed, effectively shorting those two in the same way the momentary switch would. The code causes the ESP to create that short between its GND and the GPIO D5, thus closing the switch.

If this was using any significant amount of current, you'd add a relay in there as the ESP can only handle a tiny amount in this configuration - but for small PCB loads like this, it's normally fine.

One of the images showing the PCB wasn’t working for me.

Oops - looks like I missed a file extension off. Fixed now, thanks.