-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[mqtt] allow disabling discovery #8077
Conversation
Signed-off-by: Jan N. Klug <[email protected]>
Travis tests were successfulHey @J-N-K, |
This all sounds fishy to me, so please let me try to understand the real issue first. In general:
If those two statements are taken into account, I would assume there would not be any problem with #8056, is this correct? |
The problem seems to be that the discovery service „silently“ listens to what is sent by the broker. This requires a subscription to a topic or a group of topics. Some brokers close the connection if they receive subscriptions for topics they don’t support (IMO broken, but out of our range to fix). So the only solution is to prevent subscription to „unwanted“ topics on these brokers and that requires disabling discovery. But only for that broker, not in general (there might be a second broker used for homie devices). |
Ok, thanks for the explanation. |
Agreed. I‘ll change to „discoveryEnabled“ with a default „true“, so nothing changes for users. |
Signed-off-by: Jan N. Klug <[email protected]>
Travis tests were successfulHey @J-N-K, |
By default discovery services (like homie or homeassistant) are enabled on a broker. | ||
This behaviour can be controlled with a configuration parameter. | ||
|
||
* __enableDiscovery__:If set to true, enables discovery on this broker, if set to false, disables discovery services om this broker. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* __enableDiscovery__:If set to true, enables discovery on this broker, if set to false, disables discovery services om this broker. | |
* __enableDiscovery__:If set to true, enables discovery on this broker, if set to false, disables discovery services on this broker. |
@@ -50,6 +50,7 @@ | |||
protected final MqttService service; | |||
|
|||
protected String brokerID = ""; | |||
protected boolean discoveryDisabled = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
still saying "disabled" here
@@ -181,6 +187,12 @@ | |||
<label>Broker ID</label> | |||
<description>Each system wide configured MQTT broker has a unique broker ID.</description> | |||
</parameter> | |||
<parameter name="disableDiscovery" type="boolean"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
still saying "disable" here
Signed-off-by: Jan N. Klug <[email protected]>
* allow disabling discovery Signed-off-by: Jan N. Klug <[email protected]> Signed-off-by: CSchlipp <[email protected]>
* allow disabling discovery Signed-off-by: Jan N. Klug <[email protected]> Signed-off-by: MPH80 <[email protected]>
* allow disabling discovery Signed-off-by: Jan N. Klug <[email protected]>
* allow disabling discovery Signed-off-by: Jan N. Klug <[email protected]>
* allow disabling discovery Signed-off-by: Jan N. Klug <[email protected]>
* allow disabling discovery Signed-off-by: Jan N. Klug <[email protected]>
* allow disabling discovery Signed-off-by: Jan N. Klug <[email protected]> Signed-off-by: Daan Meijer <[email protected]>
* allow disabling discovery Signed-off-by: Jan N. Klug <[email protected]>
This pull request has been mentioned on openHAB Community. There might be relevant details there: https://community.openhab.org/t/integrate-dyson-pure-cool-link/40416/92 |
Fixes #8056
This adds a parameter to the broker to disable discovery. By default this is set to false (so discovery is enabled), which is the same behaviour like before.
Signed-off-by: Jan N. Klug [email protected]