esp8266-anemometer icon indicating copy to clipboard operation
esp8266-anemometer copied to clipboard

How to provide mqtt username and password ?

Open asking23 opened this issue 5 years ago • 5 comments

I am not able to find mqtt username and password field. Kindly please update.

asking23 avatar Jun 25 '19 12:06 asking23

You need to change line if (client.connect(mqtt_id)) { in: if (client.connect(mqtt_host, mqtt_id, mqtt_password)) {

Also, you need to add following row at the end of myconfig.h file: const char* mqtt_password = "your_mqtt_password_here";

Zoldex avatar Feb 19 '20 18:02 Zoldex

Hello, good evening. what about user name of mqtt is the same as the password? could you please help me? Thank you very much

ocram76 avatar Apr 19 '20 22:04 ocram76

You need to change line if (client.connect(mqtt_id)) { in: if (client.connect(mqtt_host, mqtt_id, mqtt_password)) {

Also, you need to add following row at the end of myconfig.h file: const char* mqtt_password = "your_mqtt_password_here";

Hi, the problem even putting the password remains. The error that is generated is (Socket error on client , disconnecting) I also tried to add the field user but without success. can you help me? thank you

Soloio666 avatar Aug 28 '20 17:08 Soloio666

You need to change line if (client.connect(mqtt_id)) { in: if (client.connect(mqtt_host, mqtt_id, mqtt_password)) { Also, you need to add following row at the end of myconfig.h file: const char* mqtt_password = "your_mqtt_password_here";

Hi, the problem even putting the password remains. The error that is generated is (Socket error on client , disconnecting) I also tried to add the field user but without success. can you help me? thank you

Resolved. Thanks to the great Luigi Duchi now it works. Best regards!

Soloio666 avatar Aug 29 '20 05:08 Soloio666

You need to change line if (client.connect(mqtt_id)) { in: if (client.connect(mqtt_host, mqtt_id, mqtt_password)) { Also, you need to add following row at the end of myconfig.h file: const char* mqtt_password = "your_mqtt_password_here";

Hi, the problem even putting the password remains. The error that is generated is (Socket error on client , disconnecting) I also tried to add the field user but without success. can you help me? thank you

Resolved. Thanks to the great Luigi Duchi now it works. Best regards!

Thaks i have the solution... btw. brainfreez ;) mqtt_host, mqtt_id, mqtt_password mqtt_host= ip mqtt_id= username mqtt_password = password

wuschel1337 avatar May 11 '21 17:05 wuschel1337