couple comments... perhaps you can figure it out with the following:
deadbolt sensor... can be a cherry switch, a contact switch meaning if it's metal wires from one side will conduct though each sides. may require two switches to complete a return if the power and sensor it on one side.
You will have to adjust the design for your situation.
On the first light you can do this with nothing other than a power source and light, switches and perhaps some resistors based on what you're using.
If you want remote light you might use WiFi or Bluetooth. Just using a bluetooth device would be enough in this situation. It senses a closed circuit and sends a I'm locked signal to the other device. The other device get's a locked signal and triggers on a light.
Hope this helps.
Chris you're really quick... that project would not know if the deadbolt is locked... just that the door is closed... so OP would still have to figure out the deadbolt sensor. But it should help with the coding... to me it looks like overkill
We were just talking about this sort of thing. we expanded since the economy rebounded and the 'preferred' ladies bathroom is in constant use.
We were talking about putting an OCC/Un-OCC sensor so people at their desk can find the status.
My thoughts are a web page and a place to put your name. so you can say you are next.
maybe ESP8266 hosting a super simple web page
I just ordered the OCC sensor that will turn on the lights
and VOC sensor to turn on the fan and allow it to stay on.
small magnets on door, like for an alarm system.
In my "work" rooms, I have magnetic latches on the toilet doors, presently controlled by a wall switch, but later to be controlled by proximity plates (i.e., no touch!). Upgrade will include RFID to allow "emergency" access (someone collapses). Obviously, the power to the latch itself is a semaphore that can be extended wherever required.
If someone switches on the latch and exits, shutting the door behind, we simply switch off the power to that system and reset it. The RFID keys will more easily solve that situation. I am considering ESP8266s.
Yes, I take your point; the thing must be "idiot proof". We have had some problems already with people (mostly male I think - must ask the secretary about this ...) simply not locking the door, mostly more from general vagueness (habit?) than not understanding the switch.
The significant complications are only in regard to the ability to unlock the door in "emergency" situations - specifically, someone collapses inside. That has happened in the past, hopefully not too frequently, but always a significant risk.
Other than that, it is simply a switch marked "Door lock", presently with a red/green LED. Only the fact that it is not actually on the door itself differentiates it from a conventional snib. A display which says "LOCKED" would be a logical extension both on the inside and "OCCUPIED" on the outside. There is already a red LED on the electromagnet at the top of the door frame.