mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-19 16:56:34 +00:00
Fix SetOption158 publish/suppress ModbusReceived MQTT messages (#20733)
Fixed a bug that let some mqtt messages be published anyway
This commit is contained in:
parent
6732db8803
commit
c93d6676b9
@ -551,8 +551,12 @@ void ModbusBridgeHandle(void)
|
||||
ResponseJsonEnd();
|
||||
|
||||
if (errorcode == ModbusBridgeError::noerror)
|
||||
if (Settings->flag6.mqtt_disable_modbus ) { // SetOption158 If it is activated, Tasmota will not publish ModbusReceived MQTT messages, but it will proccess event trigger rules
|
||||
XdrvRulesProcess(0);
|
||||
} else {
|
||||
MqttPublishPrefixTopicRulesProcess_P(RESULT_OR_TELE, PSTR(D_JSON_MODBUS_RECEIVED));
|
||||
}
|
||||
}
|
||||
else if ((modbusBridge.buffer[1] == 15) || (modbusBridge.buffer[1] == 16)) // Write Multiple Registers
|
||||
{
|
||||
Response_P(PSTR("{\"" D_JSON_MODBUS_RECEIVED "\":{"));
|
||||
|
Loading…
x
Reference in New Issue
Block a user