Good, then everything is just a dry contact and this is easy. I did almost the same thing for a client’s warehouse a while back.
The 2.2k you measured is the end-of-line (EOL) resistor. The old panel used it to tell “closed” from “wire cut” from “short”. You have two choices:
- Simplest: bypass or ignore it and read each loop as a digital input. Closed door = 2.2k to ground, which with the ESP32 internal pull-up (around 45k) reads as LOW. Open = HIGH. That works, but a cut wire looks exactly like an open door.
- Keep the supervision: read each loop on an ADC pin with a 10k pull-up to 3.3 V. Closed is about 0.6 V, open is 3.3 V, shorted is 0 V. Then you can send a separate
faultvalue.
For 20 loops you will run out of usable ADC pins, so I’d do digital inputs, or add an MCP23017 I2C expander for the inputs.
PIRs: put a 12 V supply in the closet, power the PIRs from it, and wire the N.C. relay contact to an input exactly like a door. Tie the 12 V negative to the ESP32 ground only if you need to, the relay is isolated anyway. The tamper contacts can go to inputs too if you want to know when someone opens a cover.
On the Hermetry side, send each input as 0/1, not true/false, so you get a chart history of it. Something like:
{"door_lobby": 0, "door_dock": 1, "pir_hall": 0, "tamper_any": 0}
Send on every change plus once a minute, so the latest value is fresh. Then an alarm rule like door_dock == 1 on the profile, and a time condition for after hours.

