Modifying a Breville/Sage Barista Express (Coffee Machine) to integrate with Home Assistant

My espresso machine, a Sage Barista Express (also known as a Breville Barista Express in Northern America), has no smart functionality. Even though it heats up the boiler in minutes, it’s better to let the rest of the machine heat up too, which takes about 15 to 20 minutes. So my goal is to turn on the machine when I wake up, so it will have some time to heat up before I pull my first shot of the day.

Since the machine has electronic buttons, including the power on/off button, it should be a matter of just shorting the wires connected to this button to turn the machine on (and off).

I found a good tutorial on how to use a Shelly 1 on what I thought was the same machine, but got stuck on the part of the tutorial where the front panel (which holds all the buttons) is removed. Another user in the comments on that page also ran into the same problem, perhaps there are some differences between the US and the EU/UK versions of the machine.

However, I found an alternative method that doesn’t require removing the front panel (however, you do need to remove the top and back panels; instructions for which you can find on Youtube).

I pinged out the wires that are connected to the PCB of the power button module (there’s just enough room to stick two thin multimeter probes in), and found the wires that are switched by the power button. Looking from the front of the machine, these are the first and fourth wires from the left.

I piggybacked two new wires onto the existing wires. The existing wires plug into a connector that’s soldered on the PCB and there’s a bit of extra room to push in an additional solid wire next to each. Because it’s not possible to solder the new wires I fixated them with some hot glue.

The red and black wires at the top (which points to the front of the machine) are the new wires, the black and pink wires are the existing wires.

These wires get connected to the I and O connectors of a Shelly 1 (what’s nice about this device is that it uses a mechanical relay, so the connectors are isolated from the mains input).

To power the Shelly, I routed a power cable from the power button module to where the mains power cable enters the machine. I spliced the mains cable using wago connectors and added the power cable for the Shelly.

This is what the final configuration of the Shelly looks like from inside the machine (the empty connector on the right connects to a microswitch on the top panel; I also removed the knob that sets the grind size, to allow for a bit of extra room; the white cable leading to the Shelly is the power cable):

To get it working from HA, it’s just a matter of adding the Shelly, which I have configured as a switch that can be used in automations or from a dashboard.

I did add an automation that turns off the relay a second after it has been activated (so basically, it will always short the power on/off button for 1 second) to prevent confusing the machine’s firmware (it will think the user is long-pressing the power button):

- alias: 'Turn off coffeemachine switch after 1s'
  trigger:
    platform: state
    entity_id: switch.coffeemachine
    to: 'on'
    for:
      seconds: 1
  action:
    service: switch.turn_off
    entity_id: switch.coffeemachine
6 Likes

Upon finding the original tutorial you linked, I went searching for others online who had accomplished this mod to see if anyone could shed more detail. I successfully modded my Barista Express and used some info from this guide, however I have many thoughts to share about this project if you’re looking to do it yourself. Breville Barista Express (BES870XL Gen 2) Shelly1 Automated Relay Mod Install Tips - Album on Imgur

2 Likes

Hi @dkidd dkidd, I did the mod to my breville 870 with the shelly 1 and it works great, my only problem at this time is How can I know if it really turned on or not ???

I tried using an automation where I am ativating a virtual switch if the power comsuption of a Tasmota Sonoff S31 (where my Breville is pluged in) if over 10 watts but my problem is that when the Breville gets hot, it stops consuming and the power consumption falls under 10w so then my virtual switch turns Off. evidently this virtual switch will toggle over time as the Breville restart the boiler from time to time.

Have you figured a way to make sure the machine is either Off or On ?

Hi, @goldriver bruno! I do not have any means to determine whether the espresso machine is on or not other than viewing the history in the Shelly app (to see that my scheduled timers activated successfully) or by looking at my machine. At the moment, this isn’t really a problem to me because I just want it turned on in the mornings for when I wake up. In the original guide I referenced over on hackster.io, Pete Stothers (the original author of that guide), wrote a comment describing his plans for determining whether it was on or off by means of a “Xiaomi Zigbee Smart Switch with power monitoring capabilities”. He has some Home Assistant template switch code that might be able to help you with this over there.

robertklep’s “a good tutorial” link is the same guide from hackster.io

Good luck!

P.S. If you’re looking for a “dumber” method of keeping track of whether the machine is on or off, the Breville Barista Express goes to “sleep” after 1 hour of being on, and turns “off” after 3 hours of being on. So you may be able to code around when you expect the thing to be on or off based on when you sent the “on” command to the relay.

Very well written guide with pictures (my kind of tutorial). Thank you for taking the time to detail the steps and belated welcome to the Home Assistant community!

Thanks and thanks! Hope it’s helpful!

Is it possible to use a Shelly Plus 1PM?

I think the 1PM doesn’t have an actual relay. If not, I wouldn’t use it because that would mean its outputs aren’t isolated from its (110V/230V) input.

Yep you’re right, I guess I’ll swap a Shelly 1 out from a light switch and put the spare 1PM in the there :slight_smile:

So managed to pull this off, but is there a way for HA to know if the machine is actually on or off? I have to toggle it via home assistant a few times to turn it back off again.

No, it basically just actuates the on/off button. How I use it from an automation is to turn on the switch, then turn if off after one second.

Ah cool then I assume a switch for the automation is the best way to expose it to HomeKit, Alexa etc.?

Could you use a power monitoring plug ?

Yeah I guess you could, or add a Shelly 1 PM into the mix?

@robertklep does your physical button still work?

It does, although occasionally (like once every 50 times or so) it won’t and I have to press it once more.

I must have done something wrong as mine isn’t :joy:

What button type do you have set in the Shelly?

It’s set as a Detached Switch.

1 Like

Great guide. Anyone tried this on an Oracle touch? :slightly_smiling_face:

1 Like

I did something very similar for a Delonghi Dedica. I needed to operate two of the three buttons on the control panel. Button One is for my partner who likes a certain dose, Button Two for me who likes a different dose.

1 Like