So you're a Noob? Post your questions here until you graduate! Don't be shy.

User avatar
By carthapango
#94652 Hi! I have an ESP8266 NodeMCU dev board and five reed switches. I would like to be able to detect when each of them may be disconnected (got a normally open one, default position is magnet next to reed switch.)

From what I can gather online, it looks like people like to use external resistors to connect the reed switch to their board, but I also read that several GPIOs on this board has internal pullup resistors.

My questions are:
- which GPIO pins should I use as INPUT_PULLUP for the five reed switches;
- how should I wire them up -- if I need an external resistor per switch, how much should I use?
- lastly, has anyone tried something like this but using ESPHome with Homeassistant?

Thank you so much and sorry for my noob question!
User avatar
By tepalia02
#94773 You can use any digital pin. For example, in this tutorial
they have connected the reed switch to D0 pin. You can connect five switches to 5 digital pins in a similar way. They have used 10K resistor. And yes, you can integrate your project with ESPHome. I think the video will give you a proper guideline. And in case you need a proteus library for the Reed Switch, here it is: ... oteus.html