AWS_sitewise module

AWS_sitewise.get_asset_propert_id(name, assetId=None)

Obtain the asset property ID. If the sitewise database only includes one asset or uses uniquely named properties, the asset ID is not a required input.

Return type:

str

Parameters:
  • name (str) – Name of the property a user wants data for.

  • assetId (str, optional) – The asset ID that the user wants the data from. The default is None.

Returns:

asset_property_name, assetId, propertyId

Return type:

str and str and str

AWS_sitewise.get_asset_property_data(name, assetId=None, maxResults=100)

Get the data for a specific property .If the sitewise database only includes one asset or uses uniquely named properties, the asset ID is not a required input.

Return type:

DataFrame

Parameters:
  • name (str) – Measurement name / property name

  • assetId (str, optional) – If the name is unique, no assetId needs to be specified, but there are multiple assets with identical property names, the assetId is required. The default is None.

  • maxResults (int, optional) – The default is 100.

Returns:

[time, value]

Return type:

pandas.DataFrame

AWS_sitewise.send_asset_property_data(name, data_time, data, assetId=None, ensure_time_contrain=True, use_current_time=True, use_time=0.0)

Send up data into a specific asset propety.

If the sitewise database only includes one asset or uses uniquely named properties, the asset ID is not a required input.

Note that currently AWS IoT Sitewise only allows for 100 data points per second upload rate.

Return type:

None

Parameters:
  • name (str) – Measurement name / property name

  • data_time (list or np.array) – Time data in seconds.

  • data (list or np.array) – Measurement data.

  • assetId (str, optional) – If the name is unique, no assetId needs to be specified, but there are multiple assets with identical property names, the assetId is required. The default is None.

  • ensure_time_contrain (bool, optional) –

    AWS Sitewise requires that the time value be within 604800 seconds before and 600 seconds after the current timestamp in seconds. This optional will shift the provided time to meet this contraint.

    Example:

    time = [1, 2, …100] shift = current_time - time[0] updated_time = time + shift

Return type:

None

AWS_sitewise.delete_asset_property_data(name, assetId=None)

Delete the existing data for a property.

If the sitewise database only includes one asset or uses uniquely named properties, the asset ID is not a required input.

Return type:

None

Parameters:
  • name (str) – Name of the property to be deleted.

  • assetId (str, optional) – The specific asset to delete the data from. The default is None.

Return type:

None