Door Lock events stopped working with custom code

That DTH is not a working DTH and is only around for legacy purposes. The default DTH is Z-Wave Lock or for your Schalge lock try this Enhanced DTH which fixes bugs in the stock DTH and adds features specific to your Schlage lock (automatic lock and feature detection)

What is your Schlage lock model?