Hi,
I did a MQTT connection from a Multi II to HomeAssistant.
For that I created on the HomeAssistant a /share/mosquitto/mosquitto.conf, which creates a MQTT briged to the MQTT broker of HomeAssistant: persistence true allow_anonymous true connection victron address 192.168.xxx.xxx:1883 # IP und Port des Victron-Brokers #remote_username xxxx # Benutzername für Victron MQTT #remote_password xxxx # Passwort für Victron MQTT topic N/xxxx/# in 0 victron/ # Eingehende Topics von Victron, xxxx is ETH MAC adress #topic R/xxxx/# out 0 victron/ # Ausgehende Topics zu Victron #topic W/xxxx/# out 0 victron/ # Schreibzugriffe zu Victron bridge_insecure true # Deaktiviert Zertifikatsprüfung (wichtig bei Victron)
A Node-RED flow creates the cyclic MQTT keepalive.
But I want to activate the authentification and security in the communication:
RemoteConsole/Settings/General/LocalNetworkSecurityProfile from unsecured to weak or secured.
Then I have to put a password.
The MQTT broker in HomeAssistand needs a username, if a password is required.
But I cannot find the username.
What is the username? Is it hardcoded in the Victron OS (v3.66)?
I think the username is not used.
If I activate a password, I can connect via MQTT Explorer, no matter which username I use.
So, I think, the implementation in HomeAssistant has got a problem !?
I found it.
I had in the mosquitto.conf: remote_username nomatters # comment remote_password password # comment
But I could see in WireShark that both values were transfered to the victron MQTT with all caracters including the comments.
So I deleted all caracters after the username and password and the connection is established.