This project integrates a Philips Series 2200 Coffee Machine into into Home Assistant through ESPHome. This component has been developed on a Philips EP2220 and an ESP8266.
This component provides a Power Switch
, a Status sensor
and various Buttons
which simulate user input.
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
- id(Required, string):Controller ID which will be used for entity configuration.
- display_uart(Required, string): ID of the UART-Component connected to the display unit
- mainboard_uart(Required, string): ID of the UART-Component connected to the mainboard
- power_pin(Required, Pin): Pin to which the MOSFET/Transistor is connected. This pin is used to temporarily turn of the display unit.
- invert_power_pin(Optional: boolean): If set to
true
the output of the power pin will be inverted. Defaults tofalse
. - power_trip_delay(Optional: Time): Determines the length of the power outage applied to the display unit, which is to trick it into turning on. Defaults to
500ms
. - power_message_repetitions(Optional: uint): Determines how many message repetitions are used while turning on the machine. On some hardware combinations a higher value such as
25
is required to turn on the display successfully. Defaults to5
. - model(Optional: int): Different models or revisions may use different commands. This option can be used to specify the command set used by this component. Select one of
EP2220
. Defaults toEP2220
.
- controller_id(Required, string): The Philips Series 2200-Controller to which this entity belongs
- clean(Optional: boolean): If set to
true
the machine will perform a cleaning cycle during startup. Otherwise the machine will power on without cleaning. Defaults totrue
. - All other options from Switch
- controller_id(Required, string): The Philips Series 2200-Controller to which this entity belongs
- action(Required, int): The action performed by this button. Select one of
MAKE_COFFEE
,SELECT_COFFEE
,SELECT_ESPRESSO
,MAKE_ESPRESSO
,SELECT_HOT_WATER
,MAKE_HOT_WATER
,SELECT_STEAM
,MAKE_STEAM
,BEAN
,SIZE
,AQUA_CLEAN
,CALC_CLEAN
,PLAY_PAUSE
. - long_press(Optional, boolean): If set to
true
this button will perform a long press. This option is only available for actions which don't includeMAKE
. - All other options from Button
- controller_id(Required, string): The Philips Series 2200-Controller to which this entity belongs
- All other options from Text Sensor
- use_cappuccino(Optional, boolean): If set to
true
,Cappuccino selected
will be reported instead ofSteam selected
. This option is intended for machines like the EP2230 which can make cappuccino. Default tofalse
.
- type(Required, string): The type of this number component. One of
size
andbean
. Ifsize
is selected, this component will report/manipulate the beverage size. Ifbean
is used, this component will report/manipulate the beverage strength. - controller_id(Required, string): The Philips Series 2200-Controller to which this entity belongs
- status_sensor_id(Required, string): Id of a status sensor which is also connected to the controller.
- source(Optional, int): The source of this sensor. If non is provided, any selected beverage will enable this component. Select one of
COFFEE
,ESPRESSO
,CAPPUCCINO
,HOT_WATER
(only for size). When selectingCAPPUCCINO
the related status sensor must useuse_cappuccino = true
. - All other options from Number
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:
- There was no cleaning cycle during start-up
- A Mug is present
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.
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.
More information on the communication protocol used by this component can be found here.
- SmartPhilips2200 by @chris7topher
- The commands used in this Project are different. This is likely due to different model revisions.
- Make sure your wiring is correct
- The UART debug function can be used to analyze communication and verify correct wiring
- The commands used by the display unit may be different between different revisions/models (see Related Work)
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:
- Double-check wiring
- Try increasing
power_message_repetitions
to25
or some other value smaller/larger than this. - Try increasing
power_trip_delay
- Try adjusting
invert_power_pin
depending on the type of transistor used