This allows for connecting to devices that do not use the MAC address type 0.
This also adds the logging of the "mac_type" so it is visible to users trying to connect to broadcasting devices.
Additionally this will allow for future connectable devices using a MAC address type other than 0 to be automatically connected to
when support is added for them, similar to LYWSD03MMC etc..
* Remove std::string as the model id and use decoder enum.
* Update decoder version
* Check model id is in decoder range when launching discovery.
* Add BLEconnect enum MIN/MAX
* Add immediate parameter to BLE connection commands.
When sending a command to read/write a characteristic on a BLE server this adds a new parameter to cause the action to be
performed immediately. This will stop the scan in progress to perform the actions queued.
Example use:
```
mosquitto_pub -t home/OpenMQTTGateway/commands/MQTTtoBT/config -m '{
"ble_write_address":"AA:BB:CC:DD:EE:FF",
"ble_write_service":"cba20d00-224d-11e6-9fb8-0002a5d5c51b",
"ble_write_char":"cba20002-224d-11e6-9fb8-0002a5d5c51b",
"ble_write_value":"TEST",
"value_type":"STRING",
"ttl":4,
"immediate":true }'
```
Stop BLE processing when immeditate command sent.
* Use a shorter connection timeout.
* Update docs.
* Remove MQTT spam for connection retrys
* Prevent crashing when the normal connection process occurs at the same time as an immediate action.
* Use a semaphore to protect BLE device vector.
* Behaviour when MQTT and/or Wifi is not available
I was looking into why all my OpenMQTTGateway devices were not responding after a recent power failure and am speculating that the ESP32 was able to restart faster than my Wifi and MQTT Server was able to restart and resume operations. And was thinking that a generic ESP.restart may be a reasonable approach with repeated Wifi and/or MQTT connection failures.
As mentioned here https://community.openmqttgateway.com/t/behaviour-when-mqtt-and-or-wifi-is-not-available/1747
Added new variable maxRetryWatchDog, which is the maximum number of mqtt or wifi connection attempts before restarting gateway device.
* fix wifi manager portal missing parameters on esp8266
on esp8266 with ZgatewayBT
Reducing the scope of the parameters on wifi manager for esp8266 to enable to enter properly the configuration
* Support for BME280 Temperature Correction
The Spark Fun BME 280 library has support for Temperature correction, and this pull request implements the ability to apply a correction via a compiler directive ( BME280Correction ).
* Add ability to change MQTT topic and or gateway name by MQTT command.
This adds new commands to allow changing the MQTT topic and or gateway name from a command.
The new topic/name will be saved in flash memory and used on subsequent reboots.
Either/both parameters can be sent or combined with other commands.
Example use:
```
mosquitto_pub -t "home/OpenMQTTGateway/commands/MQTTtoSYS/config" -m
'{
"mqtt_topic": "topic/",
"gateway_name: "name"
}'
```
* Update example with /
Co-authored-by: Florian <1technophile@users.noreply.github.com>
* Allow for hiding mqtt config settings in wifimanager setup.
Adds the macro `WIFIMNG_HIDE_MQTT_CONFIG` that when defined will hide the mqtt configuration in the wifimanager setup.
Co-authored-by: Florian <1technophile@users.noreply.github.com>
This will remove the sending of BLE service data when multiple service data attributes are advertised by a broadcasting device.
Instead the data for known device types will be consolidated into a single message to reduce overhead.
When updating from the MQTT command from a SSL enabled server this adds an option to provide
the server SSL certificate with the command.
This is useful if connecting to different servers or if the configured certificate has expired
and requires updating to not lose the ability to update via OTA.
The certificate provided will be saved to flash memory for use on subsequent restarts.