• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

Asyn-MQTT-client how to set the client name

Q&A Forum › Category: ESP32 › Asyn-MQTT-client how to set the client name
0 Vote Up Vote Down
Juergen Schnorr asked 2 years ago

Hi,
me again. Quick questions for my understanding. I checked the documentation of Asyn-MQTT-client. But I am not 100% sure. 
Using this library I don’t have to set the MQTT client name for each ESP32 to be unique in the network. Am I correct? The device Mqtt client name is by default some chipID number?
I can set the name by using the “AsyncMqttClient& setClientId(const char* clientId)”? 
I am coming from the pubSubClient version where I had to set the Mqtt client name for each device to be unique on the network.
Regards,
 Juergen

1 Answers
0 Vote Up Vote Down
Sara Santos Staff answered 2 years ago

Hi.
I’m sorry for the delay in my response.
Yes, you are correct.
If you want to customize the client ID and set it to something other than the default chip ID, you can use the setClientId() function provided by the library. This allows you to set a specific client ID for your device if you have a specific you want.
 
I hope this answers your question.
Regards,
Sara

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [New Edition] Build ESP32-CAM Projects eBook – 2nd Edition April 16, 2025
  • [eBook Updated] Learn ESP32 with Arduino IDE eBook – Version 3.2 April 16, 2025

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2025 · RandomNerdTutorials.com · All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.