mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-27 20:56:35 +00:00
CHG: exclude TUYA_CMD_WIFI_STATE from MQTT publish
CHG: If CMD is excluded from MQTT publish show a log entry
This commit is contained in:
parent
4e801b3f82
commit
4ffbe95ecc
@ -112,8 +112,9 @@ void (* const TuyaCommand[])(void) PROGMEM = {
|
|||||||
&CmndTuyaMcu, &CmndTuyaSend, &CmndTuyaRgb, &CmndTuyaEnum, &CmndTuyaEnumList, &CmndTuyaTempSetRes
|
&CmndTuyaMcu, &CmndTuyaSend, &CmndTuyaRgb, &CmndTuyaEnum, &CmndTuyaEnumList, &CmndTuyaTempSetRes
|
||||||
};
|
};
|
||||||
|
|
||||||
const uint8_t TuyaExcludeCMDsFromMQTT[] PROGMEM = // don't publish this received commands via MQTT if SetOption66 and SetOption137 is active (can be expanded in the future)
|
const uint8_t TuyaExcludeCMDsFromMQTT[] PROGMEM = { // don't publish this received commands via MQTT if SetOption66 and SetOption137 is active (can be expanded in the future)
|
||||||
TUYA_CMD_HEARTBEAT, TUYA_CMD_SET_TIME, TUYA_CMD_UPGRADE_PACKAGE;
|
TUYA_CMD_HEARTBEAT, TUYA_CMD_WIFI_STATE, TUYA_CMD_SET_TIME, TUYA_CMD_UPGRADE_PACKAGE
|
||||||
|
};
|
||||||
|
|
||||||
/*********************************************************************************************\
|
/*********************************************************************************************\
|
||||||
* Web Interface
|
* Web Interface
|
||||||
@ -1304,7 +1305,9 @@ void TuyaSerialInput(void)
|
|||||||
}
|
}
|
||||||
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
|
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));
|
MqttPublishPrefixTopic_P(RESULT_OR_TELE, PSTR(D_JSON_TUYA_MCU_RECEIVED));
|
||||||
}
|
} else {
|
||||||
|
AddLog(LOG_LEVEL_DEBUG, ResponseData());
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
AddLog(LOG_LEVEL_DEBUG, ResponseData());
|
AddLog(LOG_LEVEL_DEBUG, ResponseData());
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user