Dynamical Datarouting



Dynamical Data Routing

Dynamical data routing allows updating measurement values in a datastates without requiring a fixed assignment to a connector or a virtual device. This enables more efficient rollout and transition processes.

A key advantage of this approach is the ability to provision datastates in the Digital Twin in advance without knowing the associated sensor at the time of provisioning. This simplifies scalability and flexibility when commissioning devices.

Implementation is carried out using a reference ID that serves as the receiving address of the Digital Twin. Within the connector or virtual device, only this target address is stored or modified as needed. Measurement values are then automatically forwarded to the corresponding Digital Twin.

Dynamical Data Routing Connector –> Digital Twin

Data can be sent directly from a connector to a datastates with the source Dynamical Data Routing.

%%{ init: { 'theme': 'base', 'themeVariables': { 'primaryColor': '#FFFFFF', 'primaryTextColor': '#031403', 'primaryBorderColor': '#606060', 'lineColor': '#606060', 'secondaryColor': '#2fcbff', 'tertiaryColor': '#E7E6E6', 'primary_font' : 'Poppins:wght@300;400;500;600;700;800', 'primary_font_type' : 'sans-serif' } } }%% flowchart LR CON-->| refKey:42,
energy: 23,
volume:11|DT subgraph DT[ Digital Twin] subgraph DTMETA[ Metadata] a1[ Reference Id --> refKey: 42] end subgraph DS[ Datastates] direction RL id1[energy] id2[volume] end end subgraph CON[ Connector] c1[Webhook / MQTT] end
[
  {
      "routing": {
          "refKey": "42"
      },
      "variable": "volume",
      "data": {
          "value": 11,
          "time": "2025-03-21T10:45:04Z"
      }
  },
  {
      "routing": {
          "refKey": "42"
      },
      "variable": "energy",
      "data": {
          "value": 23,
          "time": "2025-03-21T10:45:04Z"
      }
  }
]
  • With routing, one or more Digital Twins can be addressed using the combination of reference ID key & reference ID value. See [1]
  • The variable must match the key of the corresponding datastates. See [2]
  • data contains the information value and time:
    • value contains the measurement value to be written to the datastates.
    • time contains the timestamp for the measurement value. If this parameter is not set, the current system time is used.

The reference ID key & reference ID value are stored in the Digital Twin in the metadata:

In the datastates, the variable is stored in the “Key” field:

Dynamical Data Routing Virtual Device –> Digital Twin

In dynamical data routing from a Virtual Device to a Digital Twin, data from the _parsed datastates is sent to the addresses stored in the Data Routing tab. The addressed Digital Twins must then have appropriate datastates with the source Dynamical Data Routing.

%%{ init: { 'theme': 'base', 'themeVariables': { 'primaryColor': '#FFFFFF', 'primaryTextColor': '#031403', 'primaryBorderColor': '#606060', 'lineColor': '#606060', 'secondaryColor': '#2fcbff', 'tertiaryColor': '#E7E6E6', 'primary_font' : 'Poppins:wght@300;400;500;600;700;800', 'primary_font_type' : 'sans-serif' } } }%% flowchart LR VD-->| refKey:42,
energy: 23,
volume:11|DT subgraph VD[ Virtual Device] subgraph VDROUTE[ Data Routing] vda1[ Reference Id --> refKey: 42] end subgraph VDDS[Datastates] Parsed["_parsed: { energy: 23, volume: 11 }"] end end subgraph DT[ Digital Twin] subgraph DTMETA[ Metadata] a1[ Reference Id --> refKey: 42] end subgraph DS[Datastates] direction RL id1[energy] id2[volume] end end
Configuring Routing in the Virtual Device

To forward data to one or more Digital Twins, the target is defined in the “Data Routing” tab [1].

Configuring Routing and Datastates in the Digital Twin

To forward data to one or more Digital Twins, the target is defined in the “Data Routing” tab [1].

The datastates must match the structure of the _parsed datastates of the Virtual Device [2]. The source is set to Dynamical Data Routing accordingly.