Public broker best protocol?

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
User avatar
uxhamby
Normal user
Posts: 132
Joined: 29 Dec 2016, 18:13
Location: Toronto Canada

Public broker best protocol?

#1 Post by uxhamby » 16 Dec 2019, 20:26

With mega-20191003, what is the preferred protocol to use with public MQTT broker: broker.hivemq.com ?

Using PiDome as I have historically done, I am getting:
513156: WD : Uptime 9 ConnectFailures 0 FreeMem 13312 WiFiStatus 3
521930: MQTT : Intentional reconnect
522059: MQTT : Failed to connect to broker
530602: EVENT: Clock#Time=Mon,19:21
543156: WD : Uptime 9 ConnectFailures 0 FreeMem 13288 WiFiStatus 3
552161: MQTT : Intentional reconnect
552292: MQTT : Failed to connect to broker
in my log.
Build:⋄ 20104 - Mega
System Libraries:⋄ ESP82xx Core 2_4_1, NONOS SDK 2.2.1(cfd48f3), LWIP: 2.0.3 PUYA support
Git Build:⋄ mega-20191003
Plugins:⋄ 46 [Normal]
Build Md5: 27960afb754da96ccacbff1c54d3ab
Md5 check: passed.
Build Time:⋄ Oct 3 2019 02:16:31
Binary Filename:⋄ ESP_Easy_mega-20191003_normal_core_241_ESP8266_4M1M.bin

Thanks,

Brian H.

TD-er
Core team member
Posts: 8739
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Public broker best protocol?

#2 Post by TD-er » 16 Dec 2019, 21:34

What timeout settings do you use in the controller?

All MQTT controllers do share a lot of code. Only the way the strings are formatted differs between MQTT controllers.
So if one MQTT controller looses connection, then all will.

Can you try one of the latest builds, as I did fix some issues with the PubSubClient, regarding reconnect issues.

User avatar
uxhamby
Normal user
Posts: 132
Joined: 29 Dec 2016, 18:13
Location: Toronto Canada

Re: Public broker best protocol?

#3 Post by uxhamby » 16 Dec 2019, 21:46

Yes, I have upgraded to the latest release:
mega-20191208 (ESP_Easy_mega-20191208_normal_ESP8266_4M1M.bin)
. . . . since I made my original post.

Behaviour seems to be the same as far as MQTT goes.

Brian H.

User avatar
uxhamby
Normal user
Posts: 132
Joined: 29 Dec 2016, 18:13
Location: Toronto Canada

Re: Public broker best protocol?

#4 Post by uxhamby » 16 Dec 2019, 21:59

Controller "Client Timeout:" = 10 ms

TD-er
Core team member
Posts: 8739
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Public broker best protocol?

#5 Post by TD-er » 16 Dec 2019, 21:59

Please change the host to IP and back again to DNS and set the hostname again.
Then save.
Also check the timeout, to make sure it is not too low.
Verify with performing a ping to the host and see what the average ping is.
Then set the timeout to at least 3 times this average or minimum of about 300 msec if it is an online service.

User avatar
uxhamby
Normal user
Posts: 132
Joined: 29 Dec 2016, 18:13
Location: Toronto Canada

Re: Public broker best protocol?

#6 Post by uxhamby » 16 Dec 2019, 22:14

Ok, I followed your suggestions but arbitrarily just added a zero to the Client Timeout so it is now set to 1000ms.

My log is looking much quieter now.

Thanks,

Brian H.

TD-er
Core team member
Posts: 8739
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Public broker best protocol?

#7 Post by TD-er » 17 Dec 2019, 08:42

Good to hear and thanks for the feedback.

I was thinking about making the timeout dynamic, with using roughly 3 times the ping duration and some adjustments when a low timeout still produces errors.

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Semrush [Bot] and 50 guests