Overview of the #iot hackathon

We had a great time at the #iot hackathon on Saturday May 25th. Attendance was great, the venue became ful and people set up teams immediately and started working on their hacks!

The participants “self-configured” in 10 different teams that competed using openPicus hardware, Seeedstudio sensors and actuators, as well as the Cloud infrastructure from IoTango.

Flyport & Seeedstudio Goodies

The Hackathon was organized and supported by CREATE-NET and the IoT Italy group and was held as part of WhyMCA event Hack Reality 2.

The best hacks that used WiFi Flyport boards, sensors and actuators and communicated over the Internet have been awarded. The final winners list has been the following:

1st prize went to the ‘Smart Fridge’: A hack that monitors how often you use your fridge, monitors missing goods and that can lock your fridge and unlock it in specific timeslots to save you from eating snacks and gaining weight! The hack also lets your social network friends know when you don’t stick to your diet program!

The ‘smart’ fridge

2nd prize went to the ‘Smart car – Safe drive’: A hack that checks driver’s alcohol levels, alerts driver through a buzzer and notifies family. It also allows to call a taxi driver to assist with ‘drunk’ driver delivery safe at home!

The 2nd prize team

3rd prize went to the youngest team of participants (ITT Buonarroti Trento High School) for building an automated heat cooling system!

 

3rd place winners

All prizes were sponsored by CREATE-NET and IoTango and included Amazon gift vouchers for the winning teams. The IoT Hackathon was the first of an event series to be organized by CREATE-NET in the context of the Internet of Things, so there is more to come!

There was even a kid’s corner, where kids had the opportunity to play with littlebits and experience the joy of connecting electronic parts together and watching various outputs.

Kid’s corner with Littlebits

 

More photos from the event can be found here.

#iot hackathon fever!

The first Internet of Things Hackathon is taking place shortly (May 25th) between Milan and Trento, Italy. The event is part of the Hack Reality 2 organised by WhyMCA.

The #iot hackathon is quite special because:

1) It is the first Internet of Things hackathon

2) It is the first hackathon to take place in two different geographical locations at the same time

3) In Trento, It will take place in  bar!

Topics of interest for projects include Web & Mobile, Automotive, Internet of Things, Wearable Devices, Smart Cities, M-Payments, Home Automation.

Participants (need to register here) will have the opportunity to play with Flyport WiFi modules by openPicus, dozens of sensors and actuators from Seeedstudio, the Cloud service provided by IoTango and build creative projects that will communicate over the Internet. The main goal is to motivate people from Milan and Trento to work together for building iot hacks. Great prizes for the winning teams include 750€, 500€ and 320Amazon gift cards!

Register here for the event!

More info.

QS Europe 2013: QS + IoT + Motivation

QuantifiedSelf Europe conference is taking place this May (11-12) in Amsterdam. It is a big community meeting for makers and users interested in self-tracking tools and technologies! The program consists of talks and breakout sessions.

I will be chairing the ‘Internet of Things’ breakout session. The main objective is to drive discussions with the audience about IoT and QS convergence. Some of the topics to be included for discussion are listed here:

  • IoT basics
  • How IoT drives self-tracking
  • How can QS be improved though IoT and IoS
  • IoT driving motivation for better tracking

Any thoughts on material to include for discussion are more than welcomed. Please drop a message or send an email.

I am also running a short survey about QS, IoT and motivation here. Any input is welcomed, results will be presented at the conference and on this blog as well.

I will also present the results from my own self-tracking experiment and especially how the Fitbit hack has helped me to reach my goals.

Btw, the blog post about the Fitbit hack has reached great visibility. The hack has been already featured in articles on The Huffington Post and The Wall Street Journal!

 

IoT Day talk: IoT basics, current status, future

IoT Day has passed and from what it looks it was a great success! More than 18 events have been organised allover the world, with great talks, demos and big participation (judging from the tweets and the photos posted!).

