mirror of
https://github.com/lumapu/ahoy.git
synced 2025-05-02 19:55:54 +02:00
Add 5s on mqtt discovery value expire time.
This commit is contained in:
parent
9716f1ff8b
commit
6e34b4adf9
1 changed files with 2 additions and 2 deletions
|
@ -154,7 +154,7 @@ void app::setup(uint32_t timeout) {
|
|||
|
||||
mMqtt.setup(addr, mqttTopic, mqttUser, mqttPwd, mqttPort);
|
||||
mMqttTicker = 0;
|
||||
|
||||
|
||||
mSerialTicker = 0;
|
||||
|
||||
if(mqttAddr[0] > 0) {
|
||||
|
@ -937,7 +937,7 @@ void app::sendMqttDiscoveryConfig(void) {
|
|||
doc["unit_of_meas"] = iv->getUnit(i);
|
||||
doc["uniq_id"] = String(iv->serial.u64, HEX) + "_" + uniq_id;
|
||||
doc["dev"] = deviceObj;
|
||||
doc["exp_aft"] = mMqttInterval;
|
||||
doc["exp_aft"] = mMqttInterval + 5; // add 5 sec if connection is bad or ESP too slow
|
||||
if (devCls != NULL) {
|
||||
doc["dev_cla"] = devCls;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue