Skip to content

DIY project to upcycle old De'Longhi espresso machine into a smart Wi-Fi connected device with IoT capabilities

License

Notifications You must be signed in to change notification settings

loginov-rocks/Connected-Espresso-Machine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

69 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Connected Espresso Machine

Connected Espresso Machine is a primer on how to turn "dumb" old coffeemaker/teapot/anything into a smart connected device with a bit of hardware work and programming. For that, a series of articles was written for you to either have fun or implement your own similar project!

During the implementation of embedded projects, I faced different approaches to code firmware, so in the articles, I tried to describe common programming patterns that can be accommodated in your hobby projects.

In the current reincarnation, the espresso machine is connected to the home Wi-Fi network and exposes REST API that is used by the Web App to control the espresso machine accessible from the same network.

Web Assets (JavaScript and CSS) are served from the AWS S3 Bucket and can be updated at any time without the update of the firmware. While the firmware itself can be flashed Over-the-Air from PlatformIO IDE.

While NodeMCU is used as a single microcontroller, the implementation is not specific to it and actually, Arduino Uno was used initially to control the AC components of the espresso machine.

Contents

  1. Articles
  2. Architecture
    1. REST
  3. Hardware
    1. Controller Board Scheme
    2. AC Scheme
  4. Firmware
    1. Class Diagram
  5. OpenAPI
  6. Web Assets
    1. Test Firmware
  7. Reference
  8. Gists

Articles

Series: Medium

  1. Archeology: Medium
  2. Relays: Medium
  3. Boiler: Medium
  4. Toggle: Medium
  5. Main Class and Indicators: Medium
  6. Over-the-Air Updates: Medium
  7. Assembly: Medium
  8. REST and Web App: Medium...

Architecture

REST

REST Architecture

Hardware

Controller Board Scheme

Controller Board Scheme

AC Scheme

AC Scheme

Firmware

Class Diagram

Firmware Class Diagram

OpenAPI

Requires Node.js:

cd openapi
npm install
npm run build
npm start

Open http://localhost:3000 in browser and explore openapi.yaml

Web Assets

Requires Node.js:

cd web-assets
npm install
npm start

Open http://localhost:3001 in browser.

Test Firmware

npm run start:test-firmware

This will start Test Firmware listening at http://localhost:3002 and sourcing Web Assets from http://localhost:3001

Actual Firmware can be tested by opening the Connected Espresso Machine root page with scripts and styles URLs overrides in query parameters, like so:

http://192.168.1.1:80/?scriptsUrl=http%3A%2F%2Flocalhost%3A3001%2Fscripts.js&stylesUrl=http%3A%2F%2Flocalhost%3A3001%2Fstyles.css

Where 192.168.1.1 is local IP assigned to Connected Espresso Machine and 80 is HTTP port configured in Firmware.

Reference

Gists