I have been in Trento, Italy, presenting at the first IoTItaly event. Organisation was made by CREATE-NET and we had a great group of speakers (including Adrian McEwen from GNL team, Claudio Carnevali from openPicus, Matteo Collina, WhyMCA hackathon organisers, etc.).

About 50-60 people have attended and led to great discussions about IoT, technical aspects, business exploitation and the future of IoT!

My presentation about IoT basics, current status and the future can be found here:

 

More information about the event here.

 

Preparing for the 2013 Internet of Things Day

On April 9th we ‘celebrate’ the Internet of Things Day! Established last year for the first time, the International IoT Day proved to be a great success with many contributions from IoT fans.

This year we hope to have even more contributions and events around the world. You don’t need necessary to make a hacking event or make a workshop (though it sounds very challenging), a small-large gathering of people and discussing about IoT can do great for an event!

You can find more information about events on 2012 IoT day here, as well as register your event for 2013 IoT Day here. Website brought by The Council and Postscapes.

I am preparing a workshop event as well, it will be lively broadcasted (details will follow) and people will be able to participate online. Drop me a comment if you are interested into participating and/or have an idea to discuss during the event!

Combining QuantifiedSelf with IoT for effective motivation

This post is about combining QS (a Fitbit activity tracker), with IoT (using activity information retrieved online to control a Belkin Wemo switch) for effective motivation.

Let me explain briefly how and why:

I got this Fitbit tracker mostly out of curiosity for it as a gadget, and for experimenting with the Fitbit API. Initially I have been using it quite often – and that made me walk more and climb up more stairs than usual, to meet my daily goals and earn some badges – but quickly I got bored of it and started neglecting its usage and became less active.

So then I thought, badges earning is not working for me,  there must be a way to force myself to become more active. There are great platforms for motivating people to keep healthy and exercise more, but obviously in my case I needed something more drastic. At the same time I had been playing with a Belkin Wemo switch and have found a way (using some good online resources) to control it outside the iOS app. 

And this is how I came up with the idea of ‘punishing’ myself when I am not active enough by turning off automatically the switch that powers something important. I don’t watch TV, and I thought first of the DSL router but then there would be no connection to the Wemo to turn it back on. So I thought of connecting the fridge to the Wemo switch.

All I needed then was a service to monitor my Fitbit account and my activity that would also turn on/off the switch. For this I built a webscript that checks my daily activity through the Fitbit API. Every evening it will check for the total steps tracked by the Fitbit device. If my activity is below some threshold it gives me a warning email first. Then it checks again within 1 hour and if the threshold is still not met it shuts down the Wemo. It will recheck every 1 hour then and will turn on the switch in case I have made enough steps!

I have used webscript.io because Lua is very simple and webscript guys have done great work integrating libraries that simplify oauth authentication and communication over HTTP. Regarding the communication with the Wemo switch there are two options. Basically, the Wemo talks uPnP (though the service XML is not properly formatted and therefore no uPnP app is able to detect it within your network), so all it takes it to make a POST request to the Wemo IP and port 49153 sending the appropriate XML service file as part of the request data.

Update: This is how actually a direct request to Wemo switch looks like (in Lua code):

function controlWemo(status, port)
local response = http.request {
url = 'http://192.168.1.1:49153/upnp/control/basicevent1',
method = 'POST',
headers = {
charset='utf-8',
SOAPACTION = '"urn:Belkin:service:basicevent:1#SetBinaryState"'
},
data = '<!--?xml version="1.0" encoding="utf-8"?-->'..status..''
}

return response
end

One option is to send a request directly to the switch using dyndns and port forwarding at the home router or (more preferably for me) use a Pub/Sub service like Pusher and a device at the local network (like a powerplug, a beagleboard or a RaspberryPi) that listens for events from Pusher and sends the command to the Wemo switch.

The network communication looks like the following:

