Developing IoT Mashups with Docker, MQTT, Node-RED, InfluxDB, Grafana

Page for the tutorial " Developping IoT Mashups with Docker, MQTT, Node-RED, InfluxDB, Grafana " at Eclipse IoT Days Grenoble 2016

COMING SOON

=Install Docker=

=Install Node.js and Node-RED=

Browse http://127.0.0.1:1880/

=Install Node-RED extra nodes=

Serial for LoRa Libelium
Check available serial ports (/dev/tty.usbserial* on MacOS X, ...) ls /dev/tty.*

Serial for Geiger Counter
Connect the Geiger counter to the host.

Add a node serial "Geiger" with a Settings of 9600/8/N/1 and 'Split input into fixed lenghts of 1 chars'.

Add a node debug.

Connect "Geiger" to debug.

Deploy the flow.

The Geiger Counter sends a random sequence of 0 and 1.

Add a node function "Count Particles" with a flow-scoped variable (geiger/count): var COUNT='geiger/count';

// initialise the counter to 0 if it doesn't exist already var count = flow.get(COUNT)||0; count += 1; // store the value back flow.set(COUNT,count); // make it part of the outgoing msg object msg.count = count; msg.payload = count;

node.log("Received particles : " + count);

return msg;

Connect node "Geiger" to node "Count Particles".

Deploy the new flow.

Add a node inject "One minute timer" with a repeat interval of 1 minute.

Add a node function "Reset Particles Count" with a flow-scoped variable (geiger/count): var COUNT='geiger/count';

// initialise the counter to 0 if it doesn't exist already var count = flow.get(COUNT)||0;

msg.count = count; msg.payload = count;

node.log("Reset counter at " + count);

// make it part of the outgoing msg object count = 0; // store the value back flow.set(COUNT,count);

return msg;

Connect node "One minute timer" to node "Reset Particles Count" and node "Reset Particles Count" to node debug.

Deploy the new flow.

The result is:

UDP for ESP8266
=Install Mosquitto=

=Install InfluxDB=

=Install Grafana=

=Install Apache Spark=