HASS.Agent cannot connect to MQTT (Mosquitto) on one PC

Hi,

I’m having a strange issue with HASS.Agent MQTT connection, but only on one specific PC. I already have two other PCs connected via HASS.Agent → MQTT using the same broker without any problem. I use Mosquitto broker add-on and HASS.Agent on Windows 11.
On a new PC, HASS.Agent cannot connect to MQTT, even though the configuration is the same (only different username, password and client ID).

Mosquitto log shows:

New connection from <IP address> on port 1883.
Client "<client_id>" disconnected, not authorised.

after Mosquitto broker restart is shows:

Client <unknown> closed its connection.

In HASS.Agent MQTT status keeps cycling: connecting, stopped, failed.
Connection test to Home Assistant (API) works.
MQTT user/login configured in Mosquitto broker seems to disappear after a short time. Client ID is unique, Username/password are correct (doesnt contain any space etc.).

What I already tried:

  • Clean uninstall and reinstall of HASS.Agent
  • Removing AppData\Roaming\HASS.Agent
  • Restarting Home Assistant and Mosquitto broker
  • Disabling Satellite Service in HASS.Agent
  • Creating new MQTT users
  • Using a completely new client ID
  • Turning off IPv6 on this PC (this fixed Nabu Casa cloud connection delays)

I’m not sure what else to try. Thanks for help.

So I finally figured out the cause. By default, port 1880 was set instead of 1883 in the MQTT section of HASS.Agent. Such a silly mistake that I completely overlooked :man_facepalming: