rccoleman / lamarzocco

Interact with your La Marzocco espresso machine
59 stars 5 forks source link

Exception setting up new integration #27

Closed gmathur closed 2 years ago

gmathur commented 2 years ago

Hi there - firstly thanks for creating this. Super excited to give this a whirl with my LM.

I followed your steps and have the client id, secret, username & password but when I try and configure the integration with them I run into the following exception. I am attaching my installation info below the error -- any help debugging would be much appreciated!

This error originated from a custom integration.

Logger: aiohttp.server Source: custom_components/lamarzocco/config_flow.py:50 Integration: La Marzocco (documentation, issues) First occurred: 10:05:14 PM (1 occurrences) Last logged: 10:05:14 PM

Error handling request Traceback (most recent call last): File "/config/custom_components/lamarzocco/config_flow.py", line 48, in validate_input raise CannotConnect custom_components.lamarzocco.config_flow.CannotConnect

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/local/lib/python3.9/site-packages/aiohttp/web_protocol.py", line 435, in _handle_request resp = await request_handler(request) File "/usr/local/lib/python3.9/site-packages/aiohttp/web_app.py", line 504, in _handle resp = await handler(request) File "/usr/local/lib/python3.9/site-packages/aiohttp/web_middlewares.py", line 117, 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 98, in forwarded_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 28, in request_context_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 78, in ban_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 181, in auth_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 137, in handle result = await result File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 157, in post return await super().post(request, flow_id) 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 110, in post result = await self._flow_mgr.async_configure(flow_id, data) File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 252, in async_configure result = await self._async_handle_step(flow, cur_step["step_id"], user_input) File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 325, in _async_handle_step result: FlowResult = await getattr(flow, method)(user_input) File "/config/custom_components/lamarzocco/config_flow.py", line 135, in async_step_confirm return await self._try_create_entry(data) File "/config/custom_components/lamarzocco/config_flow.py", line 67, in _try_create_entry machine_info = await validate_input(self.hass, data) File "/config/custom_components/lamarzocco/config_flow.py", line 50, in validate_input except LaMarzocco.AuthFail: AttributeError: type object 'LaMarzocco' has no attribute 'AuthFail'


System Health

version core-2021.12.10
installation_type Home Assistant OS
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.9.7
os_name Linux
os_version 5.10.88
arch aarch64
timezone America/Los_Angeles
Home Assistant Community Store GitHub API | ok -- | -- Github API Calls Remaining | 5000 Installed Version | 1.19.3 Stage | running Available Repositories | 942 Downloaded Repositories | 3
Home Assistant Cloud logged_in | true -- | -- subscription_expiration | February 17, 2022, 4:00 PM relayer_connected | true remote_enabled | true remote_connected | true alexa_enabled | true google_enabled | true remote_server | us-west-2-1.ui.nabu.casa can_reach_cert_server | ok can_reach_cloud_auth | ok can_reach_cloud | ok
Home Assistant Supervisor host_os | Home Assistant OS 7.1 -- | -- update_channel | stable supervisor_version | supervisor-2021.12.2 docker_version | 20.10.9 disk_total | 113.9 GB disk_used | 7.3 GB healthy | true supported | true board | odroid-n2 supervisor_api | ok version_api | ok installed_addons | Terminal & SSH (9.3.0), Let's Encrypt (4.12.0), AirSonos (3.2.1), Ring-MQTT with Video Streaming (4.9.0), Mosquitto broker (6.0.1), File editor (5.3.3)
Lovelace dashboards | 2 -- | -- resources | 0 views | 1 mode | storage
Spotify api_endpoint_reachable | ok -- | --
rccoleman commented 2 years ago

It looks like I could handle that better, but I think it's having trouble connecting to the LM gateway. Does the La Marzocco mobile app work on your network?

Or the username/password/client_id/client_secret aren't accepted.

gmathur commented 2 years ago

Yeah no issues with the app - it’s working as expected.

Is there something I can run to try logging in to the gateway directly and get you those logs?

gmathur commented 2 years ago

You know what... I just tried again and everything just seemed to work ¯_(ツ)_/¯

Thanks for the help!