Read hardwired door switch in openhab

I have hard wired switches on my house doors and need to be able to read the (open/closed) state in OpenHab. I Haven’t been able to come up with any good options so far. Anyone have any ideas on the subject?

Where do the wires end up? There are different solutions for “distributed” sensors or “centralised” i.e. these run to an old intruder alarm panel?

Thank you for your time. The wires all converge in a area within 4ft of the computer running the OpenHab Server.

Previous discussions -

I do this using a rpi and the gpio via pigpio