Forgive an obvious question, but is this a house you own? If not, forget the whole idea.
Getting back to the idea, as crOsh said, using hardware desined for the purpose is really important here. There's a reason that lock hardware, both mechanical and electro-mechanical, is UL listed, and the consequences of failure more serious than having to break a window or call out a locksmith. It could cause you to be delayed or trapped and unable to exit quickly in an emergency, like a fire.