gabriel delset
gabriel delset

Reputation: 13

MQTT connection NODE-RED ; variable for username and password

i would need some help for my node-red code,

i am curently using the "mqtt-out" to connect to a mqtt broker

for the moment, i have put my variable in the server and port : ${BROKER_MQTT_HOST} and ${BROKER_MQTT_PORT}

but , i can't pass them for the username and password , if you have any idea it would be great

here is my node :

[ { "id": "fbd24183c1d90d26", "type": "mqtt out", "z": "6612f3330cf9f37d", "name": "Broker MQTT", "topic": "${BROKER_MQTT_TOPIC}", "qos": "", "retain": "", "respTopic": "", "contentType": "", "userProps": "", "correl": "", "expiry": "", "broker": "6706370c3a497665", "x": 820, "y": 580, "wires": [] }, { "id": "6706370c3a497665", "type": "mqtt-broker", "name": "", "broker": "${BROKER_MQTT_HOST}", "port": "${BROKER_MQTT_PORT}", "clientid": "", "autoConnect": true, "usetls": false, "protocolVersion": "4", "keepalive": "60", "cleansession": true, "birthTopic": "", "birthQos": "0", "birthPayload": "", "birthMsg": {}, "closeTopic": "", "closeQos": "0", "closePayload": "", "closeMsg": {}, "willTopic": "", "willQos": "0", "willPayload": "", "willMsg": {}, "userProps": "", "sessionExpiry": "", "credentials": { "user": "", "password": "" } } ]

Upvotes: 0

Views: 147

Answers (1)

gabriel delset
gabriel delset

Reputation: 13

ok i had just to fill the user and password with variable , it work just like the other field

Upvotes: 0

Related Questions