Hands on the Internet of Things

While the Internet of Things – or IoT in short – has become a buzz word, connected devices and most of the underlining technologies have been around for some while. Artists and DIYers alike have been connecting things to the web for umpteen years. I, myself built my first working prototype for the internet connected interactive art installation www.saitensprung-online.ch in 2002. At that time I used a “Service USB” interface to control motors via the internet. The actual installation was then realized with Wiring (the predecessor of Arduino) and Processing. However, I have no entitlement to have spearheaded the development of the IoT. Many great connected projects have been done much before: I am a big fan of “The Telegarden” by Ken Goldberg and Joseph Santarromana to name one.

In the twenty years, which have passed since the Telegarden went online, miniaturization has progressed, hardware prices have plummeted, open source and hacker movement began to flourish and a huge amount of information has been democratised. These factors contributed enormously to the development of easier to use hard- and software tools.

Below I would like to write about my first experiments utilising a Raspberry Pi 3 Model B running Raspbian Jessie (Linux) and the newest version of Node-RED.


Raspberry Pi and Node-RED

In my endeavors I use a Raspberry Pi as an IoT server, where the in- and outputs are merged. The Node-Red environment allows to define what happens under which circumstances and how the attached devices and services are logically connected together.

The credit card sized Raspberry Pi computer with physically connected devices via USB and GPIO.


The Node-RED UI with the editing and debugging area.


Devices connected to GPIO

The Raspberry Pi has general-purpose input/output (GPIO) pins, which can be addressed directly from Node-RED. This allows to connect digital and binary devises without the need of any additional hardware. For my test I attached a digital temperature sensor and a relay which is connected to the sauna’s control box in our house. This allows to write a 1 or 0 to the relay in order to switch it on and off. The temperature measured by the DS18b20 sensor can be read and processed within Node-RED.

A relay and digital temperature sensor which can be connected to Raspberry Pi’s GPIO.


433MHz Home Automation Devices

The maturity of wireless home automation devices are utilizing the 433 MHz ISM band (https://en.wikipedia.org/wiki/ISM_band) and there are many 433 MHz gateways for home automation on the market. I had previous experience with the technology offered by the Swedish company Telldus: Their USB gateway can be connected to one of the Pi’s USB ports and receive data from sensors, remote controls, motion detectors etc. and control wireless power switches, doorbells, dimmer and so on.

Telldus’ 433MHz USB gateway.


During testing, I connected a power socket and a thermo/hygro sensor.



Even though the Raspberry Pi offers Ethernet, WLAN and Bluetooth connectivity, I was interested in the possibility to utilize the GSM network. I connected an Arduino with a GSM shield to the Pi and with some custom code on the Arduino I was able to send and receive SMS and connect via GPRS to the internet. With the addition of a loudspeaker and a microphone, this setup would even allow to make phone calls. Of course the microphone could then as well be replaced by a device playing audio files.

Arduino with connected GSM shield.


Web Services such as Twitter and OpenWeatherMap

Node-RED can easily connect to online services via their APIs. This means that e.g. Tweets can be sent and received or live weather data as well as forecasts for a specific location can be accessed. Node-RED has even a module to conduct sentiment analyses, which means it can determine whether a text (in my case tweets) is dominantly positive or negative. I made a setup which switched a lamp off when I send the words like ugly or depressing and on, when wrote beautiful or amazing.


Infinite Combinations

I am astonished about the ease with which it is possible to combine a number of devices and services in a multitude of ways. It is possible to combine virtually any in- and output. It is possible to add conditions in-between them, or convert and modify the received data. While my tests were not aimed to be very close to life, I can absolutely see the practical aspects and uses for the IoT. With the hard- and software at hand I could and I intend to solve a small problem occurring weekly: I often switch on our electric sauna and get carried away with something else, realizing much later that the desired temperature has been reached some time ago. It would be handy and ecological (I made some calculations) to be informed by the sauna when the target temperature is reached. I could remotely switch the sauna on with a text message, a wireless remote control, a web interface, a tweet, weather data etc. etc. But, I still prefer to go to the basement and push the button myself. But what I am really interested in, is what happens after the sauna turned on. I would like to know, in which rate the sauna is heating up and how the time needed correlates to the starting temperature and/or outside weather condition. And of course I’d like to receive a text message when the set temperature is reached. I could of course toggle my desk lamp on and off at the same time – and ring the wireless doorbell – the possibilities are limitless.

Leave a Reply