Defining data streams from equipment (measurements) - Amazon IoT SiteWise
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Defining data streams from equipment (measurements)

A measurement represents a device's raw sensor data stream, such as timestamped temperature values or timestamped rotations per minute (RPM) values.

Defining measurements (console)

When you define a measurement for an asset model in the Amazon IoT SiteWise console, you specify following parameters:

  • Name – The property's name.

  • Unit – (Optional) The scientific unit for the property, such as mm or Celsius.

  • Data type – The property's data type, which is one of the following:

    • String – A string with up to 1024 bytes.

    • Integer – A signed 32-bit integer with range [-2,147,483,648, 2,147,483,647].

    • Double – A floating point number with range [-10^100, 10^100] and IEEE 754 double precision.

    • Booleantrue or false.

  • External ID – (Optional) This is a user-defined ID. For more information, see Referencing objects with external IDs in the Amazon IoT SiteWise User Guide.

For more information, see Creating an asset model (console).

Defining measurements (Amazon CLI)

When you define a measurement for an asset model with the Amazon IoT SiteWise API, you specify the following parameters:

  • name – The property's name.

  • dataType – The property's data type, which is one of the following:

    • STRING – A string with up to 1024 bytes.

    • INTEGER – A signed 32-bit integer with range [-2,147,483,648, 2,147,483,647].

    • DOUBLE – A floating point number with range [-10^100, 10^100] and IEEE 754 double precision.

    • BOOLEANtrue or false.

  • unit – (Optional) The scientific unit for the property, such as mm or Celsius.

  • externalId – (Optional) This is a user-defined ID. For more information, see Referencing objects with external IDs in the Amazon IoT SiteWise User Guide.

Example measurement definition

The following example demonstrates a measurement that represents an asset's temperature sensor readings. This object is an example of an AssetModelProperty that contains a Measurement. You can specify this object as a part of the CreateAssetModel request payload to create a measurement property. For more information, see Creating an asset model (Amazon CLI).

The Measurement structure is an empty structure when you define an asset model because you later configure each asset to use unique device data streams. For more information about how to connect an asset's measurement property to a device's sensor data stream, see Mapping industrial data streams to asset properties.

{ ... "assetModelProperties": [ { "name": "Temperature C", "dataType": "DOUBLE", "type": { "measurement": {} }, "unit": "Celsius" } ], ... }