December 18, 2015 - Brian Warner

Gear S2, SmartThings, and a Fun Home Automation Project with Stanford

One of the great things about being in the Open Source Group at Samsung is that we get to work on cool stuff both inside and outside the company.

As we’ve done in past years, Samsung is sponsoring a project in Jay Borenstein’s CS210 course at Stanford. The objective of CS210 is to expose students to corporate development practices by giving them real world design and development projects, pushing the envelope of technology and building something cool. Companies like Samsung can sponsor project teams by providing the building blocks for a project and mentoring students through the process.

Smart Watch, Smart Home

We are calling our project for 2016 Smart Watch, Smart Home. As you can probably guess, it will involve wearables and home automation; of course, it will involve open source.

Home Automation

Home automation products are nothing new and have been around for many years. However, recently there’s been a major boom in low-power, connected devices. At the same time, companies like SmartThings have been involved in a concerted effort to bridge the various disparate ecosystems that were previously separated by incompatible radios or protocols.

One of the best things to come out of this integration work is that it suddenly becomes easier to tie everything together as a result of all the low-level integration work that is already done. In particular, SmartThings has taken a great approach with SmartApps.

In essence, when a device is paired with a SmartThings hub, its key functionality is abstracted in a consistent way, regardless of manufacturer or transport. This allows you to write Groovy applications where switch.on() can be used to turn on anything that acts like a switch – regardless of whether it’s ZigBee or Z-Wave, or sold by SmartThings or GE or many others.

So what does this mean? For one thing, it’s a lot easier to write a single app that controls stuff, and once the hardware is in place in your house, the rest is just software and logic. (oblig. XKCD) It also provides a convenient way to integrate with other things. SmartThings makes it easy to expose RESTful APIs for SmartApps, which means virtually anything with network access can be used to trigger home automation routines.

This is where the smart watch comes in.

Wave your hands

The Gear S2 is a pretty nifty device. I’ve worn the various iterations of Gear since the first Tizen watch was released, and this is by far the easiest to use and most fun to wear. It is truly a pleasure to own.

It’s also packs a pretty impressive set of sensors, all of which can be accessed by Tizen apps. All variants of the Gear S2 have an accelerometer, gyroscope, barometer, ambient light sensor, and heart rate monitor. In addition, all of them have Bluetooth, WiFi, and GSM. (The GSM version is out too, but we aren’t using that for this particular project).

Put it all together and what do you have? To me, it looks like an interesting control device that is specifically attuned to what you generally care about – i.e. your immediate surroundings. Detect that a user is making a specific hand gesture? Check. Detect a user’s heartbeat is higher than usual? Can do. Has it gotten darker in the room? Yep, it can tell that.

Tying it all together

So on one hand (literally and figuratively) you have an Internet-connected control device. On the other, you have devices in your immediate vicinity that can be securely controlled over the network. Put them together, and you can create some cool stuff.

It’ll be up to the project team to define specific use cases, determine appropriate triggers for them, build an app that recognizes those triggers, write a SmartThings SmartApp, expose some RESTful APIs, and call them when a trigger happens. However, some examples could include:

  • I’m shivering, so turn up the heat a few degrees
  • My heart rate is high and my pedometer just logged a bunch of steps, cool down the room for 45 minutes
  • It’s dark and I’m flailing my arms, turn on a light
  • I’m home and just performed a secret handshake, unlock my door and turn on the lights

I am really excited about this project (and not just because I love my Gear S2 and have a bunch of SmartThings stuff). Part of the promise of IoT and home automation is that when the right conditions are met, command and control should be easily integrated into the fabric of normal life. This will be a fun and extensible way to accomplish a step on this path.

And of course, when we’re done everything will be up on GitHub. Stay tuned!

Brian Warner

About Brian Warner

Brian is Manager of Open Source Engineering and Strategy in the Samsung Open Source Group. He manages a rockstar team of upstream contributors to graphics projects (Wayland, Weston, Enlightenment, EFL, and others) who support Tizen and other projects, and is responsible for internal and external strategic open source initiatives.

Image Credits: Open Source Way

Development / IoTivity / Leadership / Tizen Gear S2 / SmartThings / Stanford /

Comments

  • Need another beta tester?

    This is just what I need to go with all of the IOT devices in my house! Probably have to get a gear tattoo on my head, though…..

    But seriously, if you have need of beta testers, I’d be glad to buy the S2 and try out the ap.

    J

  • Chad says:

    Second that on the beta test.. Gear will be here Wednesday, looking forward to adding it to the mix.

  • Albert says:

    I have the Gear S2, Nest thermostat, Wemo light switches, Hue lightbulbs, Amazon Echo and Dot, Vivint home security, SmartThings hub and the August smartlock…been searching the web for any possibility of tying these all together somehow with my Samsung watch…Amazon Echo has been amazing at integrating everything but thought it would also be cool to have the option of using my watch for certain things. I also have the Smartthings hub, just haven’t really used it much. I got to find a centralized place for it but haven’t gotten around to running some cables to place it where I’d like it.

    Looks like you guys are having some fun with this. If you have any beta testing opportunities please let me know as well.

    albertborjas@gmail.com

  • Jeff Manson says:

    I recently bought a Gear S because I wanted to write a Bluetooth LE app to connect to a battery management system that I designed and built. Unfortunately, Samsung seem to have deliberately crippled this device. The latest version of Tizen for the watch is 2.2.1, but Bluetooth LE functionality is only available in Tizen version 2.3.1. The latest SDK seems to assume that we can easily write code for Tizen 2.3 or 2.4 devices, but it is basically not possible on the current version for the Gear S. Why have Samsung abandoned this brilliant device for the downgraded Gear S2 ? I wanted a device with the great OLED screen and all the sensors. Is anyone doing a project to release an upgrade for the Tizen software in these devices or do I have to become a Tizen platform developer and do it myself ? Why hasn’t anybody used this hardware which is much better than the Gear S2 watch ?

  • rich says:

    so wheres the smartthings app for gear s2 already?

Leave a Reply to Chad Cancel reply

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

Comments Protected by WP-SpamShield Anti-Spam