mirror of
https://github.com/arendst/Tasmota.git
synced 2025-04-24 23:07:17 +00:00
Merge pull request #7744 from denisfrench/MQTT_NO_RETAIN
MQTT_NO_RETAIN option for brokers that will drop connection otherwise
This commit is contained in:
commit
b6607755a4
@ -99,7 +99,8 @@
|
||||
#define MQTT_POWER_RETAIN false // [PowerRetain] Power status message may send retain flag (false = off, true = on)
|
||||
#define MQTT_SWITCH_RETAIN false // [SwitchRetain] Switch may send retain flag (false = off, true = on)
|
||||
#define MQTT_SENSOR_RETAIN false // [SensorRetain] Sensor may send retain flag (false = off, true = on)
|
||||
#define MQTT_BUTTON_SWITCH_FORCE_LOCAL false // [SetOption61] Force local operation when button/switch topic is set (false = off, true = on)
|
||||
#define MQTT_NO_HOLD_RETAIN false // [SetOption62] Disable retain flag on HOLD messages
|
||||
//#define MQTT_NO_RETAIN // Disable all retain flags (including LWT!) if unsupported by broker (eg Losant)
|
||||
|
||||
#define MQTT_STATUS_OFF "OFF" // [StateText1] Command or Status result when turned off (needs to be a string like "0" or "Off")
|
||||
#define MQTT_STATUS_ON "ON" // [StateText2] Command or Status result when turned on (needs to be a string like "1" or "On")
|
||||
@ -139,7 +140,7 @@
|
||||
#define MQTT_LWT_MESSAGE false // [SetOption10] Switch between MQTT LWT OFFLINE or empty message
|
||||
#define MQTT_POWER_FORMAT false // [SetOption26] Switch between POWER or POWER1 for single power devices
|
||||
#define MQTT_APPEND_TIMEZONE false // [SetOption52] Append timezone to JSON time
|
||||
#define MQTT_NO_HOLD_RETAIN false // [SetOption62] Disable retain flag on HOLD messages
|
||||
#define MQTT_BUTTON_SWITCH_FORCE_LOCAL false // [SetOption61] Force local operation when button/switch topic is set (false = off, true = on)
|
||||
#define MQTT_INDEX_SEPARATOR false // [SetOption64] Enable "_" instead of "-" as sensor index separator
|
||||
#define MQTT_TUYA_RECEIVED false // [SetOption66] Enable TuyaMcuReceived messages over Mqtt
|
||||
|
||||
|
@ -314,7 +314,7 @@ void MqttPublish(const char* topic, bool retained)
|
||||
ShowFreeMem(PSTR("MqttPublish"));
|
||||
#endif
|
||||
|
||||
#if defined(USE_MQTT_TLS) && defined(USE_MQTT_AWS_IOT)
|
||||
#if defined(USE_MQTT_TLS) && defined(USE_MQTT_AWS_IOT) || defined(MQTT_NO_RETAIN)
|
||||
// if (retained) {
|
||||
// AddLog_P(LOG_LEVEL_INFO, S_LOG_MQTT, PSTR("Retained are not supported by AWS IoT, using retained = false."));
|
||||
// }
|
||||
|
Loading…
x
Reference in New Issue
Block a user