How to Keep Your Smart Home from Turning Against You