• Twilio, Tessel, and the Internet of People

    Tuesday, September 16, 2014

    9/16/2014– Jon McKay

    Twilio and Tessel

    Twilio is a company that is near and dear to our hearts at Technical Machine. We’re excited to announce that their Node.js library runs on Tessel. Twilio is the SMS and Voice glue for any communications-based applications and they have an amazing developer experience. Hands down, Twilio is the easiest way to send SMS and voice communications and I’ve yet to meet a dissatisfied customer.

    In my opinion, Twilio and Tessel seem like a perfect match. Tessel is the fastest way to gather data about the physical world, and Twilio is the fastest way to get that information to the people who care.

    Why SMS?

    There are a whole slew of ways devices communicate with each other and with people: lightweight, data transfer protocols (MQTT, CoAP, XMPP, BLE), haptics, or visual displays. But what happens when an individual needs to be notified of an event regardless of where they are in the world?

    SMS is the best way to immediately get data to to the right person. While push notifications are also a reliable way of getting information directly to a user, it still requires them to download yet another app. As more and more connected devices have their own applications, it becomes increasingly tedious to download and use a separate smartphone application for each. Text messages are still the simplest way to get data from a device to a smartphone.

    Running Twilio on Tessel

    When we shipped Tessel, the runtime wasn’t compatible enough with Node for the Twilio Node.js library to run on Tessel. Not only that, but our WiFi state machine was unstable and prone to crashing making HTTP requests unreliable.

    We’re really proud of the progress we’ve made since then to get the Twilio Node.js library running directly on a microcontroller. We’ve slogged through a whole slew of WiFi, JavaScript, and Node compatibility bugs for this library to start working. We’re starting to see other libraries (like Keen.io and MQTT which we’ll talk about more soon) Just Work on Tessel and it’s really exciting to see our original design finally coming to fruition.

    We worked Ricky Robinett, a developer evangelist at Twilio to test out the Node library as we were fixing it. He was able to write a simple app on Tessel to get an idea of exactly how lazy his dog, Gif, really is. Using the Twilio Node library and the accelerometer module, he could detect when his dog was napping on the job, and send him a text with the nap duration. While it is an, admittedly, silly use case, his blog post shows the basics of loading the Twilio node module, monitoring the accelerometer values, and posting an SMS with an event has occurred. Check it out if you’re interested in sending a text message from Tessel!

    Note: SMS in production

    Lastly, running Twilio on Tessel is the fastest way to prototype an SMS-enabled system but you would want a different system design when moving to production. For example, you could move to a proxy-service oriented architecture: Tessel would send an HTTP request to a remote server and that server would take care of interacting with the Twilio service. The proxy server could also route incoming SMS messages down to the Tessel.

    If you’re building an SMS-enabled Tessel application and you’d like help, feel free to post on our forums or shoot me an email at jon@technical.io.


    #twilio #node #tessel #compatibility #wifi #sms #iot #internet of things #internet of people #node.js #javascript #ricky #robinett #jon #mckay #jon mckay

August 2018

January 2018

July 2017

February 2017

November 2016

October 2016

September 2016

August 2016

July 2016

June 2016

April 2016

March 2016

February 2016

November 2015

September 2015

August 2015

July 2015

June 2015

May 2015

March 2015

February 2015

January 2015

December 2014

November 2014

October 2014

September 2014

August 2014

July 2014

June 2014

May 2014

April 2014

March 2014

February 2014

January 2014

December 2013

November 2013

October 2013

September 2013

August 2013

July 2013