* Add LYWSD03MMC and MHO-C401 device
and an associated BLE connect mechanism as these devices advertise only encrypted data
-free manufacturer data
-update library
* Implement scans number before connect
-Add the possibility to do a connect every X scan
-Rename variables for consistency
-Some refactoring for improved code reading
* Add JQJCY01YM Formaldcehyde detector
The device publish also the temperature, humidity and battery
* Reduce ServicedataMinLength
so as to read battery data of this device and others
* [breaking] Refactor the BLE devices identification
generalize the use of the mac address with : for the lists, white, black and internal identification
Move structures from config_BT.h to ZgatewayBT.ino
update doc
* Move minRssi to INO and optimizations
change Minrssi name to match other variable convention
Optimize the add of : to mac address
Reduce the use of abs()
Note: I cannot move BLEinterval to the ZgatewayBT.ino due to its use on main.ino
* 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
* merge duplicate code into function setWorBMac
* rename setWorBMac to updateWorB
* add helper getDeviceByMac
* change updateWorB to use helper getDeviceByMac
* change isWhite to use helper getDeviceByMac
* change isBlack to use helper getDeviceByMac
* change isDiscovered to use helper getDeviceByMac
* eliminate duplicate devices walk for isWhite, isBlack and isDiscovered check
* fix a data corruption race between MQTTtoBT and discovery-functions
the ***Discovery functions every time create a new device unless this device is set to white-list before. as a result of this, the devices list contains the same mac multiple times with different flags
* eliminate duplicate devices walk for oneWhite check
because now we have a utility function 'createOrUpdateDevice' we can globally cache this as a single flag
* secure createOrUpdateDevice agains data races on multicore esp32
* fix the concept of the createOrUpdateDevice
c / c++ does not allow NULL as function parameter like modern languages
* use nkolban Semaphore helper class (already included and used from eos1d3/ESP32_BLE librarie)
this makes the semaphore handling more cleaner and readable
* merge duplicate code during createDiscovery into new helper createDiscoveryFromList
* replace excessive use of ZmqttDiscovery precompiler directive in ble advertised callbacks with dummy functions
for a better readability we can remove this because isDiscovered does not do a devices walk anymore
* fix build errors found by travis-ci
Rename set commands to config
correct json buffer size and gateway name
replace state to cmd
replace set by config
add restart and erase command
add unicity to gateway command switches
BLE devices shouldn't be child of the gateway
make the BTtoMQTT topic consistent with other definitions