DennisOSRM / hms-mqtt-publisher

HMS-XXXXW-2T MQTT publisher and Home Assistant addon
BSD 2-Clause "Simplified" License
111 stars 16 forks source link

Allow customization of mqtt client name #105

Open dicer opened 6 months ago

dicer commented 6 months ago

I now have two containers running with hms-mqtt-publisher inside and everything seems to be working ok. I just get a lot (3-4 per second) of the following messages in my mosquitto log: 1709505662: Client hms800wt2-mqtt-publisher-ha already connected, closing old connection.

I think this is because both instances are using the same client name when connecting to mqtt. I see two possibilities:

Is it possible to do this?

dicer commented 6 months ago

I manually changed this in the code for the second container and can confirm that the name is the reason for the connection to mqtt dropping all the time.