Systems are a special device type that allows you to build complex, hierarchical relationships between your application’s devices. This is most frequently used to construct a ”digital twin” - or a model of your physical environment.
System devices are a grouping mechanism. They are parents of any number of child devices and other child systems. This allows you to create hierarchical or nested models of your environment (i.e. systems of systems). Every device, including system devices, has a “Parent System” field where you can optionally assign a device to a system.
Along with grouping, you must also be able to model and understand how data propagates from the lowest levels of your system to the very top. We’ve layered a unique data aggregation mechanism on top of the grouping mechanism to automate how data propagates through your systems.
Attributes for systems are calculated, or derived, from its child devices. This is how data propagates through your system in order to create a “system view” of your environment.
Below is a diagram that shows how data is aggregated from sensor devices and up through the system hierarchy:
The aggregation in this example is a sum. Each parent system is taking a sum of an attribute across all of its children (at a specified interval) and recording that result on one of its own attributes. Because a system is just a device, you can act on, visualize, and use them the same way you would any other device type.
Systems differ greatly from the other device types in Losant:
- Other devices - including other systems - can list a system device as their “parent”, which comes into play when calculating the system’s state values.
- They do not report their own state; rather, their state attribute values are calculated by the devices who list the system as their parent.
- Systems do not connect to the Losant broker, and thus (in addition to not reporting their own state) they cannot receive device commands.
Like with other device types, a system’s attributes are found under the “Attributes” tab in the device’s detail page. However, configuring a system’s attributes is quite different from configuring attributes for other device types. While you must still define a name and data type for each attribute, and you may also include optional description fields, system attributes also require the following properties.
Choose how the collection of raw data points gathered within the query interval should be aggregated to generate a value for the attribute. Depending on the system attribute’s data type, only certain aggregation methods may be valid.
Every system attribute must include at least one child attribute, which is a reference to an attribute present on one or more of the system’s child devices. The values of these attributes are what is used to calculate your system attribute’s state value.
Each child attribute takes the following properties:
- Attribute: Enter the name of the attribute whose state values should be used.
- Selection Mode: Choose whether to use “All child devices”, “ONLY the following devices”, or “All EXCEPT the following devices” whose values for the chosen attribute should be used in the system attribute’s calculation. If one of the latter two options are selected, then you must also specify …
- Devices / Tags: Choose at least one device or tag to use for the calculation. This device query is only against direct children of the system; it does not query children of children and so on.
System attributes are calculated by querying attributes from its children on a periodic interval. Keep in mind that a payload will be generated each time this device’s attributes are recorded. There are two additional properties that must be configured for a system device:
- Query Interval: Define how frequently the attribute aggregation should run. By default, system attribute values are calculated every 30 seconds.
- Record Duplicate Values: Choose whether a new state value should be recorded if the calculated value is equal to the value the last time the calculation was run. If this is unchecked, only changes to state per attribute will be recorded against the system.
Note: The settings chosen for these properties can have a major effect on the number of payloads generated within your application, and those payloads are subject to the same resource limits as other resources within your account.
Attributes for systems are calculated from its child devices. From the device’s detail page, you may manage a system’s child devices from the “Children” tab.
Using the form at the top of the page, select one or more devices to list as children of the system. This will modify those devices to change their “Parent System” field to match this system.
Note: You may only assign devices that are not currently assigned to another system from this interface. If you would like to assign a device to this system, and that device is currently assigned to another system, you must first unassign that device from its parent system from that device’s detail page.
Also on the “Children” tab is a list of all devices that list this system as its parent system. This list only includes direct children of the system; not included in the list is any device that may be a child of one of this system’s children.
To unassign a device from a system, click the “X” icon alongside the device within this table. This does not delete the device from the application; rather, it only strips the “Parent System” property from the device in question so that the device becomes a child of no system.
Was this page helpful?
Still looking for help? You can also search the Losant Forums or submit your question there.