The Internet of Your Things: Logging Activity in Your Home/Office

on November 28 | by

2016-11-22-st-motions-contacts-hero2

Introduction

Multiple analysts have predicted the Internet of Things (IoT) market will add trillions of dollars to the global economy in the next few years. That is a lot of hype! What makes this particular market so valuable? The explosion of web-connected sensors in our homes, cars, kids, pets, everything will give us the ability to know what happened, when it happened, and where it happened for anything we want. The Internet of Things will become the world’s largest treasure trove of data and intelligence.

One of the most useful applications of the IoT is also one of the easiest for anyone to implement. No coding, no wiring, no waiting for the future. You can start creating your own treasure trove of data and intelligence in a matter of minutes, and this tutorial will show you how.

The Internet of Your Things

If the IoT makes it easy to capture what is happening, a good place to start capturing is where we live or work. A few simple sensors collecting data in the right places can spawn insights and deliver invaluable peace of mind. The only “Internet of Things” you really care about is the “Internet of Your Things.” Is the house-sitter throwing a party? What time did the kids go to bed last night? Did the nephews break into the liquor cabinet again? Did someone let the dogs out to potty? When was the last time someone ran on the treadmill?

Sensors

STmotion STmulti

This tutorial is pretty straightforward: take a couple of old school sensors, connect them to the internet, and create a trove of intelligence. We will use two simple sensors that have been around for decades – motion sensors to let us know when there is movement and door sensors to let us know when doors open/close. These sensors have been used since the 1970s for security systems. Instead of just alerting us when there is an intrusion, we are going to use these sensors to capture data in our home/office, timestamp that data, and send it to a web service.

Samsung SmartThings Multipurpose Sensor (Door Sensor)
Samsung SmartThings Motion Sensor

Hub

sthub

Our motion and door sensors need to be wireless. This means they need to run on a battery, and that battery needs to last a long time. Sensors that directly talk to the internet through WiFi are power hogs. The sensors above communicate to a web-connected hub via Zigbee, a low-power wireless protocol. The hub will relay the data from every sensor to a web service. We will utilize Samsung SmartThings for our hub and sensors. SmartThings is a a great choice here because installation is super easy and consumer friendly. We can also easily connect our SmartThings hub to a web service to capture and view all of our sensor data.

Samsung SmartThings Hub

Hardware Installation

SmartThings provides fantastic, up-to-date installation instructions for their products:

Setting up your SmartThings hub
Setting up a SmartThings multipurpose sensor
Setting up a SmartThings motion sensor

Sensor Placement

stsensors

If we were using door and motion sensors for a security system, we would only need to secure the doors to the outside, windows, and a couple of strategically placed motion sensors. However, we are going to use our door and motion sensors to collect data on the activity of our home/office. We will need several motion sensors, one for each major room (e.g. living room, kitchen, bedrooms). Door sensors can be placed on refrigerators, cabinets (e.g. liquor, medicine, gun cabinets), interior doors, etc. Each of the sensors above also contain a temperature sensor, a handy addition we can utilize in our data collection.

*note: If a sensor gets far away from your hub, you will need to have a mesh network “repeater” for it to communicate to the hub. Zigbee is, by default, a mesh network. However, only powered SmartThings sensors act as repeaters. You may need to sporadically place SmartThings outlets in your home/office if your sensors are covering a large area.

A Web Service for Our Data

We want to stream all of our SmartThings sensor data to a cloud service and have that service turn our data into a nice dashboard that we can access from our laptop or mobile device. Our data needs a destination. We will use Initial State as that destination. Setting up the connection between SmartThings and Initial State is super easy. Simply follow the instructions at http://blog.initialstate.com/tutorial-smartthings-meet-initial-state/.

Once the SmartThings -> Initial State connection has been setup, every event that occurs on your SmartThings network will be timestamped, encrypted, and sent to your private Initial State account.

Analyzing the Data

screen-shot-2016-11-27-at-7-16-15-pm

The first thing we can do once data is streaming into our Initial State account is create a sweet looking dashboard for all of our sensors. Some helpful links on creating your dashboard:

Resizing and Moving Tiles
Change a Tile Data View Type
Adding Units and/or Emojis to Displayed Data
All SmartThings + Initial State Tips/Help Articles

screen-shot-2016-11-27-at-7-36-48-pm

The Tiles dashboard gives us a fantastic “at-a-glance” view of our home/office. We can see the current state of each sensor (emojis can help with visual context). For example, you can see that the motion sensor in the exercise room is currently inactive. Not only that, you can see at the bottom of the tile when the last change happened – Nov 26, 2016 5:15 PM. The pie chart on the right gives you a breakdown of how much a particular sensor is active vs inactive. This lets you see which rooms are utilized more than others.

screen-shot-2016-11-27-at-7-20-04-pm

If we want to really dig into all of our historical data, Initial State’s Waves application gives us the “data console” view. Some helpful links on using Waves:

Zooming and Panning
Re-ordering Signal
Keyboard Shortcuts
Generating Statistics

screen-shot-2016-11-28-at-8-56-17-am

You can see above that the back door opened on Nov 26, 2016 3:55 pm and opened again a few minutes later (perhaps someone let the dogs out and then back in).

screen-shot-2016-11-28-at-9-09-18-am

You can generate quick statistics on certain sensors such as how many times the back door opened on November 26 (in the example above, 14 times).

Conclusion

Using web-connected motion, door, and energy sensors to capture the activity where you live/work may become one of the most common use cases of the IoT. It is certainly one of the more useful applications. Projects like this take advantage of the most underrated aspect of the IoT – historical data collection. Sensors continue getting more and more affordable as do web services (Initial State gives you unlimited data+retention for only $5/mo). As the usability of web-connected sensors and data services continues to improve, the number of practical applications of the IoT will explode.

One Response

  1. Michael Filgate says:

    ” These sensors have been used since the 1970s”

    ta-da “Samsung SmartThings Multipurpose Sensor (Door Sensor)”

Leave a Reply

Your email address will not be published. Required fields are marked *

« »

Initial State Technologies, Inc.
Scroll to top
Initial State