Skip to main content

Customize IoT Central

In this exercise, you will be customizing Azure IoT Central to display the data sent from the applications you run on the Altair emulator. Applications that stream data to Azure IoT Central include WEATHER.BAS and JSON.BAS.

Open the Azure IoT Central device explorer

  1. Go to Azure IoT Central.

  2. On the left pane, select Devices select your device.

    It might take a minute or two for the Altair emulator device to register in the devices section of Azure IoT Central.

Customize the Climate monitor template

The Altair emulator supports IoT Plug and Play. When the Altair emulator connects to Azure IoT Central, the Climate Monitor Plug and Play model is loaded from the public repository of models. Default views are created for the Climate Monitor model. These default views are a great starting point, but they need customization along with some new views.

The IoT Plug and Play model is declared in the main.h file.

#define IOT_PLUG_AND_PLAY_MODEL_ID "dtmi:com:example:climatemonitor;1"

Add a summary properties view

  1. On the left pane, select Views, and then select the Editing device and cloud data tile.

    The image shows how to select views

  2. Name the form Summary.

  3. Select 3 column layout.

  4. Expand Properties.

    The image shows how to select properties

  5. Select the following properties:

    • Humidity
    • Pressure
    • Temperature
    • Weather
  6. Select Add section.

  7. Drag the newly added section in column 3 to column 1

  8. Select the following properties:

    • LED brightness
  9. Select Add section.

  10. Drag the newly added section in column 3 to column 1 below weather properties

  11. Select the following properties:

    • AirQualityIndexUS
    • Ammonia
    • CarbonMonoxide
    • NitrogenDioxide
    • NitrogenMonoxide
    • Ozone
    • PM10
    • PM2_5
    • SulphurDioxide
    • Wind Speed
  12. Select Add section.

  13. Drag the newly added section in column 3 to column 2

  14. Select the following properties:

    • Heartbeat
    • Software version
    • Start time
  15. Select Add section.

  16. Select the following properties:

    • City
    • Country
    • Location
  17. Select Add section.

    Your summary page layout should look like the following image.

    The following image shows the layout of the summary page

  18. Select Save.

  19. Select Back.

Add a weather data visualization view

  1. On the left pane, select Views, and then select the Visualizing the device tile.

    The image shows how to select visualizing the device

  2. Name the view Weather.

  3. Select Line chart from the Start with a visual list, then select Add tile.

  4. Select the Size available icon on the tile and select 3x3.

  5. Select the Edit icon on the tile.

  6. Name the chart Weather.

  7. Select Past 12 hours from the Display range dropdown list.

  8. Select Capability.

  9. In the capability list, select temperature.

  10. Select Capability.

  11. In the capability list, select pressure.

  12. Select Capability.

  13. In the capability list, select humidity.

  14. Select Capability.

  15. In the capability list, select Wind speed.

  16. Select Update.

  17. Select Save.

  18. Select Back.

Add a pollution data visualization view

  1. On the left pane, select Views, and then select the Visualizing the device tile.

    The image shows how to select visualizing the device

  2. Name the view pollution.

  3. Select Line chart from the Start with a visual list, then select Add tile.

  4. Select the Size available icon on the tile, and select 4x4.

  5. Select the Edit icon on the tile.

  6. Name the chart Pollution.

  7. Select Past 12 hours from the Display range dropdown list.

  8. Select Capability.

  9. In the capability list, select aqi.

  10. Repeat adding capabilities, and add the following capabilities.

    1. co (carbon monoxide)
    2. nh3 (ammonia)
    3. no (nitrous oxide)
    4. no2 (nitrous dioxide)
    5. o3 (ozone)
    6. pm10 (particulate matter 10)
    7. pm2_5 (particulate matter 2.5)
    8. so2 (sulphur dioxide)
    9. Wind speed

Notes. Pollutants produced by vehicle exhausts include carbon monoxide, hydrocarbons, nitrogen oxides, particles, volatile organic compounds, and sulfur dioxide. Hydrocarbons and nitrogen oxides react with sunlight and warm temperatures to form ground-level ozone. Ground-level ozone, a key ingredient in smog, can cause upper respiratory problems and lung damage.

  1. Select Update.
  2. Select Save.
  3. Select Back.

Customize the LED brightness property

If you have a Raspberry Pi with a Pi Sense HAT then customize the LED Brightness property. You can use this property to set the brightness of the Pi Sense HAT 8x8 LED panel.

  1. On the left pane, select Device templates

  2. On the left pane, select Customize, and then expand the LED brightness property.

    Update the property by using the information from the following table

    The image shows how to customize the Climate monitor template

    Display nameInitial valueMin. valueMax. valueTrue nameFalse name
    LED brightness2015n/an/a
  3. Select Save.

Publish the template

To publish the template to the Azure IoT Central application, select the Publish button.

The image shows how to select publish

View your Altair emulator device

  1. On the left pane, select Devices, select the Climate monitor template and then select your device.

  2. To explore the device views, select the various tabs.

    The image shows the IoT Central device tab

Explore climate data from IoT Central

You can explore and analyze data from Azure IoT Central.

  1. On the left pane, select Data explorer.
  2. Select the + New Query.
  3. Select the Climate monitor Device group.
  4. Select the temperature Telemetry.
  5. Select Group by Device ID.
  6. Select Analyze.
  7. Select the data time frame you would like to explore.
  8. Select data time frame you would like to zoom into.

This image shows the data explorer visualization