{"id":14963385,"url":"https://github.com/echo7394/ecostat","last_synced_at":"2025-10-25T02:30:29.530Z","repository":{"id":201129662,"uuid":"707029917","full_name":"Echo7394/EcoStat","owner":"Echo7394","description":"Seeed Studio Xiao ESP32C3 Smart ThermoStat","archived":false,"fork":false,"pushed_at":"2024-04-16T14:39:02.000Z","size":11670,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-31T04:51:28.557Z","etag":null,"topics":["arduino","esp32","esp32-arduino","esp32c3","home-automation","seeduino","seeedstudio","seeeduino-xiao","smart","smarthome","thermostat","thermostat-controller"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Echo7394.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-10-19T04:52:23.000Z","updated_at":"2024-12-16T05:03:19.000Z","dependencies_parsed_at":"2024-04-16T16:07:02.344Z","dependency_job_id":null,"html_url":"https://github.com/Echo7394/EcoStat","commit_stats":{"total_commits":179,"total_committers":2,"mean_commits":89.5,"dds":"0.22905027932960897","last_synced_commit":"4bcd026c8c1cf65a18fa34afb5e34ff36dd8ea7f"},"previous_names":["echo7394/ecostat"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Echo7394%2FEcoStat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Echo7394%2FEcoStat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Echo7394%2FEcoStat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Echo7394%2FEcoStat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Echo7394","download_url":"https://codeload.github.com/Echo7394/EcoStat/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238059129,"owners_count":19409601,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["arduino","esp32","esp32-arduino","esp32c3","home-automation","seeduino","seeedstudio","seeeduino-xiao","smart","smarthome","thermostat","thermostat-controller"],"created_at":"2024-09-24T13:31:26.032Z","updated_at":"2025-10-25T02:30:29.525Z","avatar_url":"https://github.com/Echo7394.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# EcoStat\n\u003cp\u003e\n\u003cimg height=\"70\" src=\"https://raw.githubusercontent.com/Echo7394/EcoStat/main/img/ES1.png\"\u003e\u003c/img\u003e  \n\nEcoStat is an open-source thermostat control system built using the Seed Studio Xiao ESP32C3 microcontroller.\nIt allows you to control heating, cooling, and fan systems using physical buttons and a web-based interface. \nAdditionally, it displays temperature and humidity information on an OLED screen. The goal of this project was\nto create a cheap, energy saving, open source smart thermostat that doesnt spy on you. So, finally and most \nimportantly, EcoStat does not use or collect any kind of telemetry data, at ALL.\n\n**V2 Supports Heating \u0026 Cooling automatically with multiple relays and all additional features.\nV1 only supports minimal features with two relays, it can be used for cooling as well. V1 requires you \nto manually move the wire from heating to cooling seasonally, V1 simply offers a cheaper\nversion of the project.**\n\nI put a lot of soul into this project, and more importantly the desire to keep it free, open source, and unintrusive.\nSo if you enjoy it, please consider buying me a coffee! \u003ca href=\"https://cash.app/$seripsirhc\"\u003e**Donate :)**\u003c/a\u003e\n\n\u003c/p\u003e\n\u003cp float=\"left\"\u003e\n\u003cimg src=\"https://raw.githubusercontent.com/Echo7394/EcoStat/main/img/20231013_210953.jpg\" width=\"200\" /\u003e\n\u003cimg src=\"https://raw.githubusercontent.com/Echo7394/wiki-documents/docusaurus-version/docs/Contribution/Contributors/file_transfer_station/XIAO_ESP32C3_ESPHome_Smart_ThermoStat/11.jpg\" width=\"200\" /\u003e\n\u003cimg src=\"https://raw.githubusercontent.com/Echo7394/wiki-documents/docusaurus-version/docs/Contribution/Contributors/file_transfer_station/XIAO_ESP32C3_ESPHome_Smart_ThermoStat/9.jpg\" width=\"200\" /\u003e\n\u003cimg src=\"https://github.com/Echo7394/EcoStat/blob/main/img/3dfile.png\" width=\"300\" /\u003e\n\u003c/p\u003e\n\n**Features:**\n\u003cul\u003e\n\u003cp\u003e\n\u003cli\u003eEnergy efficient HVAC control using timing based logic and hysteresis.\u003c/li\u003e\n\u003cli\u003eWeb-based interface for remote control.\u003c/li\u003e\n\u003cli\u003eReal-time temperature and humidity display.\u003c/li\u003e\n\u003cli\u003ePhysical buttons for normal offline control.\u003c/li\u003e\n\u003cli\u003eMode selection (Heating, Cooling, Off).\u003c/li\u003e\n\u003cli\u003eIndependent Fan control (circulating fan).\u003c/li\u003e\n\u003cli\u003eWi-Fi setup using a captive portal.\u003c/li\u003e\n\u003c/p\u003e\n\u003c/ul\u003e\n\n\u003chr\u003e\n\n**Hardware Requirements (Total cost approx $45)**\n\n**-Seeed Studio Xiao ESP32C3**\n\n**-Any 128x64 SSD1306 I2C OLED Screen**\n\n**-Two or Three 5V One Channel Relay Modules, I used \"HiLetgo 2pcs 5V One Channel Relay Module Relay Switch with OPTO Isolation High Low Level Trigger\" from Amazon**\n  \n**-A DHT22 Sensor, I used a \"Gowoops 2pcs DHT22/AM2302 Digital Humidity and Temperature Sensor Module\" from Amazon**\n  \n**-Micro Momentary Button, I used a 4 pin type, you can use anything that fits the mounting hole (6mm or less).**\n\u003chr\u003e\n\n**Software Dependencies**\n\u003cp\u003e\n\t\nkhoih-prog/ESP_WifiManager@^1.12.1\n\t\nadafruit/DHT sensor library@^1.4.4\n\nadafruit/Adafruit SSD1306@^2.5.7\n\nhttps://github.com/me-no-dev/ESPAsyncWebServer.git (Must change AsyncWebSocket.cpp: \"return IPAddress(0U)\"; to \"return IPAddress((uint32_t)0U)\" )\n\nadafruit/Adafruit Unified Sensor@^1.1.13\n\n\u003c/p\u003e\n\u003chr\u003e\n\n**Configuration**\n\u003cul\u003e\n\u003cli\u003eSet your desired username and password for web-based authentication using http_username and http_password (default is blank user, with pass: 13371337).\u003c/li\u003e\n\u003cli\u003eConnect the relay modules and physical buttons to the specified pins as defined in the code.\u003c/li\u003e\n\u003cli\u003eInstall neccessary libraries\u003c/li\u003e\n\u003cli\u003eCompile/Build\u003c/li\u003e\n\u003cli\u003eUpload the code to your ESP32C3 device.\u003c/li\u003e\n\u003cli\u003eUncomment Serial.begin \u0026 Open the serial monitor for debugging (optional).\u003c/li\u003e\n\u003cli\u003eAccess the EcoStat web interface by connecting to the Wi-Fi network \"EcoStat-Setup\" and visiting the IP address assigned to your device.\u003c/li\u003e\n\u003cli\u003eUse the web interface to control heating, cooling, fan, and set the target temperature.\u003c/li\u003e\n\u003c/ul\u003e\n\u003chr\u003e\n\n**Button Controls**\n\u003cul\u003e\n\u003cli\u003eBUTTON_FAN: Toggle the fan on and off.\u003c/li\u003e\n\u003cli\u003eBUTTON_MODE: Switch between Heating, Cooling, and Off modes.\u003c/li\u003e\n\u003cli\u003eBUTTON_PIN0 and BUTTON_PIN1: Increase and decrease the target temperature.\u003c/li\u003e\n\u003c/ul\u003e\n\u003chr\u003e\n\u003cp\u003e\nThe screen displays Temperature, Humidity, MCU Temp, and Wifi Signal Strength.\nButtons toggle temperature up \u0026 down by one degree at a time.\nThe \"Heat\" relay does not trigger until the current temperature is 2 degrees lower than the target temperature and it has been more than 120 seconds to prevent excessive\ntoggling and save energy / gas / LP.\nThe web page also provides the option to trigger the \"Fan\" relay seperately for air circulation without climate control.\u003c/p\u003e\n\u003chr\u003e\n\n\nDetailed description of the goals of this project and a summary of exactly what the code does:\n\n1. It includes various libraries for Wi-Fi management, sensor readings (DHT22), OLED display control, and web server functionality.\n2. It defines pins and addresses for the OLED display, DHT22 sensor, buttons, and relays.\n3. It sets up Wi-Fi using the ESPAsyncWiFiManager library, allowing users to configure the network credentials via a captive portal.\n4. It initializes the OLED display, creates a web server on port 80, and defines routes for controlling the thermostat remotely.\n5. It handles HTTP GET requests for increasing/decreasing the target temperature, turning the fan on/off, and changing the operating mode (heating, cooling, or off).\n6. It defines functions for reading the temperature, changing the mode, and updating the OLED display with current status.\n7. It sets up interrupt handlers for physical buttons to change the target temperature, mode, or fan status.\n8. The main loop continuously reads temperature and humidity from the DHT22 sensor and updates the OLED display.\n9. Depending on the operating mode (heating or cooling), it controls relays to turn on/off the heating or cooling system to maintain the desired temperature.\n\nOverall, this code creates a thermostat system with remote control capabilities, allowing users to adjust the target temperature, mode, and fan status through a web interface. It also displays current temperature and humidity on an OLED screen. The system can operate in heating or cooling mode based on the target temperature, and it provides visual feedback on the OLED screen for the user. The physical buttons provide additional control and feedback for users without accessing the web interface. No unnecessary data is collected or transmitted by the device, and no personal data is transmitted outside of your LAN.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fecho7394%2Fecostat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fecho7394%2Fecostat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fecho7394%2Fecostat/lists"}