Local backend server setup for ESP8266 sensor logging. It's built with FastAPI and SQLite.
This project contains both the backend and the .ino file for the ESP8266.
.
│ .gitignore
│ Dockerfile
│ poetry.lock
│ pyproject.toml
│ README.md
│
├── data/ # Sensor data
│
└── src/umilog/
│ database.py # SQLite setup and CRUD
│ main.py # FastAPI app and routes
│ umilog.ino # ESP8266 flashable code
│ __init__.py
- Note: A file named
sensor.sqlite3
will be created automatically on first run to store sensor data insidedata/
folder.
- Docker (Download Page)
- Arduino IDE (for uploading the
.ino
file) (Download Page)
- Clone the repository
git clone https://github.com/figdavi/umilog.git
cd umilog
- Build and run docker compose
docker compose up --build
All libraries used are already part of the core package for the ESP8266 board.
On the Arduino IDE:
-
Go to
Tools
>Board
>Boards Manager
-
Search for ESP8266 and install the
ESP8266 by ESP8266 Community
package
- Open the
.ino
file (insrc/umilog/umilog.ino
) in the Arduino IDE. - Set the correct board and port (e.g., NodeMCU 1.0).
- Replace the placeholder Wi-Fi credentials and host-ip in the sketch.
- Remove the
#include "secrets.h"
line or create a secrets.h file with the credentials. - Upload the code to the ESP8266.