.
This workflow is for users wanting a practical example of how to obtain data from remote IOT systems using the MQTT protocol in an n8n environment.
The template provides typical n8n node implementation and configuration settings necessary to read and store IOT data.
The workflow reads the temperature and humidity data from a remote IOT system in this case a DHT22 sensor connected to a ESP32 micro controller. The data is parsed into the correct JSON format and then ingested in an InfluxDB data bucket. From there the stored temperature and humidity values can be displayed in real time.
The workflow can be easily modified to read any MQTT driven device data.
The ESP32 controller with the DHT22 sensor are running on a Wokwi simulator. The simulator uses micro python to publish a MQTT "wokwi-weather" topic with the temperature and humidity payloads to an online Mosquitto MQTT broker. The n8n MQTT trigger node subscribes to the topic on the broker and reads the payload values when any changes are published. The code node then prepares the payload for JSON format. The HTTP request node ingests the data in a InfluxDB bucket
Wokwi IOT ESP32 simulator
InfluxDB
You will require access to functioning InfluxDB database to utilise this workflow
Note : You will have to provide the following for the HTTP request node to connect to InfluxDB.
n8n workflow.
When the above is configured the workflow should function correctly.