* 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.
While playing with the new BLE READ/WRITE feature for my Playbulb Candles I found that writing was not possible for characteristics which are WriteWithoutResponse only.
I implemented this quick fix which might be useful for others with devices for which they want to write to WriteWithoutResponse characteristics.
Alternatively a more slective option could be possible for a future release, i.e. adding an additional WRITE tag like "ble_write_withoutresponse": true/false
* Set OTA name as Gateway_Short_Name + MAC if using mac as gateway name.
This will set the OTA name of the gateway to the *Gateway_Short_Name*_*MAC* when USE_MAC_AS_GATEWAY_NAME is defined in the config.
* Log OTA hostname when using MAC as gateway name.
* Define MQTTsetMQTT for configuring MQTT over MQTT
* Enable MQTTsetMQTT per default on all ESP except RFBridge
Co-authored-by: Dave <d.kneisz@gmail.com>
This allows for setting the WiFimanager debug level for more or less verbosity using the WM_DEBUG_LEVEL macro.
Valid values are:
DEBUG_ERROR = 0,
DEBUG_NOTIFY = 1, // default
DEBUG_VERBOSE = 2,
DEBUG_DEV = 3,
DEBUG_MAX = 4