Added ajax routes for motion and door