Sage/Breville Coffee Machine API Integration

I’ve reverse engineered the API from the mobile app for Sage/Breville coffee machines and built a Python library with methods for the endpoints, as well as a websocket handler for status updates. I’ve then wrapped that library in a Home Assistant integration, which you can install via HACS from here.

I know this will apply to quite a niche audience, as right now the only machine it connects to is the Oracle Dual Boiler, but hopefully they will add connectivity to more machines soon.

Prior to this I was achieving a similar outcome using a smart plug (for power draw and then inferred state [ready, warming up, standby] and a Switchbot to physically ush the power button to toggle state. That has worked delightfully for years, but the new machine has an API so why not :slight_smile:

[Edit: I realised after sharing that this might be useful to others too, so have uploaded a Blueprint]

3 Likes

So funny! I literally spent this past weekend analyzing the HTTP requests from the Breville Coffee App as well and figured out the main endpoints auth/refresh, on/off and applianceProxy websocket. But you beat me to the punch in releasing this first :slight_smile:
Thanks for doing this! I will test it out when I get home. I think it should work the same with the Oracle Jet as well but I also only have the Dual Boiler so can’t test it.

1 Like

This is amazing. Thank you for the hard work and sharing

1 Like

Oh really? I didn’t realise the Jet also worked with the app.

Is that what you have? Did you get an opportunity to try it? If it works I’ll update the note on the repo as I have it called out there that it’s only the Dual Boiler.

Nah I have the dual boiler as well but I know the jet uses the app as well. In fact, in the Amazon Alexa skill, the dual boiler shows up as a Jet in the device details. They have similar features. The main difference is the use of dual boilers vs thermojet as far as I know

Wow cool, I was looking for this since I got my duo Boiler month ago and now you Build it. I am just getting an error Setting up the Integration. Hacs install works Fine.

Some more input from my side:.

Logger: homeassistant.config_entries
Quelle: config_entries.py:3969
Erstmals aufgetreten: 13:27:36 (1 Vorkommnis)
Zuletzt protokolliert: 13:27:36

Error occurred loading flow for integration sagecoffee: cannot import name ‘CONF_MACHINE_TYPE’ from ‘custom_components.sagecoffee.const’ (/config/custom_components/sagecoffee/const.py)

Changed CONF_MACHINE_TYPE inside the plugin everywhere to CONF_BRAND

that was solving the error. Maybe you can update your git @simonjgreen

1 Like

Should be showing 1.2.1 in HACS now :slight_smile:

also, super minor but my PR with the logo has been accepted to the brand repo so it no longer has the generic placeholder image

1 Like

I’m getting an oracle jet in a few days and I can investigate if it’s willing to talk :slight_smile:

I know I said this before but this is probably one of my favorite integrations in Home Assistant. I love being able to make it part of my morning automation. Setting the working light to 100% (visual cue) and using ChimeTTS (audio cue) to announce when the Breville is ready

Two questions:

  1. This may be a dumb question; how does the integration work, for example, if I change the work light value, does the request go all the way back to Breville’s server? Or is the command sent directly to the Oracle Dual Boiler? I’m just curious if the internet connection is required just for authentication.

  2. Instead of making the working light entity domain a number.* why not make it light.* ? That way you can actually turn off the light. Currently setting the working light to its lowest value of 1 doesn’t turn off the light.

Sadly, the Jet doesn’t support the cloud API. AFAIK it’s only the Oracle Dual Boiler right now

Internet is required. The integration uses the same API as the mobile app that Sage/Breville supply. There is a endpoint to send commands to, and a websocket to watch for state changes.

I considered this, but given it’s not a traditional “light” I thought it might be a bit weird. It feels more like a configurable preference than a light you’d want to turn on and off like a room light. But I’m open to feedback!

This smells like a bug, I’ve created an issue against the underlying library and will have a look when I get some time to experiment. Thanks :slight_smile:

Note for all, I have created a test release here attempting to resolve the memory leaks that are crashing home assistant instances. Feedback appreciated after a few days of running!

Does this only work for the Breville Coffee machine or might it work with the Breville Sous Vide?

Took me a while to realize this but HA Core is crashing every few hours because of this integration.

Currently only works with Sage/Breville Oracle Dual Boiler.

This is being worked here Crashing Home Assistant · Issue #6 · simonjgreen/sageha · GitHub
It’s not happening to me, or a friend of mine, but is definitely happening to some folks! If you happen to have instrumentation/profiling enabled in your HA install I’d welcome any detailed logging you might have in that issue. Additionally trying the latest pre-release version would help.

The work light bug (and additionally the screen backlight and volume) have all been adjusted to have a min of 0. My bad!

1 Like

Feedback confirms memory leak now fixed. Also adjusted the min value on the two lights plus the audio to go all the way to 0.

1 Like

Oh this is awesome!!! Also can report the crashes have been fixed with 1.2.2, thank you so much!

This integration really brings makes the Oracle Dual Boiler even better.

1 Like