Closed emes closed 3 years ago
Hi @emes You already get different cliendIds at start. What is the purpose for making them configurable?
The current client ids are random. That's fine when you're running one instance of homebridge-mqtt. I run six instances, so if debugging at the mqtt broker, I need to figure out which instance got which random string.
Configurable client-ids are pretty common. If you're really averse to adding an additional configuration option. Then I could revise with just something like this in model.js:
options.clientId = this.config.topic_prefix || 'homebridge-mqtt_' + Math.random().toString(16).substr(2, 8);
It's a little less flexible, but would allow for easily identifiable ids for those not running a default single instance and nothing added to configuration.
If you're really averse to adding an additional configuration option.
No, I just wondered how people use homebridge-mqtt
Allow the mqtt client id to be configurable. This is helpful when running multiple instances of homebridge-mqtt.