I have Zigbee2MQTT and the mosquito broker setup and I can read and write to via MQTT out of the box with a HA action. why can’t there be something similar when an esphome BT proxy is configured.
I know I can code the BT proxy to read and write by hard coding this into the proxy (and probably dynamically using a complicated setup of text sensors and buttons or triggers) but why does it have to be so hard. This is also cumbersome when I have multiple proxies and want to connect and write/read to a BLE device that changes locations.
The way I understand it, Zigbee2MQTT blankets my home with a zigbee network with all traffic being routed to a coordinator for processing and this is fed into HA, why can’t esphome proxies work in a similar fashion. Then an automation could be set up to periodically (connect if necessary and subscribe to notifications) send a request, receive the payload and publish this as a sensors data (and then disconnect if necessary) in HA.
This is my use case:
I have been using a Colmi ring as a BLE beacon with Bermuda and have had amazing results as knowing the location of individuals within the home makes a smart home even smarter. these rings are so cheap and can be worn comfortably and mine is always on me (except when charging) making them the ideal beacon for room presence detection. The only problem is that to use the ring as a beacon, I can’t have it connected to its native app. this is no problem as I am not really interested in the health data it collects etc but I would like to know the state of the battery (so I can have a notification reminding me to charge it) as well as the charging state so that I can make a template sensor that, for example, defines my location as whatever room the ring is in, except for when its charging at which point it reverts to whatever room my phone is in. I have also found the codes for gathering other info such as heartrate, oxygen saturations, steps, sleep time etc which would be nice to haves, although in my case a bit of a novelty.
it would be amazing if it was possible to have an automation that once every x amount of time could stop the proxy BT scan if a connect request is sent (either on all proxies or the proxy with the strongest signal to the device), connect to a device’s mac address (or binary sensor if already configured as a device through Bermuda etc), write to the service and characteristics UUID, receive a response or try again until a response is received and then disconnect…all from a HA automation.
This would also allow easy integration of pretty much any non-supported BT device (if the packet data and UUID’s are known) into HA automations without having to have a custom component or basic coding knowledge and also get around the 3 device limit that the esphome BLE client has, at least for sensors don’t have to have instantaneous updates or requests.