2) "U" shaped photoelectric proximity sensor, not the cheapest solution, but no moving parts! Simply mount it on the frame so the bar interrupts the beam. You may need to cover the lock hole.
Example: http://www.fargocontrols.com/pdf/sensors/Fargo_Value_PU.pdf (NPN model for Elk, you can even power off Elk +12V)
Or hit up your local electronics surplus store.
Jay
The photoelectric prox sensor looks interesting. I wonder what the light immunity stats mean in the real world. Too much light from another source would trigger a false "unlocked" condition. That probably doesn't matter since the only way that would happen when the door is really locked is if I left the lights on in my shop. I would want to know about that anyway. Am I correct in thinking that too much ambient light cannot cause a false "locked" condition, i.e., the ambient light can't somehow result in the sensor not seeing its own beam?
Certainly seems like a good off-the-shelf solution, and is as cheap as wireless (cheaper since I don't have a wireless receiver in my shop and it may be too far away to ge picked up by the one in my home.
Ira
I haven't tried this, but some observations on this choice (opinion, take them as you will):
- It is using infrared, not visible, so I would _presume_ they have an appropriate detector and filter;
- Fargo Controls is a known Industrial Automation company, not a Harbor Freight, so I would expect quality even from their "Value Line";
- There is a sensitivity setting
- You can always mount it so the detector points towards the wall and cover the bar in black non-reflective tape to cut down accidental detection.
I did some looking around and this was the only one I found that had an opening > 1/4" and was "budget". If you try it, I'd love to hear how it works.
As a last thought - I don't know what a "failure" on this device would look like - you may want to put a sanity rule in "If door is open and Lock is NOT OPEN then send panic message"
Jay