* 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
Adds the macro USE_MAC_AS_GATEWAY_NAME, when defined the gateway name will default to
OMG_XXXXXXXXXXXX, where the X's are the mac address characters.
This can still be changed in WiFiManager.
This will provide the expected funtionality for the reset trigger when the button is pressed for more than 10 seconds.
Also allows the same pin to be used as an actuator/relay trigger if pressed for less than 10 seconds.
This will enable using button on the gateway to switch any controlled attached actuators/relays when pressed.
Adds the following macros:
- ACTUATOR_ON; 0 or 1, set to the output level of the gpio pin to turn the actuator on.
- ACTUATOR_ONOFF_DEFAULT; ACTUATOR_ON or !ACTUATOR_ON, set to the state desired on reset.
- ACTUATOR_BUTTON_TRIGGER_LEVEL; 0 or 1, set to the sensing level which to detect a button press to change the actuator state.
* Fixes BLE scanning being disabled after switching server fails.
* Fixes crash caused by BLE scan results arriving while switching servers.
* Adds documentation to use the server switching command.
Merges LED_RECEIVE/LED_SEND into LED_SEND_RECEIVE pin definition.
Adds LED_ERROR to display error status based on blink times as follows:
Disconnected from Wifi: 2 seconds on 2 seconds off.
Disconnected from broker: 2 seconds on 5 seconds off.
Other status LED indications added:
WifiManager configuration web portal active: LED_INFO and LED_SEND_RECEIVE = ON.
OTA Update in progress: LED_SEND_RECIEVE and LED_ERROR = ON.
* EXPERIMENTAL: Ble read/write characteristics over MQTT.
Uses #979
This allows reading and writing BLE characteristics from an MQTT message.
Example format:
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", "ttl":4 }'
mosquitto_pub -t home/OpenMQTTGateway/commands/MQTTtoBT/config -m '{"ble_read_address":"30:AE:A4:7C:3C:A6", "ble_read_service":"cba20d00-224d-11e6-9fb8-0002a5d5c51b", "ble_read_char":"cba20002-224d-11e6-9fb8-0002a5d5c51b", "ttl": 2 }'
The ttl parameter is the number of calls to connect (defaults to 1), which occur after the BLE scan completes.
A response is provided over MQTT in the format:
write : {"id":"30:AE:A4:7C:3C:A6","service":"cba20d00-224d-11e6-9fb8-0002a5d5c51b","characteristic":"cba20002-224d-11e6-9fb8-0002a5d5c51b","write":"TEST","success":true}
read : {"id":"30:AE:A4:7C:3C:A6","service":"cba20d00-224d-11e6-9fb8-0002a5d5c51b","characteristic":"cba20002-224d-11e6-9fb8-0002a5d5c51b","read":"TEST","success":true}
* Add generic BLE connect class and read data as hex.
* Add value_type parameter and document usage
* Add note to docs
With the additional functionality added by @h2zero I’m able to extract
the temperate data from the 2nd part of the bluetooth message.
Co-authored-by: Northern Man <sgracey@Heisenberg.local>
- Adds MQTT command to change the WiFi access point.
- Adds MQTT command to change the MQTT broker and update username and password.
This will test the connection changes first and, if unsuccessful, fallback to the current connection.
If successful the new configuration will be saved in non-volatile memory.
This adds the ability to specify if the MQTT broker connection is secure via a checkbox on the config page of WiFiManager.
Also added to the WiFiManager config page is a text box to enter the brokers TLS certificate.
In the case of using manual configuration a new macro is created MQTT_SECURE_DEFAULT.
When defined as true a secure connection will be requested and the certificate defined in user_config.h will be used.
* Update to SmartRC-CC1101-Driver-Lib@^2.5.4 and removal of workaround from #847
Tks to @LSatan workaround no longer needed
https://github.com/LSatan/SmartRC-CC1101-Driver-Lib/issues/65
* Default to value as subject for rtl_433 and receiver switching
* Default to not publishing unparsed signals
* Fix for missing String for uint64_t
* Fix is only required when value a subject is defined and not PiLight
Co-authored-by: Northern Man <sgracey@Heisenberg.local>
If enabled in user_config.h this will trigger the OMG to update it's firmware from the link
provided in the MQTT message.
Example message:
{\"version\":\"test\",\"password\":\"OMGPASSWORD\",\"url\":\"https://github.com/1technophile/OpenMQTTGateway/releases/download/v0.9.6/esp32dev-ble-cont-firmware.bin\"}
If the firmware version in the message is not the same as the current OMG version the device will self update using the link in the url of the message.