Xiaomi mijia getaway - Problem controlling Built in light

hi
i have the xiaomi mijia getaway
After installation of the image all the components connected to GATEWAY were automatically identified (switches, smoke detectors, motion detectors, etc.).
In addition to all the components, a button has been added to control the interior lighting of the gateway.
The button is there but can not control the lighting on the gateway.
When I press the button, it displays ON and immediately jumps back to its previous position (OFF)
Something encountered this problem?

Yep, I had this, it means you have not got the correct key from the app. Follow the guide to insert the right key into your config., then you will have control over the light etc.

thank you for the answer
I’ve inserted the code dozens of times
We’re talking about the password in the tech mod in the app, right?

https://www.domoticz.com/wiki/Xiaomi_Gateway_(Aqara)#Adding_the_Xiaomi_Gateway_to_Domoticz

The password bit goes into key in the config.

1 Like

Make sure you do it on a android device, had heaps of issues trying to get dev key when using IOS

I’ve done it on iOS a few times and never had a problem with it. Works fine.

Yeah the first time i set them up, i used IOS.
I had to reset a gateway and i couldn’t use IOS and kept getting the errors
Swapped to android and got the key first go.

Only found this after reading the component doco and they mentioned this.

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 alternatively an emulator such as bluestacks. In some instances there is an issue with keys being generated using the iOS application

1 Like

Thanks everyone for help, I finally managed to update the key and everything works great