Correct, connect one side of every reed switch the the negative on the 12V power supply. Connect the other wire from each reed switch to a separate negative input on the 12v side of the opto. You need to “daisy chain” the positive from the power supply to each positive input on the 12v side of the opto
I’m very new to this and trying to get my head around it. At the moment I have my ESP32-WROOM plugged in via USB, I have one end of my reed to the GPIO pin and the other to GND. In the code pull-up = true. This works fine in HA, and I can add a second reed switch to another pin with them both going to GND.
Is this how you wired it without the optocoupler? I have seen some tutorials using the 3.3v pin on the ESP too but unsure why
A proper schematic (where have you heard this before) would answer a LOT of questions. A pretty Fritzing picture or a photograph is almost always absolutely worthless.
I ended up ditching that setup. That’s what I would have used if not using the optocoupler. The optocoupler replaced that terminal board.
I had that terminal board set up with each of those looped wires connected to GND on the ESP32. Each long wire went to a GPIO. That way each 3x terminal could connect two sensors. I just doubled up the ground wire into the middle terminal.
I’ve been reading this topic for almost two months now.
I’m on the exact same spot as you, need a solution for an in house alarm system witch would integrate with home assistant. I’m also building at the moment and I’m on the feeding lines stage.
I’m not very keen on electronics, but a close friend will help me.
Do you have more in depth pics and info of your current setup with the octocoupler?