Now that we’ve explored many of the key components in an IoT architecture, we are going to look at Microsoft’s IoT solutions that package several of these components together. Each is designed to simplify and speed deployment of commonly implemented IoT solutions.
All the solutions described in this chapter feature the Azure IoT Hub. As discussed in Chapter 4, the IoT Hub enables connectivity and management that can be scaled to interface with large numbers of devices and enables high-volume telemetry ingestion, command and control of the devices, and enforcement of device security.
We’ll begin by describing Microsoft’s SaaS IoT offering called IoT Central. It is a Microsoft-managed offering in which underlying services are not exposed. Setup and management of IoT Central are via a browser-based interface.
Remote monitoring
Connected factory
Predictive maintenance
Device simulation
IoT Central and the solution accelerators are accessible via Microsoft web sites where you will also find links to documentation, developer’s guides, an IoT School, the IoT Show (pre-recorded interviews/overviews describing component capabilities), access to the IoT Technical Community, and access to the IoT Device Catalog.
Azure IoT Central
IoT Solution Accelerators
Azure IoT Central
Builders. Define the types of devices connecting to the IoT Central application and customize the application. Builders create device templates to define telemetry that is being sent, define business and device properties, set thresholds that the application responds to, set device behavioral settings, and test the templates (often by initially using simulated data).
Operators. Manage devices connected to the application including device monitoring, troubleshooting and remediation of problems, and provisioning of new devices.
Administrators. Manage access to the IoT Central application through user roles and permissions.
Device Developers. Create code to run on the devices using SDKs. The code is used in creating secure connections, sending telemetry, reporting on status, and receiving configuration updates.
You can try IoT Central for free for the first 7 days or choose to pay as you go. Then you select an application template from samples that are provided or define your own custom application. If new to IoT Central, you might choose to deploy the Contoso sample template that Microsoft provides so that you can gain familiarity with the subsequent interfaces.
Once a new device type is defined in a template, we can add the device using the device explorer in the interface. We enter the device ID and device name and then adjust settings and provide property information as needed. Next, we generate a connection string for the device, prepare a Node.js project associated with the device, and then configure the client code.
Note
Azure IoT Central relies on the Azure IoT Hub Device Provisioning Service (DPS) to manage device registrations and connections to your devices. You can generate device credentials and configure the devices offline without registering them through the IoT Central interface and use your own device identifiers to register devices. You can set up shared access signatures (SAS) or X.509 certificate authority to enable devices to connect. All data exchanged between the devices and Azure IoT Central is encrypted.
On the menu along the left side, in addition to viewing the dashboard, we can access device explorer, device sets, analytics, and jobs. We also see access to device templates, continuous data export, and administration.
In device sets, we find the device set names, their descriptions, and the device template used. We can set conditions for device sets by selecting properties (such as location, temperature alerts, fan speed, etc.), an operator (value for the property equals, does not equal, is greater than, is greater than or equal to, is less than, is less than, is equal to, contains, etc.), and a value. We can also view individual devices within each device set. Here, we can view measurements, settings, properties, commands, rules, and the dashboard for each device. For example, we might set a rule that an alert is sent if the device is moved more than a certain distance.
Functions below the line on the left side of the application interface in the previous figures are focused on setup and management. These include access to setting up device templates (previously introduced), continuous data export, and administration.
If you later make changes to settings or required properties in the device template, you will be prompted to create a new version. This can be extremely useful as you might initially find that rules are broken in the new version, such as when properties that conditions rely upon have been removed. Some of the tiles in your dashboard might also be broken if properties or settings are removed. While you fix these problems, operators will still have access to the old fully working version. When you are ready, you can migrate devices to the new version through device explorer.
Continuous data export enables you to export data from IoT Central to your storage. (i.e., Azure Blob Storage, Azure Event Hubs, Azure Service Bus). The administration interface enables management of application settings, users, roles, billing, device connection, access tokens, application customization, help customization, and application template export.
IoT Solution Accelerators
The IoT solution accelerators are designed to speed implementation of popular IoT scenarios, such as those for remote monitoring, connected factories, and predictive maintenance, by automatically provisioning key PaaS Azure cloud services needed in each scenario. Microsoft positions the solution accelerators as starting points for your own IoT solutions. They are designed to be scalable, modular, understandable, extensible, and secure.
At the time this book was published, Microsoft was in the process of moving the solution accelerators from a model-view-controller (MVC) architecture written in .NET to a microservices architecture. A microservices architecture can improve the flexibility, reliability, and scalability of a solution. The Remote Monitoring and Device Simulation solution accelerators were already deployable in a microservices architecture when this book was written.
The underlying code in the solution accelerators is open source and available on GitHub. For customization of backends, you will need Java or .NET skills. Visualizations can be customized using JavaScript.
Next, we’ll explore each of the IoT solution accelerators regarding their capabilities and key resources that are provisioned.
Remote Monitoring
The Remote Monitoring solution accelerator enables collection of telemetry from multiple devices in remote locations. A dashboard shows the telemetry from the devices and provides an interface used to provision new devices or upgrade device firmware.
When you deploy the Remote Monitoring solution accelerator, you have a choice of standard, basic, or local configurations. The standard configuration is intended for production and deploys microservices on several Azure virtual machines. The basic configuration is intended for testing and demos and deploys the microservices on a single Azure virtual machine. The local virtual machine deployment is intended for testing and development and connects to the Azure IoT Hub to reach cloud resources.
You can see that the dashboard leverages Azure Maps to display where the devices are located. Integration with Time Series Insights (e.g., the menu shown on the left in the figure) is evident.
Predictive Maintenance
The Predictive Maintenance solution accelerator uses machine learning algorithms applied to device telemetry data to predict when the devices will fail. This solution can be used to put into practice optimal device maintenance plans and activities.
Once provisioned, a link is provided to the Machine Learning Studio and the workspace.
The Predictive Maintenance solution accelerator also includes a demo dashboard for the same sample data set. The regression algorithm that is deployed predicts the Remaining Useful Life (RUL) of the two jet engines as data from four sensors in each engine is cycled through. Each cycle denoted in the dashboard represents a flight of 2 to 10 hours. Data is captured by sensors every 30 minutes during a flight.
Connected Factory
Enables browsing of the OPC UA information model in OPC UA servers
Enables configuration of OPC UA devices (call methods, read and write data)
Enables publishing/unpublishing OPC UA device telemetry data
Enables viewing of telemetry previews
Enables viewing of telemetry data trends and creation of correlations using Time Series Insights
Enables viewing of calculated overall equipment efficiency (OEE) and key performance indicators
Enables viewing of industry asset hierarchies in tree topologies and interactive maps
Enables viewing, acknowledgment, and closing of alerts based on threshold rules that you set
Security permissions for users are configured based on role-based access control (RBAC) . End-to-end encryption is implemented using OPC UA authentication (X.509 certificates) and security tokens.
A demonstration dashboard is provided with simulated device data that can help you better understand the functionality provided. A map provides a view of where factories are located. The status of each factory is shown as is a list of current alarms. Overall equipment efficiency, availability, performance, quality, units per hour, and kWh are represented by indicators. You can then drill to further detail through the dashboard.
Device Simulation
The Device Simulation solution accelerator is designed to define simulated devices that create realistic telemetry. The telemetry can then be used in testing IoT solutions that you are developing. The modeling includes message formats, twin properties, and methods. More complex device behaviors can be simulated using JavaScript.
You can simulate a single device during testing or scale the testing to thousands of devices connected to your IoT Hub(s). So, you can simulate normal, peak, and extreme workloads for scale testing.
Once provisioned, you can run the sample simulations provided (including good and faulty chillers, elevators, engines, trucks, and prototypes). You can also choose to define custom device simulations including data points and value ranges. As noted earlier, your third choice is to create advanced device simulations in JSON definition files using JavaScript that you can upload.
A sample dashboard is provided to view the simulations and provides information on the number of devices, the total messages and message rate, the number of failed messages, the number of device connections, and the number of failed twin updates.