fsievers22 / esphome-ble-remote

ESPHome external component for a BLE HID client
MIT License
25 stars 10 forks source link

Difficultly connecting a remote #4

Closed solomongumbie closed 2 years ago

solomongumbie commented 2 years ago

Hello, I suppose this issue I'm creating is more of a request for some documentation. I'm trying to connect my remote to my NodeMCU (ESP32) and I am doing something wrong. I read up on the ESPHome docs here: https://esphome.io/components/ble_client.html but still I seem to be doing something wrong.

fsievers22 commented 2 years ago

I have recently changed from Arduino framework to esp-idf framework. Since then the BLE address is hardcoded: https://github.com/fsievers22/esphome-ble-remote/blob/b5b24c4b710c0b8d50d94a81163c1a7cc0ae52d1/ble_hid_client.cpp#L21 That is not an optimal solution and I will change that, but i have not much time at the moment. So if you want to use this component you have to change that line in ble_hid_client.cpp. The BLE-Client component of esphome has nothing to do with this component and you don't need it in your .yaml file to use this custom component. I hope i could help you.

solomongumbie commented 2 years ago

That helps a lot, thank you, but I have my ble address in another format similar to 00:11:22:33:FF:EE. Is there some way I should convert that?

fsievers22 commented 2 years ago

No you can just put it in like so:static esp_bd_addr_t ble_remote_address = {0x00,0x11,0x22,0x33,0xFF,0xEE};

solomongumbie commented 2 years ago

Thank you so much I got it working. May I ask if you have some form of long press detection setup in your HA configs?