My tryst with Internet of Things (IoT) – Part 2
I finally decided to delve in this wave that everyone seems to be talking about – Internet of Things! Through this series, I will describe my experience with each of the components that I get to play with. After speaking to a lot of startups, attending several IOT architecture sessions, reading about the various associated technologies – I have developed an understanding and more importantly an interest to dive into IoT. I ll start with a reference architectures and will dive into details in subsequent posts.
There are a couple of ways one person tries to start: (a) Dive directly into the depths of the ocean and figure a way up or (b) Explore the oceans, learn the sea-scape well and then dive in. Being on the conservative side, I thought of exploring the latter: some options which already exist before I dive into the depths.
One of the most fascinating solutions I found which acts like a great start is https://www.azureiotsuite.com/. This has pre-baked solutions for you to understand how an IoT solution could look like – the various components that go into building an IoT solution – and more importantly may act like a starting point for you.
Clicking on a new solution takes you to :
As you can see, there are 2 options that you can experiment with (which also happens to be the most common tasks in IoT):
- Predictive Maintenance:
- Remote Monitoring
To see the various components – let us select Remote Monitoring.
The snapshot shows the various components that it creates in the backend in Azure that support the IoT solution. As discussed in Part 1, few components discussed are being created in the backend automatically – IoT Hub, event hub, stream analytics which are the core components (‘The Magic’) and Storage Components such as Document DB and Azure Storage for storing data which are streamed and also device ids as required. The Azure App Service is being created as a WebApp which acts like the presentation dashboard.
As soon as you hit the ‘Create Solution’ button – it submits the request to Azure to provision the solution.
Clicking on Details shows you the progress of the provisioning of the solution. As you can see it basically takes advantage of ARM templates to provision the resources. This takes about 5-8 minutes.
Once the solution is ready, it will show on the dashboard – now you can click on Launch or Solution Dashboard to launch it. But before that, lets go to the Azure Management portal and see the resources that it created:
Notice that a Resource group called iot-hub is created with all the resources in it as described above. Point to note is – that with a single click of the button all this gets created for you. You can refer to the GitHub link pointed in the above snapshot about how the solution has been created.
Lets Launch the solution and see how it looks:
To begin with, note that this is an Azure website as it ends with .azurewebsites.net. Key components of the IoT solution are clearly shown:
1. Dashboard: This is the final and most important outcome of the IoT project – a single view visually indicating the state of the different sensors. As you can guess this IoT solution is reading temperatures/humidity from different regions – which are showed using Bing Apis.
2. Devices: This is a list of the devices (‘The Things’) which are streaming the data which is being presented on the dashboard
3. Rules: This is the action part – deriving insights form the data to take action – such as a notification or raise an alarm for a sensor reading
4. Additional Options: Advanced, Add a device : These are additional options that add value to your IoT Project.
The basic point being that this is a prebaked solution to give us an idea of the various components in an IoT solution. We can directly start using this solution, modify the code and integrate this into our own solution or get an idea about how an IoT solution can be designed and implement our own from scratch.
For more documentation around Azure IoT Hub, please refer to the Azure IoT Development Center. This has some excellent resources to get you started. At least now I feel I have an understanding of the various components and how they integrate. Will dive in deeper in the next part. In the meantime, please feel free to share your experiences in IoT with me @AdarshaDatta.