mqtt faster out

This commit is contained in:
MichaelDvP
2020-06-17 07:30:28 +02:00
parent 15aa7d72db
commit f5f886b5ac
2 changed files with 2 additions and 2 deletions

View File

@@ -234,7 +234,7 @@ void Mqtt::loop() {
force_publish_ = false;
send_heartbeat(); // create a heartbeat payload
EMSESP::publish_all_values(); // add sensors and mqtt to queue
process_all_queue(); // publish everything on queue
// process_all_queue(); // publish everything on queue
}
// send out heartbeat

View File

@@ -123,7 +123,7 @@ class Mqtt {
static bool mqtt_retain_;
static constexpr uint8_t MQTT_QUEUE_MAX_SIZE = 50;
static constexpr uint32_t MQTT_PUBLISH_WAIT = 750; // delay between sending publishes, to account for large payloads
static constexpr uint32_t MQTT_PUBLISH_WAIT = 250; // delay between sending publishes, to account for large payloads
static constexpr uint8_t MQTT_PUBLISH_MAX_RETRY = 3; // max retries for giving up on publishing
static constexpr uint8_t MQTT_KEEP_ALIVE = 60; // 60 seconds. This could also be less, like 30 seconds
static constexpr uint32_t MQTT_RECONNECT_DELAY_MIN = 2000; // Try to reconnect in 2 seconds upon disconnection