Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Lost connection to MQTT bruker, reconnect automatically.
#1
My Android units running IoT do every now and then (a couple of times pr day) loose connection to my Mosquitto MQTT broker. On Linux Mint it seems far more stable but if I reboot Mosquitto, they all loose connection and have to manually be reconnected.

I did assign a variable to the MQTT Connection Status to show in a Dashboard but the value remains "1" even when the connection is broken (or at least not updating any more).

Any way to automatically reconnect and also have a reliable status indication?
Reply
#2
Hi,
After the disconnection the connection status color and the connection status variable are not working.
This is an important issue. 
The app is connected again after some seconds but the user can't see this reconnection.
I will fix this issue on the next update.
Reply
#3
Hi,
I have a reconnection problem with the MQTT broker.
I use Node Red as a broker and Virtuino is subscribed in topic e.g "data"
The value display is getting the values from the topic normally but if a re-deploy at node-red(broker) the subscription is no longer active. I do not get any values from the broker.
The connection status is remaining ON, but no incomming data.
If a make an action in a button to connect to the broker, tha virtuino is subscribed again and works normally.
So the automatic reconnection is not working. Is it a bug?
Reply
#4
Same thing in my system. It would be nice to have automatic reconnection and also automatic connection on Virtuino startup.
Reply
#5
(10-05-2023, 09:16 PM)SveinHa Wrote: Same thing in my system. It would be nice to have automatic reconnection and also automatic connection on Virtuino startup.

Here I have add that if you restart Virtuino, all connections are established.
Also I checked to publish after a node-red(mqtt broker) re-deploy. It is OK.
Only the subscription to the topic is lost. Not the connection to the broker.
Any ideas?
Reply
#6
(10-06-2023, 05:58 AM)samxhot Wrote: Only the subscription to the topic is lost. Not the connection to the broker.

Same here. Reconnect refreshes the subscriptions.
Reply
#7
Hi,
Not sure if this is a bug.

I did some tests and I only have this problem when the parameter "Clean season" is true.
I would like you to do some tests with "Clean season=false"  and update this post.

Ιn case the server disconnects, the application needs some time to realize it. 
If within this time the broker restarts the application does not detect it. 
In this case, I think the problem is in the server side, which loses the list of topics.
I am very interested in fixing this behavior and would like more details.
Reply
#8
(10-30-2023, 10:43 PM)iliaslamprou Wrote: I did some tests and I only have this problem when the parameter "Clean season" is true.
I would like you to do some tests with "Clean season=false"  and update this post.

"Clean session" is unchecked in my application.
Reply
#9
Are you getting a "preview could not be loaded' error?
Reply
#10
(10-31-2023, 03:16 AM)ervinhaley Wrote: Are you getting a "preview could not be loaded' error?

I haven't seen that error (as far as I remember).
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)