Ethical hackers have uncovered a flaw in a new generation of popular smart-home devices that could allow someone standing outside a property to open the owners’ doors, garages, or gates via WiFi.