Hey, I've been using external keyboard/air mouse with my mi box and I've a problem that when I put the mi box to sleep (turn off), The external keyboard stop working/stop pairing, and I can't turn on the mix box from sleep, sometimes after few minutes it can pair up , and sometimes I need to unplug&replug the mi box to turn it on. I'm using software called External Keyboard Helper, I think I can modify one of the USB keyboard keys to act like the power switch from the mi box remote. but I can't scan the power on switch..
If someone knows how to solve it I would love to hear. Thanks.
Try Wakelock app ( https://github.com/d4rken/wakelock-revamp/releases ). Enable "Processor" and "Wi-Fi normal" in Wakelock. In case TV remote loses connection, this allows you to use casting from apps on your phone, like YouTube, to wake up Mi Box and re-pair remote under settings with a USB keyboard or Android TV remote app. This setup has worked for me for almost 2 months without unplugging the box.