Added home automation script - to have automated mode.  Also adding door sensor detection.