1technophile / OpenMQTTGateway

MQTT gateway for ESP8266 or ESP32 with bidirectional 433mhz/315mhz/868mhz, Infrared communications, BLE, Bluetooth, beacons detection, mi flora, mi jia, LYWSD02, LYWSD03MMC, Mi Scale, TPMS, BBQ thermometer compatibility & LoRa.
https://docs.openmqttgateway.com
GNU General Public License v3.0
3.55k stars 784 forks source link

On demand BL Scans. #373

Closed maxi1134 closed 5 years ago

maxi1134 commented 5 years ago

Is your feature request related to a problem? Please describe. I think that scanning for BL devices at all time is like using a shotgun, and that having a way of requesting scans on demand could alleviate the network charge. Per instance using a MQTT feed as a trigger. This coupled with motion detection would be a great way of reducing the mqtt jitter.

Describe the solution you'd like OpenMQTTGateway could wait for a command before scanning, the scan for X time(s).

Describe alternatives you've considered I couldn't find anything like this in the doc. Or perhaps my poor english made me misunderstood if there is this function.

kabturek commented 5 years ago

This is a good idea - for me (just for presence detection) i would run the scans when my door is opened as thats the only time when the number of BT devices could change.

1technophile commented 5 years ago

done in dev branch, instructions are in the commit msg