motion detection works in local development and production