Skip to content

MQTT User/Pass & Seperated values messages #1

@dersch81

Description

@dersch81

Hi,

i have a User/Pass protected MQTT Broker. How can pass the credentials with your script?

That's the way i found. Would you use another way?
if status: debug("Success with message (for current readings) <{0}>".format(jsonString)) if not args.dryRun: publish.single(args.topic, jsonString, hostname=args.host, auth={'username':"USER", 'password':"PASS"}) else: debug("Failure with message <{0}>".format(jsonString)) if not args.dryRun: publish.single(args.topicError, jsonString, hostname=args.host, auth={'username':"USER", 'password':"PASS"})

Besides i would like to have the values in seperated messages. Would you help me to change your script in that way?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions