Tutorial: Deploy and walk through the water quality monitoring application

Use the IoT Central water quality monitoring application template and the guidance in this article to develop an end-to-end water quality monitoring solution.

Water quality monitoring architecture

Devices and connectivity

Water management solutions use smart water devices such as flow meters, water quality monitors, smart valves, leak detectors.

Devices in smart water solutions may connect through low-power wide area networks (LPWAN) or through a third-party network operator. For these types of devices, use the Azure IoT Central Device Bridge to send your device data to your IoT application in Azure IoT Central. You can also use device gateways that are IP capable and that can connect directly to IoT Central.

IoT Central

Azure IoT Central is an IoT App platform that helps you quickly build and deploy an IoT solution. You can brand, customize, and integrate your solution with third-party services.

When you connect your smart water devices to IoT Central, the application provides device command and control, monitoring and alerting, a user interface with built-in RBAC, configurable dashboards, and extensibility options.

Extensibility and integrations

You can extend your IoT application in IoT Central and optionally:

  • Transform and integrate your IoT data for advanced analytics, for example training machine learning models, through continuous data export from IoT Central application.
  • Automate workflows in other systems by triggering actions using Power Automate or webhooks from IoT Central application.
  • Programatically access your IoT application in IoT Central through IoT Central APIs.

Business applications

You can use IoT data to power various business applications within a water utility. In your IoT Central water consumption monitoring application you can configure rules and actions, and set them to create alerts in Connected Field Service. Configure Power Automate in IoT Central rules to automate workflows across applications and services. Additionally, based on service activities in Connected Field Service, information can be sent back to Azure IoT Central.

In this tutorial, you learn to:

  • Use the Water quality monitoring template to create a water quality monitoring application.
  • Explore and customize an dashboard.
  • Explore a water quality monitoring device template.
  • Explore simulated devices.
  • Explore and configure rules.
  • Configure jobs.
  • Customize application branding by using white labeling.

Prerequisites

  • There are no specific prerequisites required to deploy this app.
  • You can use the free pricing plan or use an Azure subscription.

Create water quality monitoring application

Create the application using following steps:

  1. Navigate to the Azure IoT Central Build site. Then sign in with a Microsoft personal, work, or school account. Select Build from the left-hand navigation bar and then select the Government tab: Application template

  2. Select Create app under Water quality monitoring.

To learn more, see Create an IoT Central application.

Walk through the application

The following sections walk you through the key features of the application:

Dashboard

After you create the application, the Wide World water quality dashboard pane opens.

The water quality monitoring dashboard.

As a builder, you can create and customize views on the dashboard for use by operators. But before you try to customize, first explore the dashboard.

All data shown in the dashboard is based on simulated device data, which is discussed in the next section.

The dashboard includes the following kinds of tiles:

  • Wide World water utility image tile: The first tile in the upper-left corner of the dashboard is an image that shows the fictitious utility named Wide World. You can customize the tile to use your own image, or you can remove the tile.

  • Average pH KPI tiles: KPI tiles like Average pH in the last 30 minutes are at the top of the dashboard pane. You can customize KPI tiles and set each to a different type and time range.

  • Water monitoring area map: Azure IoT Central uses Azure Maps, which you can directly set in your application to show device location. You can also map location information from your application to your device and then use Azure Maps to show the information on a map. Hover over the map and try the controls.

  • Average pH distribution heat-map chart: You can select different visualization charts to show device telemetry in the way that is most appropriate for your application.

  • Critical quality indicators line chart: You can visualize device telemetry plotted as a line chart over a time range.

  • Concentration of chemical agents bar chart: You can visualize device telemetry in a bar chart.

  • Reset sensors parameters tile: The dashboard includes a tile for actions that an operator can initiate directly from the monitoring dashboard. Resetting a device's properties is an example of such actions.

  • Property list tiles: The dashboard has multiple property tiles that represent threshold information, device health information, and maintenance information.

Customize the dashboard

As a builder, you can customize views on the dashboard for use by operators.

  1. Select Edit to customize the Wide World water quality dashboard pane. You can customize the dashboard by selecting commands on the Edit menu. After the dashboard is in edit mode, you can add new tiles, or you can configure the existing files.

    Edit your dashboard.

  2. Select + New to create a new dashboard that you can configure. You can have multiple dashboards and can navigate among them from the dashboard menu.

Explore a water quality monitoring device template

