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 .
Note: To successfully complete this tutorial you must perform the following tutorials.
Previous tutorials Recommended
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
Components and materials required for testing
Github Arduino IDE code ESP8266 MQTT
More information and Downloads code on this project :
Nick O'Leary "knolleary"creator libreria pubsubclient.h Arduino
Participated in the
IoT Builders Contest