Skip to content

Commit

Permalink
added username and password to mqtt client
Browse files Browse the repository at this point in the history
  • Loading branch information
oidebrett committed Dec 7, 2024
1 parent a5cb258 commit d5b45e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/matterflow/matterflow/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ async def read_input(self):

async def send_output(self, data):
# Connect to the MQTT broker
async with aiomqtt.Client(self.connection_settings["host"], self.connection_settings["port"]) as client:
async with aiomqtt.Client(hostname=self.connection_settings["host"], port=self.connection_settings["port"], username=self.connection_settings["username"], password=self.connection_settings["password"]) as client:
"""Publish a message to a specific topic."""
topic = data.get("topic", self.output_settings.get("default_topic"))
payload = data.get("payload")
Expand Down

0 comments on commit d5b45e4

Please sign in to comment.