* Use a task to process immediate BLE actions to prevent MQTT disconnection if the action takes too long to complete.
* Add state_on and state_off parameters to createDiscovery
* Add ability to specify pulse length in ZactuatorONOFF
Add an additional parameter to the MQTT message to control the actuatorONOFF pulse length e.g. `mosquitto_pub -t home/OpenMQTTGateway_MEGA/commands/MQTTtoONOFF -m '{"gpio":15,"cmd":"high_pulse","pulse_length":25}'`
* Simplify initialization of pulselength
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..
* 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.
* 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>
* Disable MQTTsetMQTT and MQTT_HTTPS_FW_UPDATE to allow OTA for Avatto Bakery IR
Trying to update my Avattos with the currently released 0.9.8 I found that OTA wasn't possible any longer as the build was now to large
0.9.8
Checking size .pio/build/avatto-bakeey-ir/firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM: [==== ] 42.4% (used 34772 bytes from 81920 bytes)
Flash: [====== ] 55.2% (used 528716 bytes from 958448 bytes)
this goes back to 0.9.7, where WiFi, MQTT and firmware update was introduced over MQTT commands
0.9.7
Checking size .pio/build/avatto-bakeey-ir/firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM: [==== ] 42.4% (used 34772 bytes from 81920 bytes)
Flash: [====== ] 55.2% (used 528716 bytes from 958448 bytes)
Going back to building 0.9.6 I was able to OTA update again with the much smaller build
0.9.6
Checking size .pio/build/avatto-bakeey-ir/firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM: [==== ] 39.7% (used 32512 bytes from 81920 bytes)
Flash: [==== ] 41.4% (used 396804 bytes from 958448 bytes)
Building 0.9.8 with the flags brings the build back to OTAable size
0.9.8 with
'-UMQTTsetMQTT'
'-UMQTT_HTTPS_FW_UPDATE'
Checking size .pio/build/avatto-bakeey-ir/firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM: [==== ] 39.9% (used 32684 bytes from 81920 bytes)
Flash: [==== ] 42.3% (used 405024 bytes from 958448 bytes)
Similar to the flag setting in [env:rfbridge]
I'm not even sure if MQTT_HTTPS_FW_UPDATE would even work on the Avatto, with the limited flash memory.
Should we also add
board_build.ldscript = eagle.flash.1m64.ld
as a default, as it's required for OTA updates on the Avattos as discussed in https://github.com/1technophile/OpenMQTTGateway/issues/763#issuecomment-698864712 ?
* Doc addition for restricted MQTT options
Doc addition for https://github.com/1technophile/OpenMQTTGateway/pull/1046 and https://github.com/1technophile/OpenMQTTGateway/pull/986
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.
* Define MQTTsetMQTT for configuring MQTT over MQTT
* Enable MQTTsetMQTT per default on all ESP except RFBridge
Co-authored-by: Dave <d.kneisz@gmail.com>
* 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.
* 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
- 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.
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.
* PR #934
* Active Receiver Switching
Switching of the active receiver module is available between the RF,
RF2, RTL_433 and Pilight Gateway modules, allowing for changing of
signal decoders without redploying the openMQTTGateway package.
Sending a JSON message to the command topic of the desired receiver
will change the active receiver module.
Other minor adjustments/improvements
1 - Improved startup serial logging that includes
- OpenMQTTGateway Version
- OpenMQTTGateway Modules
2 - Trace logging of full Gateway module command topic
- Enabled in RF, RF2, PiLight and RTL_433
3 - Updated RTL_433 Documentation to only include enabled ASK/OOK
device decoders
4 - Trace logging of MQTT Callback topic
* Regression testing
* Adding valueAsASubject support to rtl_433_ESP
- model and id keys are appended to message topic
* Increased memory size for receiver switching in blocking build all
Co-authored-by: Northern Man <sgracey@Heisenberg.local>
Useful if you want to scan continuously for BLE device, in this case you should deactivate the BLE connect to avoid concurrency between scan and connect
* Support for changing CC1101 Receive and Transmit Frequency
* Docs
* Resolve feedback
* Update Somfy module to use Global receiveMhz
ELECHOUSE_cc1101.SpiStrobe(CC1101_SIDLE); // Idle receiver prior to
setting a new frequency
* Add ability to specify repeats for raw Pilight strings
* Updated RF Pilight doc to add raw transmission tut
Added information about transmitting raw messages using the MQTTtoPilight topic, including using the new repeats functionality. Fixed some scattered English mistakes.
* MQTT discovery improvements
-remove gatewayBT
-remove device class formaldehyde (not existing in HASS)
-add SYStoMQTT new parameters
-attach connectivity parameter to the device
-add BT gateway infos and switches
-refactor modules storage and publication
* Initial generalization from a PWM LED controller, to a PWM controller.
Allow the config file to set the name of each channel and the number of channels.
Fade time is now per-channel, so MQTT messages can genuinely set an individual channel, and specify the fade time for that channel.
The default gamma is configurable in the config.
-replace low power led by led info
-enable to change the led ON value
-go upper case for the led macros
Also transform BLE connect warning to notice in log
Add Sonoff RF Bridge LED
* 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