Hi.
I’m evaluating BTHome project and I’ve understood how to transmit sensor data from ESP32 board (i.e. a value on a speficic pin) to Home Assistant.
Anyway I’m looking to do the same in the reverse direction.
In other words is it possible to send a value (i.e. ON or OFF, 0 or 1) from HA to ESP32 board using the BTHome protocol ?
I’m very confused about this.
Its very confusing isnt it!? It seems like BT traffic is only one way. Although I do understand your question, let me ask you a question back. Esphome basically fills that role and its an integration of HA the same as any other BT integration is that controls a light or whatever. If for example I create a BT switch in esphome, I then have a switch in HA to toggle that BT switch. I am essentially sending the BT service from HA.
Even if you created that BT switch in config.yaml its still going to use some BT integration to push out the service. So my question to you. Whats the difference?
It appears that the bthome integration only supports bt sensors.
See BTHome - Home Assistant (Category: Sensor) and bthome.io (BTHome is an open standard for broadcasting sensor data and button presses over Bluetooth LE)
Hi.
Thanks for your reply.
I’m very interested to your project but I haven’t understood well how it works and how may use it for my needs.
I.e., I’ve this BTHome sensor and I can see every two seconds voltage on pin 32 of an ESP32 board on the HA dashboard.
That being the case, how may I use your “integration” to write on an other pin (i.e. pin 24) of the same ESP32 board a simple value as 0 or 1 (On or OFF).
May you help me?
Thanks in advance
Its not my integration… It was just something I found while searching and shared it here. I havnt even used it to be honest. To just send a 1/0 or On/Off, theres documentation for doing this already. You really have to familiarize yourself with them and always go there and use the search box before anything. The answers may already be there and you dont need to go do any Google-foo and waste your time. Setting up ble trackers, ble sensors, ble switch, ble text_sensor, etc etc. This stuff has been available and documented for a while.
Ya, thats the conclusion I came to as well. I thought with so many clever people around, there might be some way to do it but, i found nada.
Ill tell you whats kind of irritating is there seem to be pushes by different people or groups on BT in this case. So, BThome for example it does sensors well but not much else. Then over here you’ve got HA and esphome adding BT support which doesnt do sensors well but does other things well outside of a handful of BT sensors. Now you have to pick which one you want to use on the esp32. It’s the same way with room presence detection. Espresence is still the best IMO but you lose general esphome use if you choose Espresence. I just wish people would get together and develop one software that will do all the things so we dont have to choose which functionality to use and alsp lose at the same time.
The Bthome integration can read button presses, because there is really no difference between reading a button press and e.g a temperature. Both are really sensors, one senses a button press, the other senses a temperature.