Documentation
2.4.0
  • latest
  • stable
  • 2.4.4
  • 2.4.0
  • 2.3.0
  • 2.2.0
  • 2.1.0
  • preview
English
  • English
  • 简体中文

Device Connectivity & Management

Overview

  • Device Connectivity & Management
  • Terminology
  • Limitations

Learn

  • Model and Modeling
  • Device and Data Connectivity
  • Device Lifecycle Management

Tutorials

  • Connecting a Simulated Device to EnOS
  • Connecting a PC to EnOS

How-tos

  • Device Modeling
  • Connecting and Managing Devices in the Cloud
  • Firmware Upgrade OTA
  • Device Monitoring
  • Message Integration
  • Device Simulator
  • Asset Trees
  • Device-End Development

References

  • EnOS Device Protocol
  • EnOS Message Integration Protocol
  • EnOS Built-in Units
  • API Reference
  • EnOS SDKs

Resources

  • FAQs
  • Device Provisioning Service
  • Alert Engine
  • EnOS Edge

Last Updated 2024-11-25

  • Documentation
  • Duplicate to Related

Duplicate to Related¶


The Duplicate to Related node copies the msg from the input to the specified asset(s).

Node Type¶

EnOS.

Input and Output Ability¶

This node has 1 entry points and 2 exit points. The output msg for exit point “original” will remain the same as the input msg, while asset IDs of the assets with the copied msg will be added to the output msg for exit point “duplicate to related”.

Node Properties¶

../../../_images/duplicate_to_related.png


Name

The name for this node.


Specify Asset and Value

The criteria to specify the asset. Select one option from the drop-down.

  • By asset ID: Enter one or more asset IDs (maximum 8 characters for each asset ID) in the subsequent textfield, separated by commas. The msg will be duplicated to the asset that matches the asset ID.

  • By tag: Enter one asset tag key (maximum 50 characters) in the subsequent textfield. The msg will be duplicated to all assets with a tag key and value that matches the key and value of what is entered. For example, asset A has a tag key/value tag1:value1, asset B has a tag key/vale tag1:value1, asset C has a tag key/value tag1:value321, and tag1 is entered in the textfield. The msg will be duplicated to asset B but not asset C.

  • By asset tree parent node: There is no need to enter any value in the subsequent textfield. If the asset ID in the input metadata exists in an asset tree, the msg will be duplicated to the parent node of the asset with the asset ID.

  • By asset tree child node: There is no need to enter any value in the subsequent textfield. If the asset ID in the input metadata exists in an asset tree, the msg will be duplicated to all the children nodes (first-level) of the asset with the asset ID.

  • By file mapping: Upload a CSV file with a list of source and target asset IDs. The msg will be duplicated to assets of the target IDs with source IDs that match the assetId in the input metadata.


Description

The description for this node.

Limitations¶

  • By tag

    • Only one tag key can be specified.

    • Character limit for tag key is 50.

  • By asset ID

    • Character limit for each asset ID is 8.

  • By file mapping

    • Max mapping file size is 2MB.

    • Currently can only upload CSV files as the mapping file.

Input & Output Samples¶

Sample 1¶

Input¶

{
  "MetaData": {
    "messageType": "PostAttribute",
    "assetId": "assetA",
    "deviceKey": "deviceKey",
    "productKey": "productKey",
    "orgId": "yourOrgId"
  },
  "Body": {
    "capacity": 98,
    "color": "blue"
  }
}

Output 1 - Single Asset¶

{
  "MetaData": {
    "messageType": "PostAttribute",
    "assetId": "assetA",
    "deviceKey": "deviceKey",
    "productKey": "productKey",
    "orgId": "yourOrgId"
  },
  "Body": {
    "capacity": 98,
    "color": "blue",
    "assetId": "assetB"
  }
}

Output 2 - Multiple Assets¶

{
  "MetaData": {
    "messageType": "PostAttribute",
    "assetId": "assetA",
    "deviceKey": "deviceKey",
    "productKey": "productKey",
    "orgId": "yourOrgId"
  },
  "Body": [
    {
      "capacity": 98,
      "color": "blue",
      "assetId": "assetB",
    },
    {
      "capacity": 98,
      "color": "blue",
      "assetId": "assetC",
    },
    {
      "capacity": 98,
      "color": "blue",
      "assetId": "assetD",
    }
  ]
}

Sample 2¶

The samples below are based on a CSV mapping file with the following data.

Source Asset ID

Target Asset ID

source01

target01

source01

target02

source02

target01

source03

target02

source03

target03

Input¶

{
  "MetaData": {
    "messageType": "PostAttribute",
    "assetId": "source03",
    "deviceKey": "deviceKey",
    "productKey": "productKey",
    "orgId": "yourOrgId"
  },
  "Body": {
    "capacity": 98,
    "color": "blue"
  }
}

Output¶

{
  "MetaData": {
    "messageType": "PostAttribute",
    "assetId": "source03",
    "deviceKey": "deviceKey",
    "productKey": "productKey",
    "orgId": "yourOrgId"
  },
  "Body": [
    {
      "capacity": 98,
      "color": "blue",
      "assetId": "target02",
    },
    {
      "capacity": 98,
      "color": "blue",
      "assetId": "target03",
    }
  ]
}
On this page
  • Duplicate to Related
    • Node Type
    • Input and Output Ability
    • Node Properties
    • Limitations
    • Input & Output Samples
      • Sample 1
        • Input
        • Output 1 - Single Asset
        • Output 2 - Multiple Assets
      • Sample 2
        • Input
        • Output
© Univers. All Rights Reserved. |   Privacy Policy   User Agreement