SmartClimate is an IoT-based weather monitoring and smart device tracking system using the ESP32-C6 microcontroller with an ST7789 172×320 TFT display. This project provides real-time environmental data and smart home device status, making it an efficient tool for monitoring climate conditions and IoT devices.
Before setting up SmartClimate, ensure you have the following installed:
- Python 3 +
pip
- VS Code with the following extensions:
- Optional Docker/docker-compose for running the devcontainer to avoid installing esp-idf on host
- ESP32-C6 microcontroller
- ST7789 TFT display (172×320 resolution)
- Environmental sensors (optional, e.g., DHT22, BMP280, etc.)
- Power supply (USB-C or battery)
Aliexpress ESP32-C6 + TFT 1.47" screen
SmartClimate uses a custom partition table tailored for persistent storage, application firmware, and static assets.
Name | Type | SubType | Offset | Size | Size (KB) | Description |
---|---|---|---|---|---|---|
nvs |
data | nvs | 0x9000 | 0x80000 | 512 KB | Non-volatile storage (NVS) |
factory |
app | factory | 0x90000 | 0x200000 | 2048 KB | Main application binary |
storage |
data | spiffs | 0x290000 | 0x170000 | 1472 KB | SPIFFS for static assets |
- Clone the repository:
git clone https://github.com/your-repo/SmartClimate.git cd SmartClimate
-
Add udev rule :
replace YOURUSER with your user name
SUBSYSTEM=="tty", ATTRS{idVendor}=="303a", ATTRS{idProduct}=="1001", OWNER="YOURUSER", GROUP="dialout", MODE="0666"
-
Configure ESP-IDF:
- Open VS Code and install the ESP-IDF extension.
- Follow the setup instructions to configure the ESP32-C6 environment.
- Build and flash the firmware:
idf.py build idf.py flash
- Power on the ESP32-C6 with the TFT screen attached.
- The device will connect to the configured Wi-Fi network and start displaying weather data and smart device statuses.
- Use the serial monitor for debugging:
idf.py monitor
- Embedded web server with HTTP endpoints
- Wi-Fi station (STA) mode support
- Captive portal for Wi-Fi access point (AP) mode
- NVS-based persistent storage for configuration and credentials
- Uptime tracking (seconds to days format)
- Lightweight JSON API for system status and configuration
- Graphical user interface built with LVGL
- NTP-based time synchronization
- UI theming & styling system
- Internationalization (i18n) support
- Better error feedback on failed Wi-Fi connection
- System metrics dashboard (RAM, CPU, temp)
- Web UI with live config over HTTP
- BLE pairing & config mode
- WebSocket real-time updates
- Config export/import (JSON/NVS backup)
This project is licensed under the MIT License.
Contributions are welcome! Feel free to submit a pull request or open an issue for discussion.
Happy Coding! 😊