mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 00:09:51 +03:00
split HA-config in smaller blocks, add publish command
This commit is contained in:
@@ -40,7 +40,9 @@ using uuid::console::Shell;
|
||||
|
||||
#define EMSESP_MAX_JSON_SIZE_SMALL 256 // for smaller json docs when using StaticJsonDocument
|
||||
#define EMSESP_MAX_JSON_SIZE_MEDIUM 768 // for smaller json docs from ems devices, when using StaticJsonDocument
|
||||
#define EMSESP_MAX_JSON_SIZE_LARGE 2048 // for large json docs from ems devices, like boiler or thermostat data. Using DynamicJsonDocument
|
||||
// #define EMSESP_MAX_JSON_SIZE_LARGE 2048 // for large json docs from ems devices, like boiler or thermostat data. Using DynamicJsonDocument
|
||||
// mqtt does not publish larger than 1570 on esp8266, boiler message is split and now smaller
|
||||
#define EMSESP_MAX_JSON_SIZE_LARGE 1536 // for large json docs from ems devices, like boiler or thermostat data. Using StaticJsonDocument
|
||||
|
||||
namespace emsesp {
|
||||
|
||||
@@ -170,10 +172,10 @@ class Mqtt {
|
||||
|
||||
static AsyncMqttClient * mqttClient_;
|
||||
|
||||
static size_t maximum_mqtt_messages_;
|
||||
// static size_t maximum_mqtt_messages_;
|
||||
static uint16_t mqtt_message_id_;
|
||||
|
||||
static constexpr size_t MAX_MQTT_MESSAGES = 70; // size of queue
|
||||
static constexpr size_t MAX_MQTT_MESSAGES = 20; // size of queue
|
||||
static constexpr uint32_t MQTT_PUBLISH_WAIT = 200; // 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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user