Recently we’ve been working on several projects involving Internet of Things (IoT) for our clients. What is IoT? How does it work? What software do I need to build? How do I connect everything? Let’s try to answer some of these questions.

IoT is a very broad term that can apply to a vast amount of technologies. Take for example the definition from Wikipedia below:

The Internet of things, stylised Internet of Things (IoT), is the internetworking of physical devices, vehicles (also referred to as "connected devices" and "smart devices"), buildings and other items—embedded with electronics, software, sensors, actuators, and network connectivity that enable these objects to collect and exchange data.

Given the broad definition of IoT it follows that there are an equally broad number of ways to implement it. Generally speaking, one of the most difficult parts of IoT is connecting your smart device to your backend infrastructure. Yet again, there are a number of ways to do this. To highlight connectivity issues for smart devices to the rest of the IoT system, I’m going to lay out a hypothetical company case.

An Example System

IOT image 1

Above is a diagram of a system. Imagine Company X has a smart device that provides a count of how many widgets their customers have left. Company X gives the customer a smart device upon signing up for service, which is a large part of why customers choose Company X. The widgets could be products in a home, parts on an assembly line, or maybe how many spare tires are left on a desert crossing vehicle. Feel free to imagine the widgets as whatever you’d like.

For customer satisfaction, it’s imperative for Company X to know how many widgets are left. Customers depend on having a certain number of widgets available at any given time. These widgets are paid for on a monthly usage basis. Company X sends more widgets when the customer reaches a minimum number left. Customers expect these widgets to remain above a minimum count of 5. So when the widget count gets down to 7, Company X will automatically send the customer more widgets.

Company X provides their customers with a web portal to change their minimum widget count, see when new widgets are being delivered, and make payments. On the flip side, Company X has operations personnel that can easily oversee the whole process through a web portal. All of these things are easily connected through the internet to Company X’s servers and backend infrastructure. For the most part this is a solved problem.

However, notice the big question mark in the diagram. Company X wants the widget counter to be as flexible as possible. Company X’s widget counters should be able to be placed just about anywhere in the physical world. But how would they do that? It turns out this is a hard problem, but there are multiple ways to solve it. Let’s examine a couple of different strategies for connecting the devices to the end user.

Directly Connected Devices

IOT image 2

In the above diagram the smart device is connected directly to the internet. This works great. We could use embedded linux and develop programs that talk directly to servers and the hardware.

How can we connect a device directly to the internet? One option is through ethernet cables. However, this requires a cable be run to the place where the device physically resides. This can be tough, expensive, and unsightly. Option two, the smart device could connect to a wifi network. The wifi option is more appealing. It provides fairly flexible smart device placement and is something most customers already own. Another option is to connect through a cellular radio directly on the smart device. This isn’t a bad option, but it will require the company to subsidize the network somehow. It will also mean more complicated drivers and chips need to be present on the device. It does provide a lot of flexibility for product placement as you can get a cell phone signal pretty much anywhere these days. However, there are still dead zones for cell signals, so it doesn't completely solve the connection problem for the company. Perhaps we could provide a separate model of the smart device that has wifi. On the downside, Company X now has more hardware variations to support. It also means the customer has to know which device to purchase. It’s not entirely problematic, but it does add a measure of complexity.

One problem with connecting directly to the internet is that Company X now has to manage all of their devices with a central server infrastructure that they maintain. This is crucial, because it plays a large role in security. IoT devices are vulnerable to viruses and botnets. Take a recent example, the mirai botnet (see arstechnica for more info), which took down large parts of the internet. It was targeted specifically at IoT devices. There still isn’t an easy way to get updates to the IoT devices that were leveraged by the mirai attack. Security and pushing out updates to fix holes is a major issue and requires a lot of effort, especially if Company X manages and deploys all of their IoT devices directly to the internet. If only there was another solution with a device that already has multiple connection technologies, a global wireless network, and it’s own update infrastructure built in to take advantage…

Smart Device with a Companion App

IOT image 3

Well there is, and most people already have one in their pocket. For a lot of cases the smartphone makes a great companion to smart devices. In the above diagram you can see a smartphone sitting in the middle, filling in the question mark gap mentioned earlier.

Smartphones can easily solve connecting to the internet. They have cellular networks and wifi built right in. On top of that, the cellular network is subsidized directly by the consumer. More or less the large global cellular network is free to use for apps residing on a customer’s phone. This means that a customer can take an IoT device anywhere a cell phone can get a cell signal or wifi access and it will still be able to write data back to the cloud.

Now let’s say a company wants some kind of device a user takes with them on a backpacking trip in the mountains. Cell signal and wifi aren’t available in remote mountainous areas. Still, smartphones can store data and act as a hub for smart devices which can then be uploaded later when the smartphone gets signal.

Right now there are 1.8 billion smart phone customers in the world. That number should reach 2.1 by the end of 2016 according to statista. Of those people 87.6% of them are using an Android phone and 11.7% an iPhone according to IDC. Many of these people interact with smart devices on a daily basis already, so this is a large market to tap into.

Smartphones also have many ways of connecting to the smart devices. Wifi, bluetooth, bluetooth low energy (smart bluetooth), NFC, and USB are some current options for connecting to a device.This makes them very flexible for different smart devices’ needs.

Smartphones can also be the brains of the operation. Beacons for instance, don’t contain any business logic at all. Beacons simply broadcast a unique signal, like a radar ping. However, using web services smartphone apps can lookup arbitrary information using the beacon as a key (i.e. the Charlotte Mecklenburg Library app). Beacons can also be used like GPS for indoor navigation (i.e. the High Point Market app). Smartphones are becoming more and more powerful. Geekbench rated the iPhone 7 Plus with a score of 3307 and the Mac Pro with a score of 3754 (see Geekbench). The latest iPhone is almost as powerful as some desktop computers, making smartphones even more viable as the brains of a system.

Smartphones can help solve some of the security problems with IoT since they can provide an update mechanism. Depending on the type of smart device and the chips it has, the smartphone can directly update a device’s firmware. We can also easily send out app updates through Google Play and the iOS app store. It is worth noting the update infrastructure is maintained by Apple and Google free of cost to the smart device maker, which is a major bonus.

Smartphone apps can augment and enhance the smart device itself. Apps unlock the power of smart devices. New features can be pushed out to the app through the existing app store infrastructure. Reports and management of the device can be created directly on the app. More now than ever, customers expect their smartphones to work directly with their smart devices. Smart devices also need to be user friendly. Custom apps with well thought-out user interfaces provide that user friendliness.

Which Choice is Right For Your Company?

So which connection option is right for you? It really depends on the exact scenario and requirements of the smart device. While it might be more appropriate for a smart device in a factory to be connected directly to the internet, a device that tracks bike rides would be more appropriate connected through the smartphone option. Consumers expect smart devices to have a companion mobile app that makes using the smart device easy and powerful.

When it comes to choosing which option and building it out, Skookum can help. We take pride in creating valuable applications for our customers. Please view our work on IoT devices with High Point Market, Charlotte Mecklenburg Library, JRI Shocks and ADAC.