Skip to content

Commit

Permalink
Add credentials managing for mqtt
Browse files Browse the repository at this point in the history
  • Loading branch information
lluis-protofy-xyz committed Oct 31, 2024
1 parent a134f60 commit f12e6fd
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/protodevice/src/device/Mqtt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ class Mqtt {
}
]

if(deviceComponents.protofy.credentials.mqtt){
componentObjects[0].config["username"] = deviceComponents.protofy.credentials.mqtt.username
componentObjects[0].config["password"] = deviceComponents.protofy.credentials.mqtt.password
}

componentObjects.forEach((element, j) => {
if (!deviceComponents[element.name]) {
deviceComponents[element.name] = element.config
Expand Down

0 comments on commit f12e6fd

Please sign in to comment.