Meet Node-Red: A workflow editor for your node.js #IoT Projects!

Recently, two IBM guys have released a web-based node.js workflow editor for the IoT: Node-Red.

Node-Red is fully web-based, open source and enables you simply by dragging nodes on the workspace and connecting them to build an IoT project. Fully open-source, it only takes a few minutes to install it. It comes with a ‘Pallete’ –  a selection of actions nodes that can be dragged onto the main canvas – the canvas (or work area for designing your workflow) and an information section where you can view info about the nodes and debugging messages.

Node-Red comes ‘Arduino-ready': Using Firmata you can control the I/Os of your Arduino (assuming that it is attached through USB on your Node-Red host) using the appropriate node. An Arduino Input Node (the first one on the list) connects to the attached Arduino board and monitors the selected pin (analog or digital) for input. To configure the Arduino parameters simply click on the input node after dragging it into the canvas.

More information on using your Arduino board with Node-Red can be found here.

Network communication: So far Node-Red provides nodes for HTTP connections (the HTTP input node for making a request {POST, PUT, GET and DELETE} to a particular URL), nodes for TCP socket implementation (both server and client sockets), nodes general TCP/UDP sockets and of course (could not have been missed) MQTT nodes for subscribing to a broker and a specific topic, allowing both

For my first Node-Red project (to be presented soon – see screenshot for hints) I needed a generic HTTP request node that would allow users to define HTTP method, server path and port, headers and data. I created myself a new node (named it as HTTP_generic) that allows users to set any parameter like HTTP method, port, path, headers and data request. I have created a pull request, but I have been informed by one of the contributors that they are already working on extending the current HTTP nodes functionality!

Web of Things Hackathon in Zurich

A couple of weeks ago, on September 8th, the 3rd Web of Things Hackathon took place in Zurich! The event was sponsored by Evrythng, COMPOSE EU Project and openPicus provided us with their latest WiFi Flyport devices to play with!

We had a great time, lots of skilled people attended and we also managed to finalise a project, the ‘Augmented Fussball Table!

Check the video below for more details:

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 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 = '',
method = 'POST',
headers = {
SOAPACTION = '"urn:Belkin:service:basicevent:1#SetBinaryState"'
data = '<!--?xml version="1.0" encoding="utf-8"?-->'..status..''

return response

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 = '',
params = { oauth_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, '', {

The second webscript is the callback to the previous one (to my example 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.