I have a device which displays parametric data on a main tab, and has 3 additional tabs for configuration of various options, parameter limits, location information, etc. I would like to be able to manage up to at least 5 of these devices from the same Node-Red instance. Currently, I have a device name which I use as the top level of all MQTT topics and on the tab names. I guess I can hard wire 5 different device names and duplicate the flows in additional tabs, but does anyone know of a better way, perhaps a way to dynamically manage this. All the messages are objects and I use JSON on the device to pull the various parameters, so it would be easy to add a device name to all messages instead of in the topic and filter those out at the device and also in the Node-Red flows, but it would still require that I duplicate most of the flows for each separate device to direct to the right set of tabs. I am just wondering if there is a better way that I am missing?
Check out how to use wildcards when subscribing to MQTT topics. You can have a single flow that monitors multiple devices.
Thanks. Then I see I can extract the device name from the topic and use that to drive the right dashboard widgets.