Tasmota: MQTT keepalive interval

Created on 3 Feb 2019  路  8Comments  路  Source: arendst/Tasmota

Have you look for this feature in other issues and in the wiki?
Yes

Is your feature request related to a problem? Please describe.
There seems to be no option to customize the MQTT keepalive interval ( fixed to 10 sec. )

Describe the solution you'd like
the option to personalize the MQTT keepalive interval

Describe alternatives you've considered
fix the new value in the code at the compile time.

Additional context
_Add any other context or screenshots about the feature request here._

Please evaluate to add the option to configure the MQTT keepalive interval today fixed at 10sec. Some times a value of 30 or even 60 can be acceptable and in the environments with lot of the devices it can help to lower the basic network traffic as mqtt server log as well.

Thanks

question

Most helpful comment

6.4.1.10(eab6be8-basic) bin and 2.5.0beta2 core for all devices around my house.
Indeed, checked it one more time and discovered it as 2.4.2 (!!!). Time to reflash it :-)

Thanks for the hint.

All 8 comments

MQTT_KEEPALIVE is defined in PubSubClient.h which may be found in the PubSubClient-EspEasy-2.6.09 folder under libraries.

If you have a special use case for a different value it is recommended to change it there before compiling your custom use case firmware/binary.

Closing this issue as it has been answered.

Support Information

See Wiki for more information.
See Chat for more user experience.

I agree on that and you can change at the code level but I think binary compilation for newbies, like me, can fail due to many reasons so I'd like to suggest it as an standard configurable option.

At this moment we do not have any way to call back to the driver to set it during compile time or run time. It is unlikely that a keepalive value higher than 10 would yield any benefit unless you have a 2400bps wifi connection. MQTT is very lightweight and you have to send tens of thousands of messages to make a notable impact on anything.

indeed one tasmota device on my setup is flooding the mqtt server log. Maybe due to something more complex at mqtt client and/or server level or just a poor wifi coverage case, I don't know and I must investigate deeply, any way log filled at 10 seconds messages rate didn't help for sure.

Anyway, thanks for the interest and the prompt feedback.

@iomax which core are you using?
If 2.3.0 try 2.5.0.
If 2.5.0 try 2.3.0
If 2.4.2 try 2.5.0

We have saw that depending on your wifi setup, some cores work better than others.

6.4.1.10(eab6be8-basic) bin and 2.5.0beta2 core for all devices around my house.
Indeed, checked it one more time and discovered it as 2.4.2 (!!!). Time to reflash it :-)

Thanks for the hint.

Was this page helpful?
0 / 5 - 0 ratings