So, I’m working on incorporating some serious outdoor PIR sensors into ESPHome. I’ve done the standard hobbyiest PIR thing and it works great but most commercial PIR sensors out there do not seem to work in the same way. They are resistance based as opposed to voltage based.
How do I incorporate these into ESPHome? Binary Sensor doesn’t seem appropriate. Something tells me I’ll be using an ADC pin instead of GPIO? Looking for wiring and coding suggestions.
The alarm is a normally closed circuit that will go open on detect.
The resistor values are used in commercial alarm equipment to ensure that a nefarious person doesn’t short the connecting wire to fool the base station, the resistance at the station end is set to match the resistance at the sensor end.
If you are not worried about this sort of tampering, just use a binary sensor that will trigger inverted, i.e. when no signal is present.
It was all OK in the end. Turns out my Node MCU/ESP12F doesn’t support INPUT_PULLUP on pin D0?
In the end, I decided not to spend time on incorporating tamper or fault detection as my sensors are going to be alarmed to a separate alarm panel that does this anyway… My solution was simple. The NodeMCU sends a 3.3v to one side of the NC contact, the other side goes into D1 (or similar).