From af2a2076e3e37eb8a933b861cb80080026a5ba88 Mon Sep 17 00:00:00 2001 From: ortegafernando Date: Wed, 21 Sep 2022 21:44:17 +0200 Subject: [PATCH] SetOption147 Setoption147 (MQTT) Disable publish SSerialReceived MQTT messages. If disabled, you must use event trigger rules instead. If it is activated, tasmota will not publish a MQTT message every time a SSerialReceived event fires. Use rules to control "what, how and when" publish these messages. --- tasmota/tasmota_xdrv_driver/xdrv_08_serial_bridge.ino | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tasmota/tasmota_xdrv_driver/xdrv_08_serial_bridge.ino b/tasmota/tasmota_xdrv_driver/xdrv_08_serial_bridge.ino index 391dd952d..952cde978 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_08_serial_bridge.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_08_serial_bridge.ino @@ -167,11 +167,11 @@ void SerialBridgeInput(void) { } ResponseJsonEnd(); - if (Settings->flag6.mqtt_sserialreceived) { // SetOption147 (MQTT) Enable publish SSerialReceived MQTT messages. If disabled, use event rules instead. - MqttPublishPrefixTopicRulesProcess_P(RESULT_OR_TELE, PSTR(D_JSON_SSERIALRECEIVED)); + if (Settings->flag6.mqtt_disable_sserialrec ) { // SetOption147 If it is activated, Tasmota will not publish SSerialReceived MQTT messages, but it will proccess event trigger rules + XdrvRulesProcess(0); } else { - XdrvRulesProcess(0); - } + MqttPublishPrefixTopicRulesProcess_P(RESULT_OR_TELE, PSTR(D_JSON_SSERIALRECEIVED)); + } serial_bridge_in_byte_counter = 0; } }