To read data using the Fitbit API, user must authorise the web application (webscript in this case). The API is based on OAuth for authenticating external applications and the webscript url must be also registered as a Fitbit application. When registering your Fitbit application, you receive an app token and secret (to be used in your code). More information about the Fitbit API can be found here.

Based on the Twitter sample webscript that demonstrates usage of Oauth, I have created 2 scripts. The first one directs to the Fitbit site for granting access to the second script that retrieves my activity data and talks to Wemo switch. The code for the first one is the following:


local CONSUMERTOKEN = '39-------------0e' --your apps Fitbit token
local CONSUMERSECRET = 'bf6b---------------3cb' --your apps Fitbit secrer

-- get a request token
local response = http.request {
url = 'http://api.fitbit.com/oauth/request_token',
params = { oauth_callback =
'http://fitbit.webscript.io/callback' },
auth = { oauth = {
consumertoken = CONSUMERTOKEN,
consumersecret = CONSUMERSECRET
}}
}

local ret = http.qsparse(response.content)

-- store the token's secret for use in the callback
storage['secret:'..ret.oauth_token] = ret.oauth_token_secret

-- redirect the user to login at Fitbit
return 302, '', {
Location=
'http://api.fitbit.com/oauth/authorize?oauth_token='
..ret.oauth_token
}

The second webscript is the callback to the previous one (to my example http://fitbit.webscript.io/callback) which is the endpoint you have registered to Fitbit as the URL the user is redirected to when successfully authorised the webscript. The code for both scripts can be found here.

This is what I consider a true IoT example. It involves two different devices from different vendors, exchanging information and acting smartly (well not very smartly but it’s a start) for my benefit.

Cosm.com Android logger update

The Cosm.com Android logger app has been updated. There have been major bug fixes that allow better functionality, proper feed updates and eliminate crashes devices. So, simply install the new app, type in your Feed ID, use the QR scanner to enter a Cosm key (make sure it has update and create rights), select a time interval and watch your mobile phone’s resources being logged on the Cloud!

 

 

 

 

 

 

 

 

 

 

 

Special thanks to ‘sci.fi’ for helping with the bugs, beta testing and suggesting future features!

Using the TI BLE SensorTag

I just received my Bluetooth Low Energy SensorTag from TI and wanted to share my experience with it. Overall it looks like a great sensing device coming at an amazing price (25$ – free shipping- probably it is more of a promotion than an actual product).

SensorTag features 6 sensors in total (temperature, humidity, pressure, accelerometer, gyroscope and magnetometer) and it comes with a single cell coin cell battery (CR2032). Specs mention a  quiescent current consumption of 8uA, allowing years of battery life!

The device itself is quite small allowing it to be carried in your pocket.

 

 

 

 

 

 

 

 

 

 

Setting it up and pairing it with an iPhone device is easy and straightforward.

TI provides a free iOS app (TI BLE Sensor Tag) which visualizes on your phone all the sensor information polled form the device. However connecting some times (or most of the times actually) requires that the device is waken from the sleep mode by clicking on the side button. I find this pretty annoying since you cannot rely on polling data from the device at long intervals (longer than its ‘active connection’ period is set to), but that’s probably a general issue with most Bluetooth devices. On the good side, once you click the wake-up button on SensorTag, the app finds the SensorTag and connects to it right away.

Here are some screenshots form the TI app:

 

 

 

 

 

 

 

 

 

 

An interesting (free) 3rd-party app that utilizes the TI SensorTag is ‘Comfort Guide – SENSiBLE’ by Sensirion AG (btw SenorTag is based on Sensirion SHT21 humidity sensor), that combines humidity and temperature data illustrating environmental conditions to the user in an understandable manner:

 

 

 

 

 

 

 

Wonder how you can write your own iOS app to read sensor data? No problem, the TI app includes also its own code as a sample of how to connect with SensorTag and read data from the available sensors (this one goes beyond open source, it’s integrated open source, or embedded open source!!):