magico13 / ha-emporia-vue

Home Assistant Integration for Emporia Vue Energy Monitor
MIT License
453 stars 61 forks source link

Sign In With Google #279

Open lboucher26 opened 1 month ago

lboucher26 commented 1 month ago

Hi All

When i made my account on the app i hit sign in with Google.

Now when i try to do the configuration i get an unexpected error... I did try my password for google. No dice.

Do i need to make a new account and NOT sign in with google?

Thanks

Screenshot 2024-05-12 182432 image

magico13 commented 1 month ago

If you create an Emporia account with the same email then you can use the password for the Emporia account with Home Assistant, but can use either method to log into the app. The "two" accounts will be linked so you won't have to set anything up again.

lboucher26 commented 1 month ago

Thanks, unfortunately no dice... I did fully restart HA system...

Here is what the log says This error originated from a custom integration.

My username on emporia community is lboucher26 and email @.*** I can login online just fine, and the app works fine. I have update HA to the latest..

Thanks alot for responding and appreciate the work on integrating this to HA.

Logger: custom_components.emporia_vue.config_flow Source: custom_components/emporia_vue/config_flow.py:76 integration: Emporia Vue (documentation, issues) First occurred: 7:42:26 PM (1 occurrences) Last logged: 7:42:26 PM

Unexpected exception 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 490, in authenticate tokens = aws.authenticate_user(client_metadata=client_metadata) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/pycognito/aws_srp.py", line 389, in authenticate_user response = boto_client.initiate_auth( ^^^^^^^^^^^^^^^^^^^^^^^^^^ 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.

On Sun, May 12, 2024 at 6:50 PM Mike Marvin @.***> wrote:

If you create an Emporia account with the same email then you can use the password for the Emporia account with Home Assistant, but can use either method to log into the app. The "two" accounts will be linked so you won't have to set anything up again.

— Reply to this email directly, view it on GitHub https://github.com/magico13/ha-emporia-vue/issues/279#issuecomment-2106399335, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACV54Y2THF52BEET3SUM5YDZB7W3PAVCNFSM6AAAAABHTE2CMGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMBWGM4TSMZTGU . You are receiving this because you authored the thread.Message ID: @.***>

-- Lucas Boucher

magico13 commented 1 month ago

Are you able to log into the app via the "Sign in with Email" option? The Emporia community uses a different login than the app, so if you can't login to the app with your email then that's where you should create an account.

lboucher26 commented 1 month ago

Tried that.. Didn't work. Tried resetting password which didn't work... It said if I created account with Google login I cannot reset password...

So I tried making a new account with exact same email. That seemed to work. Surprised it let me make account with same email address.

Now HA works.

Thanks

On Mon, May 13, 2024 at 9:21 AM Mike Marvin @.***> wrote:

Are you able to log into the app via the "Sign in with Email" option? The Emporia community uses a different login than the app, so if you can't login to the app with your email then that's where you should create an account.

— Reply to this email directly, view it on GitHub https://github.com/magico13/ha-emporia-vue/issues/279#issuecomment-2107564363, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACV54Y6CCHG2EDQS7DIUESTZCC44NAVCNFSM6AAAAABHTE2CMGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMBXGU3DIMZWGM . You are receiving this because you authored the thread.Message ID: @.***>

TagCdog commented 1 month ago

I am having the same problem. I must have created my app account using "Sign in with Google". I cannot use "Sign in with Email" as it says to use "Sign in with Google" instead. I tried making a new account with the same email and password, but it does not let me saying, "An account with the given email already exists."

Edit: I tried sharing my Emporia devices with a secondary email and logging in with that. It tried to set itself up, but ultimately triggered an "Unexpected Error".

Edit 2: I resolved this by using Forgot My Password and resetting it. Both Email and Google sign in work now.