Page 1 of 2
mqtt connect loss
Posted: Sun Feb 05, 2023 5:39 pm
by d820513
Hi guys. Loss of connection by mqtt server after a certain time, what am I doing wrong? what is the solution to this problem. Thank you
Re: mqtt connect loss
Posted: Sun Feb 05, 2023 5:43 pm
by mnfisher
Please upload for program file (.fcfx) if you want people to be able to help.
Need to use 'full editor & preview' then 'Attachments' (beneath message)
Martin
Re: mqtt connect loss
Posted: Sun Feb 05, 2023 6:11 pm
by d820513
my project
Re: mqtt connect loss
Posted: Sun Feb 05, 2023 6:14 pm
by d820513
tell me what algorithm of the program I should use so that the connection is stable, if the connection is lost, so that it can be restored
Re: mqtt connect loss
Posted: Sun Feb 05, 2023 6:38 pm
by mnfisher
I think the idea is to check if an error has occurred and re-connect if needed (looking at examples in the wiki at
https://www.flowcode.co.uk/wiki/index.p ... IoT/Cloud))
So something like:
Martin
Re: mqtt connect loss
Posted: Sun Feb 05, 2023 6:59 pm
by d820513
thank Martin,
Re: mqtt connect loss
Posted: Sun Feb 05, 2023 7:03 pm
by mnfisher
Does it work?
Re: mqtt connect loss
Posted: Sun Feb 05, 2023 7:07 pm
by d820513
Yes, I'm checking now, I need time to find out
Re: mqtt connect loss
Posted: Sun Feb 05, 2023 7:13 pm
by d820513
he lost connection with the server again

(
Re: mqtt connect loss
Posted: Sun Feb 05, 2023 7:20 pm
by d820513
I don't know why, but the microcontroller loses communication with the server