Managing thousands of IoT devices via a dashboard may not always be the most intuitive way. After all, who wants to scan through the clutter of a thousand different things and their notifications. In this blog post, we show you a unique approach to solve this problem through an IoT chatbot. Just like you chat with your co-workers, you can also chat with your devices, and they can respond back too.
Read on to know how a facilities management team interacts with the device/assets via a chat interface to make their maintenance chores easier and seamless. This chat interface is powered by the Azure IoT Hub and PubNub.
Azure IoT Hub can connect thousands of devices to control and monitor then via cloud-to-device and device-to-cloud interfaces and communicate using familiar protocols such as HTTP, AMQP and MQTT.
It supports multiple languages and platforms such as .NET, Node.js, PHP, Java, and Python on Windows and Linux.
Azure IoT Hub is built to scale for managing hybrid cloud deployments and supports orchestration of services for distributed data storage, analytics, artificial intelligence and more.
Images Courtsey, Azure IoT Hub
In this blog post, we’ll show you how to deploy Azure IoT service that powers an application which can be used by the facilities management team of a building. If you can think of connecting all the building assets to the Azure IoT Hub, then there can be new ways of managing them via chatbots. Let’s look at how to build an IoT chatbot for this use case.
In a typical office building or premises, a facilities management team takes care of maintaining all the utilities such as electrical, plumbing, sewage & fire safety systems, among others. For demonstrating this IoT chatbot, let’s consider only the electrical system for now. Imagine that the electrical staff uses a chat app, akin to Whatsapp or Slack, to coordinate repair and inspection works. Wouldn’t it be more convenient if that chat app also hooks up all of the several hundreds of the electrical points, appliances, and machinery?
If we somehow manage to do this, then for Jack and Mike, who are our champion electricians, replacing a fused light bulb will be just as easy as interacting with the bulb device socket via chat. Here is a simulated scenario of this interaction.
So that’s the concept. All you need is an intelligent device and a chatbot to impersonate that device. Once deployed, the chatbot can take part in chat conversations and can convey commands and messages to and from the device.
If you have a chat interface to interact with your co-workers then why not extend it to also interact with the devices that you and your co-workers manage on a day to day basis
Want to know how we built this demo app? Let’s dive in to learn how to make this with Azure IoT Hub.
We have a simulated setup of a small office, in the form of a web page containing the office floor plan along with light socket points.
And a web-based chat UI for the facilities management staff users.
The source code for this demo simulation is available in this GitHub repository.
There are three components of this demo source code.
Let’s launch these three components to make a working demo. We will start with the Azure IoT Hub.
Before launching this demo application, we have to create the devices and get their device keys. These keys are used to send messages to the Azure IoT hub. In this case, the devices are the light bulb sockets in the office. Refer this README file for the step by step instructions on creating the Azure IoT HUB service and registering the devices for this application.
Refer to this README file to launch the Node.js server for building simulation.
Once launched, you can interact with the light bulbs displayed in the office floor plan as follows.
The light bulbs have three states which are indicated by distinct colors:
(Note: To keep things simple, the building currently supports interaction with two light bulbs only. These two light bulbs are the ones that you can see in the animated interaction demo above.)
Refer this README file to launch a separate instance of Node.js server for the Chat UI. With this, all the three components of the application are not up and running.
You can sign in to the chat with your nickname and can see the pre-listed devices as shown in the animated demo above. Now you can play around with the chat UI and also interact with the building and perform operations on the light bulbs. Give it a try and see the messages popping up in the chat window.
Congratulations!! You are now part of a harmonious human to machine conversation.
This application relies on Azure IoT Hub and PubNub data stream service. Azure IoT orchestrates the device-to-cloud and cloud-to-app messaging.
PubNub provides a real-time data stream channel over which two Internet endpoints can communicate directly. For this application, PubNub plays the role of intermediate orchestrator, for exchanging chat messages between different users’ chat UI instances. Also on the building simulation side, PubNub is used to notify the Node.js (IoT Chatbot) about the device status.
All messages between the components are exchanged in JSON format. Refer to the message format file to know the exact format of messages that are sent during
If this use case excites you, then we would like to hear from you on how to improve it.
Maybe you can think of an improved chat interface that can filter devices based on their states, or group them based on some categorization. When it comes to maintaining thousands of devices, we need such efficient arrangements to provide a good user experience to the facility maintenance staff.
You could also extend this use case for scenarios like perimeter security & warehouse management, etc.. Feel free to comment below to discuss any similar application areas. We will be back soon with yet another cool use case of Internet of Things.
Kitchen Inventory Management with Smart Jar
IoT Intelligent Transportation Systems with Twilio Sync
An IoT Retrofit Suite For Professional DIYers
This Alexa Powered Dictionary Bot Can Expedite Your Vocabulary Buildup
Please log in again. The login page will open in a new window. After logging in you can close it and return to this page.