magico13 / ha-emporia-vue

Home Assistant Integration for Emporia Vue Energy Monitor
MIT License
500 stars 67 forks source link

UserNotFound at the installation process #276

Closed OlivierBY closed 7 months ago

OlivierBY commented 7 months ago

Hi,

At the Installation step I had the error below. On the Emporia Vue my login is a Google Account : That is the issue ?

Traceback (most recent call last): File "/config/custom_components/emporia_vue/config_flow.py", line 76, in async_step_user info = await validate_input(self.hass, user_input) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/emporia_vue/config_flow.py", line 47, in validate_input if not await hub.authenticate(data[CONF_EMAIL], data[CONF_PASSWORD]): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/emporia_vue/config_flow.py", line 37, in authenticate result = await loop.run_in_executor(None, self.vue.login, username, password) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/pyemvue/pyemvue.py", line 355, in login self.auth = Auth( ^^^^^ File "/usr/local/lib/python3.12/site-packages/pyemvue/auth.py", line 57, in init self.cognito.authenticate(password=password) File "/usr/local/lib/python3.12/site-packages/pycognito/init.py", line 478, in authenticate :param client_metadata: Metadata you can provide for custom workflows that RespondToAuthChallenge triggers. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/pycognito/aws_srp.py", line 269, in authenticate_user hkdf = compute_hkdf( ^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/botocore/client.py", line 553, in _api_call return self._make_api_call(operation_name, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/botocore/client.py", line 1009, in _make_api_call raise error_class(parsed_response, operation_name) botocore.errorfactory.UserNotFoundException: An error occurred (UserNotFoundException) when calling the InitiateAuth operation: User does not exist.

DabblerIOT commented 7 months ago

It could be. You can give others access to your account. Try making an emporia account with your email, and then give access to your new emporia account the devices from the account via the google login. I'm 90% sure that emporia vue only connects to the emporia users via Amazon incognito. (work around for now, but could get you going fast).

OlivierBY commented 7 months ago

That's a great idea. I'm on holydays right now. I will try this next week and i'll give you a feedback.

magico13 commented 7 months ago

The other thing to try is just making an Emporia account with the same email. I set mine up the opposite way, creating an account first and then trying Google, and both get me into my account.

Looks like that worked for someone else as well: https://github.com/magico13/PyEmVue/issues/78

OlivierBY commented 7 months ago

Yes, juste creating a new account with the same email as my Google account and get intro my account and acces to my services.

Thanks you all for your help.