Introduction: DomoRasp

First of all, 2 important things:

- you have to be patient with my bad english

- don't panic: the circuit seems really terrible, but it works and I will explain you how to build your own one

This small project aims to build a ESP32 based system able to communicate via MQTT sensors data;

The data will then displayed using Grafana.

Ready to start?

Step 1: What You Need

You need a PC connected to your home WiFi network.

The PC will be used to host the MQTT broker, Telegraf and Grafana.

If possible a Raspberry Pi where to host the InfluxDB service (otherwise you can install InfluxDB on your PC)

As Hardware you need:

In Amazon you can find really good kits from Elegoo or AzDelivery, for example this one.

Step 2: Install the Software Components

There are a lot of tutorial on how to install and configure MQTT (Mosquitto) + InfluxDB + Telegraf + Grafana.

A really useful one is this: Raspberry Pi IoT: Sensors, InfluxDB, MQTT, and Grafana

When the circuit has been built and communicate with the MQTT broker (be patient, you have to wait some other steps), you should able to subscribe to the esp32/sensors/ topic using MQTT.fx, and see the data sent by circuit.

I'd like to give you some advices:

  • delete all input and output configurations in the telegraf.conf and create two files in the new 'conf' directory: inputs.conf and outputs.conf. You can see my configuration in the images.
  • test the ecosystem Mosquitto + InfluxDB + Telegraf before I build the circuit: MQTT.fx is your friend

Step 3: Setup the Arduino Development Environment

I don't know if you are new to Arduino (I hope no, because this project could be as little bit difficult a first project)

Anyway..first of all you have to install the Arduino IDE and the setup the ESP32 board in the IDE.

NB: don't install the Windows 10 App, but the complete Win32 application:

Setup the ESP32 board in Arduino, as explained here:

At the end of those 2 steps you should be able to load a simple sketch to the ESP32 micro-controller.

I developed my code using Visual Studio Code with this extension:

Before build the circuit, please be sure you can:

  • compile a simple sketch (search for the I2C scanner for example)
  • see the ESP32 serial output in Visual Studio Code
  • Install and include libraries in the project
  • upload your sketch on the ESP32

Step 4: Build the Circuit

I created a Fritzing project page to explain how to build the circuit and where you can find my code!

I discovered Fritzing just today: an amazing software and community, where to design and prototipe circuits.

You have do download the last (free) version of Fritzing and open the DomoRasp.fzz file I added to the follow page:

(please read the description in the project page!)

That's all!

Have fun and don't hesitate contact me !