Blog

The Internet of Things is an evolution of the Internet. It interconnects not only human and computer as before but also physical objects (things). Things can be home appliances, vehicles, industrial facilities or potentially everything we interact with daily.

The Starter Kit: Internet of Things basically consists consists of a Remote Switch Bricklet and a Master Brick. It allows to contol 433MHz actuators such as remotely controlled mains switches, remote dimmers and home automation components like automated blinds. We developed the web site iot-remote.com for the kit. It allows to control those acutators and the devices that are connected to them without any programming. The web sie uses the Tinkerforge Javascript Bindings, after you downloaded the web site for the first time you can use it in offline mode without an internet connection. Communication happens only between the controlling device, e.g. PC, smart phone or tablet and the actuator itself. The communication does not go through the Tinkerforge server or similar. If you don’t want to program anything yourself, you can easily use this web site to control your living room lights or other devices over the internet.

If you want to implement your own project ideas you can use the Bindings for the Remote Switch Bricklet and as appropriate integrate other Tinkerforge modules. As an example a light or temperature dependent controlling with the Ambient Light or Temperature Bricklet is very easy to realize. The case of the starter kit does have additional holes for the Ethernet Extension, which can also be easily integrated. With the Ethernet Extension you can go without a Raspberry PI or similar that is used as a gateway.

Today we released two new Bindings that are particularly useful in an academic environment:

MATLAB is a wide-spread software for solving mathematical tasks. MATLAB is used in many research facilities and companies. It can evaluate and visualize mathematical models and it has interfaces to different hardware platforms as well as capabilities to verify C/C++, HDL and mechatronic systems. With the MATLAB API that we released today it is possible to use Bricks and Bricklets directly from within MATLAB.

Octave is a free software project that is compatible to MATLAB in many respects. The current Octave version is commandline-based, it can be used with different user interfaces. The released Octave Bindings make it possible to use the Tinkerforge building blocks with Octave.

The first panels for the very first RED Brick prototype arrived today! We already hand-soldered and tested the power supply and we even already found a small bug in the layout. Unfortunately we can’t populate the BGA parts ourself. We have an appointment at our pick and place manufacturer to populate the prototypes at the end of next week, keep your fingers crossed!

We made a photo where we put the most important parts (unsoldered) on the pcb, so you can get a first impression:

Below you can find the whole RED Brick circuit board panel from both sides.

JavaScript for Node.js

Node.js is a platform that can run server-side JavaScript. With Node.js it is now possible to control Bricks and Bricklets with server-side JavaScript. Reading out the current illuminance from the Ambient Light Bricklet looks as following:

The JavaScript Bindings for Node.js work by the same principle as all of the other Bindings. A TCP/IP connection to the Brick Daemon or the WIFI/Ethernet Extension is established through normal sockets. The functionality to do this is provided by Node.js. JavaScript that is run in the Browser can unfortunately not open normal sockets. Because of this we have separate JavaScript Bindings for Browser.

JavaScript for Browser

The JavaScript Bindings for the Browser are based on WebSockets. To this end the newest versions of the Brick Daemon as well as the Master Brick include a small web server with support for WebSockets. In the current Master Brick version Websockets only work with the Ethernet Extension. Support for the WIFI Extension will be added later on.

Why is this so awesome that we expended this huge effort? The JavaScript Bindings for the Browser allow to control Bricks and Bricklets directly from every Browser that supports modern web standards. For example: It is possible to get the environmental data from the Starter Kit: Weather Station with a small amount of HTML and JavaScript lines und show them on a web page. This web page can either be loaded from a server or locally. It does not matter where the HTML/JavaScript comes from, since the JavaScript itself is always executed locally.

That means that you can make apps for Android or IPhone that show weather data or that can control the Remote Switch Bricklet with just a few lines of HTML and JavaScript.
It is not necessary to write a complicated native app in Java or Objective-C!

Reading out the current illuminance from the Ambient Light Bricklet looks as following:

The JavaScript Bindings for the Browser introduce a big amount of new possibilities in the realm of the Internet of Things. To demonstrate this we will release a new Starter Kit that consists of a complex web application (completely open source) which can control one of our Bricklets.

To counteract possible attacks (over the Internet) through the Browser on our Bricks/Bricklets, we released a possibility to authenticate connections to Bricks/Bricklets in addition to the JavaScript Bindings.

Authentication

By default no access control is performed on the TCP/IP interface of Brick Daemon and the Ethernet/WIFI Extension. If you can connect to it you can control the Bricks and Bricklets. With the new JavaScript Bindings it is now easier for an attacker to get access to the local TCP/IP network (through the Browser), for this we introduced authentication. With authentication enabled only parties that know your authentication secret can control your Bricks and Bricklets.

Authentication can be activated for the Brick Daemon as well as for the Ethernet/WIFI Extension. Additionally we added an authentication tutorial to ease the beginning. To extend an existing program by authentication you usually only have to add one line to your program that sets the authentication secret.