Product Features
Digital Twins

Add an Instance

9min

Note: To access the Digital Twins feature, you need a Scale or Growth Litmus license.

You can add a Digital Twins Instance by navigating to Digital Twins > Instances.

Instances are inherited from a model. They are the actual data objects that contain static and dynamic data from different sources. You must create a model before creating an instance.

Before You Begin

Before you add an Instance, you will need to create a Digital Twins model. See Create and Import Models for details.

Step 1: Add Instance

To add an instance:

  1. Navigate to Digital Twins > Instances. The Instances pane appears.
  2. From the Instances pane, click the Add an instance tile. The Add an Instance dialog box appears.

    Add an instance icon
    Add an instance icon
    
  3. Select a model to associate with the instance. Either search for a model or select one from the list.

    Add an instance dialog box
    Add an instance dialog box
    
  4. Enter the details for the Instance.
    • Name: Enter a name for the instance.
    • Interval: Enter the interval between retrieving data from the instance. The minimum interval allowed is one second.
    • Topic: Review the default topic name for the instance. You have the option of entering a custom topic name.
    • Flatten hierarchy: Select the checkbox to send hierarchy data in a flat JSON structure. When selected, it will take a nested JSON object and convert it into a JSON object with one layer using dot notation. This is useful when sending JSON objects to InfluxDB, because InfluxDB does not accept nested JSON objects.
  5. Click Add.

Step 2: Configure Instance

After creating the instance, you can customize the model parameters it is associated with.

Click the Instance tile (grid view) to view the instance details.

After making changes to an instance, you must save the changes and then restart the instance to implement the updates. See the "Restart Instance" section below.

Static Attributes

The Static Attributes tab displays the metadata values for the model the instance belongs to. You can customize the attribute values for the instance.

Document image


Action

Details

[1] Search Attributes

Search for static attributes configured in the model the instance is associated with.

[2] Refresh

Refresh attribute values.

[3] Import Attributes

Import Attributes. See Create and Import Models to learn more about importing static attributes.

[4] Save Instance

Save changes to the instance.

[5] Edit

Customize static attribute value.

Dynamic Attributes

The Dynamic Attributes tab displays the variable data attributes configured in the model the instance belongs to. You can map one-to-one relationships with data topics and attributes by updating the topic field for the instance.

Important: To view data from a topic in the instance payload, you must map the topic to a dynamic attribute.

Document image

Document image


Action

Details

[1] Search Attributes

Search for dynamic attributes in the model the instance is associated with.

[2] Edit

You have the option of adding topics from different data sources in Litmus Edge, such as from DeviceHub or an integration. Click the Edit icon, and search for a DeviceHub tag or enter the topic name in the Topic field.

[3] Refresh

Refresh attribute values.

[4] Import Attributes

Import Attributes. See Create and Import Models to learn more about importing dynamic attributes.

[5] Save Instance

Save changes to the instance.

Data Access

The Data Access tab allows you to view real-time data for the instance.

Document image


Details

[1] Review the topic name and interval configured for the instance. Click the Copy icon to copy the topic name.

[2] Subscribe and unsubscribe for data access to view real-time data for the instance.

Note: The Digital Twins instance topic's syntax has been updated to digitaltwins.<model_name>.<instance_name> from digitaltwins_<instance_name>. Existing instances remain unchanged until manually updated.

Restart Instance

After making changes to the instance, make sure to click Save instance and then Restart instance to implement the updates.

Document image