La Marzocco GS/3 & Linea Mini support

@mrvautin @rccoleman FYI - I reached out to La Maz IoT after sales support who confirmed that a “flush” per app/server stats is considered any extraction below 5 sec, and in upcoming 2.x firmware for the machine that will change to any extraction under 10 secs. :+1:

1 Like

Pre-empting your next question, which was my next question to La Maz, pre-brew is included in that time:
Eg :

  1. 2 sec. pre-brew + 4 sec. brew = coffee (over 5 sec.)
  2. 2 sec. pre-brew + 2.9 sec. brew = flush (under 5 sec.)

My raspberry pi Home Assistant, La Marzocco install is working well with my Linea Mini. Question: can the same install steps work when Home Assistant is working inside Docker?

Installation of integrations is the same regardless of HA installation type. It’s simple if you install via HACS, and only requires you to have access to your config directory if you don’t.

here is the log:
Traceback (most recent call last):

File “/usr/local/lib/python3.9/site-packages/lmdirect/connection.py”, line 90, in retrieve_machine_info

await client.fetch_token(

File “/usr/local/lib/python3.9/site-packages/authlib/integrations/httpx_client/oauth2_client.py”, line 131, in _fetch_token

return self.parse_response_token(resp.json())

File “/usr/local/lib/python3.9/site-packages/authlib/oauth2/client.py”, line 380, in parse_response_token

self.handle_error(error, description)

File “/usr/local/lib/python3.9/site-packages/authlib/integrations/httpx_client/oauth2_client.py”, line 80, in handle_error

raise OAuthError(error_type, error_description)

authlib.integrations.base_client.errors.OAuthError: invalid_client: The client credentials are invalid

The above exception was the direct cause of the following exception:

Traceback (most recent call last):

File “/usr/local/lib/python3.9/site-packages/lmdirect/connection.py”, line 156, in _connect

self._machine_info = await self.retrieve_machine_info(

File “/usr/local/lib/python3.9/site-packages/lmdirect/connection.py”, line 97, in retrieve_machine_info

raise AuthFail(“Authorization failure”) from err

lmdirect.connection.AuthFail: Authorization failure

The above exception was the direct cause of the following exception:

Traceback (most recent call last):

File “/config/custom_components/lamarzocco/config_flow.py”, line 44, in validate_input

machine_info = await lm.connect()

Seems to not like the client ID, password. I used the same one as before, which is working with my standalone Home Assistant install.

I used:

Client ID: 965136328570-l2o6fsf7odo1ec6bc6s3026e7985h7t7.apps.googleusercontent.com

Client Secret: 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

Used my iOS La Marzocco app user name and password. The install was via HACS to get the La Marzocco integration.

SORRY! I went to the documentation page and saw the CLIENT_ID and CLIENT_SECRET, and used it, and it works now. Raspberry Pi 4B, Raspian, Docker, Home Assistant

There is no difference between any HA installation method when it comes to installing integrations. That said, your client ID and client secret look nothing like the ones in the docs and are almost certainly incorrect. Use the ones from here unless you know otherwise: https://github.com/rccoleman/lamarzocco. You mentioned them in your previous post, so I assume that’s what you used in your first installation.

Just a heads up - I released a new beta version that handles connection failures more gracefully and adds the long-awaited reservoir support PR from timclipsham. The latter adds a binary_sensor that will be off if the water level is acceptable or you’ve plumbed your LM machine, and on if the reservoir is removed or water level is low.

It also cleans up some deprecated function calls and such to eliminate warnings and prepare for the future. Please give it a try and let me know if there are any issues.

2 Likes

Thanks again @rccoleman for making this and being on top of features and maintenance, much appreciated

1 Like

Thanks for your time!Is there any way to change the polling interval.(30s to 2s)

It takes longer than that to collect all the data for each poll attempt, and sometimes the machine doesn’t respond and ends up timing out (which is currently 10s after a lot of experimentation). You’ll also make it even more difficult to let the official app log in if the integration is monopolizing the single allowed connection.

You can play with it if you want by changing this in const.py, but I don’t recommend it:

"""Set polling interval at 20s."""
POLLING_INTERVAL = 30

You can see that I used to have it at 20s and forgot to update the comment after increasing it :slight_smile:

Got it and thank you again!
I’m a LMLM user and really glad to help you with the further feather!

Hi there, I wonder if it is possible to create an IOS shortcut to toggle stand-by and on status of my La Marzocco mini?

It’s just a switch, so pretty straightforward:

Or you can expose the same switch via the Homekit integration and control it that way.

Hey @rccoleman LM just released firmware 2.10 and a new phone app. This includes automatic backflushing etc. Do you think it will be hard to add to your integration?

I saw the new app and v1.40 firmware upgrade for my GS/3 AV, but couldn’t get the firmware update to succeed this morning after many attempts. They all just ended in “Download failed”. I don’t expect it to be hard to add the new functionality, but I’ll need to get it working locally first. It also appears to add real line-pressure preinfusion in addition to their “prebrewing”, so I’m looking forward to that.

Ok. It must be v1.40 for GS3 and v2.10 is for Linea Mini. I’ve not had any success updating either and I can see others are having a similar problem on iOS too: https://www.home-barista.com/espresso-machines/la-marzocco-linea-mini-user-experience-t36004-1550.html

Looks like LM thinks it’s a bandwidth issue, so I’ll try again tonight. I didn’t think to check Home Barista, so thanks for the link.

I finally got mine working. It seems it updated but the app was out of sync. Force closed the app and can see the new firmware and settings.

I can already see that Home assistant can’t switch it on and off already. Looking into it now.

Update: Turns out I was wrong. Home assistant integration does continue to work. It just needed some time and a reboot.