Skip to content
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

Enchancement: Bridge notifications only locally #233

Closed
tomanwalker opened this issue Jul 29, 2016 · 3 comments
Closed

Enchancement: Bridge notifications only locally #233

tomanwalker opened this issue Jul 29, 2016 · 3 comments
Labels
Component: mosquitto-broker Type: Enhancement A new feature for a minor or major release.

Comments

@tomanwalker
Copy link

Would it be possible to introduce a configuration that would publish bridge state only locally (0 | 1). A remote broker does not allow retained messages to be published. However the notifications can be used on a device. E.g. I was thinking to make Raspberry Pi senseHAT App that would monitor the notification and then make it into LED light ( green | red ) based on state.

@ralight ralight added Type: Enhancement A new feature for a minor or major release. Component: mosquitto-broker labels Aug 8, 2016
@ralight
Copy link
Contributor

ralight commented Aug 8, 2016

Expanding bridge notifications like you've said seems like a reasonable plan. Needs a little bit of thought as to how it will work with the existing settings.

hardillb pushed a commit to hardillb/mosquitto that referenced this issue Nov 23, 2016
This update adds an option to only publishes bridge
notification messages to the local side of the bridge.

It adds a config file option called notifications_local_only
that accepts a boolean value, defaults to false to be
consistent with existing behaviour.

Fixes eclipse#233

Signed-off-by: Ben Hardill <[email protected]>
hardillb added a commit to hardillb/mosquitto that referenced this issue Dec 3, 2016
This update adds an option to only publishes bridge
notification messages to the local side of the bridge.

It adds a config file option called notifications_local_only
that accepts a boolean value, defaults to false to be
consistent with existing behaviour.

Fixes eclipse#233

Signed-off-by: Ben Hardill <[email protected]>
hardillb added a commit to hardillb/mosquitto that referenced this issue Dec 3, 2016
This update adds an option to only publishes bridge
notification messages to the local side of the bridge.

It adds a config file option called notifications_local_only
that accepts a boolean value, defaults to false to be
consistent with existing behaviour.

Fixes eclipse#233

Signed-off-by: Ben Hardill <[email protected]>
@cjmaynard
Copy link

I think there might be a problem here. Yesterday I tried Ben's patch and set notifications_local_only true. If I have a local client subscribed to $SYS/broker/connection/+/state and I shut down the remote broker such that the bridge is no longer connected, my local client does not get the notification update that the state is now '0'. When the remote broker is restarted and the bridge is reestablished, the local client does get the notification update that the state is now '1' though. (If I don't use notifications_local_only true, the client does get both '0' and '1' state changes, as expected ... but of course then the state topic is published across the bridge, which I want to avoid.)

@karlp
Copy link
Contributor

karlp commented Mar 7, 2018

I added a comment to 740b710 as well. I can confirm that I don't get the 0 state when the bridge connection is lost, only the 1 when it's established. using mosquitto devel branch

@lock lock bot locked as resolved and limited conversation to collaborators Aug 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Component: mosquitto-broker Type: Enhancement A new feature for a minor or major release.
Projects
None yet
4 participants