dmamontov / esphome-blekeyboard

ESPHome BLE Keyboard
https://community.home-assistant.io/t/esphome-ble-keyboard/
84 stars 16 forks source link

Send keyboard power key #16

Open Dasisfakt opened 1 year ago

Dasisfakt commented 1 year ago

Good afternoon. There is an Xiaomi mi box S console, but I can't turn it off or on in any way. Which activation key can I use?

honeyjohney commented 1 year ago

Good afternoon. There is an Xiaomi mi box S console, but I can't turn it off or on in any way. Which activation key can I use?

I use key code 0xEB to wake up Xiaomi mi box S and Xiaomi mi stick

macfly92 commented 1 year ago

Hello, First of all, thank you for your work and for sharing it with the community. I have an Android box from my ISP. I am also trying to turn it on with your software, unfortunately the solution proposed above does not work for me.

I have installed this software on my ESP32 card: https://github.com/fsievers22/esphome-ble-remote and paired it with my remote control and it returns the Power, Media Select Cable (for the TV source), etc. commands.

I find these codes in the linux input event code ( 116 for Power, 0x17a for Media Select Cable...) : https://github.com/torvalds/linux/blob/master/include/uapi/linux/input-event-codes.h

Is it possible to send this kind of code with your software?

Thanks in advance.

muxa commented 1 year ago

I've been trying to find codes for the Power/Sleep/Wake buttons but could not. The codes that I have found were something else and did not do anything (or did something else) in my case. Is there a full reference of the key codes that can be used via this component?

macfly92 commented 1 year ago

I think only key codes can be found here: https://github.com/dmamontov/esphome-blekeyboard/wiki/Keys

muxa commented 1 year ago

@macfly92 yes, those are the documented keys and they don't include all the keys that a keyboard can send I believe.