mcer12 / Hugo-ESP8266

Hugo is a 4-button ESP8266 Wi-Fi Remote, Arduino compatible and simple to use.
MIT License
110 stars 11 forks source link

MQTT client ID should unique/random #7

Closed giddyhup closed 5 years ago

giddyhup commented 5 years ago

Duplicate MQTT client IDs are against specifications. Each device should have its own unique ID. When multiple Hugos are in use this may cause conflicts. Possible conflicts are mitigated since a Hugo is connected to the broker only for a short while but it would be better if the ID would be randomized (as it is done in other projects) and not hardcoded.

Edit: PS.: ~I would also consider randomizing OTA names.~ In OTA names this seems to already be implemented.

mcer12 commented 5 years ago

Last three segments (6 characters) of the MAC address will be appended in the device name. I will let you know once the update is ready.

mcer12 commented 5 years ago

@giddyhup Try out latest sketch