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.
Series: Medium
- Archeology: Medium
- Relays: Medium
- Boiler: Medium
- Toggle: Medium
- Main Class and Indicators: Medium
- Over-the-Air Updates: Medium
- Assembly: Medium
- REST and Web App: Medium...
Requires Node.js:
cd openapi
npm install
npm run build
npm start
Open http://localhost:3000
in browser and explore openapi.yaml
Requires Node.js:
cd web-assets
npm install
npm start
Open http://localhost:3001
in browser.
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.
- DIY Connected Espresso Machine: Relays (Part 2)
- DIY Connected Espresso Machine: Boiler (Part 3)
- DIY Connected Espresso Machine: Toggle (Part 4)
- DIY Connected Espresso Machine: Main Class and Indicators (Part 5)
- DIY Connected Espresso Machine: Over-the-Air Updates (Part 6)