Allie Hopkins
Guest blog post by Gautam Banerjee, product manager of dweet.io
We were thrilled when the SimpleLink™ SensorTag team at Texas Instruments told us they wanted to add dweet.io support to their smartphone app. The SensorTag is one of the most robust, developer friendly Internet of Things (IoT) prototyping kits we’ve come across. And with dweet.io, prototyping with the SensorTag just became even easier.
In a nutshell, dweet.io is like Twitter for machines. It’s a platform that enables “things” on the Internet of Things to publish their data to the cloud. In turn, other “things” or apps may subscribe to that data. As a developer, dweet is a common, RESTful api layer for all your connected hardware. You can then build, prototype and deploy your IoT apps in any platform. Essentially, you can focus more on solutions and user experience, and less on the IoT infrastructure.
Let’s walk through getting your SensorTag data on dweet.io. The first thing need is the latest version of the SensorTag app. The app uses Bluetooth® Smart to connect your phone to your SensorTag kit and acts as an Internet gateway to send your data to the cloud (dweet). Make sure your SensorTag is on.
Make sure Bluetooth is enabled on your phone. On the first screen you should see your SensorTag in the list of Bluetooth devices.
The SensorTag apps searches for Bluetooth Smart devices
Select your SensorTag and choose “Sensor View” from the pop up. This will give you a real-time view of your SensorTag sensor outputs. We want to send this data to the cloud. The default app cloud configuration is for IBM Bluemix, so we’ll have to edit that to dweet. Click on the cloud view cell to enter the configuration. Then click edit. Select dweet.io from the list of built-in cloud services.
Next, you’ll see that you’ve been given a thingname for dweet. A thingname on dweet is like a username on Twitter. It is just a way to uniquely identify your machine or device. Since we’re using dweet’s free service, all your data is publicly viewable. If you want to secure it, you can buy a lock. Also, your thingname is not protected — that is, anyone can write to it unless you lock it. So I recommend you change the default thingname you were assigned to something unique to you (I just used mysensortag).
Now click save and go back to the sensor-view page. Make sure the push-to-cloud switch is on and you’re all set. You can see what it is dweeting in real time if you go to http://dweet.io/follow/your-thingname in any browser. Be sure to replace your-thingname with the name you set in the app.
You can toggle between raw values and a visual view. As you can see, the dweet app is ‘dweeting’ SensorTag data like your accelerometer, speed, altitude, temperature, and orientation. In other words, the app is publishing your SensorTag’s data to dweet.io. Any other party may subscribe or follow your Thing’s datastream via dweet.io’s api (or simply typing the follow URL above if they know your thingname).
To help your development journey, Bug Labs also provides an open-sourced visualization web app called freeboard™. Freeboards are easily configurable dashboards that allow you to display a combination of thing and web accessible data in real time. Dashboards help you make better design decisions, observe and understand the things behavior, spot trends or identify issues quickly. Many of our customers use freeboard as their main end user application, such as vehicle fleet management (location, speed, heading), public swimming pool temperature and providing air quality information.
Freeboard is free to use unless you want to keep your dashboards private. Once you signup, click on “Create New” and give your first freeboard a name. A freeboard is comprised of three of things:
Once you’ve created a new dashboard, you will see a blank canvas and a configuration panel on top. Before we add panels to your dashboard, we must add at least one datasource. Click on “add” under datasources and select dweet.io as the type.
Select dweet.io as your datasource type
Now give this dweet datasource a name, like SensorTag. For thingname, you must use the name that the app is using for your SensorTag. In my case, it was mysensortag. Since we’re using the free tier of dweet, there is no value for key, so you can leave it blank.
Once you hit save, you’ll see the name of your datasource on the top panel. You’ll know that your datasource is alive if you see the time it was last updated.
Our SensorTag is connected!
Now that you have at least one datasource, you can start adding panels and widgets. A panel is a container that you can drag around your dashboard for your preferred placement. Panels can hold one or more widgets, usually in logical groupings.
Click add pane to get started. You’ll see that a pane has an action bar on top. To add widgets to pane, click on the “+” and select your type. Our first widget will be a temperature gauge.
Configuring your widget involves selecting the datasource (in our case, there’s only one), and then selecting which key-values in that datasource you want.
First, add your datasource to the first input field by clicking on “+ datasource”. Next, you can traverse the key-value pairs in your datasource via a dropdown. Select ambient temperature. Set your units to C. I put my max range to 50.
And that’s it! You have your first widget.
Try repeating these steps for different types of widgets and datasource values. I did a text widget with a sparkline for the light sensor. I ended up with this simple dashboard in about 2 minutes.
A simple freeboard for my SensorTag!
We are excited our tools are available for TI’s SimpleLink SensorTag. We believe dweet.io and freeboard can accelerate your product development because they’re so easy to use. If you have questions for TI or us, just tweet us at @dweet.io or @TXInstruments. Happy prototyping!
Buy the SimpleLink SensorTag today!
TI PROVIDES TECHNICAL AND RELIABILITY DATA (INCLUDING DATASHEETS), DESIGN RESOURCES (INCLUDING REFERENCE DESIGNS), APPLICATION OR OTHER DESIGN ADVICE, WEB TOOLS, SAFETY INFORMATION, AND OTHER RESOURCES “AS IS” AND WITH ALL FAULTS, AND DISCLAIMS ALL WARRANTIES, EXPRESS AND IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT OF THIRD PARTY INTELLECTUAL PROPERTY RIGHTS.
These resources are intended for skilled developers designing with TI products. You are solely responsible for (1) selecting the appropriate TI products for your application, (2) designing, validating and testing your application, and (3) ensuring your application meets applicable standards, and any other safety, security, or other requirements. These resources are subject to change without notice. TI grants you permission to use these resources only for development of an application that uses the TI products described in the resource. Other reproduction and display of these resources is prohibited. No license is granted to any other TI intellectual property right or to any third party intellectual property right. TI disclaims responsibility for, and you will fully indemnify TI and its representatives against, any claims, damages, costs, losses, and liabilities arising out of your use of these resources.
TI’s products are provided subject to TI’s Terms of Sale (www.ti.com/legal/termsofsale.html) or other applicable terms available either on ti.com or provided in conjunction with such TI products. TI’s provision of these resources does not expand or otherwise alter TI’s applicable warranties or warranty disclaimers for TI products.
Mailing Address: Texas Instruments, Post Office Box 655303, Dallas, Texas 75265
Copyright © 2023, Texas Instruments Incorporated