Optimizing Energy Efficiency While Maintaining Secure Surveillance Capabilities at Home With Smart Devices