Hello,
I have an SpB-enabled sensor that, once connected, starts publishing data to the configured GroupID/NodeID/DeviceID
topic on an Ignition MQTT server (MQTT Distributor). Upon publishing, the system automatically discovers the sensor, and the tag appears in the MQTT Engine tag browser.
Here’s my question: I’d like some of these attributes to be automatically historized without manually setting each tag’s history property to true in the MQTT Engine. Is there any way to trigger an event for a new MQTT tag, or a similar mechanism, to enable history automatically?
Thank you,
Joan
There is no easy/good method to do this.
The closest you will likely find is to have an event triggered by [MQTT Engine]Engine Info/Edge Nodes/Online Nodes
changing. That tag is a dataset listing the timestamp of when each node last sent a BIRTH message, which is how it announces new tags. You would likely want the script to look for tags you want to put history on under each node after it births.
Just beware that MQTT Engine will sometimes update that Online Nodes
tag faster than the new tags actually pop into existence. If your event triggers too fast, it won't find the tags you would expect.