My apartment is full of 433MHz and zwave devices. However I couldn't find any door lock sensor. (I can't use servo locks). My idea was to use a raspberry pi and the gpios but having to hook something up the the outlet just to be able to see if the door is locked or not felt like a bad idea. I wanted something running on batteries and this was the best idea with the least amount of wires :) This is of course not wifeapporved and i will do something to hide the remote and the wires later, or atleast make everything white to blend in ;)
I had a microswitch and a old nexa remote which I didn't use and which together would make a great sensor.
Step 1: The Remote
Step 2: Attach Wires
These wires were connected to the microswitch. If the switch is closed it should send a off signal, if the switch is opened it should send a on signal.(Domoticz which I use see a locked doorlock as off and a open doorlock as on)
Step 3: Mounting and Final Result
I placed the microswitch inside the lock with double sided tape. In the video below you can see the sensor in action :-)