Introduction: 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
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
Downloads:
Github Arduino IDE code ESP8266 MQTT
More information and Downloads code on this project :
Thanks to..
Nick O'Leary "knolleary"creator libreria pubsubclient.h Arduino

Participated in the
IoT Builders Contest
7 Comments
6 years ago
All of the links are dead??
Reply 6 years ago
Hello, retry again, the links are working fine.
http://pdacontrolen.com/
Reply 6 years ago
Links looks to be dead again, all of http://pdacontrolen.com/
6 years ago
hello
how can i use it for d1 mini?
6 years ago
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.
Reply 6 years ago
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.
Reply 6 years ago
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.