I want to have a sensor that indicates whether or not my front door deadbolt is locked. This sounds like some kind of switch, but getting the position precisely correct for a traditional switch sounds quite difficult. Also the bolt may throw slightly different distances based on who locks it, how hard it is flipped, etc.
I am thinking about some kind of extra-long, fairly flexible lever, but unsure if I could get such a device into the bolt hole. Or, I could try to detect the position of the handle, ie the outside/human hand side of the lock instead of the door side. I also considered some kind of IR setup to see if the lock handle is in line-of-sight across the door, theoretically if positioned correctly the beam would be blocked by the lock in one position or the other. Again, the position sounds quite precise and hard to do. Another thought is that maybe there is a way to cram a small simple switch into the mechanism of the lock itself, like the round part that started off as a hole in the door.
Anyone taken this on before? Any ideas or guidance?