Comments (15)
from hon.
Nice, you always need a restart if you install or update a custom integration via HACS.
With pleasure! I hope that too 😄
from hon.
Hey, sorry for late response 😅
How often does the problem occur? Can you still log in and use the integration normally?
from hon.
no the issue happens constantly and the integration does not work because of that, the mobile app works fine but this integration get's this issue constantly
from hon.
debug logging
2023-04-07 13:02:58.374 ERROR (MainThread) [root] Unable to login: 400
Illegal Request |
You have sent us an Illegal URL or an improperly formatted request. |
|
2023-04-07 13:02:58.401 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry hon@xxxxxxxxx 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 48, in _headers
raise PermissionError("Can't Login")
PermissionError: Can't Login
from hon.
This could be related to #11. Can you test if the fix in v0.5.0-beta.4
also solves your issue or gives a different error?
from hon.
still fails
Error setting up entry [email protected] 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(
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 76, in _check_headers
raise PermissionError("Can't Login")
and
Logger: pyhon.connection.auth
Source: custom_components/hon/init.py:31
Integration: Haier hOn (documentation, issues)
First occurred: 20:26:59 (1 occurrences)
Last logged: 20:26:59
Unable to login: 400
Illegal Request |
You have sent us an Illegal URL or an improperly formatted request. |
from hon.
Sorry I had implemented the error handling a bit messy, I can absolutely not localize where the problem occurs. I have now improved the error handling a bit and published a new beta, can you please test the latest version v0.5.0-beta.5
and send me the error message? I hope then I can say more about this 🙂
from hon.
Latest version
hOn Authentication Error 1 401 - https://he-accounts.force.com/SmartHome/setup/secur/RemoteAccessAuthorizationPage.apexp?source=CAAAAYd15NhvMDAwMDAwMDAwMDAwMDAwAAAA8rGLCzmMClXPcostjourJYsd41oGhfUUcorFGYXTPejXEpIoBY1mV7_agIwAp46riD2R-zAZuydLA8pB9ommqwBNQhN-yjXQs1J8BfNfS9-LAtZmJ5fAyq6FIUk6uXoGev_PVt1G6nrs-k-7kQxtCZ1waeV70gNYzIkEUzIoc6kYjFThRjreg_YI_jg9iP1tvTvpT1ZUNKu5vobK4wkjzyV5Z5bLVHM4avVOtl5FqqQoD7AqrHzGtVFZKhapuvZYIGDyGqHwmc3s99pQaoeFUrMqgjrX2XKWNX0MXLj5m5nltYfgdIruYqUHaX4tVzm4YlrpDt84CEE09Tif-VG0MeniHTAkOJwx-_mIAcU9PZ_jCvJm3dXkFwwZxXg5Kt7qeRsZeXsRb8l-9tMNnxgsUGLM3Ovkwxv4XpiFHl9oZGC7fe_hiN4n_AewGdHruvqHDbEZNDW2xLzy--ElnhnaSiu-uhMj5gQHYU7Scr81EGoDQ6nuQWfcJIqjd-BLccpdY1O-fH-M9ntXJU9LZ_di8-iB8RggULK5hXwyyTvRHOW_B3Nq0GwRaII7bf1tM1Pnv7iTqx9xIkkCxTVafqNh_6b6khEC9vEmJ9lvL8IsyfO5hfaUHiL0A0ObnshRLp2hKisfHZC26W4RmZ8LQc7ZU3AalVtIJrhsqhuJbUYROG2tUIOqMbyQ0_PuqBoqSDpQVtJ8Yh226mIlyHJMBh86TVU%3D&display=touch 2 302 - https://he-accounts.force.com/SmartHome/s/login?display=touch&ec=302&inst=68&startURL=/SmartHome/setup/secur/RemoteAccessAuthorizationPage.apexp?source%3DCAAAAYd15NhvMDAwMDAwMDAwMDAwMDAwAAAA8rGLCzmMClXPcostjourJYsd41oGhfUUcorFGYXTPejXEpIoBY1mV7_agIwAp46riD2R-zAZuydLA8pB9ommqwBNQhN-yjXQs1J8BfNfS9-LAtZmJ5fAyq6FIUk6uXoGev_PVt1G6nrs-k-7kQxtCZ1waeV70gNYzIkEUzIoc6kYjFThRjreg_YI_jg9iP1tvTvpT1ZUNKu5vobK4wkjzyV5Z5bLVHM4avVOtl5FqqQoD7AqrHzGtVFZKhapuvZYIGDyGqHwmc3s99pQaoeFUrMqgjrX2XKWNX0MXLj5m5nltYfgdIruYqUHaX4tVzm4YlrpDt84CEE09Tif-VG0MeniHTAkOJwx-_mIAcU9PZ_jCvJm3dXkFwwZxXg5Kt7qeRsZeXsRb8l-9tMNnxgsUGLM3Ovkwxv4XpiFHl9oZGC7fe_hiN4n_AewGdHruvqHDbEZNDW2xLzy--ElnhnaSiu-uhMj5gQHYU7Scr81EGoDQ6nuQWfcJIqjd-BLccpdY1O-fH-M9ntXJU9LZ_di8-iB8RggULK5hXwyyTvRHOW_B3Nq0GwRaII7bf1tM1Pnv7iTqx9xIkkCxTVafqNh_6b6khEC9vEmJ9lvL8IsyfO5hfaUHiL0A0ObnshRLp2hKisfHZC26W4RmZ8LQc7ZU3AalVtIJrhsqhuJbUYROG2tUIOqMbyQ0_PuqBoqSDpQVtJ8Yh226mIlyHJMBh86TVU%253D%26display%3Dtouch 3 301 - https://he-accounts.force.com/SmartHome/s/login/?display=touch&ec=302&inst=68&startURL=/SmartHome/setup/secur/RemoteAccessAuthorizationPage.apexp?source%3DCAAAAYd15NhvMDAwMDAwMDAwMDAwMDAwAAAA8rGLCzmMClXPcostjourJYsd41oGhfUUcorFGYXTPejXEpIoBY1mV7_agIwAp46riD2R-zAZuydLA8pB9ommqwBNQhN-yjXQs1J8BfNfS9-LAtZmJ5fAyq6FIUk6uXoGev_PVt1G6nrs-k-7kQxtCZ1waeV70gNYzIkEUzIoc6kYjFThRjreg_YI_jg9iP1tvTvpT1ZUNKu5vobK4wkjzyV5Z5bLVHM4avVOtl5FqqQoD7AqrHzGtVFZKhapuvZYIGDyGqHwmc3s99pQaoeFUrMqgjrX2XKWNX0MXLj5m5nltYfgdIruYqUHaX4tVzm4YlrpDt84CEE09Tif-VG0MeniHTAkOJwx-_mIAcU9PZ_jCvJm3dXkFwwZxXg5Kt7qeRsZeXsRb8l-9tMNnxgsUGLM3Ovkwxv4XpiFHl9oZGC7fe_hiN4n_AewGdHruvqHDbEZNDW2xLzy--ElnhnaSiu-uhMj5gQHYU7Scr81EGoDQ6nuQWfcJIqjd-BLccpdY1O-fH-M9ntXJU9LZ_di8-iB8RggULK5hXwyyTvRHOW_B3Nq0GwRaII7bf1tM1Pnv7iTqx9xIkkCxTVafqNh_6b6khEC9vEmJ9lvL8IsyfO5hfaUHiL0A0ObnshRLp2hKisfHZC26W4RmZ8LQc7ZU3AalVtIJrhsqhuJbUYROG2tUIOqMbyQ0_PuqBoqSDpQVtJ8Yh226mIlyHJMBh86TVU%253D%26display%3Dtouch 4 200 - https://he-accounts.force.com/SmartHome/s/login/?language=en_US&display=touch&ec=302&inst=68&startURL=%2FSmartHome%2Fsetup%2Fsecur%2FRemoteAccessAuthorizationPage.apexp%3Fsource%3DCAAAAYd15NhvMDAwMDAwMDAwMDAwMDAwAAAA8rGLCzmMClXPcostjourJYsd41oGhfUUcorFGYXTPejXEpIoBY1mV7_agIwAp46riD2R-zAZuydLA8pB9ommqwBNQhN-yjXQs1J8BfNfS9-LAtZmJ5fAyq6FIUk6uXoGev_PVt1G6nrs-k-7kQxtCZ1waeV70gNYzIkEUzIoc6kYjFThRjreg_YI_jg9iP1tvTvpT1ZUNKu5vobK4wkjzyV5Z5bLVHM4avVOtl5FqqQoD7AqrHzGtVFZKhapuvZYIGDyGqHwmc3s99pQaoeFUrMqgjrX2XKWNX0MXLj5m5nltYfgdIruYqUHaX4tVzm4YlrpDt84CEE09Tif-VG0MeniHTAkOJwx-_mIAcU9PZ_jCvJm3dXkFwwZxXg5Kt7qeRsZeXsRb8l-9tMNnxgsUGLM3Ovkwxv4XpiFHl9oZGC7fe_hiN4n_AewGdHruvqHDbEZNDW2xLzy--ElnhnaSiu-uhMj5gQHYU7Scr81EGoDQ6nuQWfcJIqjd-BLccpdY1O-fH-M9ntXJU9LZ_di8-iB8RggULK5hXwyyTvRHOW_B3Nq0GwRaII7bf1tM1Pnv7iTqx9xIkkCxTVafqNh_6b6khEC9vEmJ9lvL8IsyfO5hfaUHiL0A0ObnshRLp2hKisfHZC26W4RmZ8LQc7ZU3AalVtIJrhsqhuJbUYROG2tUIOqMbyQ0_PuqBoqSDpQVtJ8Yh226mIlyHJMBh86TVU%253D%26display%3Dtouch&System=IoT_Mobile_App&RegistrationSubChannel=hOn 5 400 - https://he-accounts.force.com/SmartHome/s/sfsites/aura?r=3&other.LightningLoginCustom.login=1 ERROR - 400 - https://he-accounts.force.com/SmartHome/s/sfsites/aura?r=3&other.LightningLoginCustom.login=1 =============== Response ===============
Illegal Request |
You have sent us an Illegal URL or an improperly formatted request. |
from hon.
I'm also facing this issue. Could this be a problem with illegal characters in the password field?
from hon.
It is possible depending on how badly they have written their api or if python is doing silly things
my password includes these characters lower case letters, upper case letters, numbers and %
from hon.
This was a good hint! That was the problem, my python code did do silly things 😃
I json decoded the data but didn't use url encoding.
I fixed it in new release version v0.5.0
, please test if you can login now.
from hon.
Hi,
I'm still receiving an error with the integration. I have uninstalled and reinstalled and even tried the beta version.
The following is the error I am getting in the log:
`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 April 2023 at 10:45:03 pm (4 occurrences)
Last logged: 6:57:20 pm
Error setting up entry [email protected] 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=CAAAAYd3bd4XMDAwMDAwMDAwMDAwMDAwAAAA8kcOnxVr6g47ysXKy_8XChFcO6DI_s5gsaOcJ_q2EXSgq_es7J1yTL6Q_JEnPi659KQLaVTasBfwZTtEZKXfPExld4Dt8mfAFRJ98JCzC2Axt_kJF2U5_5WXJ4bQXCx0zmYNOES33kkvCbAIrj1xlcac3DsaXXHu4-a7HnJxPs9XyFHxgMYUXeBgrUlSLlOxQ2_XdBfIi5QT4xcmODlwaryXlTu_ZT7fOsVwl-tgYNskPRBOzhkeVVj4vhqMwSJE6oCW7aW6AxB8ZlIFgFi-hr38nqg3VGpdJwb-bQvEXSKFOPmRuDNhc807i4fZ9pwIGgvl_hfXA5LduNqX8dlVEg8UMYUNk-vLM0kLmDsQ5MGjiOgCfMvQXqdcrzVe3F_gUz-pCRix1NfRJHWyzMKZTn3RqzSDrrhMxzHmPoFAhAnRxkAlDnmQufTpcqHt0vBr-n47mzWvXSv_lPkOsZoJOD-oMxDa22Esa5JjRJVdk9FjegKe3QPu4mHtysZLrPZu_ywrZGuM1MEPHqYn_WMUZhYWxUcFWb2e722zybZK7HVkf_BP1EgMYl-NWB3OD9Lb3KiDIlV_IVVYp0CsvdyBqypTjZ-qzVpZLfJOX0cFatpB2DZEAE_D60Da46YMFtfhYJumnmBww4FquCuWOvXoXlIoZDdYJAngk4JtTYU8sqNFfPLAjA406fH6tyzTqbMEI4xfko-yZNoLu9TGkkz6-uI
`
from hon.
Hi, which version do you use? I'm really sure this is from an older version before v0.5.x
🤔
Do you have restarted home assistant after installation?
from hon.
I tested it numerous times last night with no luck. After a restart and on the beta version it now seems to work. Again, appreciate your time in making this integration. Hopefully, things go smoothly from here.
from hon.
Related Issues (20)
- Some sensors not receive the correct values from certains AC machines
- Config flow could not be loaded: 500 Internal Server Error Server got itself in trouble HOT 2
- Setup not working with 0.9.1 and HA 7.3 HOT 8
- Possible conflict with plugin and mobile app - door lock error starting program HOT 1
- HWD80-B14979U1 HOT 1
- Error when adding account HOT 7
- Hoower hwash 550 energy consumption HOT 1
- Switch and Buzzer Entity unavailable DishWaser HOT 4
- Aie Conditioner Fan mode cannot be set to auto HOT 12
- automatically to off HOT 7
- Oven's configs don't show in 0.9 beta HOT 2
- Error setup entry [email protected] for hon HOT 1
- Spin 1600rpm not displayed for my Hoover Wash500 HOT 1
- Add Candy appliance: washing machine RO 1486DWMCT/1-S HOT 1
- Error sending actions to AC HOT 10
- Refrigerator HFW7819EWMP compatibility HOT 1
- It doesn't work as well as before HOT 15
- Set fan swing HOT 3
- Cannot run 0.9.0 HOT 18
- Setup failed for custom integration hon: Requirements for hon not found: ['pyhOn==0.14.11']. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hon.