Prepend system hostname to discovery_device_name #307
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description:
Hi there! This is mainly just a proposal for a quality-of-life adjustment stemming from my very-short-lived bug report #306 . Now that a client_id composed from the
discovery_device_nameis being passed along with the MQTT connection per #299 , this can cause connection conflict when more than one gateway is connecting to the same MQTT broker if one is lazy like myself and leaves the default configuration. So, this proposal is simply to change the default for that config and prepend the systems hostname to the configuration, making it by default<hostname>-TheengsGateway. This way, the name is less likely to cause conflict with multiple gateways!An alternative idea I had was maybe to generate a short random string/UID to prepend instead of the hostname, but I thought the hostname might be more meaningful to ID the system it's running on.
Thoughts?
Checklist: