# History enable on MQTT tags

**URL:** <https://forum.inductiveautomation.com/t/history-enable-on-mqtt-tags/97950>\
**Category:** Ignition\
**Created:** [October 30, 2024, 12:31pm UTC](https://forum.inductiveautomation.com/t/history-enable-on-mqtt-tags/97950 "2024-10-30T12:31:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Joan\_March](https://avatars.discourse-cdn.com/v4/letter/j/bcef8e/32.png) [@Joan\_March](https://forum.inductiveautomation.com/u/Joan_March)\
**Post date:** [October 30, 2024, 12:31pm UTC](https://forum.inductiveautomation.com/t/history-enable-on-mqtt-tags/97950/1 "2024-10-30T12:31:09Z")

</div>

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?

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/1/f/1f12296d8d0f6a0810d8ec1ad5d37040f04153ca.png)

Thank you,  
Joan

---

<div class="post-metadata">

**Author:** ![justin.brzozoski](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/justin.brzozoski/32/13452_2.png) [@justin.brzozoski](https://forum.inductiveautomation.com/u/justin.brzozoski)\
**Post date:** [October 30, 2024, 3:28pm UTC](https://forum.inductiveautomation.com/t/history-enable-on-mqtt-tags/97950/2 "2024-10-30T15:28:03Z")

</div>

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.
