Iot Data Hub Aggregation



Source “IoT Data Hub Aggregation”

The source “IoT Data Hub Aggregation” provides the possibility to process several variables of a device at the same time as one state. This function is particularly useful if, for example, you want to link the humidity and temperature values that originate from a device in a condition of a rule. Based on the condition, the rule can be triggered afterwards.

Furthermore, this functionality is used to link GPS coordinates (longitude and latitude) from a device directly and easily in one step with the geo-coordinate of the digital twin.

To display the history of GPS data in the detailed view of a twin on a map, you can create the aggregated state according to this instruction:

  1. Select the source “IoT Data Hub Aggregation” and a device from the IoT Data Hub to receive data from.
  2. Then select all the desired variables, whose values will be aggregated into a JSON object.
  3. The value type is a JSON.
  4. In the Javaskript transformer, define the two variables lat and lon, e.g.:
module.exports = (data) => {
 	return {lat: data.gpsLatitude, lon: data.gpsLongitude};
}
  1. Then link this state to the geo-coordinates of the twin.

  2. With the next incoming data packet the position of the twin will be updated directly.