Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Login Error #15

Closed
shanespringer opened this issue Apr 8, 2023 · 6 comments
Closed

Login Error #15

shanespringer opened this issue Apr 8, 2023 · 6 comments

Comments

@shanespringer
Copy link

Getting a blocking error on this integration causing it to fail.

I'm curious if using a gmail alias is something your codebase supports? Bolded below is the correct email that I signed up with and use in the Haier app, but I know it sometimes freaks out other things

This error originated from a custom integration.

Logger: homeassistant.config_entries
Source: custom_components/hon/init.py:32
Integration: Haier hOn (documentation, issues)
First occurred: 2:03:07 PM (2 occurrences)
Last logged: 2:03:28 PM

Error setting up entry XXXXX+XXXXXXX@gmail.com for hon
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 383, in async_setup
result = await component.async_setup_entry(hass, self)
File "/config/custom_components/hon/init.py", line 32, in async_setup_entry
await hon.setup()
File "/usr/local/lib/python3.10/site-packages/pyhon/api.py", line 54, in setup
headers=await self._headers) as resp:
File "/usr/local/lib/python3.10/site-packages/pyhon/api.py", line 44, in _headers
if await auth.authorize(self._email, self._password, self._mobile_id):
File "/usr/local/lib/python3.10/site-packages/pyhon/auth.py", line 142, in authorize
if not (url := await self._login(session, email, password, fw_uid, loaded, login_url)):
File "/usr/local/lib/python3.10/site-packages/pyhon/auth.py", line 104, in _login
return (await response.json())["events"][0]["attributes"]["values"]["url"]
KeyError: 'events'

@tempus2016
Copy link

#11

#11 (comment)

@Andre0512
Copy link
Owner

Hey, can you test if v0.5.0-beta.4 also works for you? The "+" and all other special characters in mail or passwords would be encoded and shouldn't be a problem.

@shanespringer
Copy link
Author

apologies @Andre0512 , I think I might be an idiot. the beta version didn't resolve the issue, but I think I was also conflating the smartHQ app and the hOn app. i'm guessing this is the source of the failure as smartHQ is available in my region and hOn is not. please feel free to reopen if that isn't the problem, but i'm going to go ahead and close this before shamefully hanging my head :)

@Andre0512
Copy link
Owner

No problem, this is really confusing with all these apps. There is hOn, haier u+, simply-fi, wizard, smartHQ... they have some compatibilities with each other, but I have not yet understood the exact connections 😃

@shanespringer
Copy link
Author

It’s a crappy boat, but the company is good

@Andre0512
Copy link
Owner

Hey, have a look at #8, we really had a problem with special characters like the plus. 🙈
Maybe it wasn't the regional apps thing, would be interesting if you could try again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants