La Marzocco GS/3 & Linea Mini support

Awesome. Glad you got it working and welcome aboard.

Out of interest what is the latest firmware version? I’m running v2.07 and it’s showing as the latest version for me.

That’s good to know. I periodically see my GS/3 drop off my network such that it can’t be pinged and even the official app can’t connect to it. Instead of asking for support, I created a ping sensor and Lovelace button that cycles power via a plugin module :slight_smile: . Maybe now I’ll file a support ticket.

My current firmware is 2.09, shows last firmware as 2.07.

However, I was running 2.09 when i got the machine new a couple of weeks ago. They updated it remotely and still showed as 2.09 on the app, so this could be a bug introduced on 2.09 (on Linea Mini) and this was a fix that they didn’t apply a minor version number to for some reason.

Ha! Ken! Glad to see you onboard, and also props on getting yourself a LMLM!

[See EDIT below for new info]

I did something dumb that will cause problems with the 2021.12 HA release and I wanted to mention it here in case someone updates to the 2021.12 beta that was released today. If you upgrade to 2021.12 with v0.7.8 of La Marzocco integration release, HA will crash almost immediately as it tries to migrate the device registry to a newer schema.

No matter what, I need to release a new version of the integration that fixes the problem. I think that everything will be fine as long as you uninstall the old version and install the new version before updating to HA 2021.12, but I’ll test that and hopefully release a new integration version before the official HA 2021.12 release next week. It’s a small change.

If you update HA to 2021.12 while using v0.7.8 of the LM integration installed, HA won’t start at all and it’ll take a little more effort to recover. As long as you can log into your HA host via SSH or via the device console, you can run these commands from your config directory to get back up and running:

cp .storage/core.device_registry .storage/core.device_registry-orig
sed "s/^.*\"entry_type\": \"None\",//" .storage/core.device_registry-orig > .storage/core.device_registry
cp custom_components/lamarzocco/entity_base.py custom_components/lamarzocco/entity_base.py-orig
sed "s/^.*\"entry_type\": \"None\",//" custom_components/lamarzocco/entity_base.py-orig > custom_components/lamarzocco/entity_base.py

Restart HA after that and you should be back up and running. The commands essentially do an in-place fix to the device_registry and integration, and it’s really just removing a line from two different files. You could also make those same changes via any file editor using Samba to your HA instance, but it’s easier to make a mistake if you’re not careful.

EDIT: I just made a pre-release of v0.7.9 and it’s working for me, so please help test it out if you can. You will need to do the following:

  • Uninstall the current integration from Configuration->Integrations via the 3-dot menu on the La Marzocco card. You do not need to remove it from HACS.
  • Update to v0.7.9 via HACS or by manually downloading it. It’s a currently a pre-release, so you’ll need to enable beta releases if you’re using HACS.
  • Restart HA
  • Reinstall the integration from Configuration->Integrations. It should find your machine via zeroconf discovery, and you’ll need to reenter your client ID/secret and username/password.

You should up and running and be good-to-go for HA 2021.12 after doing that.

Would you think v0.7.9 should work on 2021.11.5? It doesn’t appear to be working for me after upgrading.

