MQTT Constant Disconnects and Reconnects After Reboot
On each startup I find HASS Agent isn't communicating over MQTT. Looking at the status it flips rapidly between connected and reconnected.
Looking at the Mosquito MQTT Broker logs, the previously used ID is showing as still connected, as though it didn't disconnect cleanly.
The only thing I can spot in the HASS Agent logs is the connection confirmations several times per second.
I can work around this for now, by updating the ID for the MQTT session in the HASS Agent config.
Solution:Jump to solution
I think @Amadeo was on to something. I had a prior issue which I used task scheduler to start HASS agent as admin. I never deleted that after resolving my other issue...
14 Replies
Help us Help Others!
To help others find answers, you can mark your question as solved via
Right click solution message -> Apps -> ✅ Mark Solution
Help us Help You!
Please don't delete messages or posts because it makes it impossible to understand what happened. If you don't want your messages to be seen then don't post here.
Please provide us with the version number of your app.
You can find it by clicking the ? at the bottom of the main page and checking under the logo that shows.Please provide us with your integration version number.
You can find it in HACS -> HASS.Agent 2 -> Top left
for installed version number.
We will help as soon as possible.
While you're waiting you can try the following:
- Checkout the documentation. - Search here in discord for previously solved similar issues.
@Amadeo
@DrR0x
There is other instance of HASS.Agent (or satellite service) that is using the same clientid
And they fight for connection aż mqtt broker will connect with only one specific clientid
@CrispyTheGoat for improving the docs, do you have 2 copies of the hass.agent fork, or have you got both an original lab02 and fork copy installed?
sensitive-blueOP•3d ago
I have the forked version as far as I am aware, as well as the media and notification add-on I think. How can I check best?
How might I confirm which that is, as I would have thought changing the ID on one would have solved that?
sensitive-blueOP•3d ago
sensitive-blueOP•3d ago
oh wait
https://github.com/LAB02-Research/HASS.Agent, this is pre-fork version
Solution
sensitive-blue•3d ago
I think @Amadeo was on to something. I had a prior issue which I used task scheduler to start HASS agent as admin. I never deleted that after resolving my other issue...
sensitive-blueOP•3d ago
Meaning it has been startinmg a second copy on boot everytime.
sensitive-blueOP•3d ago
Okay all good, will add a new section to troubleshooting for people to check this
sensitive-blueOP•3d ago
Sorry for taking up your time and thanks again for such a snappy response