A device template in Azure IoT Central defines the capabilities of a device. Available capabilities are telemetry, properties, and commands. As a builder, you can define device templates in Azure IoT Central that represent the capabilities of the connected devices. You can also create simulated devices to test your device template and application.

The water quality monitoring application you created comes with a water quality monitoring device template.

To view the device template:

  1. Select Device templates on the leftmost pane of your application in Azure IoT Central.
  2. From the list of device templates, select Water Quality Monitor to open that device template.

The device template.

Customize the device template

Practice customizing the following device template settings:

  1. From the device template menu, select Customize.
  2. Go to the Temperature telemetry type.
  3. Change the Display name value to Reported temperature.
  4. Change the unit of measurement, or set Min value and Max value.
  5. Select Save.

Add a cloud property

  1. From the device template menu, select Cloud properties.
  2. To add a new cloud property, select + Add Cloud Property. In Azure IoT Central, you can add a property that is relevant to a device but not expected to be sent by the device. One example of such a property is an alert threshold specific to installation area, asset information, or maintenance information.
  3. Enter Installation area as the Display name and choose String as the Schema.
  4. Select Save.

Explore views

The water quality monitoring device template comes with predefined views. The views define how operators see the device data and set cloud properties. Explore the views and practice making changes.

Device template views.

Publish the device template

If you make any changes, be sure to select Publish to publish the device template.

Create a new device template

  1. On the Device templates page, select + New to create a new device template and follow the creation process.
  2. Create a custom device template or choose a device template from the Azure IoT device catalog.

Explore simulated devices

The water quality monitoring application you created from the application template has two simulated devices. These devices map to the water quality monitoring device template.

View the devices

  1. Select Devices on the leftmost pane of your application.

    Devices

  2. Select one simulated device.

    Select device 1

  3. On the Cloud Properties tab, change the Acidity (pH) threshold value from 8 to 9 and select Save.

  4. Explore the Device Properties tab and the Device Dashboard tab.

Note

All tabs have been configured from Device template views.

Add new devices

  1. On the Devices tab, select + New to add a new device.
  2. Use the suggested Device ID or enter your own. You can also enter a Device name for your new device.
  3. Select Water Quality Monitor as the Device template.
  4. Make sure the Simulate this device is set to Yes if you want to create a simulated device.
  5. Select Create.

Explore and configure rules

In Azure IoT Central, you can create rules that automatically monitor device telemetry. These rules trigger an action when any of their conditions are met. One possible action is to send email notifications. Other possibilities include a Power Automate action or a webhook action to send data to other services.

The water quality monitoring application you created has two preconfigured rules.

View rules

  1. Select Rules on the leftmost pane of your application.

    Rules

  2. Select High pH alert, which is one of the preconfigured rules in the application.

    The high pH alert rule.

    The High pH alert rule is configured to check the condition of acidity (pH) being greater than 8.

Next, add an email action to the rule:

  1. Select + Email.
  2. In the Display name box, enter High pH alert.
  3. In the To box, enter the email address associated with your Azure IoT Central account.
  4. Optionally, enter a note to include in the text of the email.
  5. Select Done to complete the action.
  6. Set the rule to Enabled and select Save.

Within a few minutes, you should receive email when the configured condition is met.

Note

The application sends email each time a condition is met. Select Disable for a rule to stop receiving automated email from that rule.

To create a new rule, select Rules on the leftmost pane of your application and then select +New.

Configure jobs

With Azure IoT Central jobs, you can trigger updates to device or cloud properties on multiple devices. You can also use jobs to trigger device commands on multiple devices. Azure IoT Central automates the workflow for you.

  1. Select Jobs on the leftmost pane of your application.
  2. Select +New job and configure one or more jobs.

Customize your application

As a builder, you can change several settings to customize the user experience in your application.

  1. Select Administration > Customize your application.

  2. Under Masthead logo, select Change to choose the image to upload as the logo.

  3. Under Browser icon, select Change to choose the image that appears on browser tabs.

  4. Under Browser colors, you can replace the default values with HTML hexadecimal color codes.

    Customize your application

Update the application image

  1. Select Administration > Your application.

  2. Select Change to choose an image to upload as the application image.

Clean up resources

If you're not going to continue to use your application, delete the application with the following steps:

  1. Open the Administration tab on the leftmost pane of your application.

  2. Select Your application and select the Delete button.

    Delete your application.