Refactor BLE gateways (#617)

* Refactor BLE gateways:
-merge HM10 and ESP32 code
-publish sensor values with the other BLE device parameters to avoid MQTT multiple publication
-make uniform the case of mac adress id between HM10 and ESP32
-add the possibility to remove service data publishing either when sensors is recognised or not
-correct manufacturing data display
-merge process cleargrass methods
-check service data validity before processing
This commit is contained in:
Florian authored and GitHub committed 2020-06-05 08:09:49 -05:00
1 parent ac4f6b74c2
commit 661ef9c55e
5 files changed
+290 -401

No files matched your search

+5 -2
View File
@@ -17,13 +17,16 @@ OpenMQTTGateway is able to scan all the BLE devices that advertise their data so
|-|:-:|:-:|
| BLE watches with fixed mac||rssi for presence detection|
| BLE beacons keychains||rssi for presence detection|
| XIAOMI Mi Flora ||temperature/moisture/luminance/fertility|
| Vegtrug ||temperature/moisture/luminance/fertility|
| XIAOMI Mi Flora |HHCCJCY01HHCC|temperature/moisture/luminance/fertility|
| XIAOMI Mi Jia |LYWSDCGO|temperature/humidity/battery|
| XIAOMI Mi Lamp |MUE4094RT|presence|
| ClearGrass |CGG1|temperature/humidity/battery|
| ClearGrass alarm clock|CGD1|temperature/humidity|
| ClearGrass with atmospheric pressure |CGP1W|temperature/humidity/air pressure|
| Clock |LYWDS02|temperature/humidity|
| XIAOMI Mi Scale ||weight|
| XIAOMI Mi Scale v1|XMTZC04HM|weight|
| XIAOMI Mi Scale v2|XMTZC05HM|weight|
| XIAOMI Mi band ||steps|
+8
View File
@@ -39,6 +39,9 @@ Note that the gateway return one or two measurement value each time. The differe
* Temperature
* Moisture
* Fertilization
* Humidity
* Pressure
* Steps
* Weight
* Impedance
* Battery (mi jia only)
@@ -49,6 +52,11 @@ The infos will appear like this on your MQTT broker:
More info are available on [my blog](https://1technophile.blogspot.fr/2017/11/mi-flora-integration-to-openmqttgateway.html) (especially about how it was implemented with HM10)
::: tip
The HM10 module doesn't read enough information (servicedata UUID is missing) to support Mi Scale and Mi Band. They are supported nevertheless with ESP32.
OpenMQTTGateway publish the servicedata field of your BLE devices, with HM10 this field can be longer compared to ESP32 if the device is not recognised.
:::
## Setting a white or black list
A black list is a list of mac adresses that will never be published by OMG
to set black list