This project integrates a Philips Series 2200/3200 Coffee Machine into into Home Assistant through ESPHome.
This component has been developed on a Philips EP2220
and an ESP8266 but it will happily run on an ESP32.
Currently supported Coffee Machine models include:
Series | Model Number |
---|---|
Series 2200 | EP2220 , EP2235 |
Series 3200 | EP3243 , EP3246 |
My modified EP2220
:
More information about the PCB used in this image is available here.
This component provides a Power Switch
, a Status sensor
and various Buttons
which simulate user input as well as a Number
component to customize beverage settings such as size and strength.
The Power Switch
can be used to turn on the coffee machine with and without a cleaning cycle during startup.
You might break/brick your coffee machine by modifying it in any way, shape or form. If you want to use this component, do so at your own risk.
A example configuration can be found here
true
the output of the power pin will be inverted. Defaults to false
.500ms
.25
is required to turn on the display successfully. Defaults to 5
.en-US
, de-DE
, it-IT
. Defaults to en-US
.EP_2220
, EP_2235
, EP_3243
, EP_3246
. Defaults to EP_2220
.true
the machine will perform a cleaning cycle during startup. Otherwise the machine will power on without cleaning. Defaults to true
.SELECT_COFFEE
, MAKE_COFFEE
, SELECT_ESPRESSO
, MAKE_ESPRESSO
, SELECT_HOT_WATER
, MAKE_HOT_WATER
, SELECT_STEAM
, MAKE_STEAM
, SELECT_CAPPUCCINO
, MAKE_CAPPUCCINO
, SELECT_LATTE
, MAKE_LATTE
, SELECT_AMERICANO
, MAKE_AMERICANO
, BEAN
, SIZE
, MILK
, AQUA_CLEAN
, CALC_CLEAN
, PLAY_PAUSE
. Note that some options are only available on select models.true
this button will perform a long press. This option is only available for actions which don't include MAKE
.size
, bean
and milk
. If size
is selected, this component will report/manipulate the beverage size. If bean
is used, this component will report/manipulate the beverage strength. If milk
is used, this component will report/manipulate the amount of milk added to the beverage. Note that some options are only available on select models.COFFEE
, ESPRESSO
, HOT_WATER
, CAPPUCCINO
, AMERICANO
, LATTE_MACCHIATO
. Note that some options are only available on select models or setting types.The following script can be used to make a fully automated cup of coffee. The power switch used in this case does not perform a cleaning cycle. The cleaning check is required since after power loss the machine always cleans. This script will only continue to brew coffee under 2 conditions:
script:
- id: coffee_script
then:
- if:
condition:
lambda: 'return id(status).state == "Off";'
then:
- switch.turn_on: power
- wait_until:
condition:
lambda: 'return (id(status).state == "Idle") || (id(status).state == "Cleaning");'
timeout: 120s
- if:
condition:
lambda: 'return (id(status).state == "Idle") && id(mug_sensor).state;'
then:
- delay: 5s
- button.press: make_coffee_button
else:
if:
condition:
lambda: 'return (id(status).state == "Idle") && id(mug_sensor).state;'
then:
- button.press: make_coffee_button
The coffee machines display unit is connected to the mainboard via a 8-pin ribbon cable with Picoflex connectors. The display is powered by the mainboard and the two units communicate using a serial bus. The ESP is placed in between this bus to perform a man-in-the-middle attack. The RX/TX lines are piped through the ESP such that messages can be read, intercepted and injected.
When injecting a 'turn coffee machine on' command, the coffee machine does turn on, but the display unit does not. To circumvent this behavior we can re-boot the display unit by temporarily removing it's power. Thus the display will power on and operate normally. To perform this operation a transistor or MOSFET can be used.
The following wiring guideline can be used to add a Wemos D1 Mini to the coffee machine. The unlabeled wires should be connected without changes. More schematics are available here.
The ribbon cable wires have the following functionalities.
Pin | Mainboard | Functionality |
---|---|---|
0 | 5V | 5V |
1 | GND | GND |
2 | GND | GND |
3 | unused | unused |
4 | TX/RX | Messages from mainboard to display |
5 | RX/TX | Messages from display to mainboard |
6 | 0V | unknown - very noisy |
7 | 5V |
The Wemos D1 Mini has a built in Voltage regulator, thus connecting it to the 5V provided by the mainboard is no problem. If you use a different ESP Module/Board please make sure it is 5V tolerant or use a Voltage regulator. Otherwise you might release magic smoke.
This project has convinced me to design my first PCB (printed circuit board). This rather simple ESP8266-12F-based design was inspired by the Wemos D1 Mini, which I was using previously. When using this PCB the ribbon cable connecting the mainboard to the display must not be cut in half and no soldering is required.
The Schematics, PCB Layout and BOM are available here on oshwlab.com and an accompanying 3D-printable case for the small PCB is available here on printables.com. The SMD components were chosen such that they can still be hand-soldered without a hot-air station or reflow oven, given a little experience. Since this is my first design there may be mistakes and things that could be optimized. Everything is provided as is, without warranty or liability of any kind.
There are also other PCB designs like this one which relies on using a Wemos D1 Mini and does not require soldering SMD components.
More information on the communication protocol used by this component can be found here.
EP3243
and the EP3246
.With some Hardware combinations and on some coffee machines, the display might not turn on reliably. If this is the case for you please try the following troubleshooting steps to resolve the issue:
power_message_repetitions
to 25
or some other value smaller/larger than this.power_trip_delay
invert_power_pin
depending on the type of transistor used