Hi everyone,
Since switching from Username/Password authentication to the new VRM API tokens, I am experiencing a persistent issue where my Node-RED MQTT connection drops after a few hours (sometimes after 1 hour, sometimes after 24–48 hours) and gets stuck in an endless connecting loop.
Interestingly, if I trigger a manual deploy in Node-RED, the connection drops immediately and cannot recover either.
Working vs. not working:
The symptoms:
-
The MQTT nodes switch to a yellow
connectingstate and stay there forever. -
During this downtime, the same API token still works perfectly for HTTP requests (e.g., VRM forecast queries via REST API). Only MQTT is blocked.
-
The only way to restore the connection is to generate a completely new API token in the VRM portal and paste it into Node-RED. Once a new token is applied, it connects instantly—until the next drop/deploy.
My current configuration in Node-RED (standard MQTT node):
-
Broker:
mqtt64.victronenergy.com(Port 8883, TLS active) -
Protocol: MQTT V5 (also not working with V3.1.1)
-
Username: My registered VRM Email address
-
Password: The VRM API-Token “Token abc123…”
-
Keep-Alive: 30 seconds
-
Session: “Use clean session” is enabled
-
Client ID: Left blank for auto-generation (I also tried a static Client ID, which didn’t help).
Node-RED System Logs during the loop:
Plaintext
Jun 11 14:56:44 host env[29201]: 11 Jun 14:56:44 - [info] [mqtt-broker:K40 - mqtt64.victronenergy.com] Connection failed to broker: c0xxxxxxxx86_Node-Red@mqtts://mqtt64.victronenergy.com:8883
Jun 11 14:57:04 host env[29201]: 11 Jun 14:57:04 - [info] [mqtt-broker:K40 - mqtt64.victronenergy.com] Connection failed to broker: c0xxxxxxxx86_Node-Red@mqtts://mqtt64.victronenergy.com:8883
It seems like the VRM broker puts my API token (or my IP/Client ID combination) into a (temporary?) “lockout” or blacklist after a disconnect or rapid reconnect attempt, treating it as a stale or duplicate session.
Is there a specific Client ID naming convention required for API tokens to force-kill old sessions, or is the VRM gateway rate-limiting Node-RED’s built-in reconnect mechanism?
Any insights from the VRM portal/broker team would be highly appreciated!
Thanks in advance, Martin