Logger: aiohttp.server
Source: custom_components/lamarzocco/config_flow.py:96
Integration: lamarzocco (documentation, issues)
First occurred: 16:44:37 (1 occurrences)
Last logged: 16:44:37

Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/aiohttp/web_protocol.py", line 422, in _handle_request
    resp = await self._request_handler(request)
  File "/usr/local/lib/python3.9/site-packages/aiohttp/web_app.py", line 499, in _handle
    resp = await handler(request)
  File "/usr/local/lib/python3.9/site-packages/aiohttp/web_middlewares.py", line 119, in impl
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 60, in security_filter_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 220, in forwarded_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 24, in request_context_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 138, in auth_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 135, in handle
    result = await result
  File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 130, in post
    return await super().post(request)
  File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 62, in wrapper
    result = await method(view, request, *args, **kwargs)
  File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 71, in post
    result = await self._flow_mgr.async_init(
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 197, in async_init
    flow, result = await task
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 215, in _async_init
    flow = await self.async_create_flow(handler, context=context, data=data)
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 709, in async_create_flow
    integration.get_platform("config_flow")
  File "/usr/src/homeassistant/homeassistant/loader.py", line 530, in get_platform
    cache[full_name] = self._import_platform(platform_name)
  File "/usr/src/homeassistant/homeassistant/loader.py", line 535, in _import_platform
    return importlib.import_module(f"{self.pkg_path}.{platform_name}")
  File "/usr/local/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 850, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/config/custom_components/lamarzocco/config_flow.py", line 61, in <module>
    class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
  File "/config/custom_components/lamarzocco/config_flow.py", line 96, in ConfigFlow
    self, discovery_info: zeroconf.ZeroconfServiceInfo
AttributeError: module 'homeassistant.components.zeroconf' has no attribute 'ZeroconfServiceInfo'

Hmm, yeah it looks like the commit to add that was in Nov and I don’t how to do it in a backward compatible way. Looks like I was too hasty pushing that out and I’ll have to take another look tomorrow.

For what it’s worth, Paulus just did a PR to eliminate the crash that spawned this whole thing, so there’s less urgency to make any changes.

Thanks for testing, and sorry for the inconvenience!

I released v0.8.0 earlier today as a pre-release, and it works for me on 2021.11.5 and 2021.12.0b0. You’ll get a warning about the zeroconf DataClass access, but there’s a 6-month deprecation period and it’ll work fine. With Handle invalid device registry entry type by balloob · Pull Request #60966 · home-assistant/core · GitHub, you could even stay on v0.7.8 when upgrading to 2021.12.

Hi Rob

I’m on v0.7.6 and still on 2021.10.6

Everything works fine since the last issue I had.

Should I still update? I just don’t want anything to break

Yes, I recommend updating HA and this integration to the latest.

Thanks. I’m not very technical and I apologize in advance for these noob questions.

Do I update the integration first then HA ?
What about HACS?

Update the integration through HACS to v0.8 and then update HA to 2021.12.6.

Hi All,

This is probably more a templating question than a LM specific issue, but I thought others might also like a similar notification when coffee machine is at temperature you’ve specified.

Thus far not working until my 10 minute timeout; I trigger an automation when the machine turns on and I’m trying to use a wait trigger to wait until boiler temp is >= target temp…any ideas getting the below working? Or any better solutions to the problem?

I think the issue is how I’m trying to get the state attribute and compare it’s value as greater than or equal to another attribute. All the state_attr examples I can find are more like a boolean is a value, like

is_state_attr(‘water_heater.linea_mini_coffee’, ‘93’)

Current automation yaml:

- id: '1636944805816'
  alias: Coffee Machine at Temp
  description: ''
  trigger:
  - platform: state
    entity_id: switch.linea_mini_main
    to: 'on'
  condition: []
  action:
  - wait_for_trigger:
    - platform: template
      value_template: '{{ is_state_attr(''water_heater.linea_mini_coffee >= water_heater.linea_mini_coffee.temperature'')
        }}'
    timeout: 00:10:00
  - service: notify.mobile_app_ken_s_pixel_5
    data:
      title: Espresso Ready
      message: Boiler has reached 93
  - service: tts.google_translate_say
    data:
      entity_id: media_player.kitchen_display
      message: Espresso Ready
  mode: parallel
  max: 10

There are several problems there. I recommend spending a bit of time reading this. This is more like what you want:

  - wait_for_trigger:
    - platform: template
      value_template: '{{ states("water_heater.linea_mini_coffee")|float >= state_attr("water_heater.linea_mini_coffee", "temperature")|float }}'
    timeout: "00:10:00"
1 Like

Thanks @rccoleman - Was able to get it to work with that and thanks for link to that doc. Have learned a few things about templating that I didn’t understand prior.

@rccoleman great work!

Whenever the pump is running, either for espresso or flushing, I get a constant stream of these:

Z (whoa)

I’m interested in this stream to build my own shot timer. I checked your lmdirect repo but couldn’t find out, how to get it (I can get communication running, get status and so on, but I’m no pro in this low level communcation). Is there a way to detect, whether the pump is running with your provided code?

The library currently only stays connected to do periodic polling and receive the responses, so it won’t reliably receive these unsolicited messages. It would need to stay connected all the time to see the whole Z sequence, and without that I don’t know how you’d get real time feedback and the pump starting and stopping.

Hi, when I try to configure the La Marzocco Expresso integration I get a “Unknown Error” message. I use the Client ID 4_2d2impykbv0g44oc88kogw000s8wgwwgws80ccowkcg0wk8o8w and Client Secret 1m52x65srmysk4owk0ww4ok84sw484ww0gsoo0kc0gs4gcwkko, plus my Username and Password. I have the Linea Mini. Running HA on a dedicated Raspberry Pi 4.

What does the HA log say?

hmm, I checked the logbook right after attempting to Configure just now, no entries. There are entries for a Fan, but not sure what that is about. BTW, I am very new to HA, HACS, etc. Thanks for the help!