Skip MQTT response if command is prefixed with underscore (#21740)

This commit is contained in:
Theo Arends 2024-07-08 16:57:21 +02:00
parent 09b2670c45
commit 105a08dd20
3 changed files with 13 additions and 5 deletions

View File

@ -16,6 +16,8 @@ All notable changes to this project will be documented in this file.
- Berry `int64` added `low32()` and `high32()` methods, used in Matter (#21728)
- Matter support for 'Generic Switch' based on Tasmota Buttons (#21731)
- Berry cam module and img class (#21743)
- Skip MQTT response if command is prefixed with underscore (#21740)
- Skip MQTT response if commands are executed prefixed with ``Backlog2`` (no delay) or ``Backlog3`` (#21740)
### Breaking Changed

View File

@ -124,6 +124,8 @@ The latter links can be used for OTA upgrades too like ``OtaUrl https://ota.tasm
- Support for QMP6988 temperature and pressure sensor
- Support for Sonoff WTS01 temperature sensor using SerialBridge in ``SSerialMode 3``
- Support for Sonoff POWCT Ring [#21131](https://github.com/arendst/Tasmota/issues/21131)
- Skip MQTT response if command is prefixed with underscore [#21740](https://github.com/arendst/Tasmota/issues/21740)
- Skip MQTT response if commands are executed prefixed with ``Backlog2`` (no delay) or ``Backlog3`` [#21740](https://github.com/arendst/Tasmota/issues/21740)
- Extend command ``SetOption147 1`` to disable publish of IRReceived MQTT messages [#21574](https://github.com/arendst/Tasmota/issues/21574)
- NeoPool data validation and communication statistics default enabled for ESP32 only [#21721](https://github.com/arendst/Tasmota/issues/21721)
- ESP32 support for power and energy limit checks, like ``MaxEnergy2`` per phase [#21695](https://github.com/arendst/Tasmota/issues/21695)

View File

@ -400,6 +400,10 @@ void CommandHandler(char* topicBuf, char* dataBuf, uint32_t data_len) {
user_index = true;
}
type[i] = '\0';
if ((i > 1) && ('_' == type[0])) {
type++; // Skip leading _ in command
TasmotaGlobal.no_mqtt_response = true;
}
bool binary_data = (index > 299); // Suppose binary data on topic index > 299
if (!binary_data) {