Skip to content

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.

License

Notifications You must be signed in to change notification settings

Times-Z/SmartClimate

Repository files navigation

SmartClimate

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.

Prerequisites

Before setting up SmartClimate, ensure you have the following installed:

Software Requirements

  • Python 3 + pip
  • VS Code with the following extensions:
  • Optional Docker/docker-compose for running the devcontainer to avoid installing esp-idf on host

Hardware Requirements

  • ESP32-C6 microcontroller
  • ST7789 TFT display (172×320 resolution)
  • Environmental sensors (optional, e.g., DHT22, BMP280, etc.)
  • Power supply (USB-C or battery)

Tested hardware

Aliexpress ESP32-C6 + TFT 1.47" screen

Partitions

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

Installation

  1. Clone the repository:
    git clone https://github.com/your-repo/SmartClimate.git
    cd SmartClimate

If you use devcontainer :

  1. Add udev rule :

    replace YOURUSER with your user name

    SUBSYSTEM=="tty", ATTRS{idVendor}=="303a", ATTRS{idProduct}=="1001", OWNER="YOURUSER", GROUP="dialout", MODE="0666"

If your don't use devcontainer

  1. Configure ESP-IDF:

    • Open VS Code and install the ESP-IDF extension.
    • Follow the setup instructions to configure the ESP32-C6 environment.

Both

  1. Build and flash the firmware:
    idf.py build
    idf.py flash

Usage

  • 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

API documentation

SmartClimate API Swagger

Features

  • 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

Roadmap

  • 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)

License

This project is licensed under the MIT License.

Contributions

Contributions are welcome! Feel free to submit a pull request or open an issue for discussion.


Happy Coding! 😊

About

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.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published