MQTT User/Pass & Seperated values messages
dersch81 opened this issue · comments
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?