crsherman / nodejs-poolController-mqtt

A MQTT integration for nodejs-poolController from tagyoureit
GNU General Public License v3.0
7 stars 4 forks source link

MQTT authentication #2

Closed quadflight closed 4 years ago

quadflight commented 5 years ago

Is there an option to use user/pass for mqtt ?

Thank you

crsherman commented 4 years ago

quadflight, Try replacing line 47 with the following code:

var host = 'http://your_IP_address_for_mqtt_broker:1883' var options = { username: 'your_username', password: 'your_password' } var client = mqtt.connect(host, options)

rsnodgrass commented 4 years ago

FYI, this is fixed in the latest pull request I just submitted by allowing specifying environment variable with username and password.

https://github.com/crsherman/nodejs-poolController-mqtt/pull/5

crsherman commented 4 years ago

Issue fixed with rsnodgrass pull request code.