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

forwarding broker in a message loop #2921

Closed
boilermanc opened this issue Oct 12, 2023 · 3 comments
Closed

forwarding broker in a message loop #2921

boilermanc opened this issue Oct 12, 2023 · 3 comments

Comments

@boilermanc
Copy link

Hi all, i am having a forwarding issue. I am running mosquitto version 2.0.11 mosquitto is an MQTT v5.0/v3.1.1/v3.1 broker. I have that running on a pi and that is the only thing on the pi other than tailscale. i have an esp32 that is running arduino code and connecting some sensors. i connect that to the broker pi at a local address and then forward off to a remote server. the remote address is a tailscale address. i have the data in the code set to send every 5 minutes. i can connect locally and tail the logs and see that that is indeed what happens.

on the other end, when i turn on the bridge it just constant stream of messages. non stop loop.

`2023-10-12 20:45:52.941 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Gravity_Sensors_Gravity_pH' changed from 13.77000046 to 13.81999969

2023-10-12 20:45:53.224 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Gravity_Sensors_Gravity_pH' changed from 13.81999969 to 13.77000046

2023-10-12 20:45:53.528 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Gravity_Sensors_Gravity_pH' changed from 13.77000046 to 13.81999969

2023-10-12 20:45:53.690 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Gravity_Sensors_Gravity_pH' changed from 13.81999969 to 13.77000046

2023-10-12 20:45:54.689 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Gravity_Sensors_Gravity_pH' changed from 13.77000046 to 13.81999969

2023-10-12 20:45:54.689 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Gravity_Sensors_Gravity_pH' changed from 13.81999969 to 13.77000046

2023-10-12 20:45:55.031 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Gravity_Sensors_Gravity_pH' changed from 13.77000046 to 13.81999969

2023-10-12 20:45:55.031 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Gravity_Sensors_Gravity_pH' changed from 13.81999969 to 13.77000046

2023-10-12 20:45:55.235 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Gravity_Sensors_Gravity_pH' changed from 13.77000046 to 13.82999992

2023-10-12 20:45:55.235 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Gravity_Sensors_Gravity_pH' changed from 13.82999992 to 13.81999969

2023-10-12 20:45:55.344 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Gravity_Sensors_Gravity_pH' changed from 13.81999969 to 13.77000046

2023-10-12 20:45:55.588 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Gravity_Sensors_Gravity_pH' changed from 13.77000046 to 13.81999969

2023-10-12 20:45:55.707 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Gravity_Sensors_Gravity_pH' changed from 13.81999969 to 13.82999992

2023-10-12 20:45:55.708 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Gravity_Sensors_Gravity_pH' changed from 13.82999992 to 13.81999969

2023-10-12 20:45:55.708 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Gravity_Sensors_Gravity_pH' changed from 13.81999969 to 13.77000046

2023-10-12 20:45:55.842 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Gravity_Sensors_Gravity_pH' changed from 13.77000046 to 13.81999969

2023-10-12 20:45:56.031 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Gravity_Sensors_Gravity_pH' changed from 13.81999969 to 13.77000046

2023-10-12 20:45:56.348 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Gravity_Sensors_Gravity_pH' changed from 13.77000046 to 13.8299999`

seems like a loop is being created but not sure where. here is my broker code:

`allow_anonymous true
listener 1883

connection bridge-to-remote
address this is my remote ip:1883 # <-- Replace with your remote broker's IP and port
bridge_attempt_unsubscribe false
bridge_protocol_version mqttv311
try_private false
start_type automatic
cleansession true
clientid bridge-local
notifications false
topic # both 0`

any help would be appreciated. if more information is needed, let me know.

thanks!

@karlp
Copy link
Contributor

karlp commented Oct 13, 2023

both is definitely your problem. Have a little thought for what you're trying to do there...

@boilermanc
Copy link
Author

that was a little cryptic but i figured out from the second part that i must not be doing right. did some more research and it was all reviled. all set now. thanks for nudging me along.

@karlp
Copy link
Contributor

karlp commented Oct 13, 2023

sorry, it wasn't meant to be as cryptic as it came out, github's autoformatting swallowed the # and made it all bold :|

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants