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.
No description
No description
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...
Jump to solution
14 Replies
HASS.Agent Helper
Help us Help Others!
To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> ✅ Mark Solution
From An unknown user
HASS.Agent Helper
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.
HASS.Agent Helper
@Amadeo @DrR0x
Amadeo
Amadeo3d ago
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
DrR0x
DrR0x3d ago
@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-blue
sensitive-blueOP3d 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-blue
sensitive-blueOP3d ago
No description
sensitive-blue
sensitive-blueOP3d ago
oh wait
DrR0x
DrR0x3d ago
Solution
sensitive-blue
sensitive-blue3d 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-blue
sensitive-blueOP3d ago
Meaning it has been startinmg a second copy on boot everytime.
sensitive-blue
sensitive-blueOP3d ago
No description
DrR0x
DrR0x3d ago
Okay all good, will add a new section to troubleshooting for people to check this
sensitive-blue
sensitive-blueOP3d ago
Sorry for taking up your time and thanks again for such a snappy response

Did you find this page helpful?