Virtuino Forum

Full Version: MQTT topic subscriptions
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Am I correct that "Selected panel settings" "Refresh values only if panel is selected" does not cause topics to be unsubscribed from if topics are not on the current panel? I experimented with the option, but couldn't figure out what it was actually doing.

I have a complex project that has a panel for debugging sensor issues which displays for a lot of topics that update frequently and I'd like to find a way so that I could view the panel when needed without flooding Virtuino with too many messages in normal operation. I thought the above setting might help with that, but it doesn't appear to.

Is the best approach to achieve this type of reduction to set up a separate server connection (to the same source, but differ client id) and move the details topics to the second connection and selectively enable or disable the connection based on what panel is being displayed?

I see that there's a mechanism for setting an emulator variable with the current panel id and I suspect I could make an IF that looked at it and set variables for enabling various connections. Is this a good path to go down?

Thanks.

Lisa
Hi Lisa,
yes, the best way to subsribe or unsibscribe the topics is to use more than one MQTT clients to the same broker.
I think you are very experienced on the operation of the application. 
Indeed, this is the solution to the problem. 
Enable or disable the broker by switching panels.
You have to try it
(11-02-2022, 06:29 PM)iliaslamprou Wrote: [ -> ]Hi Lisa,
yes, the best way to subsribe or unsibscribe the topics is to use more than one MQTT clients to the same broker.
I think you are very experienced on the operation of the application. 
Indeed, this is the solution to the problem. 
Enable or disable the broker by switching panels.
You have to try it

Thanks for the verification, I'll give it a go. Lots of knobs on Virtuino, lots to learn.