{"id":16218802,"url":"https://github.com/loginov-rocks/connected-espresso-machine","last_synced_at":"2025-03-19T10:31:04.766Z","repository":{"id":43688173,"uuid":"75429964","full_name":"loginov-rocks/Connected-Espresso-Machine","owner":"loginov-rocks","description":"DIY project to upcycle old De'Longhi espresso machine into a smart Wi-Fi connected device with IoT capabilities","archived":false,"fork":false,"pushed_at":"2022-07-07T19:48:01.000Z","size":13045,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-17T06:22:37.908Z","etag":null,"topics":["arduino","connected-home","diy","iot","nodemcu"],"latest_commit_sha":null,"homepage":"https://loginov-rocks.medium.com/list/diy-connected-espresso-machine-c9576e4bc43a","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/loginov-rocks.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}},"created_at":"2016-12-02T20:51:15.000Z","updated_at":"2024-06-28T18:04:46.000Z","dependencies_parsed_at":"2022-08-28T06:12:26.682Z","dependency_job_id":null,"html_url":"https://github.com/loginov-rocks/Connected-Espresso-Machine","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loginov-rocks%2FConnected-Espresso-Machine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loginov-rocks%2FConnected-Espresso-Machine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loginov-rocks%2FConnected-Espresso-Machine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loginov-rocks%2FConnected-Espresso-Machine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/loginov-rocks","download_url":"https://codeload.github.com/loginov-rocks/Connected-Espresso-Machine/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244407805,"owners_count":20447850,"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","connected-home","diy","iot","nodemcu"],"created_at":"2024-10-10T11:50:40.107Z","updated_at":"2025-03-19T10:31:03.768Z","avatar_url":"https://github.com/loginov-rocks.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Connected Espresso Machine\n\n**Connected Espresso Machine** is a primer on _how to turn \"dumb\" old coffeemaker/teapot/anything into a smart connected\ndevice_ with a bit of hardware work and programming. For that, a series of [articles](#articles) was written for you to\neither have fun or implement your own similar project!\n\nDuring the implementation of embedded projects, I faced different approaches to code firmware, so in the articles, I\ntried to describe _common programming patterns_ that can be accommodated in your hobby projects.\n\nIn the current reincarnation, the espresso machine is connected to the home Wi-Fi network and exposes\n**[REST API](#openapi)** that is used by the **Web App** to control the espresso machine accessible from the same\nnetwork.\n\n**[Web Assets](#web-assets)** (JavaScript and CSS) are served from the **AWS S3 Bucket** and can be updated at any time\nwithout the update of the firmware. While the firmware itself can be flashed _Over-the-Air_ from **PlatformIO IDE**.\n\nWhile **NodeMCU** is used as a single microcontroller, the implementation is not specific to it and actually, **Arduino\nUno** was used initially to control the AC components of the espresso machine.\n\n## Contents\n\n1. [Articles](#articles)\n2. [Architecture](#architecture)\n    1. [REST](#rest)\n3. [Hardware](#hardware)\n    1. [Controller Board Scheme](#controller-board-scheme)\n    2. [AC Scheme](#ac-scheme)\n4. [Firmware](#firmware)\n    1. [Class Diagram](#class-diagram)\n5. [OpenAPI](#openapi)\n6. [Web Assets](#web-assets)\n    1. [Test Firmware](#test-firmware)\n7. [Reference](#reference)\n8. [Gists](#gists)\n\n## Articles\n\nSeries: [Medium](https://loginov-rocks.medium.com/list/diy-connected-espresso-machine-c9576e4bc43a)\n\n1. Archeology: [Medium](https://loginov-rocks.medium.com/diy-connected-espresso-machine-archeology-part-1-3d8c374b0f32)\n2. Relays: [Medium](https://loginov-rocks.medium.com/diy-connected-espresso-machine-relays-part-2-2a070d81ffd2)\n3. Boiler: [Medium](https://loginov-rocks.medium.com/diy-connected-espresso-machine-boiler-part-3-db0dcd764f6)\n4. Toggle: [Medium](https://loginov-rocks.medium.com/diy-connected-espresso-machine-toggle-part-4-689a737b9f36)\n5. Main Class and Indicators:\n   [Medium](https://loginov-rocks.medium.com/diy-connected-espresso-machine-main-class-and-indicators-part-5-2f7f45d01c31)\n6. Over-the-Air Updates:\n   [Medium](https://loginov-rocks.medium.com/diy-connected-espresso-machine-over-the-air-updates-part-6-76ae32736f73)\n7. Assembly: [Medium](https://loginov-rocks.medium.com/diy-connected-espresso-machine-assembly-part-7-7b590ef343fd)\n8. REST and Web App: Medium...\n\n## Architecture\n\n### REST\n\n![REST Architecture](https://raw.githubusercontent.com/loginov-rocks/Connected-Espresso-Machine/main/docs/Architecture/REST.png)\n\n## Hardware\n\n### Controller Board Scheme\n\n![Controller Board Scheme](https://raw.githubusercontent.com/loginov-rocks/Connected-Espresso-Machine/main/docs/Hardware/Schemes/5-Final-NodeMCU.png)\n\n### AC Scheme\n\n![AC Scheme](https://raw.githubusercontent.com/loginov-rocks/Connected-Espresso-Machine/main/docs/Hardware/Schemes/AC-Scheme.png)\n\n## Firmware\n\n### Class Diagram\n\n![Firmware Class Diagram](https://raw.githubusercontent.com/loginov-rocks/Connected-Espresso-Machine/main/docs/Firmware/Class-Diagram.png)\n\n## OpenAPI\n\nRequires [Node.js](https://nodejs.org):\n\n```shell\ncd openapi\nnpm install\nnpm run build\nnpm start\n```\n\nOpen `http://localhost:3000` in browser and explore `openapi.yaml`\n\n## Web Assets\n\nRequires [Node.js](https://nodejs.org):\n\n```shell\ncd web-assets\nnpm install\nnpm start\n```\n\nOpen `http://localhost:3001` in browser.\n\n### Test Firmware\n\n```shell\nnpm run start:test-firmware\n```\n\nThis will start **Test Firmware** listening at `http://localhost:3002` and sourcing **Web Assets** from\n`http://localhost:3001`\n\nActual **Firmware** can be tested by opening the **Connected Espresso Machine** root page with scripts and styles URLs\noverrides in query parameters, like so:\n\n```\nhttp://192.168.1.1:80/?scriptsUrl=http%3A%2F%2Flocalhost%3A3001%2Fscripts.js\u0026stylesUrl=http%3A%2F%2Flocalhost%3A3001%2Fstyles.css\n```\n\nWhere `192.168.1.1` is *local IP* assigned to **Connected Espresso Machine** and `80` is *HTTP port* configured in\n**Firmware**.\n\n## Reference\n\n* [Quick start with NodeMCU v3 (ESP8266), Arduino ecosystem, and PlatformIO IDE](https://loginov-rocks.medium.com/quick-start-with-nodemcu-v3-esp8266-arduino-ecosystem-and-platformio-ide-b8415bf9a038)\n\n## Gists\n\n* DIY Connected Espresso Machine: Relays (Part 2)\n    * [Relay.h](https://gist.github.com/loginov-rocks/4bfa4750ed7d8e2273f5402d58d906c6)\n    * [Relay.cpp](https://gist.github.com/loginov-rocks/0e8f73218224bcbe169dc9a4ae883bb1)\n    * [main.cpp](https://gist.github.com/loginov-rocks/4ea1348e0f6a6a279ee8fb320b93696c)\n* DIY Connected Espresso Machine: Boiler (Part 3)\n    * [Boiler.h](https://gist.github.com/loginov-rocks/bf00abfa41bdae9f0755f1e1da09a3b7)\n    * [Boiler.cpp](https://gist.github.com/loginov-rocks/97928385cdc14b2b8685e260fd0301ec)\n    * [main.cpp](https://gist.github.com/loginov-rocks/a6ee1173ae0b32c9ba575e358a4aa1e1)\n* DIY Connected Espresso Machine: Toggle (Part 4)\n    * [Toggle.h](https://gist.github.com/loginov-rocks/c9e36bb92d1792c3f6f7c3f3043665ad)\n    * [Toggle.cpp](https://gist.github.com/loginov-rocks/f31b9a23ab0bc96e5d136551c8843a2f)\n    * [main.cpp](https://gist.github.com/loginov-rocks/ca233d7fce4953092067197c9220e12b)\n* DIY Connected Espresso Machine: Main Class and Indicators (Part 5)\n    * [EspressoMachineCommand](https://gist.github.com/loginov-rocks/4d169d05a190bed989a5177bbab5b3b2)\n    * [EspressoMachine Header](https://gist.github.com/loginov-rocks/5bcba13a50df0c58ede9b2d18fece709)\n    * [EspressoMachine Implementation, General Part](https://gist.github.com/loginov-rocks/475e93c029d1173bec8faf8ba5853d02)\n    * [EspressoMachine Implementation, Commands Part](https://gist.github.com/loginov-rocks/041f81c4351a6c8e26f3fedd84651e93)\n    * [EspressoMachine Implementation, Work Part](https://gist.github.com/loginov-rocks/c7e9d3b286da0336fb337f38f9aad5bc)\n    * [Make Coffee Command, Header](https://gist.github.com/loginov-rocks/2659beb02cc3ef7a0d4887b0c5a99738)\n    * [Make Coffee Command, Implementation](https://gist.github.com/loginov-rocks/ec6bf5b8a4b12d6aa5301c269be3f26c)\n    * [main.cpp](https://gist.github.com/loginov-rocks/1fc72c52acc9e6b7471a6ee0421f20cc)\n* DIY Connected Espresso Machine: Over-the-Air Updates (Part 6)\n    * [setupWiFi](https://gist.github.com/loginov-rocks/9061ed1d774c3a61113ba0d1052c8d8f)\n    * [setupOtaUpdates](https://gist.github.com/loginov-rocks/cb05853f007baffa3f6ad5136fe81fc9)\n    * [main.cpp](https://gist.github.com/loginov-rocks/40e418a9ec3267f09f5134f2ff425897)\n    * [platformio.ini](https://gist.github.com/loginov-rocks/5ff42d9c28257ca0188627bac181f19c)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floginov-rocks%2Fconnected-espresso-machine","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Floginov-rocks%2Fconnected-espresso-machine","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floginov-rocks%2Fconnected-espresso-machine/lists"}