Add API controller for turning devices on and off.