new auto-lock code
Merge branch 'master' into ihartwig_doorsense