Esphome remote with bluetooth receiver

I have been building my universal remote with IR & bluetooth on esp32

It uses the ESPHome IR receiver and transmitter and BLE keyboard to connect to a Sony TV and old Pioneer AVR with IR

Now I want to add a Bluetooth remote as input device, but I cannot just add the esp32 ble tracker to the same esp32 that runs my IR transceiver.
As soon as I add the code for ble tracker the esp32 refuse to connect with errno 111

Is this because the ble tracker only works on the esp-idf framework and I have to use the arduino framework for ESPHome? Is there a way to make all of this work on 1 esp32 or do I have to use 2 different esp32’s in the same room.

1 Like

That one? GitHub - dmamontov/esphome-blekeyboard: ESPHome BLE Keyboard
It uses a different bluetooth framework (nimble) than espHome, so, afaik, they cannot be used together for the time being.

Yes that its right, but my problem is that I cannot get a bluetooth remote connected to HA. I went through all the post about bluetooth but it skips over how to get a bluetooth remote to connect or paired. Its just says that you can use a blueooth remote as bluetooth keyboard but nowhere how to get it connected.

There is a guide to use an esp32 as bluetooth hid but than I have to setup a third esp32 to make it work. Using 3 x esp32 per room to make a universal remote is just not worth it.

When bluetooth proxy came out they said you can add it to any of your esp32’s already in use. But you can’t since they do no use the same framework.

Do you mean on HAOS? No clue if it’s even possible.
If you mean to get an ESP32 to act as the BT “receiver”, I have see nothing on that path, either.

I personally use a HA Container installation, and do it the “linux way”, outside of HA.

See, e.g., or search on “linux bluetooth keyboard”

There is an ESPhome BLE Remote. I found the solution here:

All I need now is an HA blueprint to map the keys

1 Like

Very interesting!

That component supports BLE remotes, so there is no pairing. Basically, the remote “multicast” its events to whomever is listening for them.
In the ESPHome config, you configure the MAC address of the remotes you’re interested in. You cannot guess those, so you’ll first put a random one, the look into the ESP logs for the detected devices from the BLE scanner and play “trials and errors”.

There is a way to get the BT remote mac. What I did is attempt to connect the remote to any Android TV and it will give you the mac address

At the moment I am testing with a Sony TV remote . I still have to pair it by holding the pairing buttons on the remote. I see that its connect to the esp32 in the ESPHome logs , but when I press a button I do not see anything in the ESPHome logs. If you go to the integration and look at Last Event Usage you can see the button that was pressed.

Now I still have a problem. When I power cycle the esp32 the connection is lost and I have to pair the remote again. It also seems that the remote will only connect to one device at a time which is to be expected. I do not think it will “multicast” but if there is a way please let me know.