New MQTT user here…
What would be the best way to expose only parts of certain UDT’s through MQTT?
Lets say we have a motor UDT that contains a lot of tags that are not important for other parties and we only like to expose the status of the motor and the actual speed.
What would be the best practice for this?
Any advice is welcome
If you’re using the Cirrus Link modules you would normally use the ExcludeFromPayload custom property to exclude items but this doesn’t work for UDTs.
There are probably better solutions but my solution to this issue was to create a mirror set of UDTs only containing the tags I wanted to send. Each tag of a mirror UDT is a reference tag and the path is created using the original instance path as a UDT parameter. I have a script running once a day that scans the original tag provider and creates or removes mirror UDT instances automatically. I also added a parameter on the original UDTs and regular tags to cause the script to ignore a particular item if needed.
Like I said, probably better or easier ways to accomplish this. For my use case though it seems to be working well and has been pretty flexible.
Thanks for your insight, I’ll look into the scripting solution.
Seems like a good aproach.