mirror of https://github.com/arendst/Tasmota.git
Change MQTT timeout
Change MQTT_ARDUINOMQTT command timeout from 1 to 10 seconds
This commit is contained in:
parent
ce5264518d
commit
93460c6498
|
@ -1,6 +1,7 @@
|
|||
/* 6.2.1.11 20191002
|
||||
* Remove support for MQTT Client based on esp-mqtt-arduino by #define MQTT_LIBRARY_TYPE MQTT_ESPMQTTARDUINO
|
||||
* Add support for MQTT Client based on lwmqtt to be selected by #define MQTT_LIBRARY_TYPE MQTT_ARDUINOMQTT
|
||||
* Change MQTT_ARDUINOMQTT command timeout from 1 to 10 seconds
|
||||
*
|
||||
* 6.2.1.10 20180930
|
||||
* Add command RGBWWTable to support color calibration (#3933)
|
||||
|
|
|
@ -50,11 +50,6 @@ void KNX_CB_Action(message_t const &msg, void *arg);
|
|||
#define MODULE SONOFF_BASIC // [Module] Select default model
|
||||
#endif
|
||||
|
||||
#define USE_DHT // Default DHT11 sensor needs no external library
|
||||
#define USE_ENERGY_SENSOR // Use energy sensors (+14k code)
|
||||
#define USE_HLW8012 // Use energy sensor for Sonoff Pow and WolfBlitz
|
||||
#define USE_CSE7766 // Use energy sensor for Sonoff S31 and Pow R2
|
||||
|
||||
/*********************************************************************************************\
|
||||
* [sonoff-sensors.bin]
|
||||
* Provide an image with useful supported sensors enabled
|
||||
|
@ -272,10 +267,13 @@ void KNX_CB_Action(message_t const &msg, void *arg);
|
|||
#endif
|
||||
|
||||
#ifndef MQTT_MAX_PACKET_SIZE
|
||||
#define MQTT_MAX_PACKET_SIZE 1000
|
||||
#define MQTT_MAX_PACKET_SIZE 1000 // Bytes
|
||||
#endif
|
||||
#ifndef MQTT_KEEPALIVE
|
||||
#define MQTT_KEEPALIVE 15
|
||||
#define MQTT_KEEPALIVE 15 // Seconds
|
||||
#endif
|
||||
#ifndef MQTT_TIMEOUT
|
||||
#define MQTT_TIMEOUT 10000 // milli seconds
|
||||
#endif
|
||||
|
||||
#ifndef MESSZ
|
||||
|
|
|
@ -500,7 +500,7 @@ void MqttReconnect()
|
|||
#elif (MQTT_LIBRARY_TYPE == MQTT_ARDUINOMQTT)
|
||||
MqttClient.begin(Settings.mqtt_host, Settings.mqtt_port, EspClient);
|
||||
MqttClient.setWill(stopic, mqtt_data, true, 1);
|
||||
MqttClient.setOptions(MQTT_KEEPALIVE, true, 1000);
|
||||
MqttClient.setOptions(MQTT_KEEPALIVE, true, MQTT_TIMEOUT);
|
||||
// MqttClient.onMessageAdvanced(MqttMyDataCb);
|
||||
MqttClient.onMessage(MqttMyDataCb);
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue