coffee: Add coffee maker post.
This commit is contained in:
parent
ee3a1882ae
commit
352a78107c
29 changed files with 167 additions and 0 deletions
104
content/posts/coffee/index.md
Normal file
104
content/posts/coffee/index.md
Normal file
|
|
@ -0,0 +1,104 @@
|
|||
---
|
||||
title: "DIY 'Smart' Coffee Maker"
|
||||
date: "2020-07-05"
|
||||
author: "William Floyd"
|
||||
featured_image: "media/20200702_120123.jpg"
|
||||
categories: [
|
||||
"Hardware",
|
||||
"Electronics",
|
||||
"Hacking"
|
||||
]
|
||||
tags: [
|
||||
"Hobby",
|
||||
"Home Assistant",
|
||||
"Home Automation",
|
||||
"ESPHome",
|
||||
"Coffee",
|
||||
"IOT"
|
||||
]
|
||||
---
|
||||
|
||||
I have recently (last couple months) been getting into home automation, specifically using Home Assistant.
|
||||
I also wanted to get a coffee maker that used K-Cups.
|
||||
Thus the goal was born - to get a coffee maker working with Home Assistant, such that I could automate it to fit my morning routine.
|
||||
|
||||
I first searched for new coffee makers, looking to see what the easiest ones would be to hack into and automate.
|
||||
I got so far as adding a sleek new brand name model to my Amazon cart, but thankfully reason and frugality prevailed!
|
||||
Instead, I opted to swing by the local Goodwill the next day, to see what secondhand options might be available.
|
||||
As luck would have it, I found a no-frills, single button coffee maker for the princely sum of $4, and I was on my merry way.
|
||||
|
||||
[](media/src/20200610_204856.jpg)
|
||||
|
||||
***
|
||||
|
||||
Later that evening, opening the black box up (thankfully I had the correct triangular screwdriver head), I found very easily hackable innards.
|
||||
|
||||
[](media/src/20200610_205351.jpg)
|
||||
|
||||
The control board ([front](media/20200610_205847.jpg), [back](media/20200610_205841.jpg)) is very simple - two buttons in parallel, an LED, and a couple resistors.
|
||||
I'm not quite sure what the logic is upstream (it un/latches on each press), but the buttons short to ground, and this is something I can work with.
|
||||
The control board has wires for ground, signal, and 5V, in that order.
|
||||
|
||||
The ordeal of hacking into the thing, and my missteps trying to do so, is rather boring really, but it produced this:
|
||||
|
||||
[](media/src/20200702_120309.jpg)
|
||||
|
||||
[](media/src/20200702_120302.jpg)
|
||||
|
||||
[](media/src/20200702_120328.jpg)
|
||||
|
||||
The brains I added was a Wemos D1 Mini (thanks, Aliexpress!), with a 3.3V<->5V converter between to sense when the coffee maker is on, and also turn on a mosfet to short the button to ground.
|
||||
I initially had issues with the coffee maker turning on whenever I plugger the D1 Mini in, but a pulldown resistor solved this.
|
||||
|
||||
[](media/src/20200702_120334.jpg)
|
||||
|
||||
I also opted for an external USB plug - this allows me to possibly reflash this without opening the enclosure, and also meant I did not need to splice into the mains line inside, which I was reluctant to do.
|
||||
|
||||
I initially flashed and programmed the coffee maker with Tasmota, but almost immediately opted to use ESPHome instead.
|
||||
I like Tasmota and ESPHome, I was just able to get more fine control of the setup using ESPHome in this instance, especially concerning the button logic.
|
||||
|
||||
The (important) code is as follows:
|
||||
|
||||
```
|
||||
binary_sensor:
|
||||
- platform: gpio
|
||||
device_class: power
|
||||
internal: true
|
||||
id: power_on
|
||||
pin: D2
|
||||
|
||||
switch:
|
||||
- platform: gpio
|
||||
pin: D1
|
||||
id: relay
|
||||
restore_mode: ALWAYS_OFF
|
||||
- platform: template
|
||||
name: "Coffee Maker"
|
||||
icon: "mdi:coffee-maker"
|
||||
lambda: |-
|
||||
if (id(power_on).state) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
turn_on_action:
|
||||
- switch.turn_on: relay
|
||||
- delay: 50ms
|
||||
- switch.turn_off: relay
|
||||
turn_off_action:
|
||||
- switch.turn_on: relay
|
||||
- delay: 50ms
|
||||
- switch.turn_off: relay
|
||||
```
|
||||
|
||||
The beauty of the way in which I can detect signals and simulate a button press is that ESPHome senses when I use the physical button, and updates accordingly.
|
||||
I can use the coffee maker absolutely as normal, the 'Smart' part of it is optional.
|
||||
|
||||
***
|
||||
|
||||
The rest of my setup using this coffee maker is somewhat outside the scope of this post, but it includes using Tasker on my phone to run a 'Wakeup' automation on Home Assistant, which will - along with turning on my bed-head lamp, and switching my monitor on before putting it to sleep - check if I turned on a 'Morning Coffee' user input.
|
||||
If I remembered to prep my coffee the night before, and turned on the switch, I will wake up to a hot cup of coffee (or, the sound of a coffee-in-progress).
|
||||
I can also command Alexa and Google Assistant to do my bidding and make me a coffee.
|
||||
At least someone does what I want...
|
||||
|
||||
Truly, we are living in the future.
|
||||
BIN
content/posts/coffee/media/20200610_204856.jpg
(Stored with Git LFS)
Normal file
BIN
content/posts/coffee/media/20200610_204856.jpg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
content/posts/coffee/media/20200610_205351.jpg
(Stored with Git LFS)
Normal file
BIN
content/posts/coffee/media/20200610_205351.jpg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
content/posts/coffee/media/20200610_205841.jpg
(Stored with Git LFS)
Normal file
BIN
content/posts/coffee/media/20200610_205841.jpg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
content/posts/coffee/media/20200610_205847.jpg
(Stored with Git LFS)
Normal file
BIN
content/posts/coffee/media/20200610_205847.jpg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
content/posts/coffee/media/20200702_120123.jpg
(Stored with Git LFS)
Normal file
BIN
content/posts/coffee/media/20200702_120123.jpg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
content/posts/coffee/media/20200702_120302.jpg
(Stored with Git LFS)
Normal file
BIN
content/posts/coffee/media/20200702_120302.jpg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
content/posts/coffee/media/20200702_120309.jpg
(Stored with Git LFS)
Normal file
BIN
content/posts/coffee/media/20200702_120309.jpg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
content/posts/coffee/media/20200702_120328.jpg
(Stored with Git LFS)
Normal file
BIN
content/posts/coffee/media/20200702_120328.jpg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
content/posts/coffee/media/20200702_120334.jpg
(Stored with Git LFS)
Normal file
BIN
content/posts/coffee/media/20200702_120334.jpg
(Stored with Git LFS)
Normal file
Binary file not shown.
0
content/posts/coffee/media/src/.env
Normal file
0
content/posts/coffee/media/src/.env
Normal file
BIN
content/posts/coffee/media/src/20200610_204856.jpg
(Stored with Git LFS)
Normal file
BIN
content/posts/coffee/media/src/20200610_204856.jpg
(Stored with Git LFS)
Normal file
Binary file not shown.
1
content/posts/coffee/media/src/20200610_204856.jpg.hash
Normal file
1
content/posts/coffee/media/src/20200610_204856.jpg.hash
Normal file
|
|
@ -0,0 +1 @@
|
|||
088dae081c1112cb0ecc34916970329a
|
||||
BIN
content/posts/coffee/media/src/20200610_205351.jpg
(Stored with Git LFS)
Normal file
BIN
content/posts/coffee/media/src/20200610_205351.jpg
(Stored with Git LFS)
Normal file
Binary file not shown.
1
content/posts/coffee/media/src/20200610_205351.jpg.hash
Normal file
1
content/posts/coffee/media/src/20200610_205351.jpg.hash
Normal file
|
|
@ -0,0 +1 @@
|
|||
e2f419dd7a127579617af9b0b3fc54bb
|
||||
BIN
content/posts/coffee/media/src/20200610_205841.jpg
(Stored with Git LFS)
Normal file
BIN
content/posts/coffee/media/src/20200610_205841.jpg
(Stored with Git LFS)
Normal file
Binary file not shown.
1
content/posts/coffee/media/src/20200610_205841.jpg.hash
Normal file
1
content/posts/coffee/media/src/20200610_205841.jpg.hash
Normal file
|
|
@ -0,0 +1 @@
|
|||
9331dc6ea3a9f20feeb535aec0784676
|
||||
BIN
content/posts/coffee/media/src/20200610_205847.jpg
(Stored with Git LFS)
Normal file
BIN
content/posts/coffee/media/src/20200610_205847.jpg
(Stored with Git LFS)
Normal file
Binary file not shown.
1
content/posts/coffee/media/src/20200610_205847.jpg.hash
Normal file
1
content/posts/coffee/media/src/20200610_205847.jpg.hash
Normal file
|
|
@ -0,0 +1 @@
|
|||
7c49cdfcb5380bdf5d835fb4818ac208
|
||||
BIN
content/posts/coffee/media/src/20200702_120123.jpg
(Stored with Git LFS)
Normal file
BIN
content/posts/coffee/media/src/20200702_120123.jpg
(Stored with Git LFS)
Normal file
Binary file not shown.
1
content/posts/coffee/media/src/20200702_120123.jpg.hash
Normal file
1
content/posts/coffee/media/src/20200702_120123.jpg.hash
Normal file
|
|
@ -0,0 +1 @@
|
|||
87267cf11a6ba05a54fb9f0f8ce4edfd
|
||||
BIN
content/posts/coffee/media/src/20200702_120302.jpg
(Stored with Git LFS)
Normal file
BIN
content/posts/coffee/media/src/20200702_120302.jpg
(Stored with Git LFS)
Normal file
Binary file not shown.
1
content/posts/coffee/media/src/20200702_120302.jpg.hash
Normal file
1
content/posts/coffee/media/src/20200702_120302.jpg.hash
Normal file
|
|
@ -0,0 +1 @@
|
|||
4a65f0f170d59099c330aac084068f62
|
||||
BIN
content/posts/coffee/media/src/20200702_120309.jpg
(Stored with Git LFS)
Normal file
BIN
content/posts/coffee/media/src/20200702_120309.jpg
(Stored with Git LFS)
Normal file
Binary file not shown.
1
content/posts/coffee/media/src/20200702_120309.jpg.hash
Normal file
1
content/posts/coffee/media/src/20200702_120309.jpg.hash
Normal file
|
|
@ -0,0 +1 @@
|
|||
1b3b90a6443b28ac1fd7aad19d2d5932
|
||||
BIN
content/posts/coffee/media/src/20200702_120328.jpg
(Stored with Git LFS)
Normal file
BIN
content/posts/coffee/media/src/20200702_120328.jpg
(Stored with Git LFS)
Normal file
Binary file not shown.
1
content/posts/coffee/media/src/20200702_120328.jpg.hash
Normal file
1
content/posts/coffee/media/src/20200702_120328.jpg.hash
Normal file
|
|
@ -0,0 +1 @@
|
|||
70c564aefb733512185b9dc48bed0567
|
||||
BIN
content/posts/coffee/media/src/20200702_120334.jpg
(Stored with Git LFS)
Normal file
BIN
content/posts/coffee/media/src/20200702_120334.jpg
(Stored with Git LFS)
Normal file
Binary file not shown.
1
content/posts/coffee/media/src/20200702_120334.jpg.hash
Normal file
1
content/posts/coffee/media/src/20200702_120334.jpg.hash
Normal file
|
|
@ -0,0 +1 @@
|
|||
d757c81bb35b1198445ced20ed831881
|
||||
Loading…
Add table
Reference in a new issue