mqtt connect loss

For general Flowcode discussion that does not belong in the other sections.
d820513
Posts: 56
http://meble-kuchenne.info.pl
Joined: Thu Aug 19, 2021 1:14 pm
Has thanked: 2 times
Been thanked: 1 time

mqtt connect loss

Post 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
Attachments
mqtt_connetct_problem.jpg
mqtt_connetct_problem.jpg (83.12 KiB) Viewed 3555 times

mnfisher
Valued Contributor
Posts: 1635
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 142 times
Been thanked: 761 times

Re: mqtt connect loss

Post 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

d820513
Posts: 56
Joined: Thu Aug 19, 2021 1:14 pm
Has thanked: 2 times
Been thanked: 1 time

Re: mqtt connect loss

Post by d820513 »

my project
Attachments
mqtt_tnk65_2.1.fcfx
(16.67 KiB) Downloaded 558 times

d820513
Posts: 56
Joined: Thu Aug 19, 2021 1:14 pm
Has thanked: 2 times
Been thanked: 1 time

Re: mqtt connect loss

Post 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

mnfisher
Valued Contributor
Posts: 1635
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 142 times
Been thanked: 761 times

Re: mqtt connect loss

Post 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:
mqtt.fcfx
(18.92 KiB) Downloaded 494 times
Martin

d820513
Posts: 56
Joined: Thu Aug 19, 2021 1:14 pm
Has thanked: 2 times
Been thanked: 1 time

Re: mqtt connect loss

Post by d820513 »

thank Martin,

mnfisher
Valued Contributor
Posts: 1635
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 142 times
Been thanked: 761 times

Re: mqtt connect loss

Post by mnfisher »

Does it work?

d820513
Posts: 56
Joined: Thu Aug 19, 2021 1:14 pm
Has thanked: 2 times
Been thanked: 1 time

Re: mqtt connect loss

Post by d820513 »

Yes, I'm checking now, I need time to find out

d820513
Posts: 56
Joined: Thu Aug 19, 2021 1:14 pm
Has thanked: 2 times
Been thanked: 1 time

Re: mqtt connect loss

Post by d820513 »

he lost connection with the server again :((

d820513
Posts: 56
Joined: Thu Aug 19, 2021 1:14 pm
Has thanked: 2 times
Been thanked: 1 time

Re: mqtt connect loss

Post by d820513 »

I don't know why, but the microcontroller loses communication with the server

Post Reply