Skip to content

This is how you can leverage the Azure IoT & Data Stack to monitor and inspect physical devices in near-real time.

Notifications You must be signed in to change notification settings

southworks/azure-iot-factory-monitoring

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

If you download and run this reference implementation you will be able to simulate sensors data, check alarms in the dashboard and/or receive notification emails. Also, you will be able to get reports being built using Databricks.

You can find the complete article describing the scenario tackled with this reference implementation here.

Appendix A - Requirements

In order to test our solution, you will need the following:

  1. An active Azure subscription.
  2. The az-cli.
  3. The databricks-cli.
  4. NodeJS (necessary to run the sample emulator locally).

Appendix B - Process

To run our solution follow the instructions detailed in the README files within each of the subfolders that explain how to run the emulator locally and deploy the solution to your Azure subscription.

Take into consideration that the deployment will create the following resources in your Azure subscription which you should manually delete after you finish to avoid incurring in extra costs:

  1. An IoT Hub.
  2. A Stream Analytics Job.
  3. A storage account.
  4. An Event Hub with the Data Capture functionality enabled.
  5. An Azure Function app with two Azure functions.
  6. A Logic App.
  7. A Log Analytics instance.
  8. An Azure Monitor instance.
  9. A Databricks instance.

Appendix C - Data structures

Measurements messages

The telemetry messages sent by the sensors emulator to the IoT Hub follow the schema:

{
    Data: [{
        value: number,
        timestamp: string (yyyy-MM-ddTHH:mm:ss.SSSZ),
    }],
    Properties: {
        measType: 'temperature' | 'power',
        factoryArea: 'A' | 'B',
        machineType: 'PickAndPlaceArmEngine' | 'ConveyorBeltEngine',
    }
}

The data includes only the measured value and a timestamp indicating when the sample was taken. The measurement type alongside the factory area and machine type the sensor is attached to are included in the message properties which are used in later stages to calculate historic analytics.

Alarm events

The alarm events generated by the Azure Stream Analytics Job to the Event Hub follow the schema:

{
    status: 'on' | 'off',
    timestamp: string (yyyy-MM-ddTHH:mm:ss.SSSZ),
    type: 'temperature' | 'power',
    deviceId: string,
    factoryArea: 'A' | 'B',
    machineType: 'PickAndPlaceArmEngine' | 'ConveyorBeltEngine',
}

About

This is how you can leverage the Azure IoT & Data Stack to monitor and inspect physical devices in near-real time.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages