Create the representation of a generator

You are operating generators which are producing energy. Each generator reports the energy produced per minute and the internal temperature of the generator.

Every generator is expected to produce 20 watts of energy per minute.

In the generator template you will define the following measurements and metrics:

  • Measurements: watts/minute produced, temperature and rpm
  • Metrics: total watts per 5 minutes, average temperature per 5 minutes and average rpm per 5 minutes

Create an asset model

Assets are created based on templates. Templates ensure consistency of information across multiple assets of a similar kind.

Go to the AWS IoT SiteWise console

  1. Click the three bars in the upper left corner
  2. Models
  3. Create model
  4. Name: Generator model 262966 Doppler
  5. Attribute definitions: Name: serial, Default value: noserial, Data type: String
  6. Measurement definitions: Name: watts_1m, Unit: watts/m, Data type: Double
  7. Add new measurement
  8. Measurement definitions: Name: temperature, Unit: Celsius, Data type: Double
  9. Add new measurement
  10. Name: rpm, Unit: rpm, Data type: Double
  11. Metric definitions: Name: sum_watts_5m, Formula: sum(watts_1m), Data type: Double, Time interval: 5 minutes
  12. Add new metric
  13. Metric definitions: Name: ratio_avg_rpm_power_5m, Formula: avg(rpm)/sum(watts_1m), Data type: Double, Time interval: 5 minutes
  14. Create model
  15. In the resulting page the Status will be CREATING
  16. Wait until the Status has changed to ACTIVE

Create an asset

Create a generator asset based on the model template that you just created.

Go to the AWS IoT SiteWise console

  1. Click the three bars in the upper left corner
  2. Assets
  3. Create asset
  4. Model: Generator model 262966 Doppler
  5. Name: Generator-1
  6. Create asset
  7. In the resulting page the Status will be CREATING
  8. Wait until the Status has changed to ACTIVE

Associate data streams and configure notifications

After your asset has been created you need to associate data streams which are ingested into SiteWise with your asset properties.

SiteWise can also publish data from your assets to the AWS IoT Core message broker. This setup can be used to consume data in other AWS services. To make SiteWise publish data to AWS IoT you must enable notifications for the related property.

You will now associate data streams with your asset properties and enable notifications.

  1. On the page for your asset Generator-1 click Edit
  2. “serial”: 1234, Notification status: ENABLED
  3. “rpm”: /DayOneEnergyCorp/1/Generator/rpm, Notification status: ENABLED
  4. “temperature”: /DayOneEnergyCorp/1/Generator/Temperature, Notification status: ENABLED
  5. “watts_1m”: /DayOneEnergyCorp/1/Generator/Power, Notification status: ENABLED
  6. “sum_watts_5m”: Notification status: ENABLED
  7. “ratio_avg_rpm_power_5m”: Notification status: ENABLED
  8. Save