What product/components do you use and which version/fix level are you on?
Cumulocity IoT - Backend 1015.0.207, UI 1015.0.68.
Is your question related to the free trial, or to a production (customer) instance?
What are you trying to achieve? Please describe it in detail.
I have setup a vehicle which has a number of components (engine, transmission, diff, etc). The vehicle will have a gateway that collects the data from these components. I want the system to reflect this structure where the data is still represented as coming from the respective component.
One simple example, I want to track the usage of the vehicle based on the meter reading (hours) from the Engine component.
In the Analytics Builder model I want to:
- Receive the Meter Reading from an Engine component (device measurement input)
- Find the parent Vehicle (also a Device) for the Engine
- Update a Fragment/Property for the Usage on the parent Vehicle (managed object output)
I can imagine this is easy enough to code (EPL?), but can’t see how to use blocks to get the parent device.
I have proven the basic concept with explicitly selected devices, but now want to do this dynamically.
this is not directly possible. Also device hierarchy information is not provided by the standard Managed Object input block. You would need to have a custom block to get the parent id (either a custom version of the Managed Object input one that includes parent information or a custom block that determines the parent for a given Managed Object ID). You would require another custom block, which can receive the managed object id as an input instead of a parameter.
So this is quite complicated. Another option might be the usage of template parameters. The parent and child ids in your model could then be template parameters. You would have to manually create instances of the model through the instance editor:
This would allow you to have a single model.