Reuse (or borrow) MQTT Basetopic at first use

Hi, after happily using Octoprint for a long time now, I decided to try and make a plugin myself.
I'd like to use MQTT in my plugin, and I found how I could use a helper to use the MQTT plugin to send MQTT messages.
So far, so good. Now I'd like to borrow the basetopic from the MQTT plugin as my default basetopic. It only needs to be copied to the settings of my plugin at first use. After that the user should be able to set it to something else. I got that last part figured out, but can someone give me a hint on how I can get the first part done? Thanks!

Edit and offtopic: : Shouldn't be this under development? Probalby. Can I move it myself? Yes I can! I started doubting myself and sent it back to Plugins. Sorry

If you want to share the base topic, it's just a matter of pulling in the MQTT's plugin setting, so something like self._settings.global_get(["plugins","mqtt","publish", "baseTopic"])

1 Like

Ah great, thanks a lot! Missed that one form the documentation. I've read so much of it the last few days, but totally must have missed this!