John Kestner

Twine Web App

Program hardware without coding

2012

Twine was one of the first consumer Internet of Things products. (Read more about the product here.) A major part of making this screenless, buttonless hardware user-friendly was developing tightly integrated software.

The Twine web app makes it simple to set up and monitor Twines from a browser. Set rules to trigger messages without any programming. The rules are put together with a palette of available conditions and actions, and read like normal sentences: WHEN moisture sensor gets wet THEN text "The basement is flooding!"

Architecture

I built an interactive web application using Backbone, which lets a user provide simple When/Then rules to their sensor hardware. In live mode (done with long polling because WebSockets weren't mature) they can see the sensors react to stimuli in real time with CSS animations, encouraging exploration. The web app is modular to accommodate new kinds of sensors with a few minutes of code.

Once rules are set, the save action passes them off to a service that generates firmware and leaves it in a queue for the user's Twine to check and flash itself.

The app is built on Python/Tornado for speed and simplicity. It works alongside services to generate firmware, trigger actions from rules such as user notifications, and scalably communicate with hundreds of thousands of devices. It's served through nginx on AWS.

Setup app

Because the hardware and software are made for each other, setup is easy. I made a single-page web app that holds the user's hand while they're necessarily disconnected from the Internet in order to connect to Twine's Wi-Fi. The app is written in vanilla Javascript, and talks to the Twine's WiFi radio via REST calls to give it network credentials, and then to onboard them.

My contribution

Developed the idea into a product. Front end design and coding (HTML, CSS, Backbone, JavaScript), back end (Python, Tornado, PostgreSQL, nginx, AWS), copy, illustration, identity.

Press: Wall Street Journal, Engadget, Wired, Better Homes & Gardens, etc.