How to control humidifier pushbutton

Hello, I’m a DIY beginner. I have an inexpensive humidifier with only two buttons. I want to integrate these two buttons with ESP32 and ESPHome into Home Assistant, similar to [Stateful momentary switch with ESPHome](https://Stateful momentary switch with ESPHome), but I’m unsure how to wire them.
Do I need any additional hardware?

There is probably voltage present on those pins. You will need an optocoupler or a relay to connect the ESP to the switch.

https://www.aliexpress.com/item/32952579553.html

They come in single channel and multi channel versions.

Ultimately you’ll have to break out a multimeter and see what you’re dealing with. Hopefully the buttons simply short to ground when pushed, which means you can simulate the same via your ESP.

1 Like

Thank you for your response. It seems I oversimplified things. I’ll look into how to use a relay.

Thanks. Unfortunately, I don’t have a multimeter. I might buy a set later; it looks like it’s a necessary item for learning ESP32.

An inexpensive one would be more than adequate and as you mentioned, honestly is a must-have in your toolbox for these kinds of projects. Have fun diving into this world!

2 Likes

Maybe a SwitchBot will do the trick?

Well two switch bots for two buttons, and clunky as hell, not to mention €30 each.

Yes you need a meter for this sort of stuff.


I received the relay and the multimeter that I purchased. I’ve already tried connecting them to the humidifier, and it works well. Next, I will start learning the methods of soldering and using the multimeter. Thanks again, everyone.

1 Like

Thank you for the advice, but I intend to take this opportunity to delve into DIY with ESP.

1 Like

The moment of successful attempt today was truly joyful. I have purchased a multimeter and identified the power interface of the original humidifier. Next, I will try to split the power supply to the ESP32.

Awesome, glad you’re having fun!