Software Development

Internet of Things

What is Internet of Things?

Internet of Things (IoT) is a network of internet connected devices (IoT Devices) embedded in everyday objects enabling sending and receiving data such as settings and telemetry.

IoT devices are pieces of hardware, such as sensors, actuators, gadgets, appliances, or machines, that are programmed for certain applications and can transmit data over the internet or other networks.

What is an example of an Internet of Things device?

A light bulb that can be switched on using a smartphone app is an IoT device, as is a motion sensor or a smart thermostat in your office or a connected streetlight. An IoT device could be as fluffy as a child’s toy or as serious as a driverless truck. Some larger objects may themselves be filled with many smaller IoT components, such as a jet engine that’s now filled with thousands of sensors collecting and transmitting data back to make sure it is operating efficiently. At an even bigger scale smart cities projects are filling entire regions with sensors help us understand and control the environment. 

Azure IoT reference architecture

The below diagram represents a recommended architecture for IoT applications using Azure PaaS (platform-as-a-service) components. The following diagram reflects different Azure components that can be used to architect an IoT solution. The diagram shows, most of the commonly used services, but no solution requires all of them.

Diagram of the architecture

Devices

Azure IoT supports a large range of devices, from microcontrollers running Azure RTOS and Azure Sphere to developer boards like MxChip and Raspberry Pi. Azure IoT also supports smart server gateways capable of running custom code. Devices might perform some local processing through a service such as Azure IoT Edge, or just connect directly to Azure so that they can send data to and receive data from the IoT solution.

When devices are connected to the cloud, there are several services that assist with ingesting data. Azure IoT Hub is a cloud gateway service that can securely connect and manage devices. IoT Hub Device Provisioning Service (DPS) enables zero-touch, just-in-time provisioning that helps to register a large number of devices in a secure and scalable manner. Azure Digital Twins enables virtual models of real world systems.

Insights

Once devices have been connected in the cloud, their data can be processed and explored to gain custom insights about their environment. At a high level, there are three ways to process data — hot path, warm path, and cold path. The difference between them has to do with requirements for latency and data access.

  • The hot path analyzes data in near-real-time as it arrives. In the hot path, telemetry must be processed with very low latency. The hot path is typically implemented using a stream processing engine. Consider using services such as Azure Stream Analytics or HDInsight. The output may trigger an alert, or be written to a structured format that can be queried using analytical tools.
  • The warm path analyzes data that can accommodate longer delays for more detailed processing. Consider Azure Data Explorer or Azure Time Series Insights for storing and analyzing large volumes of data.
  • The cold path performs batch processing at longer intervals (hourly or daily). The cold path typically operates over large volumes of data which can be stored in Azure Data Lake, and the results don’t need to be as timely as the hot or warm paths. Consider using Azure Machine Learning or Azure Databricks to analyze cold data.

Actions

You can use the insights gathered about your data to manage and control your environment. Business integration actions might include storing informational messages, raising alarms, sending email or SMS messages, or integrating with business applications such as CRM and ERP. The following services are available for management and business integration:

  • Power BI connects to, models, and visualizes your data. Power BI enables you to collaborate on data and use artificial intelligence to make data-driven decisions.
  • Azure Maps allows you to create location aware web and mobile applications using geospatial services (search, maps, routing, tracking, and traffic), APIs, and SDKs.
  • Azure Cognitive Search provides a search service over varied types of content. This includes indexing, AI enrichment, and querying capabilities.
  • Azure API Management provides a single place to manage all of your APIs.
  • Azure Web Apps enables you to deploy web applications that scale with your organization.
  • Mobile Apps allows you to build cross platform and native apps for iOs, Android, Windows, or Mac.
  • Dynamics 365 combines CRM (customer relationship management) and ERP (enterprise resource planning) in the cloud.
  • Microsoft Flow is a SaaS offering for automating workflows across applications and other SaaS services.
  • Azure Logic Apps is a cloud-based PaaS offering used to create and automate workflows that integrate your apps, data, services, and systems.

We will discuss in details about Azure IOT Hub

Azure IOT Hub

IoT Hub is a managed service hosted in the cloud that acts as a central message hub for communication between an IoT application and its attached devices. You can connect millions of devices and their backend solutions reliably and securely. Almost any device can be connected to an IoT Hub.

Azure Iot Hub

  • Managed service for bi-directional communication
  • Platform as a Service (PaaS)
  • Highly secure, scalable and reliable
  • Integrates with a lot of Azure Services
  • Programmable SDKs for popular languages (C, C#, Java, Python, Node.js)
  • Multiple protocols (HTTPS, AMQP, MQTT)

Azure Functions

  • Serverless coding platform (Functions as a Service, FaaS)
  • Designed for nano-service architectures and event-based applications
  • Scales up and down very quickly
  • Highly scalable
  • Supports popular languages and frameworks (.NET & .NET Core, Java, Node.js, Python, PowerShell, etc.)

Demo

In this Demo we will walk through how to hook up to Azure IoT hub(D2C) with a single Azure Function.

Demo Source Code : https://github.com/PalakMahajanDA/IOTHubDemoWithFunction.git

Leave a Reply