Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By AutoDoc
#63527 I need to send my ESP serial number to my MQTT broker as the payload. ESP.getChipID returns a 32-bit integer, and MQTT wants a string. After much trial and error I have a solution, but there must be a better way. Here's what I'm doing:
Code: Select all...
char NRValue[8];
String(ESP.getChipId()).toCharArray(NRValue,8);
client.publish("DocTest/ChipID", NRValue);
...


Is there a better way?