Custom data point properties, built into property template
-
Is there a mechanism to create custom data point properties? For example, say on all of my data points (or at least by default, use will be dependent) I wanted a property called rating. For say % load values this could be 90% or 100% or something else. For say UPS load in kw or kva, I could designate the rating as 150kw. The units wouldn't really be an issue as it should match the data point's units. Or another good example would be a setpoint for a temperature zone. What I'm wanting to do would work best as a static property versus the current method which is to create a constant value virtual point which has much more processing overhead.
It would reduce the overhead and simplify the process if I could import it in the JSON or add it to a property template. If I have say 5 universal properties that are static and I have 200 data points, It would take 1000 (5x200) extra virtual data points to do that.
The goal is to use this as a means to render custom graphics such as this where I need to pass 6 static values plus the sensor value into a filter to get the dynamic thermo-graphic color. And that is for each individual box.
-
Hi sstuhlmann,
I'm not sure I completely understand. So, you have other properties you would like to associate with a data point.
One way to do this is the JSON store. You could have records stored with XIDs based on the point's XID. Then you can easily load the JSON store item for display/use on the page using the
<ma-json-store></ma-json-store>
tag. There is an example using the JSON store in the UI examples section.Alternatively, if these property sets may change over time and you wish to record them, you can store up to 65535 characters of JSON against a point's ID and a millisecond using the NoSQL JSON store API endpoints. It's in the "nosql-point-json-data-store" section of swagger. There is not currently any generic way of using this through UI components.
Since you said they're static, I suspect the JSON store is what you're looking for.
-
I would agree that the JSON store is probably your best bet at the moment. Store an object where each property is the XID of the data point for easy retrieval. We have also discussed adding some generic JSON data to each data point so that might be an option in the future.