1. What Is the Internet of Things?
If youve been watching the technology world lately, chances are you have encountered numerous mentions of the term, the Internet of Things. Most media references and company advertisements label this or that as the Internet of Things but with little or no explanation about what it means. Even when you do find some depth of what it means, the text tends to focus on either the problems and challenges, or they focus on the promise of making our lives better in the future. Some suggest the Internet of Things will bring about the inevitable evolution of our society as we become more connected to the world around us every day.
However, you need not dive into such heady concepts or recite rhetoric to get started with the Internet of Things. In fact, through the efforts of many open source developers and vendors, you can explore the Internet of Things without intensive training or expensive hardware and software. Best of all, you can explore the Internet of Things without learning a lot about programming or spending months learning how to code!
This book is intended to be a guide to help you understand the Internet of Things and to begin building solutions that you can use to learn more about the Internet of Things. Since this is a beginners book, we will start by examining the programming language and environment followed by a detailed look at the hardware. We will also learn the basic knowledge of electronics and then explore several projects to help us understand how to work with the software. The final project will bring all the aspects together to help understand what the Internet of Things is, and even how to write custom software for building solutions for the Internet of Things. Best of all, we do so using one of the easiest to use programming languages and easy to use open source microcontroller boards.
So, what is this Internet of Things, hence IOT? While it is true the IOT employs technology and techniques that already exist, the way they are employed, coupled with the ability to access the solution from anywhere in the world, makes the IOT an exciting concept to explore. Now lets discuss what the IOT is.
The essence of the IOT is simply interconnected devices that generate and exchange data from observations, facts, and other data making it available to anyone. While there seems to be some marketing efforts attempting to make anything connected to the Internet an IOT solution or device not unlike the shameless labeling of everything cloud, IOT solutions are designed to make our knowledge of the world around us more timely and relevant by making it possible to get data about anything from anywhere at any time.
As you can imagine, if we were to connect every device around us to the Internet and make sensory data available for those devices, it is clear there is potential for the number of IOT devices to exceed the human population of the planet and for the data generated to rapidly exceed the capabilities of all but the most sophisticated database systems. These concepts are commonly known as addressability and big data and are two of the most active and debated topics in IOT.
However, the IOT is all about understanding the world around us. That is, we can leverage the data to make our world and our understanding of it better.
The Internet of Things and You
How do we observe the world around us? The human body is a marvel of ingenious sensory apparatus that allows us to see, hear, taste, and even feel through touch anything we encounter. Even our brains can store visual and auditory events recalling them at will. IOT solutions mimic many of these sensory capabilities and therefore can become an extension of our own abilities. While that may sound a bit grandiose (and it is), IOT solutions can record observations in the form of data from one or more sensors and make them available for viewing by anyone anywhere via the Internet.
Sensors are devices that produce either analog or digital values. We can then use the data collected to draw conclusions about the subject matter. This could be as simple as a sensor to detect when a door, window, or mailbox is opened. In the case of a switch on a mailbox, the knowledge we gain from a simple switch opening or closing (depending on how it is implemented and interpreted) may be used to predict when incoming mail has arrived or when outgoing mail has been picked up. I use the term predict because the sensor (switch) only tells us the door was opened or closed, not that anything was placed in or removed from the mailbox itself that would require additional sensors.
A more sophisticated example is using a series of sensors to record atmospheric data such as temperature, humidity, barometric pressure, wind speed, ambient light, rainfall, etc., to monitor the weather that allows us to perform analysis on the data to predict trends in weather. That is, we can predict within a reasonable certainty that precipitation is in the area.
Now, add the ability to see this data not only in real time (as it occurs), but also remotely from anywhere in the world, and the solution becomes more than a simple weather station. It becomes a way to observe the weather about one place from anywhere in the world. This example may seem to be a bit commonplace since you can tune into any number of television, web, and radio broadcasts to hear the weather from anywhere in the world. But consider the implications of building such a solution in your home. Now you can see data about the weather in your own home!
In the same way, but perhaps on a smaller scale, we can build solutions to monitor plants to help us understand how often they need water and other nutrients. Or perhaps we can monitor our pets while we are away at work. Further, we can record data about wildlife in our area to better understand our effect on nature.
IOT Is More Than Just Connected to the Internet
If a device is connected to the Internet, does that make it an IOT solution? That depends on whom you ask. Some believe the answer is yes. However, others (such as myself) contend that the answer is not unless there is some benefit from doing so. For example, if you connected your toaster to the Internet, what could be the benefit of doing so? It would be pointless (or at least extremely eccentric) to get a text on your phone from your toaster stating that your toast is ready. So, in this case, the answer is no.
However, if you have persons such as responsible teenagers or perhaps older adults whom you would like to monitor, it may be helpful to be able to check to see how often they use their toaster and when. That is, you can use the data to help you make decisions about their care and safety.
To me, if there is no use for the data, whether it is something that is viewed in real time or is stored for later processing, then simply connecting it to the Internet does not make it an IOT solution. There must be some gain in the use of the device. Thus, being connected to the Internet doesnt make something IOT. Rather, IOT solutions must be those things that provide some meaning however small that has benefit to someone or some other device or service.
More importantly, whatever we build IOT solutions to do, they allow us to sense the world around us and learn from those observations. The real tricky part is in how the data is collected, stored, and presented. We will see these in practice through examples in later chapters. See the sidebar for an example of a controversial IOT device - a common household appliance.
However, IOT solutions can often take advantage of companies that provide services that can help enhance or provide features you can use in your IOT solutions. These features are commonly called IOT Services and range from storage and presentation to the infrastructure services such as hosting.