schmittx/home-assistant-eero

config_flow error setting up/login eero account v1.2.1 - HAOS 9.5 - HA 2023.4.2

Closed this issue · 4 comments

Hi,
I'm encountering an error trying to setup home-assistant-eero integration.
If I enter my phone number... I don't get a text and nothing happens (included country code).
If I enter my email, I get an error.

image

home-assistant-eero=v1.2.1 (installed via HACS)
HAOS=9.5
HA=2023.4.2
eeroOS=v6.14.0-4275
Running on Proxmox on a NUC.

Here is what I see in the logs:

2023-05-10 14:30:26.763 ERROR (MainThread) [custom_components.eero.config_flow] Status: 401, Error Message: error.login.unknown
2023-05-10 14:30:26.763 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/aiohttp/web_protocol.py", line 433, in _handle_request
    resp = await request_handler(request)
  File "/usr/local/lib/python3.10/site-packages/aiohttp/web_app.py", line 504, in _handle
    resp = await handler(request)
  File "/usr/local/lib/python3.10/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 85, in security_filter_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 100, 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 80, in ban_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 235, in auth_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 146, in handle
    result = await result
  File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 180, in post
    return await super().post(request, flow_id)
  File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 72, in wrapper
    result = await method(view, request, data, *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 271, in async_configure
    result = await self._async_handle_step(
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 367, in _async_handle_step
    result: FlowResult = await getattr(flow, method)(user_input)
  File "/config/custom_components/eero/config_flow.py", line 77, in async_step_user
    self.user_input[CONF_USER_TOKEN] = self.response["user_token"]
TypeError: 'NoneType' object is not subscriptable

I took a peek at the code and added a logger line to confirm it's receiving my input...

image

I personally use my US-based phone number to login so that's the only method I can directly confirm.

From your logs, it seems like it doesn't recognize your email address:
ERROR (MainThread) [custom_components.eero.config_flow] Status: 401, Error Message: error.login.unknown

Maybe someone else on here can confirm the email method works? That would help narrow it down a bit.

Thanks for quick reply. I can confirm my email is correct... And Amazon account since 2006 on same email. (and same phone number)
I did try phone number in format: "CAAANNNNNNN" (where C=country code, AAA=area code, NNNNNNN=number)
I see the prompt message Enter the verification code that was sent to however, I don't receive anything. (checked erro app & amazon app, too) No messages in the logs.

I can edit the code and add a logger message anywhere... is there a file/function/line you think will help debug the issue?

Hmm, what do you use to sign into the Eero app? Your email I assume? And to confirm, you're not using the sign-in via Amazon method, correct?

I had no clue what you meant by sign-in via Amazon method... so I logged out and tried to log in again...
I guess I did choose the Sign in with Amazon method when I setup eero :(
Now, the NOTES in the README makes sense.

I did get it working. Thanks. I'll add some steps below for the next person searching.

Create a new Eero account (not linked to Amazon) then, give it admin access to current account.

  • Sign out on eero app.
  • Click New to eero? then click Continue with email or phone. Then, sign out.
  • Sign in original account (Amazon sign in method)
  • Add admin to account.
    • Go to settings -> network users -> Invite an admin -> email yourself the share link
  • Sign out of original account and sign in new account. Open admin invite link and accept.
  • Sign in your original account.
  • Use the dummy account you just created to setup this eero integration.