A manager of a plant floor is dreaming. “Clairvoyance. Clairvoyance. Clairvoyance.” She wakes up in a cold sweat. Her husband turns to her, “Honey, what’s wrong?” She sighs, blurry-eyed, and stares at the ceiling hoping it will jog her memory. “I was dreaming about the plant floor. That I could see everything that was going on everywhere, all the time. I could see the future, the past, and the present all at once. I knew when things were going to be done. I knew when machines were going to fail. I could see everything!” Her husband rolls over, tugging the sheets back over himself. “It was just a dream, go back to bed,” he groggily mumbles. But she can’t, the dream just felt too real.

Benefits of Azure IoT Hub

Perhaps she couldn’t go back to bed because she knew intuitively that all of those dreams are possible to some degree. And whether you are trying to create solutions such as those for a single plant, a generic solution for many, or solve some other device-to-cloud-related problem, IoT Hub can help.

In a nutshell, what is Microsoft Azure IoT Hub? It’s a Platform-as-a-Service solution catering to the need to connect devices to the cloud (and in turn other services), keep track of each and every one, keep them secure, and provide a platform to remotely monitor their reliability and update their firmware as needed. If you work with Microsoft technologies already and are looking for custom solutions for your specific challenges or want to create your own IoT-related product, IoT Hub abstracts away many of the IoT-specific use cases and lets you concentrate on the business problems at hand.

Setting Up Azure IoT Hub

The basic process to set up a device and get it to talk to the cloud is fairly straightforward for any .NET developer, and perhaps surprisingly, there is documentation and support for Node and Java running on a device as well. Microsoft’s getting started tutorial can be finished in an afternoon, no hardware required. Want to run some technology other than .NET, Node, or Java? No problem, IoT Hub supports anything that can talk MQTT (a common communication protocol for devices).

To summarize Microsoft’s tutorial, you go into Azure and create an IoT Hub. Then, you create a device key and register it with the IoT Hub. This key is based on a device id, and it’s done by creating a small console application that generates the device key and registers it with IoT Hub. Good, now you and Azure IoT Hub know that this device exists, and can authenticate it whenever it connects. Next, you create two applications: The “SimulateDevice” app is for simulating a real device that sends info to the cloud, and “ReadDeviceToCloudMessages” is for reading that data back from the IoT Hub.

Once that’s finished and you run the applications, “SimulateDevice” starts pushing messages to IoT Hub, which logs them and processes meta data about them (how much data, sent when, by what device), and these messages are read in near-real-time by your “ReadDeviceToCloudMessages” app.

Beyond The Basics

Once you’ve got a tantalizing picture of what’s possible with IoT Hub, the possibilities are endless. You can read the messages being sent to IoT Hub from other applications and services within Azure, so making a Microsoft BI dashboard to see real-time data is a possibility. You can send messages to the device, to manage machines in the real world. You can process data from your devices with Azure’s Machine Learning or Stream Analytics services. Using such services, you can let your Machine Learning automate certain processes, for example turning off a machine if it seems close to the point of failure based on temperature or noise patterns.

Once you have a myriad of devices securely and robustly giving you information about what’s happening out there in the real world, there more possibilities for clairvoyance than you can count.