Kids who grew up in the 1990s, like myself, will have noticed a lot of changes to our everyday lives over the last 30 years because of the internet and its omnipresence. Having a wireless connection wherever we go, checking emails and Facebook on our smartphones: all of this didn't exist in the 1990s. Smartphones? We had mobile phones, yes, but with a monochrome display and an antenna, and they didn't have an internet connection. The multimedia highlight was playing the game Snake, a simple 2D game with a game logic that can be programmed in a day. There was no mobile internet and no wireless LAN. When we were visiting another city and got lost, we had to go inside a store and ask for helpāno Google Maps.
Nowadays, the internet is ubiquitous and people are dependent on it for their day-to-day life. Everyone has a phone in their pocket, which they can use to find any information they want in seconds. According to a study by Business Insider, on average, there will be four internet-connected devices per human by 2020.
Smart devices come in various forms and shapes and are causing disruptions in every industry, just like the internet did in the early 2000s. Companies such as Google and Samsung have been developing wearable devices, such as smartwatches and health trackers, automated robots for industrial applications, self-driving cars, smart buildings, and smart home devices, as well as early-warning systems for tsunamis or earthquakes.
In this chapter, we will explore some of the devices and technologies that are driving the internet-connected device revolution. We will have a closer look at the following topics:
The most prominent category of Internet of Things (IoT) devices for end consumers is smart homeāconnected electronic devices that are used in your flat or house. They often replace traditional electronic devices by enhancing them with an internet connection and a way to control them digitally. In most cases, they offer a smartphone app or integration with a smart home app, such as Google Home, which makes it possible, for example, to turn the device on and off from your sofa, change its settings, and check its status.
According to a study by Zion Market Research (https://www.zionmarketresearch.com/news/smart-home-market), the global smart home market is about to reach around USD 53.45 billion by 2022, with big tech companies such as Samsung and Google being at the forefront. Let's look at some examples of these smart home devices:
- Smart fridges
- Smart door locks
- Smart thermostats
- Smart scales
- Smart lights
- Smart pet food dispensers
These are only a few of the smart home devices available today. The potential of such smart devices to influence our lives is huge.
Let's look at an example of a smart deviceāa smart fridgeāand see what benefits it brings over a non-smart device.
The main problems people tend to have with a regular fridge are the following:
- Food goes to waste because you have no clear overview of expiration dates for each item.
- You run out of a certain food because you did not keep track of your supply.
Smart fridges keep track of your groceries and their expiration dates and warn you when you might run out of your favorite food. When opening the fridge, it could also present you with recommendations for what to cook with the available ingredients.
To minimize food waste, it might detect that you have, for example, tomatoes, curry sauce, and onions that will go bad soon. It might then automatically run an online search and present you with recipes that include these ingredients for you to prepare.
If it is connected to third-party shopping providers, it might also take care of ordering food automatically for youāfor example, when your milk is running low, it might order a new bottle for you, which will then either be delivered to your doorstep or be ready for pickup at your local grocery store, together with other items that you are running low on.
While you cannot expect that level of comfort from a smart device just yet, more and more devices in our households will have similar features that make our lives easier.
In most cases, smart home devices need internet access to function correctly, which means that you must tell your device how it can connect to your local network via a network name and password.
When you first set up a new smart device in your household, the process often looks like this:
- You connect the smart device to a power source.
- The smart device goes into setup mode.
- The smart device opens an ad hoc network (see https://en.wikipedia.org/wiki/Wireless_ad_hoc_network).
- You connect to the network provided by the smart device via your smartphone.
- On your smartphone, you visit a special website that is served by the smart device, and which is only accessible when you are connected to its network.
- You specify the network username and password on the website.
- The information is transmitted to the smart device.
- The smart device will close the temporary ad hoc network and connect to your normal network via the username and password you provided.
- The smart device can go online via your regular wireless network.
The very same technique can be used for creating IoT prototypes with microcontrollers, such as Arduino, Raspberry Pi, or Particle Photon, to create a convenient setup routine. We will not cover this technique in this book, but this is something to keep in mind if you're thinking about giving a prototype to friends and family or with batch production.
For example, if you were to bring your prototype to your friend's house, it would not be able to connect to the internet there, because it does not know the network name and password to connect with.
Without a setup routine like the one described previously, the source code of the device has to be modified each time the device is placed into a different environment to successfully connect to the other network.
If you have ever lived in a single apartment without too much knowledge about how to separate your clothes when doing your laundry, you might have ended up with a bunch of pink shirts because a red sock found its way into your collection of white shirts that were to be washed. If you don't know what I am talking about, it is one of the mistakes a lot of single people make when using a washing machine. Washing a red sock with your white shirts is not a good idea, and might result in your shirts taking on the color of the sock, thereby becoming pink.
Other things can go wrong. You might do something wrong when setting the temperature, accidentally washing your favorite Norwegian Christmas sweater at 90 degrees, causing it to shrink. Now you might wear it while exposing your belly on cold summer days.
Chances are high that you don't want these things to happen.
Imagine that your shirts had a voice and that, when you asked them about their color and washing preferences, they answered, "Hi, my color is light-blue and I enjoy being washed at 30 °C. I will get sick when you tumble dry me, so please don't!". Now your washing machine could ask each and every textile lying in the washing machine drum about their washing preferences and set the program accordingly, or warn you that the red sock might better be off with the other red socks.
This can be made possible by using smart tags, such as RFID (short for Radio-Frequency Identification).
Many such use cases are about to bring value to our lives and make our lives easier. However, many companies forget about their product's original use case. One example is a smart light bulb that cannot be used as a light source when it is having a firmware update (https://twitter.com/BalrogGameRoom/status/1036644958973960192), which lasts for up to one hour. A firmware update probably does not need to be done very often, but if the light bulb is going through a firmware update in the evening, when it is dark, you will question their update policy and want to go back to using a normal light bulb.
I think updating the firmware on devices is important to keep the device secure and safe from hackers, but, in this case, the company producing these smart light bulbs could have spent more time developing a better update routine to improve the user experie...