If you receive an {"error":"Invalid key"} in your log while trying to control the gateway light, you should generate the key again using an Android Phone or alternativly an emulator such as bluestacks. In some instances there is an issue with keys being generated using the iOS application.