Smart surveillance and alarm systems