How does one ensure a data change subscription happens to all children of a template?
Hey all! I'm currently trying to figure out a strange situation that seems to not have a clean solution in Thingworx.
In short, I am looking to simulate multiple power meters which will likely have a voltage and current property so kilowatt hours can be calculated. However, this will not always be the case, so I don't want to always have these averages stored.
Currently, have a Thing Template called "Power_Meter_Demo". It has the property "current" and "voltage". In addition, I have a Power_Meter_Rolling_Average Thing Shape which has properties "currentAverage", "rollingWindowSize", "currentWindowTotal", and "totalKilowattHours", which are all to be derived from the "current" and "voltage" properties off of the thingTemplate.
What I would like to do is have a subscription on data change where these values are updated, that way they can be displayed live. It does allow me to create a subscription for data change events on the template, which is decent. The main issue becomes that if I decide I don't want to apply the shape for a particular department, the data change event fires anyway, even though I'm using it for purposes explicitly for items on the shape attached, which I don't want. The best case scenario for this is that I need to do a "shape check" on the thing. I've tried to use a subscription the shape as well, but it simply doesn't give me the option to put it on a template, which half makes sense, as a template really doesn't have data change events. This leads me to believe there is no good way to pass down a subscription where the data change event is on the template, but should only happen when a shape is on the template/thing
What's the best practice on this? Do I just do the shape check every time I get a new value?

