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:

I freshly installed the newest version but getting this error in the broker’s log:

2026-04-30 09:22:38: New client connected from 10.10.1.164:64990 as 7a77324f (p4, c1, k15, u'hass_agent').
2026-04-30 09:23:14: New connection from 10.10.1.164:54645 on port 1883.
2026-04-30 09:23:14: Protocol error from 10.10.1.164:54645: First packet not CONNECT (47).
2026-04-30 09:23:14: Client 10.10.1.164 [10.10.1.164:54645] disconnected: protocol error.

HASS.Agent’s log says:

2026-04-30 09:24:23.184 +02:00 [INF] [HASS_API] System connected with http://10.10.3.6:8123
2026-04-30 09:25:22.886 +02:00 [ERR] [MQTT] Error while connecting: Unable to connect to the remote server
2026-04-30 09:25:22.887 +02:00 [WRN] [MQTT] Disconnected: UnspecifiedError

I have no idea what is going wrong:

Sorted out: Cleared MQTT config in Agent, restartet and reconfigured. Working now