I think about the possibility to create a generic bluetooth/BLE extender (relay) which uses TCP/IP in between. After researching a bit, I’m still not sure if this would be possible in general and to create such a thing on top of ESPHome.
Unfortunately, my knowledge about Bluetooth and BLE is not deep enough to understand if such a device would be possible in theory at all or if some restrictions in BT/BLE exists which may render this idea to nonsense…
The idea is like to transform the following situation:
As far as I understand, the ESPHome Bluetooth Proxy it’s something different it’s designed to integrate BT devices it into HomeAssistant and therefore it needs to interpret the meaning of the transferred data (the protocol for all currently supported devices) to create useful values to monitor/control the BT devices via HomeAssistant.
I wonder if it’s possible to just grep the BT data without interpreting it, transfer them via TCP/IP and send it out again with the same BT signature as the original BT sender has done it. This would be a nice and general solution to extend BT.
I found that classic Bluetooth is used more for streaming which may be possible to implement on TCP streams, while BLE may also be possible to map to e.g. MQTT messages to communicate between both realys - theoretically.
It is nothing more than a Bluetooth antenna on the end of a TCP connection… with 4 (?) max simultaneous connections and you don’t really want to try to do audio…
This is why the more common asked question about the is ‘I installed a proxy and it did not find XX’ (because you need the integration to interpret. The proxy just passes it along.
Ok, so the Bluetooth Proxy does NOT do the interpretation and as far as I understand, this part is done in the HomeAssistant BT integration.
For what I’m trying to do (no interpretation of the data), the BT Proxy seems to be closer to what I’m trying to do because you’re saying it’s more like an “antenna on the end of a TCP connection”.
Would it be possible to use such a proxy the other way around on the other end, like “receive the BT data via TCP and send it out again on the BT antenna”?
With these two parts, it should be possible to build such an extender.
This sounds really great! I was not able to find something about using it in this way in the documentation.
To be sure, that I fully understand this, I have some more questions.
So I can use just two ESPHome (e.g. two ESP32 based systems) and can do a setup to let both ESPHome devices communicate via TCP/IP (without HomeAssistant involved)?
(I thought I need at least the API section in the configuration to let the BT proxy talking with HA - but I maybe misunderstood something here.)
How do I configure the counterpart of each other ESPHome in the yaml file? I can’t find a hint about this.
It looks like no ready usable solution is out there to do what I want to achieve (but it’s really interesting, that such a BT relay does not already exists because it would be helpful for many situations).
Maybe I can try to take a deeper look to the ESPHome Bluetooth Proxy code and how it works. It should be possible to build such a device (2 are required to build the complete relay) which just sends out the received BT signal via TCP/IP on device and on the other device the received TCP/IP received data needs to be send again via BT and vice versa.