sidddy / flora

ESP32 BLE client for Xiaomi Mi Plant sensors
MIT License
190 stars 71 forks source link

Replace fixed list of devices by a BLE scan #20

Open Djebouh opened 5 years ago

Djebouh commented 5 years ago

The list of devices is now dynamic. The BLE scan has a duration of BLE_SCAN_DURATION. It looks for devices with root UUID matching 0xfe95 (flora device identifier). Then the initial processing is applied on each device.

This should address issue #19

Matz88 commented 5 years ago

Now it just tries to process all the flora devices around... is it not better to scan and then process only the one in the list? I did that for my local version.

Djebouh commented 5 years ago

In my case, it is easier to have a full dynamic list. I don't have neighbor using Flora, and I could filter out in MQTT if need be. I prefer to have the config in the MQTT (that I can access remotely), than on the ESP (which I need to connect to). Then, even if multiple ESP scan the same devices, this will "only" add another value, I don't see it as a potential conflict. But this is not an issue as well to add a filter that is either a list of address to keep or empty (no filtering). It could match both use cases :).

tobiasfaust commented 5 years ago

hi, its possible to merge it into dev-branch? Or at least to update your PullRequest along current dev-branch? Maybe, an enhancement: to disable a MAC-Adress via WebForm from scanning