-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Update MQTT root on lora region change #8166
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
Conversation
@ndoo suggested that we simultaneously clear the nodedb. |
I think one regression here is that if the user has a custom MQTT topic (perhaps some specific implementation on their own MQTT server), it would get reset by this change. May be inconveniencing that group of users for the convenience of this group of users. What I assume would fix it is to generate the root topic with the old region and do a string comparison against the new generated root topic |
@ndoo this should do it ^ 🙂 |
Thanks! Hmm, I may be wrong here, but IIRC even the default generated topic will get saved to userPrefs so this block of code will functionally always enter the first if condition, hence necessitating doing an actual string comparison to determine if the topic is at default. I.e. the userpref will only be empty if region is UNSET |
Sorry, I would love to test but am away from a device for 2-3 more days due to a work trip. |
Ah, you're 100% correct ✔️ |
No worries, thanks for testing it.
…On Tue, Sep 30, 2025 at 16:16 Ford Jones ***@***.***> wrote:
*ford-jones* left a comment (meshtastic/firmware#8166)
<#8166 (comment)>
Ah, you're 100% correct ✔️
I've just gotten back home to test this and you're right about the
preference being overwritten, I'll push something else up shortly 📡
—
Reply to this email directly, view it on GitHub
<#8166 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACAFABF2A6W2ULJ3XTCWCL3VJC73AVCNFSM6AAAAACH3JEWFCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTGNJQHA3TSNJQGE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
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.
Pull Request Overview
This PR updates the MQTT root topic to include the LoRa region name when the region is changed, ensuring proper MQTT topic subscription for different regions. The changes address issue #8139 by automatically updating MQTT configuration when LoRa region settings are modified.
- Adds logic to update MQTT root topic when LoRa region changes in admin configuration
- Updates menu handler to include MQTT root topic modification during region selection
- Updates protobuf submodule to latest version
Reviewed Changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 4 comments.
File | Description |
---|---|
src/modules/AdminModule.cpp | Adds region change detection and MQTT root topic update logic |
src/graphics/draw/MenuHandler.cpp | Updates LoRa region picker to modify MQTT root topic and handle config changes properly |
protobufs | Updates submodule to newer commit |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
… 8139-root-topic
Resolves #8139
🤝 Attestations