Changed MQTT_KEEPALIVE and Retained message

This commit is contained in:
Stephan Hadinger 2019-06-05 22:37:23 +02:00
parent dc79718c10
commit 3b1ba3bbd5
2 changed files with 2 additions and 3 deletions

View File

@ -435,8 +435,7 @@ void KNX_CB_Action(message_t const &msg, void *arg);
#define MQTT_MAX_PACKET_SIZE 1000 // Bytes
#endif
#ifndef MQTT_KEEPALIVE
//#define MQTT_KEEPALIVE 15 // Seconds
#define MQTT_KEEPALIVE 30 // Changed to 30s which is min for AWS IoT, hoping it does not break anthing
#define MQTT_KEEPALIVE 15 // Seconds
#endif
#ifndef MQTT_TIMEOUT
#define MQTT_TIMEOUT 10000 // milli seconds

View File

@ -237,7 +237,7 @@ void MqttPublish(const char* topic, bool retained)
{
char *me;
#ifdef USE_MQTT_AWS_IOT
AddLog_P(LOG_LEVEL_INFO, S_LOG_MQTT, PSTR("Retained is not supported by AWS IoT, using retained = false."));
AddLog_P(LOG_LEVEL_DEBUG, S_LOG_MQTT, PSTR("Retained are not supported by AWS IoT, using retained = false."));
retained = false; // AWS IoT does not support retained, it will disconnect if received
#endif