Hi,
My Tag Change scrips are not triggering when I look for a whole UDT/Template change.
I’m using UDTs to group a set of tags together that would be always updated together.
I’m also using scripting based on Tag Change.
I subscribe to all tag changes with path
as [MQTT Engine]*
My issue is that my Tag Change event script is not triggered at the Template/UDT level:
[MQTT Engine]Edge Nodes/group/node/dev1/my_udt
My script is triggered at the sub-tags value change level:
[MQTT Engine]Edge Nodes/group/node/dev1/my_udt/speed1
The following is a Sparkplug message I pubish, all the sub-tags are updated as a group under value.mertics
. I’m hoping to start my script based on all the metrics arriving.
{
"timestamp":1604591089193,
"metrics":[
{
"name":"my_udt",
"type":"template",
"value":{
"metrics":[
{
"name":"speed1",
"value":"542",
"type":"string",
"timestamp":1604591089193
},
{
"name":"speed2",
"value":"testnode",
"type":"string"
}
]
},
"timestamp":1604591089192
}
]
}
Is it possible to detect a value change of a UDT? Or do I need to detect a sub-tag change and then interogate each or the other tag values independantly?