Custom namespace questions

Hi,

We have experimented the use of custom namespace to subscribe to topics published by non-sparkplug device. However, we are having the following questions:

  1. While tag is auto created under the custom namespace, the tag will also auto disappear if there is no new messages published from the edge. Is this a designed behaviours or there is a setting to change that?
  2. We do not seem to be able to write to the tags in the custom namespace. Is this a design of there is a configuration for it?
    Thanks.

The tags shouldn’t disappear. The only time that should happen is if the MQTT Engine module or Ignition is restarted.

Also, writing to custom namespace tags is not possible because typically what ‘writing to a custom namespace tag’ means is that an MQTT message should be sent to the MQTT client. There are two ways to potentially ‘write’ to those tags:

  1. Use scripting to publish messages to the MQTT client: MQTT Publishing via MQTT Engine - MQTT Modules for Ignition 8.x - Confluence

  2. Make the tags writable (see the option here: ME: Configuration - MQTT Modules for Ignition 8.x - Confluence). Note this does not result in outgoing MQTT messages automatically. But, you can combine this with a tag change event script to script MQTT publishing.

Thanks Wes, can you elaborate a bit more on on the tag disappear on restart of the module? I.e if we have a non spark plug remote device that we need to switch on and off based on conditions, we would want the tags associated with that device to be there all the time so that we can have history and dashboard about it. Is there no way of achieving this?

This is just the way MQTT Engine works - at least for the time being. We’ve considered changing this behavior but have not done so yet. This is really a result of historical behavior (this was the only way it could work in Ignition7) and doesn’t typically negatively impact MQTT/Sparkplug (used by Transmission).

There are a couple of options to workaround this:

  1. Set the tag to store history. Note even though the tag ‘disappears’ from the tag tree, the config (such as history settings) are preserved across restarts.
  2. Set up a tag change script on the MQTT Engine tag to update another tag in a realtime tag provider.