mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-23 02:36:35 +00:00
Fix Tuya Exception 3 (#17941)
This commit is contained in:
parent
0ea36d996c
commit
e1b11a6fe7
@ -1334,12 +1334,21 @@ void TuyaSerialInput(void)
|
||||
ResponseAppend_P(PSTR("}}"));
|
||||
|
||||
if (Settings->flag3.tuya_serial_mqtt_publish) { // SetOption66 - Enable TuyaMcuReceived messages over Mqtt
|
||||
/*
|
||||
for (uint8_t cmdsID = 0; sizeof(TuyaExcludeCMDsFromMQTT) > cmdsID; cmdsID++){
|
||||
if (TuyaExcludeCMDsFromMQTT[cmdsID] == Tuya.buffer[3]) {
|
||||
isCmdToSuppress = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
*/
|
||||
for (uint8_t cmdsID = 0; cmdsID < sizeof(TuyaExcludeCMDsFromMQTT); cmdsID++) {
|
||||
if (pgm_read_byte(TuyaExcludeCMDsFromMQTT +cmdsID) == Tuya.buffer[3]) {
|
||||
isCmdToSuppress = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!(isCmdToSuppress && Settings->flag5.tuya_exclude_from_mqtt)) { // SetOption137 - (Tuya) When Set, avoid the (MQTT-) publish of defined Tuya CMDs (see TuyaExcludeCMDsFromMQTT) if SetOption66 is active
|
||||
MqttPublishPrefixTopic_P(RESULT_OR_TELE, PSTR(D_JSON_TUYA_MCU_RECEIVED));
|
||||
} else {
|
||||
|
@ -2120,12 +2120,21 @@ void TuyaProcessCommand(unsigned char *buffer){
|
||||
|
||||
// SetOption66 - Enable TuyaMcuReceived messages over Mqtt
|
||||
if (Settings->flag3.tuya_serial_mqtt_publish) {
|
||||
/*
|
||||
for (uint8_t cmdsID = 0; sizeof(TuyaExcludeCMDsFromMQTT) > cmdsID; cmdsID++){
|
||||
if (TuyaExcludeCMDsFromMQTT[cmdsID] == cmd) {
|
||||
isCmdToSuppress = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
*/
|
||||
for (uint8_t cmdsID = 0; cmdsID < sizeof(TuyaExcludeCMDsFromMQTT); cmdsID++) {
|
||||
if (pgm_read_byte(TuyaExcludeCMDsFromMQTT +cmdsID) == Tuya.buffer[3]) {
|
||||
isCmdToSuppress = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// SetOption137 - (Tuya) When Set, avoid the (MQTT-) publish of defined Tuya CMDs
|
||||
// (see TuyaExcludeCMDsFromMQTT) if SetOption66 is active
|
||||
if (!(isCmdToSuppress && Settings->flag5.tuya_exclude_from_mqtt)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user