{"id":24803120,"url":"https://github.com/gabrielmarcano/esp32-roaster","last_synced_at":"2026-04-13T07:02:06.766Z","repository":{"id":162206044,"uuid":"634395369","full_name":"gabrielmarcano/esp32-roaster","owner":"gabrielmarcano","description":"Firmware to create a real life roaster using the ESP32 microcontroller","archived":false,"fork":false,"pushed_at":"2025-02-01T14:43:24.000Z","size":323,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-25T05:37:59.106Z","etag":null,"topics":["esp32","husarnet","iot-device","ota-updates","platformio"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gabrielmarcano.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-04-30T01:15:16.000Z","updated_at":"2025-03-22T23:29:45.000Z","dependencies_parsed_at":"2023-11-15T05:22:52.205Z","dependency_job_id":"caa6962e-ee31-444c-94dd-a9504624071e","html_url":"https://github.com/gabrielmarcano/esp32-roaster","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/gabrielmarcano/esp32-roaster","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gabrielmarcano%2Fesp32-roaster","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gabrielmarcano%2Fesp32-roaster/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gabrielmarcano%2Fesp32-roaster/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gabrielmarcano%2Fesp32-roaster/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gabrielmarcano","download_url":"https://codeload.github.com/gabrielmarcano/esp32-roaster/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gabrielmarcano%2Fesp32-roaster/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31742941,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-13T06:26:45.479Z","status":"ssl_error","status_checked_at":"2026-04-13T06:26:44.645Z","response_time":93,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["esp32","husarnet","iot-device","ota-updates","platformio"],"created_at":"2025-01-30T05:17:40.408Z","updated_at":"2026-04-13T07:02:06.710Z","avatar_url":"https://github.com/gabrielmarcano.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003eESP32 Roaster Project\u003c/h1\u003e\n\u003cp align=\"center\"\u003e\n  A project to control a peanut, coffee \u0026 cocoa roaster with an ESP32\n\u003c/p\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n[![Build](https://img.shields.io/github/actions/workflow/status/gabrielmarcano/esp32-roaster/build.yml?logo=github)](https://github.com/gabrielmarcano/esp32-roaster/blob/master/.github/workflows/build.yml)\n[![OTA Update](https://img.shields.io/github/actions/workflow/status/gabrielmarcano/esp32-roaster/ota-update.yml?logo=github\u0026label=OTA)](https://github.com/gabrielmarcano/esp32-roaster/blob/master/.github/workflows/ota-update.yml)\n[![GitHub release](https://img.shields.io/github/v/release/gabrielmarcano/esp32-roaster?filter=*alpha\u0026logo=github)](https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gNzMuMTg2IDg1LjI2N1Y2OC44OTJzLTEyLjI1Mi0uMDYyLTI2LjcyOSAzLjgxN3ptMTAuMzk1IDkyLjA5Yy04LjEzOCAxMC4yLTUyLjczNS0yNS44OC00NS4xNTQtNTEuNjQ1IDMuMDAyLTEyLjE0NSAxMy4xOS0xNy42MTIgMjEuNTExLTE2LjI4IDMwLjM1IDYuMTc1IDM1LjI2IDQ5LjM2OSAyMy42NDMgNjcuOTI2em0tMTguODItMzkuNDZhOS4zOTkgOS4zOTkgMCAwIDAtOS4zOTkgOS4zOTggOS4zOTkgOS4zOTkgMCAwIDAgOS40IDkuNCA5LjM5OSA5LjM5OSAwIDAgMCA5LjM5OC05LjQgOS4zOTkgOS4zOTkgMCAwIDAtOS4zOTktOS4zOTl6bS0yLjgxIDguNjcxYTIuMzc0IDIuMzc0IDAgMSAxIDAtNC43NDggMi4zNzQgMi4zNzQgMCAwIDEgMCA0Ljc0OHoiIGZpbGw9IiNGRjdGMDAiLz48L3N2Zz4=)](https://platformio.org/)\n\n\u003c/div\u003e\n\n## Contents\n\n- [Summary](#summary)\n- [Project structure](#project-structure)\n- [Hardware](#hardware)\n- [Software](#software)\n- [Wiring](#wiring)\n\n## Summary\n\nAll logic depends on the data given by the **Thermocouple** \u0026 **DHT22** sensors, and the selected mode in the **4 Position Rotary Switch**. It's intention is to control 3 motors, which will turn on or off based on the temperature that it reaches.\n\nWhen the temperature reaches 140ºC, 170ºC or 180ºC (depending on the mode) it feeds a relay that controls the first motor,\nand also starts a timer that can be 12, 20 or 33 minutes which also depends on the mode.\n\nThere will be two push buttons, one will add +1min to the time (and start the timer if there isn't one already), and the other will reduce -1min to the time.\n\nWhen the timer stops, a buzzer starts making noise and also feeds the other 2 relays that controls the second \u0026 third motor.\n\n\u003e Motors can only be stopped manually by either the security button or through the web interface. If Motor 2 or Motor 3 are stopped via the web interface, they will stop any action taken after the timer stops.\n\n### Modes\n\n| Position | Name   | Temperature | Time |\n| -------- | ------ | ----------- | ---- |\n| 0        | Off    | 0ºC         | 0m   |\n| 1        | Peanut | 180ºC       | 20m  |\n| 2        | Cocoa  | 140ºC       | 33m  |\n| 3        | Coffee | 170ºC       | 12m  |\n\n\u003e The default state of the switch does not set a timer. Timer response can also be turned off by setting the state of the switch to the position 0 (i.e. the default state.)\n\n## Project structure\n\nThe project structure is as follows:\n\n| Resource                                    | Description                                                                                                                                      |\n| ------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |\n| [src/](src)                                 | The [main.cpp](/src/main.cpp) file with the code to be uploaded to esp32                                                                         |\n| [data/](data)                               | Static files written directly to the SPI flash file storage (SPIFFS)                                                                             |\n| [lib/](lib)                                 | All additional libraries. Core libraries are installed via PlatformIO or written in **lib_deps** using the [platformio.ini](platformio.ini) file |\n| [server/](server)                           | [Express](https://expressjs.com/) server for debugging                                                                                           |\n| [env\u0026#x2011;template.h](src/env-template.h) | Environment variables template file used to get the credentials for WiFi \u0026 VPN                                                                   |\n| [platformio.ini](platformio.ini)            | PlatformIO project configuration file                                                                                                            |\n\n### Envionment Variables\n\nUse env vars to store your credentials and build the firmware locally.\n\n1 - Run the command: `cp src/env-template.h src/env.h`\n\n2 - Edit the values\n\n```cpp\n#define WIFI_SSID \"SSID\"\n#define WIFI_PASSWORD \"PASSWORD\"\n```\n\n## Hardware\n\n- **ESP32-DEVKIT-V1**: ESP32 Microcontroller\n- **I²C 16x2 LCD Display**\n- **Type K thermocouple**: Thermoelectrical thermometer\n- **MAX6675**: Type K thermocouple digital converter\n- **DHT22**: Humidity sensor\n- **4 Position Rotary Switch**: Mode selector\n- **Passive Buzzer**\n- **Motor (x3)**\n- **Push button (x2)**: Time adder/substractor\n- **Relay (x3)**\n- **7805 / 7812**: Voltage regulators\n- **Capacitors**\n- **Resistors**\n\n## Software\n\n### Web server\n\nThe ESP32 also act as a server for controlling the motor states, showing the temperature and humidity with gauges, and showing the remaining time in the timer. The server uses [SSE](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events) to update the values on the web.\n\nThe web interface can _read_ all values, and can only _write_ to the motor states and timer values.\n\nOTA updates are available thanks to [ElegantOTA](https://github.com/ayushsharma82/ElegantOTA).\n\n| Resource | Description                                                                                                                  |\n| -------- | ---------------------------------------------------------------------------------------------------------------------------- |\n| /events  | Event Source with `readings`, `timer` \u0026 `states` events                                                                      |\n| /data    | **GET** - Request to update the temperature \u0026 humidity readings, timer remaining time and motors states on the web interface |\n| /motors  | **POST** - Request to control the state of the motors throught the web interface                                             |\n| /time    | **POST** - Request to increase or reduce the timer by 60 seconds                                                             |\n| /reset   | **POST** - Request to perform a remote software reset of the ESP32                                                           |\n| /update  | Firmware \u0026 Filesystem OTA updates                                                                                            |\n\n## Wiring\n\n\u003e **TODO**: Upload circuit, PCB design, 3D design, Gerber files \u0026 ESP32 pinout\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgabrielmarcano%2Fesp32-roaster","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgabrielmarcano%2Fesp32-roaster","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgabrielmarcano%2Fesp32-roaster/lists"}