Introduction: Tutorial ESP8266 and Node-RED MQTT GPIO (Mosquitto) # 1

Picture of Tutorial ESP8266 and Node-RED MQTT GPIO (Mosquitto) # 1

To integrate the module ESP8266 with node-red IoT platform has been used MQTT protocol, there are client libraries for esp8266 as MQTT in this case I decided to use the library pubsubclient.

This example will receive Node Red that receives data from the ESP8266 and allow control a LED connected to GPIO 02 from a dashboard created in Node Red Dashboard .

Complete Tutorial ESP8266 and Node-RED MQTT GPIO (Mosquitto) # 1

Note: To successfully complete this tutorial you must perform the following tutorials.
Previous tutorials Recommended

Program ESP8266 con Arduino IDE

Tutorial 1 : Install Lubuntu (Ubuntu)
Tutorial 2 : Installation Node RED platform

Tutorial 3: Installation Node Red Dashboard

Tutorial 4: Installation Modbus TCP IP in Node Red

Tutorial 5: Installation of Mosquitto Broker MQTT in Lubuntu

Step 1: Installation Node-RED Complete

Installation Node-RED Complete

Step 2: VIDEO Test ESP8266 GPIO MQTT Mosquitto Node-RED IoT # 1

Video Test ESP8266 GPIO MQTT Mosquitto Node-RED IoT # 1

Step 3: Tutorial ESP8266 GPIO MQTT Mosquitto Node Red IoT # 2

Tutorial ESP8266 GPIO MQTT Mosquitto Node Red IoT # 2

Step 4: Bonus : Test ESP8266 Control Servo MQTT Node-Red IoT #3 : PDAControl

Bonus : Test ESP8266 Control Servo MQTT Node-Red IoT #3 : PDAControl

Step 5: View GPIO Control

Picture of View GPIO Control

Arduino IDE add the pubsubclient library using the search engine libraries or manually by downloading the library and storing it in their respective folder for libraries.

Node Red Dashboard

Mosquitto MQTT Broker

Pubsubclient.h lib

Components and materials required for testing

ESP8266 01

ESP8266 03

ESP8266 12F

Diode led

Resistors

Converter TTL -USB

Protoboard

Wires

Downloads:
Github Arduino IDE code ESP8266 MQTT

Github pubsubclient Library

Node Red import code example

More information and Downloads code on this project :

PDAControl English

PDAControl Español

Youtube Channel PDAControl

Thanks to..

Nick O'Leary "knolleary"creator libreria pubsubclient.h Arduino

Comments

rlasure (author)2017-01-24

All of the links are dead??

Jhon_Control (author)rlasure2017-01-24

Hello, retry again, the links are working fine.

http://pdacontrolen.com/

SørenL10 (author)Jhon_Control2017-06-13

Links looks to be dead again, all of http://pdacontrolen.com/

daneshjookit (author)2017-06-13

hello

how can i use it for d1 mini?

teaMJPx (author)2016-11-11

Nice! Does this resolve the freak-out issue with the ESP8266 where it reboots randomly? I had been able to get a few lights through the house with relays but then the module would reboot itself and turn everything off. It was not reliable at the time.

Zodiac69 (author)teaMJPx2016-11-12

Most reboot issues are power related. Make sure you have, enough current and clean power. If you are sure that your power is good, then check your code for glitches.

teaMJPx (author)Zodiac692016-11-12

I don't recall what I see when I did it. I'm going back to the drawing board and giving it another shot then.

Thanks for the help. Voted.

About This Instructable

14,481views

36favorites

Bio: Share - Learn - Makers. Projects, Articles, #automation, #PLC, #Arduino, #IoT and More PDAControl
More by Jhon_Control:ESP-IDF for Modules ESP32 Complete InstallationControlling Arduino From Node-RED With Firmware Firmata IoT#View Dashboards Emoncms & ESP8266 + Arduino #IoT
Add instructable to: