This article is the third part of our Azure services explained series. Part 1 explores Azure Service Fabric, and its key benefits. In part 2 we focused on Azure Functions. In this post we will take a closer look at Azure IoT Hub.
Do you have IoT projects on your roadmap? If yes, then you have probably heard about Azure IoT Hub. Smart devices (like a smart toilet, for example) connect through Wi-Fi to Azure IoT Hub, which acts as a command center: processes messages, triggers actions, and collects information about the toilet’s system. Then, it sends this information further to the appropriate system or application.
Wait… Have I lost you at “smart toilet”?
Unless you are an IoT expert, it’s not easy to understand the essence of the Internet of Things. But have no fear, my job is to explain complicated things in simple ways. For Azure IoT Hub, I’ll do this by using the home automation example. Simply because it’s easier to grasp than, let’s say, IoT-driven smart cities.
Welcome to my smart home. Fancy trying my futuristic toilet?
A “smart home” is a home equipped with lighting, heating, and electronic devices that are connected to the Internet and can be controlled remotely by smartphone or computer. For example, you can contact your refrigerator to order milk when you’re running out of it, your lightbulbs to turn on and off automatically on voice cue, or your toilet seat to warm up while you are still in the bed.
Let’s stay with this last example. If you look closely, a smart toilet has several, rather unusual capabilities.
- wireless Bluetooth music sync
- foot warmer
- automatic self-cleansing
- a remote control that lets you instantly adjust the water spray for position, temperature, and oscillating or pulsating motion
- adjustable warm-air flow
- built-in odor control
- the possibility to save preferred settings for many users
And the best part: everything can be controlled through voice commands or an application. A smart toilet offers personalized settings that let you fine-tune every aspect of your user experience. Can you imagine a more pleasant experience? I doubt it.
IoT, and its promise.
The Internet of Things (IoT) is the network of physical devices, vehicles, home appliances, and other items embedded with electronics, software, sensors, actuators, and connectivity which enables these objects to connect and exchange data.
The term was coined by Kevin Ashton, a British technology pioneer. He was working as an assistant brand manager at Procter & Gamble in 1997 when he became interested in using RFID (Radio Frequency Identification Data) to help manage P&G’s supply chain. In his famous presentation in 1999, he said that computers should be capable of gathering information independently of humans and be able to understand the real world without being operated by people. Since that presentation, we have been talking about the “Internet of Things”.
The IoT promise is a smarter, more convenient, and more economical life. For this promise to become reality, however, technology has to be top-notch.
Welcome to Azure IoT Hub.
Azure IoT Hub is Microsoft’s Internet of Things connector to the cloud. It’s a fully managed cloud service that enables reliable and secure bi-directional communications between millions of IoT devices and a solution back end.
Device-to-cloud telemetry data tells you about the state of your devices and assets. Cloud-to-device messages let you send commands and notifications to your connected devices. Device messages are sent in a durable way to accommodate intermittently connected devices.
Discussing the many interesting features Azure IoT Hub offers is out of the scope of this blog. Today I’ll limit myself to explaining the notion of IoT Edge and device twins, which are at the core of Azure IoT Hub.
An IoT Edge is a smart device equipped with compute power and designed to execute services in the field. By processing data at their origin, a lot of transmission and network traffic can be avoided. Thus both costs and risks can be minimized.
A device twin is the digital representation of your connected device. It’s a JSON file in the cloud managed by IoT Hub, and there is one of them for each of your IoT devices connected to IoT Hub.
In this device twin, you have several sections. The first one is called tags. This is something that allows you to group your devices according to location, building number, building level, and to address these devices in a bulk. So, let’s say, you want to update all your toilets on floor number two. In this case, you just send a SQL query and pass a command for updating firmware on all devices on that level.
There are two more notions here that are important: reported properties – the reported state of the device, pushed by the device to the cloud; and the desired properties – the state you want your device to be in, pushed by the cloud to the device.
IoT Hub, being the authoritative source, takes care of all these pushes, or with a better word, synchronization.
Okay, I’ve heard enough. Take me back to the smart bathroom.
Let’s imagine your smart bathroom leverages the highly scalable PaaS components of the Azure IoT platform as its foundation. The toilet connects through Wi-Fi to Azure IoT Hub. Azure IoT Hub provisions, authenticates and manages the toilet at scale and in a highly secure manner. It processes messages, triggers actions, and collects information about the toilet’s system health. Then it catalogs and analyzes the data, and dispatches it to the appropriate business system for response.
Besides this, Azure IoT Hub offers device management. Got a second bathroom with toilet? No problem. You can register the new device to Azure IoT Hub and manage it from there. Also, Microsoft’s IoT connector generates a unique access key for every single device. This ensures that devices can only do what they are supposed to, and allows you to disable single devices when they get corrupted.
IoT application structures are getting increasingly complex. In addition to traditional human users we find new technologies, all kinds of smart devices, and new backend architectures. As long as all components and services run and interact as desired, perfect! But what if something behaves buggy or breaks at all, leaving a frustrated user? On a toilet seat? I dread thinking about that…
You so have to monitor that!
A satisfied user experience requires a stable and performing system. To ensure that, it’s essential that your monitoring includes all components along the full stack. Only if all transactions are observed end-to-end do you get the required data set to analyze the behavior of your application and detect anomalies out of the box.
Dynatrace is the only monitoring solution on the market that is built on a powerful AI engine to automatically discover all dependencies and find the root cause for a detected problem.
Dynatrace’ Smartscape view is the visualization of all components, services, and dependencies in the IoT application
Dynatrace provides all required components to cover our smart toilet example. It integrates with the device, which is the toilet seat, the Azure IoT Hub, and the backend services attached to it.
The Internet of Things is growing by huge leaps and we approach the day when connectivity is considered standard in every product. While this might sound weird today, within 5-10 years the connected toilet will be the standard in smart homes all over the world.
But there is so much more to IoT! In fact, after reading only one hour about the different possibilities IoT technology offers, I really think that there has never been a more exciting time to be in IT.
Do you have any IoT projects? Which cloud services you use? Why? Share your story in the comment section below, or read more about how Dynatrace can help: