Fab Academy 14

Networking and Communications

Networking and Communications

For the Networking Class, we did an activity in which anyone could connect to a network generated by oscar in a Raspberry Pi, to visualize in a Node RED dashboard what was happening in our arduino sensors through an MQTT connection, and actuate on someone else arduino with ours.

In this collective class, I was only able to connect myself to the dashboard, but wasn´t able to connect to someone elses arduino, but I designed my own dashboard and network for my project, which is still in progress, but I´m going to explain a little bit about it for this assignment.

For my project, a Node Red dashboard is going to be the initial way of controlling and visualizing everything, since I´m going to sense some values from the machine, cross them with the real time weather values taken from the web, and actuate them in different outputs.

Most of this was done with the FabAcademy complementary documentation and some extra research.

Mobirise

MQTT

MQTT (MQ Telemetry Transport or Message Queuing Telemetry Transport) is an open OASIS and ISO standard (ISO/IEC 20922) lightweight, publish-subscribe network protocol that transports messages between devices. WIKIPEDIA

ESP8266 12-E Chip Pinout

MQTT

Network Protocol

MQTT (MQ Telemetry Transport or Message Queuing Telemetry Transport) is an open OASIS and ISO standard (ISO/IEC 20922) lightweight, publish-subscribe network protocol that transports messages between devices. WIKIPEDIA.

Below I post the tutorial I followed to install it on my Mac, but furtheron, I will have to install it on a Raspeberry Pi 3.

The whole process of installing Homebrew and everything else is not so friendly at all.

What is MQTT and how it works?

Raspberry Pi 3 IoT Home Server

ESP8266 12-E Chip Pinout

Node Red

Web browser-based flow

Node-RED is a flow-based development tool for visual programming developed originally by IBM for wiring together hardware devices, APIs and online services as part of the Internet of Things. Node-RED provides a web browser-based flow editor, which can be used to create JavaScript functions.
WIKIPEDIA.

Node Red Helps you to interconnect through a web browser based platform, a lot of different inputs and outputs that work as nodes, ehoch you can program in diferent ways.  This is a visualization of how I connected some nodes to create a visualization for my project.

I also found some usefull documentation of the propper message structure wich helped me solving some problems I had in the beggining.

To install the Dashboard ti visualize the data, I followed the tutorial on FabAcademy web page. Then I did some testings to send messages directly through terminal and it worked. 

Dashboard tutorial

Mosquitto Pub-SUb Pub extra documentation

Mobirise
ESP8266 12-E Chip Pinout

Node Red

Web Scraping

This is a visualization of live sensing and web scrapping data from a weather API. The upper data is the real weather from Barcelona and Bogotá, gattered from the Open Weather Map. I lear how to do it following a tutorial.

Open Weather Map API
Tutorial for the API + NodeRED

In the lower part, the sunlight measure is being senses through an LDR, and the and the lower one is sensed or directly commanded to be like that.

Mobirise
ESP8266 12-E Chip Pinout

Node Red

Troubleshooting

When you download the information from some sources like APIs, Sensors with multiple readings or others, you have to first debugg the msg.payload, and then SWITCH or SET the msg.payload to be the information you need to get. After that you can selct from different outputs how you want it to actuate.

Understanding the Structure (debug)

Networking and Communications

I still need to design the final version of this dashboard, depending of the pending prototyping of my project, but this is how far I´ve got for now. I will also make a step by step guide to simplyfy this process.

Voltio

Page was built with Mobirise themes