zweckj / lamarzocco

Interact with your La Marzocco espresso machine
55 stars 2 forks source link

Latest update added features in `weeklySchedulingConfig` which breaks HA #36

Closed mrvautin closed 7 months ago

mrvautin commented 7 months ago

@zweckj It seems the latest ios App, gateway and/or machine firmware has added some new features which has broken the implementation.

Machine: Linea Mini (OG version) Gateway: v3.4-RC5 Machine Firmware: 2.12

2024-03-20 13:35:32.829 DEBUG (MainThread) [custom_components.lamarzocco.coordinator] Finished fetching lamarzocco data in 0.103 seconds (success: False)
2024-03-20 13:35:38.132 DEBUG (MainThread) [custom_components.lamarzocco.coordinator] Initializing local API
2024-03-20 13:35:38.132 DEBUG (MainThread) [custom_components.lamarzocco.coordinator] Init WebSocket in background task
2024-03-20 13:35:38.345 ERROR (MainThread) [custom_components.lamarzocco.coordinator] Unexpected error fetching lamarzocco data: 'weeklySchedulingConfig'
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 318, in _async_refresh
    self.data = await self._async_update_data()
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/lamarzocco/coordinator.py", line 107, in _async_update_data
    await self._async_handle_request(self.device.get_config)
  File "/config/custom_components/lamarzocco/coordinator.py", line 129, in _async_handle_request
    await func()
  File "/usr/local/lib/python3.12/site-packages/lmcloud/lm_device.py", line 119, in get_config
    self.parse_config(raw_config)
  File "/usr/local/lib/python3.12/site-packages/lmcloud/lm_machine.py", line 137, in parse_config
    raw_config["weeklySchedulingConfig"]
    ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'weeklySchedulingConfig'
2024-03-20 13:35:38.351 DEBUG (MainThread) [custom_components.lamarzocco.coordinator] Finished fetching lamarzocco data in 0.218 seconds (success: False)

Update: On reading logs properly, this is an issue with the lmcloud repo, not this one but issue remains.

zweckj commented 7 months ago

lmcloud is the backing library. I need to find some time to map out the changes they made to their API

zweckj commented 7 months ago

latest preview is working with the updated firmware - the new features are not added yet

mrvautin commented 7 months ago

Awesome. Can confirm it's working again. I don't use the scheduling. Thanks.