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

Error during setup #11

Closed
tempus2016 opened this issue Apr 2, 2023 · 15 comments
Closed

Error during setup #11

tempus2016 opened this issue Apr 2, 2023 · 15 comments

Comments

@tempus2016
Copy link

I receive this error every time I try to set up the integration.

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: 07:45:15 (3 occurrences) 
Last logged: 07:48:18

Error setting up entry xxx@live.co.uk 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 144, in authorize
    if not await self._get_token(session, url):
  File "/usr/local/lib/python3.10/site-packages/pyhon/auth.py", line 116, in _get_token
    async with session.get(url[0]) as resp:
  File "/usr/local/lib/python3.10/site-packages/aiohttp/client.py", line 1141, in __aenter__
    self._resp = await self._coro
  File "/usr/local/lib/python3.10/site-packages/aiohttp/client.py", line 508, in _request
    req = self._request_class(
  File "/usr/local/lib/python3.10/site-packages/aiohttp/client_reqrep.py", line 305, in __init__
    self.update_host(url)
  File "/usr/local/lib/python3.10/site-packages/aiohttp/client_reqrep.py", line 364, in update_host
    raise InvalidURL(url)
aiohttp.client_exceptions.InvalidURL: /SmartHome/_ui/system/security/ChangePassword?retURL=/SmartHome/setup/secur/RemoteAccessAuthorizationPage.apexp?source%3DCAAAAYdF3NxSMDAwMDAwMDAwMDAwMDAwAAAA8sbnEX8dpUqQX_4LLtIz8sY-PYEWuUNbA3FBywvLwODN1VBKZeyocPhtGmQg8nqwh13R0gNRNkWwfjETjavXdS4jzomsiVBxk5FYTymhGCPJ5r58wi7S2zKL-QbEIZmnRk3YPjx9NgxKtNCEKwJxFsjPtmUA9o66MXCOjTaBtPsSxlCVpCy1hOhll8YzFztNyPIk-0P2ARHhnecbF8vbr87UWC6STm4T7HAf9vUSV7g6db4aF0tJ_Bz6eRiHrF-SLKTbImHonDzZ_I8i0kLBgRPiwnJ4kspqMUqbMNVwtC_mvQpAcW0UHNtYfMnxo2LLKbl6H33cy2NZaahBO4_KxYBtlnkeL186bwBtRw5oNZT_OH5LwLI9B38TvA95u5UD10-aABP0nCE5lv8P2IIGtAhiyhXq4J5nk5MkE6bDVrPxezun71eWniUaR-VyxwSr7NXGNC2ealm7sV3eyGyQP8WdQOLI5bjkGWUe8UJAbTrmo5yXPfSJIgsU-DkzB-4yetUbrrBbTRIKjOnb9CXlhSn7XhvapaO2XTx15rVymeQw_S7MdKce51nqDSVxaZqgApn-u-04M76j6D67VJAyk5QS6K-6n_8zdSV38vLgWvA72M4WA5x-oBCSfAfzGUG2MgBWx7JLZj5YCc6Or9hCROctmHuqaJ2PoyScLgkw-CGRElEisHglBmZbvzX7DoeBEfRPjLw2jGC0ntlcNJ6Oxf8&fromFrontdoor=1&setupid=ChangePassword
@cddevlin6
Copy link

I am facing a similar issue! The integration had initially worked then stopped and I get that message in the logs.

@bokkoman
Copy link

bokkoman commented Apr 4, 2023

Same. After the username and password part. It just fails.

@Andre0512
Copy link
Owner

Andre0512 commented Apr 8, 2023

Hey, for some reason you are requested to change your password 🤔
Can someone test if the message also appears after you change the password via the app?
At the moment I don't know why you are redirected to this page or how to reproduce it...

@tempus2016
Copy link
Author

tempus2016 commented Apr 8, 2023

Hey, for some reason you are requested to change your password 🤔
Can someone test if the message also appears after you change the password via the app?
At the moment I don't know why you are redirected to this page or how to reproduce it...

I just tried. Still issues.

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: 11:08:11 (1 occurrences) 
Last logged: 11:08:11

Error setting up entry x 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'
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: 11:07:22 (3 occurrences) 
Last logged: 11:14:59

Error setting up entry j@live.co.uk 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 144, in authorize
    if not await self._get_token(session, url):
  File "/usr/local/lib/python3.10/site-packages/pyhon/auth.py", line 116, in _get_token
    async with session.get(url[0]) as resp:
  File "/usr/local/lib/python3.10/site-packages/aiohttp/client.py", line 1141, in __aenter__
    self._resp = await self._coro
  File "/usr/local/lib/python3.10/site-packages/aiohttp/client.py", line 508, in _request
    req = self._request_class(
  File "/usr/local/lib/python3.10/site-packages/aiohttp/client_reqrep.py", line 305, in __init__
    self.update_host(url)
  File "/usr/local/lib/python3.10/site-packages/aiohttp/client_reqrep.py", line 364, in update_host
    raise InvalidURL(url)
aiohttp.client_exceptions.InvalidURL: /SmartHome/setup/secur/RemoteAccessAuthorizationPage.apexp?source=CAAAAYdlfA8XMDAwMDAwMDAwMDAwMDAwAAAA8uApeUV7zmQH4QX2lPxnW-5eOgGjd1mJQpftDIe3RshfPzRWt1LWhbjjdW2ibc_A7BQknpQWywTXKdtvE_Btzckz0ksYGWfx8K0RhW8g29CiP4A_aSFABY7MrYrpglqR4DAq6Hn6wqdf-Xti0FjbGXRF_FJEvM8uNPTo1TOC2jMlS0ilxplUBPFl_MqSA8mHasXAGGC4G048IRHhTeF67oUwXtjlznpapJUl2FyrMbuvYLVthe4Jb60-LKHRYUPijW9RcUzA7ovq2PtBKYs32WzwCcVkfGvYXjoDanvXLzSaJg2B2mJQdREJ8ExdSZOX4xWY3ThN6SGAIDDilhIKcZYo4_PpFeV1o2mt2O9euPbZv42esApA9seZDhwI8S78eVtbvOLoswwXxlm29i-7XDbP5lOXSLtIYxbbGSOK_btUyqF20QY2NBjcfPm3VG2ka-iBsCg2x14y4X_7BKCwMT--EaqvXG4V4CXN93c6PhnaPAcuzdV9E7P47VgFI-oej_jL0BD1taIPy2orPm8Y6W4TlHkkviuq-sVbHJNASMYG4zEVAGBb42kSgfmSdYhlxzZV0aP9PCTD7vinThWOzGhJOSH0w7jwxq-hLI9VtMOvGLvQWVBKGs5guRqRWQXbiow6-T9Yk5COBkMCTHpkVGWjVjCzlhGC_FbtOQS219kaUMP_YGuIDuI8Azrf5Yv2pMFWVVew1mEHWPxcHDFm48M

@tempus2016 tempus2016 mentioned this issue Apr 9, 2023
@cddevlin6
Copy link

I can log in fine with the Gvigroux version but I only see 3 sensors. When I used your (Andre0512) integration initially, I could see all the sensors I would expect. It then stopped working after a couple of days. The official hOn app is now showing an issue for me too and not loading.

@Andre0512
Copy link
Owner

Hey @tempus2016, sorry I have no idea how this can happen. I have released a beta version v0.5.0-beta.1 with improved logging. Can you test it and send me the errors?
The version is installable via HACS if you allow beta versions.

@Andre0512
Copy link
Owner

@cddevlin6 so this integration works a few days for you and then starts failing with the exact error like @tempus2016?

The gvigroux login isn't implemented clean. Everyone is using his session, this couldn't be a solution 😃

I have also problems with the official hOn app at the moment, the new version seems to be broken. In the app store are tons of complaints and haier answers that they have a massive cloud platform outage 🤔

@bokkoman
Copy link

My official hOn app is working again.
There is a way to communicate directly with the washing/drying machine. But i haven't had success with that yet.

@Andre0512
Copy link
Owner

For me too, seems like they have fixed their problems 🙂
A direct connection would be nice, but I didn't find any open ports on my washing machine and when spoofing the traffic I can't find any direct communication.

@bokkoman
Copy link

For me too, seems like they have fixed their problems 🙂 A direct connection would be nice, but I didn't find any open ports on my washing machine and when spoofing the traffic I can't find any direct communication.

I was referring to this
https://github.com/ofalvai/home-assistant-candy

@Andre0512
Copy link
Owner

This is for a different app with a different protocol (simply-fi). It looks like some devices can be accessed with both protocols, but my machine and some other newer devices can only work with the hOn protocol, so I can't test that. Maybe it is the strategy of Haier to rely only on the hOn app in the future or the simply-fi protocol is only implemented for devices produced by candy, I don't know.
If you have more information or question about that, we better create a thread in the discussion section, because this issue was about an other topic 😅

@tempus2016
Copy link
Author

tempus2016 commented Apr 10, 2023

Hey @tempus2016, sorry I have no idea how this can happen. I have released a beta version v0.5.0-beta.1 with improved logging. Can you test it and send me the errors? The version is installable via HACS if you allow beta versions.

This error originated from a custom integration.

Logger: root
Source: custom_components/hon/__init__.py:31
Integration: Haier hOn (documentation, issues)
First occurred: 18:42:11 (2 occurrences)
Last logged: 18:42:53

Can't get login url - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <meta HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE"> </head> <body> <script>var tm=null;function lhdoredir(){tm&&(window.clearTimeout(tm),tm=null);window.location.replace?window.location.replace("/SmartHome/setup/secur/RemoteAccessAuthorizationPage.apexp?source=CAAAAYdxaS04MDAwMDAwMDAwMDAwMDAwAAAA8rRU8JRO6GbBz4MDVVRU8s9WBGHMEXkSdEA3KF7x-IoUryIQrIovntrjYmcOQULIVgctgtnvnGq40CQuG1rYHIi59DbEYOu80nYtpgV2nEFmq-03v7eLUQ2OEQCgGmL1R7nETduE8GbtA48mHsESdIxdY139mLEZjK7t8fheh0grFUbuYRx52BJAUxez87JU6Kyx_sVn7A4fkMyRo4CwAMg32RFNjc-zyMDsJZqye9-B2hB7DtrBe0qdKeZ0U2P9lI2SjzOwq9otT82LSj1z7ms1yXVu2D7fLeh1Hi5IIgVKbONwidfFctYhnxuDaki0jDZ4A9HmG0OkcTGHfkvp0susFQoC3mGD73UsEmZKpaCXsY_u779tUq6iXGpb10aoVWWegpx6tj_Etuyg_KYkw1lENoecyOBPfQZ8KrtgGKWch6UtWSR04Znqd65q5CQpO82ZFHSn4zpmHlOslwq2m3DjgjlE4cm3jm5244hp2aq94FxGXQVFaoFdQVHgd4QogmngLS_UMTw7UCvHQDqMYKDjUoA3ZFUdbbR-AYmeRA79PtHUNB9Li1ECPkLP5sPndp91DKKbHx-X0MhnL8bnI87K3hvvXQHFcYBCK5B1p9LyM1w6XFH6yYCOi1NB2TzvSUbuWiHGErr2Q8Wszpgyo-u86BxLmJIUkNEDubrIfCNEfaR5ivQs8Z024BHrMuaxRKEeXmm2tBlS2Q-HmLo0iSM"):window.location.href="/SmartHome/setup/secur/RemoteAccessAuthorizationPage.apexp?source=CAAAAYdxaS04MDAwMDAwMDAwMDAwMDAwAAAA8rRU8JRO6GbBz4MDVVRU8s9WBGHMEXkSdEA3KF7x-IoUryIQrIovntrjYmcOQULIVgctgtnvnGq40CQuG1rYHIi59DbEYOu80nYtpgV2nEFmq-03v7eLUQ2OEQCgGmL1R7nETduE8GbtA48mHsESdIxdY139mLEZjK7t8fheh0grFUbuYRx52BJAUxez87JU6Kyx_sVn7A4fkMyRo4CwAMg32RFNjc-zyMDsJZqye9-B2hB7DtrBe0qdKeZ0U2P9lI2SjzOwq9otT82LSj1z7ms1yXVu2D7fLeh1Hi5IIgVKbONwidfFctYhnxuDaki0jDZ4A9HmG0OkcTGHfkvp0susFQoC3mGD73UsEmZKpaCXsY_u779tUq6iXGpb10aoVWWegpx6tj_Etuyg_KYkw1lENoecyOBPfQZ8KrtgGKWch6UtWSR04Znqd65q5CQpO82ZFHSn4zpmHlOslwq2m3DjgjlE4cm3jm5244hp2aq94FxGXQVFaoFdQVHgd4QogmngLS_UMTw7UCvHQDqMYKDjUoA3ZFUdbbR-AYmeRA79PtHUNB9Li1ECPkLP5sPndp91DKKbHx-X0MhnL8bnI87K3hvvXQHFcYBCK5B1p9LyM1w6XFH6yYCOi1NB2TzvSUbuWiHGErr2Q8Wszpgyo-u86BxLmJIUkNEDubrIfCNEfaR5ivQs8Z024BHrMuaxRKEeXmm2tBlS2Q-HmLo0iSM"}window.setTimeout?tm=window.setTimeout(lhdoredir,1E3):lhdoredir();var SFDCSessionVars={"uid":"00568000001qgPW","server":"https:\/\/login.salesforce.com\/login\/sessionserver212.html","act":"t","inst":"https:\/\/he-accounts.force.com\/SmartHome","host":"login.salesforce.com","oid":"00DU0000000Lkcq","exp":1681155731000};SFDCSessionVars.callback=lhdoredir;</script><script src="/SmartHome/jslibrary/1635874030242/sfdc/SfdcSessionBase208.js"></script><script> if(window.localStorage && window.localStorage.setItem) { window.localStorage.setItem('logoutUrl', ''); } </script><noscript> You do not have Javascript enabled. Javascript is required to use salesforce.com. Please enable Javascript, then click <a href="/SmartHome/setup/secur/RemoteAccessAuthorizationPage.apexp?source=CAAAAYdxaS04MDAwMDAwMDAwMDAwMDAwAAAA8rRU8JRO6GbBz4MDVVRU8s9WBGHMEXkSdEA3KF7x-IoUryIQrIovntrjYmcOQULIVgctgtnvnGq40CQuG1rYHIi59DbEYOu80nYtpgV2nEFmq-03v7eLUQ2OEQCgGmL1R7nETduE8GbtA48mHsESdIxdY139mLEZjK7t8fheh0grFUbuYRx52BJAUxez87JU6Kyx_sVn7A4fkMyRo4CwAMg32RFNjc-zyMDsJZqye9-B2hB7DtrBe0qdKeZ0U2P9lI2SjzOwq9otT82LSj1z7ms1yXVu2D7fLeh1Hi5IIgVKbONwidfFctYhnxuDaki0jDZ4A9HmG0OkcTGHfkvp0susFQoC3mGD73UsEmZKpaCXsY_u779tUq6iXGpb10aoVWWegpx6tj_Etuyg_KYkw1lENoecyOBPfQZ8KrtgGKWch6UtWSR04Znqd65q5CQpO82ZFHSn4zpmHlOslwq2m3DjgjlE4cm3jm5244hp2aq94FxGXQVFaoFdQVHgd4QogmngLS_UMTw7UCvHQDqMYKDjUoA3ZFUdbbR-AYmeRA79PtHUNB9Li1ECPkLP5sPndp91DKKbHx-X0MhnL8bnI87K3hvvXQHFcYBCK5B1p9LyM1w6XFH6yYCOi1NB2TzvSUbuWiHGErr2Q8Wszpgyo-u86BxLmJIUkNEDubrIfCNEfaR5ivQs8Z024BHrMuaxRKEeXmm2tBlS2Q-HmLo0iSM">here</a> to continue. </noscript> <!-- service is in read write mode --> </body> </html>
Can't get login url - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <meta HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE"> </head> <body> <script>var tm=null;function lhdoredir(){tm&&(window.clearTimeout(tm),tm=null);window.location.replace?window.location.replace("/SmartHome/setup/secur/RemoteAccessAuthorizationPage.apexp?source=CAAAAYdxac3eMDAwMDAwMDAwMDAwMDAwAAAA8rwM7f5_tembex0UYBkXQ_sSdJ7QwVW_CHVcskzITOEcHHPsHX1JQ0Lsyv6Ce5El6JE--kAagdBmGOM26F6vBNl9XOk8AOIUrAguv5YAzVxUcwd6TmMRcE6ybv_zzSfWj9yQltiaFtyYPmjktkcTnfe4hDt5xutWn2iLxR-oUFepui7jJSTcPvxHduKv1Rl17CesEvw8qX0kfvAZg2uKynaBUmZjul1HFIAn2iZKOM0Gz1tif50THZaUabFNIPCGrBS1a4O2kAjQs6PXrsWDZuZLwA8iXq4QrZtCWizC_2iG_34ytx89uJRCiAg9Vm9gcIQWcEuXycY6G-2Ovfp2ZrWIwQ4qf12e1FV6GYnzJDyixXXSPgbq79w_9_fv8l9JF25MOMCZGnfNc65oMQWpusvsIznNeWc7KGJlUZtNXWSbQJogGZfoYP-LVsXbgz_MeY4W7o-G2AogjjCN64JM8h-9pOg4KIWzXNcp1psUIV7BCkt8ebQFQm47-5kPCyV4CXfx90-RK7lYrH1ksbdjdjf4f8D3aic3kw7unPtwLuAozU6_guWQBLEI90gcO_bAPdQZl4E63x7SKggR8a7-fy51PbtN_9RZw8F9H9Ra6gC-GB8png3m05FqKSOMtCvYf04U52fVP1tzF--xts2g1ddO3eXJC6wEy9DIGtpx-04M1szjovtQQDu28lj9Cu9Vn0FcLQr5KZ1xQB-0r6UobL8"):window.location.href="/SmartHome/setup/secur/RemoteAccessAuthorizationPage.apexp?source=CAAAAYdxac3eMDAwMDAwMDAwMDAwMDAwAAAA8rwM7f5_tembex0UYBkXQ_sSdJ7QwVW_CHVcskzITOEcHHPsHX1JQ0Lsyv6Ce5El6JE--kAagdBmGOM26F6vBNl9XOk8AOIUrAguv5YAzVxUcwd6TmMRcE6ybv_zzSfWj9yQltiaFtyYPmjktkcTnfe4hDt5xutWn2iLxR-oUFepui7jJSTcPvxHduKv1Rl17CesEvw8qX0kfvAZg2uKynaBUmZjul1HFIAn2iZKOM0Gz1tif50THZaUabFNIPCGrBS1a4O2kAjQs6PXrsWDZuZLwA8iXq4QrZtCWizC_2iG_34ytx89uJRCiAg9Vm9gcIQWcEuXycY6G-2Ovfp2ZrWIwQ4qf12e1FV6GYnzJDyixXXSPgbq79w_9_fv8l9JF25MOMCZGnfNc65oMQWpusvsIznNeWc7KGJlUZtNXWSbQJogGZfoYP-LVsXbgz_MeY4W7o-G2AogjjCN64JM8h-9pOg4KIWzXNcp1psUIV7BCkt8ebQFQm47-5kPCyV4CXfx90-RK7lYrH1ksbdjdjf4f8D3aic3kw7unPtwLuAozU6_guWQBLEI90gcO_bAPdQZl4E63x7SKggR8a7-fy51PbtN_9RZw8F9H9Ra6gC-GB8png3m05FqKSOMtCvYf04U52fVP1tzF--xts2g1ddO3eXJC6wEy9DIGtpx-04M1szjovtQQDu28lj9Cu9Vn0FcLQr5KZ1xQB-0r6UobL8"}window.setTimeout?tm=window.setTimeout(lhdoredir,1E3):lhdoredir();var SFDCSessionVars={"uid":"00568000001qgPW","server":"https:\/\/login.salesforce.com\/login\/sessionserver212.html","act":"t","inst":"https:\/\/he-accounts.force.com\/SmartHome","host":"login.salesforce.com","oid":"00DU0000000Lkcq","exp":1681155773000};SFDCSessionVars.callback=lhdoredir;</script><script src="/SmartHome/jslibrary/1635874030242/sfdc/SfdcSessionBase208.js"></script><script> if(window.localStorage && window.localStorage.setItem) { window.localStorage.setItem('logoutUrl', ''); } </script><noscript> You do not have Javascript enabled. Javascript is required to use salesforce.com. Please enable Javascript, then click <a href="/SmartHome/setup/secur/RemoteAccessAuthorizationPage.apexp?source=CAAAAYdxac3eMDAwMDAwMDAwMDAwMDAwAAAA8rwM7f5_tembex0UYBkXQ_sSdJ7QwVW_CHVcskzITOEcHHPsHX1JQ0Lsyv6Ce5El6JE--kAagdBmGOM26F6vBNl9XOk8AOIUrAguv5YAzVxUcwd6TmMRcE6ybv_zzSfWj9yQltiaFtyYPmjktkcTnfe4hDt5xutWn2iLxR-oUFepui7jJSTcPvxHduKv1Rl17CesEvw8qX0kfvAZg2uKynaBUmZjul1HFIAn2iZKOM0Gz1tif50THZaUabFNIPCGrBS1a4O2kAjQs6PXrsWDZuZLwA8iXq4QrZtCWizC_2iG_34ytx89uJRCiAg9Vm9gcIQWcEuXycY6G-2Ovfp2ZrWIwQ4qf12e1FV6GYnzJDyixXXSPgbq79w_9_fv8l9JF25MOMCZGnfNc65oMQWpusvsIznNeWc7KGJlUZtNXWSbQJogGZfoYP-LVsXbgz_MeY4W7o-G2AogjjCN64JM8h-9pOg4KIWzXNcp1psUIV7BCkt8ebQFQm47-5kPCyV4CXfx90-RK7lYrH1ksbdjdjf4f8D3aic3kw7unPtwLuAozU6_guWQBLEI90gcO_bAPdQZl4E63x7SKggR8a7-fy51PbtN_9RZw8F9H9Ra6gC-GB8png3m05FqKSOMtCvYf04U52fVP1tzF--xts2g1ddO3eXJC6wEy9DIGtpx-04M1szjovtQQDu28lj9Cu9Vn0FcLQr5KZ1xQB-0r6UobL8">here</a> to continue. </noscript> <!-- service is in read write mode --> </body> </html>
This error originated from a custom integration.

Logger: homeassistant.config_entries
Source: custom_components/hon/__init__.py:31
Integration: Haier hOn (documentation, issues)
First occurred: 18:42:11 (2 occurrences)
Last logged: 18:42:53

Error setting up entry x 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 31, in async_setup_entry
    hon = await Hon(entry.data["email"], entry.data["password"], session=session).create()
  File "/usr/local/lib/python3.10/site-packages/pyhon/hon.py", line 26, in create
    await self.setup()
  File "/usr/local/lib/python3.10/site-packages/pyhon/hon.py", line 34, in setup
    for appliance in (await self._api.load_appliances())["payload"]["appliances"]:
  File "/usr/local/lib/python3.10/site-packages/pyhon/connection/api.py", line 39, in load_appliances
    async with self._hon.get(f"{const.API_URL}/commands/v1/appliance") as resp:
  File "/usr/local/lib/python3.10/contextlib.py", line 199, in __aenter__
    return await anext(self.gen)
  File "/usr/local/lib/python3.10/site-packages/pyhon/connection/handler.py", line 34, in get
    async with self._intercept(self._session.get, *args, **kwargs) as response:
  File "/usr/local/lib/python3.10/contextlib.py", line 199, in __aenter__
    return await anext(self.gen)
  File "/usr/local/lib/python3.10/site-packages/pyhon/connection/handler.py", line 81, in _intercept
    kwargs["headers"] = await self._check_headers(kwargs.get("headers", {}))
  File "/usr/local/lib/python3.10/site-packages/pyhon/connection/handler.py", line 72, in _check_headers
    if await self._auth.authorize():
  File "/usr/local/lib/python3.10/site-packages/pyhon/connection/auth.py", line 170, in authorize
    if not await self._get_token(url):
  File "/usr/local/lib/python3.10/site-packages/pyhon/connection/auth.py", line 143, in _get_token
    raise PermissionError
PermissionError

Andre0512 added a commit that referenced this issue Apr 10, 2023
@Andre0512
Copy link
Owner

Nice, this are helpful information! Please try if it works with v0.5.0-beta.4

@tempus2016
Copy link
Author

Nice, this are helpful information! Please try if it works with v0.5.0-beta.4

Looks like that's it working.
Screenshot 2023-04-10 at 19 52 04

@Andre0512
Copy link
Owner

Thank you! 👍 🎉

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

4 participants