Create an IoT Central application

Completed

Exercise 1: Create Azure IoT Central Application

In this exercise, you will be building an IoT solution using IoT Central to integrate with the Smart Trash Containers built by Contoso. As part of this you will be setting up the telemetry including tracking events generated by the customer requesting pickup on demand of the container.

Task 1: Start Azure IoT Central trial

  1. Navigate to the Azure portal and click Create a Resource.

  2. Search for IoT Central and select IoT Central Application.

  3. Click Create.

  4. Enter smart-trashcan for Resource Name, provide a unique Application URL (use smarttrashcan<date><initials>), select your Subscription, and click Create New.

  5. Enter smarttrashcontainerlab if available and click OK.

  6. Select Pricing Tier as Paid Application, select Custom Application for Template, select your Location, and click Create.

    Screenshot of Resource group, Pricing tier, Template, and Location details with Create button.

  7. After deployment completes, click Go to Resource.

  8. Click on the IoT Central Application URL.

    Note

    If you see any issue with the page not loading or resource not configured, try to change the browser and the issue should be resolved.

    Screenshot of IoT Central Application URL.

Task 2: Create the device template

  1. After the page loads successfully, select the Create Device Template tile.

  2. Select Custom.

  3. Enter Smart Trash Container for name and click Create.

Task 3: Create telemetry measurement

  1. Click New and select Telemetry.

  2. Type Percent Full for Display Name, percentfull for Field Name, percent for Units, 0 for Minimum, 100 for Maximum, 0 for Decimal, select any Color you like, and click Save.

Task 4: Create state measurement

  1. Click New and select State.

  2. Enter Lid State for Display Name, lidstate for Field Name, and click Add Value.

  3. Enter open for Value, Open for Display Name, select Red for Color, and click Add Value.

  4. Enter closed for Value, Closed for Display Name, and select Green for Color

    Screenshot of Closed for Value, Closed for Display Name and Green for Color.

  5. Click Save.

Task 5: Create new event

  1. Click New and select Event.

  2. Enter Ready for Pickup for Display Name, readyforpickup for Field Name, Information for Default Severity, and click Save.

Task 6: Add setting for odor control

  1. Switch to the Settings tab and select Number.

  2. Enter Odor Control Level for Display Name, ocl for Field Name, 0 for Number of Decimal Places, 0 for Minimum, 3 for Maximum, and click Save.

Task 7: Add property for trash container location

  1. Switch to the Properties tab and select Location.

  2. Enter Container Location for Display Name, location for Field Name, Microsoft Main Campus, 1 Microsoft Way, Redmond, WA 98052 for Initial Value, make the field Required, and click Save.

    Screenshot of Configure Location details.

Exercise 2: Build sample dashboard

In this exercise, now that your device template is built, you are going to customize the dashboard for devices to be more useful.

Task 1: Add basic elements to the dashboard

  1. Switch to the Dashboard tab and select Event History.

  2. Enter Pickup Requests for Title and select the icon for Ready for Pickup. Make sure this is removing the blocked symbol.

  3. Click Save.

  4. Select Map.

  5. Enter Container Location for Title, select Container Location for Location, and click Save.

  6. Select Settings and Properties.

  7. Enter Order Level for Title and click Add/Remove.

  8. Select Order Control Level and click Add. Make sure it is moved to the Selected Columns.

  9. Click OK.

  10. Click Save.

  11. Your dashboard should look like the image below.

    Screenshot of the dashboard with Pickup Requests, Container Location, and Order Level details.