Sometime after I re-authenticated using 2FA, I find that the MQTT connection keeps getting dropped within a minute of the vac going idle. The driver then reconnects, but the connection repeatedly gets dropped thereafter.
Yes, me too. I thought it was only an issue with my Roborock CurvX model. The Roborock iOS app appears stable when I check it. I believe the iOS app resubscribes to their MQTT servers at mqtt-us-3.roborock.com:8883 when the Roborock iOS app is launched.
I modified the Roborock Robot Vacuum driver to auto-retry connecting twice after an MQTT disconnect. After two connection attempts, the driver exits and waits for the scheduled job to refresh.
One could achieve this same reconnect logic using an HE Rule to detect when the driver's health status attribute is offline and then command the driver to Refresh. It would be wise in the Rule to check how many times the Rule retries to avoid creating an endless/runaway loop.
I have not been able to determine why the disconnect occurs, as other HE MQTT-based app connections are very stable.
My driver workaround is a temporary fix until the Roborock Robot Vacuum developer can investigate and recommend a more permanent solution.
warn Roborock healthStatus set to offline
info Roborock MQTT is Not Connected - skipping disconnect()
info Roborock executing 'disconnect()' interfaces.mqtt.isConnected()=false
info Roborock executing 'mqttClientStatus(Error: Connection lost: Connection lost)'
info Roborock healthStatus set to online
info Roborock subscribe topic:rr/m/o/2c4xt5g1KRrGi3wpks6oFz/e877cdaf/#
info Roborock MQTT connected successfully.. state.countConnectAttempts reset.
info Roborock ==> connect(): state.countConnectAttempts = 2
info Roborock executing 'mqttClientStatus(Status: Connection succeeded)'
info Roborock connecting mqttUser:e877cdaf to ssl://mqtt-us-3.roborock.com:8883
info Roborock ==> connect(): state.countConnectAttempts = 2
info Roborock MQTT is Not Connected - skipping disconnect()
info Roborock ==> connect(): state.countConnectAttempts = 1
error Roborock MQTT Connection Exception: Client is disconnected
info Roborock connecting mqttUser:e877cdaf to ssl://mqtt-us-3.roborock.com:8883
info Roborock ==> connect(): state.countConnectAttempts = 0
info Roborock MQTT is Not Connected - skipping disconnect()
warn Roborock healthStatus set to offline
info Roborock MQTT is Not Connected - skipping disconnect()
info Roborock executing 'disconnect()' interfaces.mqtt.isConnected()=false
Iām not seeing any errors at all. My logs are actually weirdly clean since the last reconnect on Jan 1.
Hate to give the cheap troubleshooting answer, but can you reboot your Hubitat hub(s) and see if it helps? When I was building the driver, I ran into some odd MQTT behavior and a reboot fixed it for me.
LMK if that changes anything. Also curious if anyone else is seeing this.
To note:
This connection is actually given from your user/pass login. The system passes the app the proper connection points. If you turn on debug and reauthorize, you should see these values.
Rebooted the C8 hub, but still seeing disconnects after 1-2 min...
I have highlighted the log lines showing MQTT disconnects. It looks like the Roborock MQTT is getting a "Client is disconnected" message when trying to re-connect?