We were on our way back on a Sunday morning from Lokhandwala to my home in Thane. It is definitely a long distance to cover and we were commuting by train and then bus. Me and my daughter. Needless to say we were parched and very exhausted. While the bottled water in the station took care of our needs of thirst it was the heat that we needed to get relieved about. My daughter threw a question to me if we could just turn on the AC of our house while we were just 10 minutes away from there so that once we enter the house it would be cool. Really it was a question to ponder upon. Sometimes kids throw such questions and demands which really make people think. As I said in my earlier blog, "To see the future it is very essential to hear your kids to see them." This was a case like that and so begun my study of a new technology, IoT, Internet of Things. To study something the biggest driver is a purpose and in this case like in many cases the driver was a simple question. So today I take upon this opportunity to humbly jot down some points that make the IoT skeleton.
I would like to give a disclaimer before you read any further that I am not an expert in this technology and I am still learning the ropes of the same. However, whatever that is learnt needs to be shared because knowledge is the only wealth that multiplies on sharing unlike any other wealth in the world.
What is the motivation of IoT for a layman?
While many telecom experts have written tons about this technology that is yet to see a good light of the day, at least in India and other developing countries, it is essential to know how can this technology benefit a person who is not tech savvy or who is not really a technical field person. After all we make things for the people and not only for those who have a deep and sound understanding of technology. The motivation of IoT is to take the internet from a level where it communicates between persons to a level where there is a level of communication between devices to devices, devices to person and of course person to person. The present internet is people-centric and it always needs a kind of a probe or a kind of an user to be at one end of the system requesting or processing information. IoT on the other side gives a kind of power to Non-Living machines to take the part in a very important process which was in a way limited to the human world, taking decisions. We would be living in a world were machines at some point of time would be able to take the same kind of decisions we take with cognizance of the external and internal environment. The only thing that IoT does not address is the fact that it does not put any emotion to the machines and thank God for that.
Skeleton of IoT:
It is not easy to explain all aspects of IoT in one blog post rather it is impossible. As Einstein said "Things should be made simple but not further simpler" so we would really want to explore this technology in bits and pieces. Today I am taking an example that answers the question of my daughter and that is to control the machines by some kind of control system and intelligence built in the network. Of course in later posts we will also see how these machines end up taking decisions on their own.
A primary requirement of this would be to connect the devices by means of some method to the internet after all we are talking about "Internet" of things and this has to be connected to the Internet in some ways. For this the device which in the figure below are Air conditioner, Smart Electric Meter and Refrigerator need to have a transmitter/receiver that can communicate on a wireless interface with the home SOHO. Also there needs to be a special kind of a Transmitter/Receiver in the SOHO router which can translate these signals from the devices to a legible format that can be read over the internet.
Let us see the picture below and disect it piece by piece.
Well it is very clear that on the left side there are devices connected to the SOHO and on the right hand side we have the internet infrastructure.
LoRa WAN:
A LoRa WAN is similar to that of a wifi protocol the only difference is that it runs on 433MHz. Other bands can also be used, but I found the band of 433MHz to be more popular as this is long range and is less prone to interference in present situations. This is an unlicensed band just like the WiFi and can connect the devices to the SOHO router. Of course the SOHO Router should also have a LoRa WAN concentrator receiver that it may then put to the Internet side.
Communication:
The communication is same as it is a normal IP communication. There is NAT in the SOHO that converts the private IPs to a public pool with a specific port number and then this is transferred over the internet to the subsequent application servers. Mind you that the user is able to control the system in this case only by means of a dedicated login to the application server either from the home laptop or a mobile device using a specific user name and password that is given for each device service or each device service group. A device service group is a collection of devices that can be managed using the same application by a common user id and password. Eg if you have all the appliance by a similar manufacturer then there may be a possibility of having a device service group for you and then you can control these devices using the same user ID and password.
The flow of call is never from the user to the device directly it is from the user to the application server and then to the device and the reverse reporting is also in the same way. Well this is the simplest form of how you can setup the IoT in your network.
Of course there are many devices these days that also do not require the LoRa interface and have an inbuilt WiFi receiver that can connect to your WiFi and there are apps to control that using your WiFi or also over the internet. However that is a different story.
Addressing of the Devices:
Apart from IP the devices and the applications have a unique 64 Bit identifier just like the Mac Address. DevEui and the AppEui are what they are called respectively. These are unique addresses and are also sent in order for the application servers to exactly pinpoint the devices that they are actually accessing with the profile.
Security:
There are three different 128 bit keys that the LoRa WAN operates upon. This is to ensure a proper secured session between the devices and the application. Because if this session is secure then and only then there would be a kind of integrity of the data reported by the devices to the users and the command chain that the user would provide to control these devices. Why? Because the media is fairly insecure (Unlicensed Band).
- AppKey: This is a key which is permanent and is known by the application and the device. This key is a part of the system and is predefined.
- AppSKey: This is the Application Session Key and this is generated when a session is established between the device and the application that is hosted on the application server.
- NwSKey: This is the Network Security Key and this is also generated when the data flow starts from the Device to the application. The NwSKey is basically from the Device to the end gateway, in this case the point where the application servers are connected to the internet. This basically secures the Network flow or establishes a kind of a secured tunnel for the device to communicate so that there is no tapping of information at any point of time.
The second and the third keys are generated during the session establishment and the data flow while the first key is predefined for identification.
So my friends you see that how insecure it may seem to be it is not like that. There is a lot of lock and key present in the flow of data which makes the protocols inherently free from hacking.
Use Cases:
Well there are many use cases of this. One it answers the question that my daughter asked. I can switch on the AC using an app on my mobile phone while I am just 10 minutes away from my house. I can look at my electricity consumption. I can look at my refrigerator cooling and adjust it accordingly also see whether it is full of goods or needs some refill. Of course in this basic model I will not be able to see if I have enough Ice cream in the refrigerator, that is a different case.
What we look ahead at???
Well this is just the start. We can have a lot of things that we can do with IoT. We have not yet touch-based upon the decision making structure and how we can align devices or share device load in order to have a good use and optimal use of all the devices that we own. Basically from all the machines that our houses/businesses have in silos we bring them to a common ground where we can orchestrate or they themselves can adjust to the environment.
Till then have a great day ahead and keep evolving....
Cheers,
Kalyan