Project

An Introduction to the Wunderbar

August 29, 2015 by Patrick Lloyd

Learn how to set up the Wunderbar platform to begin building your own IoT apps. This will demonstrate the "Can't Touch This" and "Tell Me When" demo applications to measure WunderBar sensors and perform actions based on them. Some of the major bugs are discussed.

The Wunder Bar is a cute idea with some major bugs.

Introduction

German tech startup Relayr has just released a starter kit for developing applications for the Internet of Things. Pitched primarily to software developers unfamiliar with IoT hardware, WunderBar endeavors to streamline the development process with a hardware kit full of sensors, software API's with example code, and a cloud infrastructure to collaborate globally with data from other WunderBar users. The actual kit contains a separable printed circuit board with wirelessly connected sensor modules that cover a wide range of applications: RGB color and proximity detector, microphone, IR transmitter, inertial measurement unit (IMU), temperature / humidity sensor, and an expansion board for connecting to any of Seeed Studios available sensors and devices. The best part is: all schematics, firmware, and demo applications are all open source. See their documentation page for more info. Folks in the US can pick one up from the Local Motors Shop.

However, after playing around with the kit, I encountered some significant hurdles. I'm going to walk you through the projects and break down the primary issues.


The box

 

In the box
What's in the box

 

Guts of WunderBar

In more technical terms, each of the WunderBar modules has a Nordic Semiconductor nRF51 SoC which reads the sensor(s) on their board and uses Bluetooth LE (4.0) to talk to a "master module," which then uploads the data to the Relayr cloud. The nRF51's communicate with MQTT which is a lightweight publish-subscribe protocol designed for really low power IoT applications. The master module uses an nRF51 to talk to the sensor modules, a Gainspan GS1500m to connect to a local WiFi network, and a Freescale Kinetis K-series (ARM Cortex M4) processor to do all the heavy lifting (associate with networks, host MQTT server, authenticate with Relayr cloud, etc). As far as available sensors go, the linup is pretty slick:

  • TAOS TCS3771 RGB color and proximity sensor
  • MEAS HTU21D temperature and relative humidity sensor
  • MPU-6500 acccelerometer and gyroscope
  • Knowles SPU0410HR5H noise level sensor
  • Customizable IR transmitter
  • Bridge module for Seeed Studios Grove devices
Wunderbar Master Module
Wunderbar Master Module broken away from everything else

Setting Everything Up

In order to use the WunderBar, Relayr requires that the device go through a process called "Onboarding" where you associate the device to your particular network, your phone, and the Relayr cloud. I've embedded some of their videos below but they have plenty of resources on getting that up and running so I'll be brief in its explanation:

After spending some time getting everything up and running, I think it's important to note that the WunderBar is not a finished product just yet. This is a developer kit in its beta stages trying to work through some kinks, so if you run into any hardware or software issues, shipping concerns, or just want some place to look for ideas and workarounds, the developer forum is a decent way to get insight from other users as well as the developers themselves.

 
Caveat emptor: there will be bugs...

 

Side Note on Security

With a predicted number of IoT devices exceeding 8 billion back in 2012, and swarms of hackers actively searching for exploits there are some serious concerns about security in the Internet of Things. Relayr claims to have tons of security built into their products but one very troubling feature of the WunderBar is that it will only connect to a very small subset of networks with particularly limited security options. Network names can't have usernames (like in WPA2 enterprise networks), network names AND passwords must be 18 characters or less, and THEY CAN ONLY CONTAIN NUMBERS AND LETTERS. This is wholly my opinion here, but the fact that you are required to make your network less secure to use a product is pretty unacceptable. This may be fixed in future firmware updates but it really feels like security is a complete afterthought.

 

Viewing Sensor Data with the Dashboard and the Manager App

Once all the sensor modules are On-Boarded feel free to break it apart, pop in the batteries, and view the real-time sensor data on the Relayr Device Dashboard.

 

This will let you know if and how the devices are communicating and can act as a way to troubleshoot. You can also view sensor data through the phone you used to onboard the WunderBar:

 
Some of the other ways to access raw sensor values

Android Demo Apps

Relayr provides source code for two demo Android apps that show off some of their SDK's functionality. If you aren't particularly well-versed in Android development, they are also available on the Google Play Store for free. The first one, Can't Touch This (source) (Google Play), uses the accelerometer module to determine if an object it's stuck to is moved. In my case, I wanted to know if anyone was running off with cooler filled with delicious summertime beverages. 

After downloading the app and signing in with my Relayr credentials, I named the device being protected and affixed the accelerometer to the cooler using the included double-sided foam tape.



Oh precious mobile refrigeration device, never leave me...

The next demo app is called Tell Me When (source) (Google Play). This allows you to set threshold rules for your devices and get notified when they occur. I live in Georgia where the weather can be pretty volatile and the parties can get pretty unruly. I set up a rule to read the thermometer so that I can be warned if the temperature reaches heat stroke conditions, another one to let me know if it's too humid outside (and therefore raining), a sound level rule to let me know if my party is getting too rowdy, and a proximity sensor to keep track of when people are grabbing my beers from the refrigerator.


My custom rules

 


Rule creation window

 

Unfortunately, there are still some bugs to be worked out and I couldn't get the Tell Me When app to actually register when any of these conditions were met, even though they were clearly meeting the thresholds according to the Relayr Dashboard in the browser and the Relayr Manager app on my phone. So, just remember your mileage may vary...



I know Jimbo BillyBob stole my beer! Why doesn't WunderBar report it?

Conclusion

The Relayr WunderBar is a very ambitious project that is still in its infancy. If you are willing to put up with some minor security headaches and connectivity troubleshooting, this is a very interesting way to get real-world sensor data into your Python, Node.js, Android, iOS, C#, and HTML5 projects. With the open source nature of the device and a helpful development community, WunderBar shows a lot of promise.

One primary issue is getting a reliable connection between the Bluetooth-enabled sensor modules and the master module (which gets the sensor data and uploads it over WiFi). Some of the issues I've been having, (like modules disconnecting after moving more than a few inches from the master module) people on the Relayr forums have brought up and the Relayr staff are issuing replacements.

In the next set of tutorials, I'm going to dig deeper into the platform and start pulling data directly from the SDK libraries and hack it a bit add some more complex functions. Take a look though the documentation and start messing around with the examples. Until next time... happy hacking!