Welcome to the Coffee Machine Home Automation Project! This project is designed to turn your regular coffee machine into a smart, controllable device, allowing you to brew your favorite coffee with just a click.
The primary aim of this project is to provide an automated interface for your coffee machine, enabling remote power on/off functionality and coffee brewing via a mobile application.
The original project is based on esp8266 Tasmota Scripting-Language: Tasmota-coffee-machine.
This project uses ESP32 and Tasmota Berry.
- Coffee machine Grimac Tube (manual: 1 switch to power on, 1 switch to coffee brewing. You can use any manual 2 switch coffee machine)
- Sonoff Dual R3 v2 with Tasmota firmware
You need to replace the standard bistable switch of your coffee machine with the outputs of your Dual R. Output 1 for the Coffee machine power (coffee machine resistance) and the power 2 for the coffee brewing (the pump). In the standard setup, the pump can be enabled only if the coffee machine is on, with the Dual R we can enable the 2 power independently, but we will replicate the original behavior via software.
I have replaced the switch with 2 buttons for the input 1 and 2 of the Dual R.
In my case, the Power on LED was inside the power switch. After I replaced this one with a button, I added a 220v green LED.
Before proceeding, ensure that you've accessed the Tasmota console for your Sonoff Dual R3 v2 device. Input the following commands in the Tasmota console to enable the necessary switch modes:
SwitchMode1 3
SwitchMode2 15
Delay to power off the coffee machine after an inactivity period (no coffee brewing). The time of inactivity is configurable in the 'Off delay time' input.
Using the 'Shot coffee time' input, you can set up your perfect coffee brewing time.
The system stores the last coffee brewing time. Using the appropriate button, you can set the last coffee brewing time as the 'Shot coffee time'. You can use this function to calibrate your coffee machine as we will see later.
Are you tired of waiting for the coffee machine to be ready before brewing your coffee? With the auto-start function, you can load your preferred coffee pods and your coffee cup while the coffee machine is off. Simply press and hold the brewing button for 2.5 seconds, and the coffee machine will turn on in auto-start mode! Once the coffee machine is ready, the brewing process will start automatically!
The custom parameters are now available on Home Assistant, allowing you to directly set up your coffee machine through it. I chose not to use the haco library because I prefer not to install unnecessary plugins on Home Assistant when a feature is natively supported. Instead, I've developed a small library, HaMqttMgmt.be, to handle the creation and bidirectional update of MQTT entities from Berry using Home Assistant's standard discovery MQTT protocol.
Are you using multiple types of coffee pods? Do each of these types have different brewing times?
You need a precision scale.
- Set a too long 'Shot coffee time', like 30 seconds
- Turn on your coffee machine and wait until it becomes ready
- Load your preferred coffee pods inside
- Place the precision scale on the rack
- Place your coffee cup on the precision scale and tare it
- Start the coffee brewing and turn it off when the current weight is reached
- Now you can set the last coffee brewing time into the 'Shot coffee time' through the 'Set' button.
Weight table
Type | Weight brewing |
---|---|
General Rule | coffee weight * 2 |
Short Coffee | 20g |
Long Coffee | 22g |
Benvenuto nel progetto di automazione domestica per la macchina da caffè! Questo progetto è progettato per trasformare la tua normale macchina da caffè in un dispositivo intelligente e controllabile, consentendoti di preparare il tuo caffè preferito con un semplice clic.
L'obiettivo principale di questo progetto è fornire un'interfaccia automatizzata per la tua macchina da caffè, consentendo la funzionalità di accensione/spegnimento remoto e la preparazione del caffè tramite un'applicazione mobile.
Il progetto originale si basa su esp8266 e sul linguaggio di scripting Tasmota: Tasmota-coffee-machine.
Questo progetto utilizza ESP32 e Tasmota Berry.
- Macchina da caffè Grimac Tube (manuale: 1 interruttore per l'accensione, 1 interruttore per la preparazione del caffè. È possibile utilizzare qualsiasi macchina da caffè manuale con 2 interruttori)
- Sonoff Dual R3 v2 con firmware Tasmota
È necessario sostituire l'interruttore bistabile standard della tua macchina da caffè con le uscite del tuo Dual R. L'uscita 1 per l'alimentazione della macchina da caffè (resistenza della macchina da caffè) e l'uscita 2 per la preparazione del caffè (la pompa). Nella configurazione standard, la pompa può essere attivata solo se la macchina da caffè è accesa, con il Dual R possiamo attivare le 2 alimentazioni indipendentemente, ma replicheremo il comportamento originale tramite il software.
Ho sostituito l'interruttore con 2 pulsanti per l'ingresso 1 e 2 del Dual R.
Nel mio caso, il led di accensione era all'interno dell'interruttore di accensione, dopo averlo sostituito con un pulsante, ho aggiunto un led verde da 220V.
Prima di procedere, assicurati di aver accesso alla console di Tasmota per il tuo dispositivo Sonoff Dual R3 v2. Inserisci i seguenti comandi nella console di Tasmota per abilitare le modalità di interruttore necessarie:
SwitchMode1 3
SwitchMode2 15
Ritardo per spegnere la macchina da caffè dopo un periodo di inattività (nessuna preparazione del caffè). Il tempo di inattività è configurato nell'input 'Off delay time'.
Attraverso l'input 'Shot coffee time', puoi configurare il tempo perfetto per la preparazione del tuo caffè.
Ogni caffè che prepari, il sistema memorizza l'ultimo tempo di preparazione del caffè. Attraverso l'apposito pulsante, puoi impostare l'ultimo tempo di preparazione del caffè nell'input 'Shot coffee time'. Puoi utilizzare questa funzione per calibrare la tua macchina da caffè come vedremo più avanti.
Sei stanco di aspettare che la macchina da caffè sia pronta prima di preparare il caffè? Con la funzione di avvio automatico, puoi caricare le tue cialde di caffè preferite e la tua tazza di caffè mentre la macchina da caffè è spenta. Basta premere e tenere premuto il pulsante di preparazione per 2,5 secondi e la macchina da caffè si accenderà in modalità di avvio automatico! Una volta pronta la macchina da caffè, il processo di preparazione del caffè inizierà automaticamente!
Ora i parametri personalizzati sono disponibili su Home Assistant, consentendoti di configurare direttamente la tua macchina del caffè tramite HA. Ho scelto di non utilizzare la libreria haco perché preferisco non installare plugin non necessari su Home Assistant quando una funzionalità è supportata nativamente. Invece, ho sviluppato una piccola libreria, HaMqttMgmt.be, per gestire la creazione e l'aggiornamento bidirezionale delle entità MQTT da Berry utilizzando il protocollo MQTT standard di discovery di Home Assistant.
Stai utilizzando diversi tipi di cialde caffè? E ogni tipo ha un tempo di estrazione diverso?
Hai bisogno di una bilancia di precisione.
- Imposta un tempo di 'Shot coffee' troppo lungo, come 30 secondi.
- Accendi la macchina da caffè e attendi che sia pronta.
- Inserisci le tue cialde di caffè preferite.
- Posiziona la bilancia di precisione sul supporto.
- Posiziona la tua tazza di caffè sulla bilancia di precisione e azzerala.
- Avvia la preparazione del caffè e spegnila quando raggiungi il peso desiderato.
- Ora puoi impostare l'ultimo tempo di preparazione del caffè nell'input 'Shot coffee time' attraverso il pulsante 'Set'.
Tabella dei pesi
Tipo | Peso preparazione |
---|---|
Regola generale | peso caffè * 2 |
Caffè corto | 20g |
Caffè lungo | 22g |