esphome / feature-requests

ESPHome Feature Request Tracker
https://esphome.io/
411 stars 26 forks source link

Enable writing to a BLE characteristic #1460

Open nambuco opened 2 years ago

nambuco commented 2 years ago

Describe the problem you have/What new integration you would like

BLE Sensor only allow reading a characteristic, but I would like to also write to a characteristic in my application.

Please describe your use case for this integration and alternatives you've tried:

Since this is not possible today, I am not using BLE in my application.

Additional context

nambuco commented 2 years ago

Additional information, BLE Server with writeable characteristic would also work for me, but esp32_ble_server seems to be limited to manufacturer and model.

deltaphi commented 2 years ago

I would like to jump in on this feature request. My application is as follows:

I have a battery-powered device capable of receiving a byte string via BLE (write to characteristic) and then transmitting this code as an IR command. This device controls my TV and Radio receiver. Having the ability to write to a BLE characteristic (at least a fixed string for when a switch is toggled, preferably some sort of Text Output component) would enable me to control the BLE device from an ESP.

Please note that directly using an ESP32 with IR_Transmitter is not possible in my case. There is no power outlet near where I need to place the IR transmitter. I actually had an ESP32 running on batteries up, but the power consumption of the ESP32 is so massive that it drains a USB Powerbank within two days, whereas the BLE device runs for a year on rechargeable AA batteries.

mattmeye commented 1 year ago

+1 I have another usecase:

I have a battery-powered device with a bme680 sensor to send air quality data via ble periodically. Another normal power-connected device will receive this data (or data of other ble devices) via wlan to hass.

Zylatis commented 4 months ago

+1: I'd like to make a remote control blinds device which is battery powered (such products already exist so it is doable). While the motor itself will consume a lot of energy, it's not used often and so wifi comms would really eat into the current available. I also would like to do something similar to the IR blaster case mentioned above. It would also be useful to send messages which could result in waking up a dormant wifi module for higher bandwidth, shorter period, applications.