Configureable MQTT Broker discovery prefix #955
Replies: 2 comments 1 reply
-
In the earliest days of this project, I did have this option configurable, but nobody knew what it meant and, people would change it without understanding and break discovery unintentionally so, almost 5 years ago, I decided to just hardcode it and see what would happen (it was part of a larger effort to minimize configuration options). With ~10,000 installs, I can say that this is only the 2nd or 3rd time it's been brought up which confirms to me it was the correct decision. Of course there will be exceptions to that rule, as you are bringing up here, but having a config option for every possibly custom configuration makes little sense when those exceptions are extremely rare and I think there is basically zero reason an average user should change this setting (the only viable reason I can come up with is multiple HA instances using the same broker, which just sounds like a horrible idea in general). Advanced users that enjoy causing themselves pain by changing defaults can just fork this project and do whatever they want! |
Beta Was this translation helpful? Give feedback.
-
With these numbers your decision is for sure correct. I am fine with that and can work with the current code. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
After installing the ring-mqtt-addon I had trouble with the auto discovery which did not worked.
By checking the logs and using the MQTT Explorer Addon I figured out that the configTopic for the discovery prefix is hardcoded to the MQTT Broker default of HASS which is "homeassistant".
src: ring-mqtt-main\devices\base-ring-device.js
snip
const configTopic =
homeassistant/${entity.component}/${this.locationId}/${this.deviceId}_${entityKey}/config
this.debug(
HASS config topic: ${configTopic}
, 'disc')this.debug(discoveryMessage, 'disc')
snap
I changed my discovery topic a long time ago when I configured the MQTT Broker and so the auto discovery did not work.
After changing it back to homeassistant the auto discovery worked flawless.
I can imagine that not everybody is using the default so the possibility to configure it would be nice.
Thanks tsightler for the great work so far. Having this now up and running in HA is such a big feature addon.
I still do not understand why the official ring add-on is supporting only a few features.
Beta Was this translation helpful? Give feedback.
All reactions