Skip to content
Go to file

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Control 'Things' from the Internet

This is a Proof of Concept application I maintain to fine tune a develop+test+deployment work-flow for IoT use cases.

Video overview

The Circuit (Things)

I used a really basic setup of 'things' that I want to control over the Internet.

The breadboard brings together the following ...

  1. An Arduino Uno
  2. A Servo
  3. An LM35 temperature sensor
  4. An LED
  5. A Photoresistor

Things circuit diagram

The Internet

A web UI controls the Servo and the on/off frequency of the LED. The UI also displays readings from the LM35 temperture sensor continuously. The progress bar displays readings from the photoresistor. Higher percentage indicates more light, vise versa.

Demo Photo

I have hosted this UI in Firebase at

In May 2016, Google announced major upgrades to Firebase during their Google I/0 conference. Now I love it even more.

Firebase Console

How to run

  1. Complete breadboard connections as illustrated.
  2. Plug Arduino to the host computer via USB.
  3. Install the Arduino IDE and load Standard Firmata.
  4. Install Node.js
  5. clone git repository to your local machine.
  6. npm install
  7. npm start
  8. Load index.html either directly in the web browser to test that everything communicates with each other. Once verified, host it on the Internet.

How to run as a Docker container

  1. Install Docker on your raspberry pi. I have documented my work flow at .
  2. docker run -dti --privileged tyrell/control-things-from-the-internet:rpi-latest

TIP: Head over to to find the Docker repository for my images. I usually TAG my images as rpi-latest and x86-latest, the two main platforms I run containers in.

Setup a cron job to restart the container after a reboot

  1. sudo crontab -e
  2. Add the following line to the file and save

@reboot /bin/bash /<where-you-cloned-the-git-repo>/scripts/ 2> /<where-you-cloned-the-git-repo>/cron_errors.log

How to run as a Node-RED flow

  1. Install Node-RED on your Raspberry Pi.
  2. Setup the circuit and attach your Arduino to the Pi.
  3. Go to http://[your-pi-ip-address]:1880 in a browser to view the Node-RED flow designer.
  4. Copy and paste the flow definition from node-red/flows_raspberrypi.json file and deploy to Node-RED

I have a Node-RED docker image, with Johnny Five and Pubnub packaged in at

Node-RED Flow


  1. - This tutorial was the starting point for my experiment. I replaced the dependency on with Pubnub. Instead of having to run a node server to host HTML, I hosted the UI in Firebase. This decouples my UI from the device drivers.
  2. Pubnub -
  3. Firebase -
  4. - They have operationalised deployments in a way I find really interesting.
  5. Node-RED -
  6. Johnny Five and Node-RED HowTo -


Copyright (c) 2016 Tyrell Perera Licensed under the MIT license.

You can’t perform that action at this time.