Thank you for one more interesting solution. Just want to suggest useful thing which might be more simple and durable as contact pair. I mean "Switch Reed" http://www.ebay.com/itm/1PC-Recessed-Magnetic-Window-Door-Contact-Security-Safety-Alarm-Switch-Reed-/310770552546?hash=item485b5e4ee2:g:eGcAAOSwNSxU2BfU
Best regards!