francispoisson / hilo

Hilo integration for Home Assistant
The Unlicense
26 stars 8 forks source link

Integration failed to load with merge #35 #36

Closed Fox350 closed 2 years ago

Fox350 commented 2 years ago

Hy guys, I did update from HACS to # 35 and the integration now fail to load. I will rollback for now. Here is the error during the setup of component hilo :

Cette erreur provient d'une intégration personnalisée

Logger: homeassistant.setup Source: custom_components/hilo/hilo_api.py:71 Integration: Hilo HA integration (documentation, issues) First occurred: 19:58:49 (1 occurrences) Last logged: 19:58:49

Error during setup of component hilo Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/setup.py", line 254, in _async_setup_component result = await task File "/config/custom_components/hilo/init.py", line 68, in async_setup return await _async_process_config(hass, config) File "/config/custom_components/hilo/init.py", line 90, in _async_process_config await hilo.async_update_all_devices() File "/config/custom_components/hilo/hilo_api.py", line 213, in async_update_all_devices await self.get_devices() File "/config/custom_components/hilo/hilo_api.py", line 193, in get_devices url = f"{await self.location_url}/Devices" File "/config/custom_components/hilo/hilo_api.py", line 57, in location_url self._location_id = await self.get_location_id() File "/config/custom_components/hilo/hilo_api.py", line 159, in get_location_id req = await self._request(url) File "/config/custom_components/hilo/hilo_api.py", line 111, in _request await self.refresh_token() File "/config/custom_components/hilo/hilo_api.py", line 150, in _refresh_token self._access_token = await self.get_access_token() File "/config/custom_components/hilo/hilo_api.py", line 137, in get_access_token req = await self.async_call(url, method="post", headers=headers, data=body) File "/config/custom_components/hilo/hilo_api.py", line 95, in async_call return await try_again(f"{url} returned {resp.status}") File "/config/custom_components/hilo/hilo_api.py", line 73, in try_again return await self.async_call( File "/config/custom_components/hilo/hilo_api.py", line 95, in async_call return await try_again(f"{url} returned {resp.status}") File "/config/custom_components/hilo/hilo_api.py", line 73, in try_again return await self.async_call( File "/config/custom_components/hilo/hilo_api.py", line 95, in async_call return await try_again(f"{url} returned {resp.status}") File "/config/custom_components/hilo/hilo_api.py", line 73, in try_again return await self.async_call( File "/config/custom_components/hilo/hilo_api.py", line 95, in async_call return await try_again(f"{url} returned {resp.status}") File "/config/custom_components/hilo/hilo_api.py", line 71, in try_again raise HomeAssistantError("Retry limit reached") homeassistant.exceptions.HomeAssistantError: Retry limit reached

Also, : Cette erreur provient d'une intégration personnalisée

Logger: custom_components.hilo.hilo_api Source: custom_components/hilo/hilo_api.py:70 Integration: Hilo HA integration (documentation, issues) First occurred: 19:58:49 (1 occurrences) Last logged: 19:58:49

Unable to post https://hilodirectoryb2c.b2clogin.com/hilodirectoryb2c.onmicrosoft.com/oauth2/v2.0/token?p=B2C_1A_B2C_1_PasswordFlow: https://hilodirectoryb2c.b2clogin.com/hilodirectoryb2c.onmicrosoft.com/oauth2/v2.0/token?p=B2C_1A_B2C_1_PasswordFlow returned 400

skimaniac commented 2 years ago

même chose ici

Fox350 commented 2 years ago

I did copy my backup folder back in \config\custom_components\hilo and replace the new one. I can connect without problem and the integration start. Also, Hilo web site is available so this must be related to the change in code. I did just want to let you know so you can workaround before the issue is resolved. Thanks!

valleedelisle commented 2 years ago

C'est étrange, je la roule ici depuis quelques jours sans problème.

Est-ce que quelqu'un qui a le problème peut rouler avec le mode debug enabled by any chance?

Idéalement, si vous pouvez décommenter la ligne 82 afin de voir le détail de l'erreur du serveur d'authentification.

_LOGGER.debug(f"Response: {resp.status} {resp.text}")

Et pour activer debug pour cette composante:

logger:
  logs:
    custom_components.hilo: debug
valleedelisle commented 2 years ago

Si vous n'avez pas fait de backup et que vous avez le problème, vous pouvez trouver les fichiers avant ce commit ici [1]

[1] https://github.com/francispoisson/hilo/tree/9736fcdd9e0b2cc255adb5bd743045a4363da033

francispoisson commented 2 years ago

Ici, ça fonctionne bien. Avez-vous mis à jour à partir de HACS?

isbkch commented 2 years ago

Oui j'ai mis a jour a partir de HACS, j'ai la meme erreur depuis la mise a jour

Logger: custom_components.hilo.hilo_api
Source: custom_components/hilo/hilo_api.py:70 
Integration: hilo (documentation, issues) 
First occurred: 10:09:18 AM (1 occurrences) 
Last logged: 10:09:18 AM

Unable to post https://hilodirectoryb2c.b2clogin.com/hilodirectoryb2c.onmicrosoft.com/oauth2/v2.0/token?p=B2C_1A_B2C_1_PasswordFlow: https://hilodirectoryb2c.b2clogin.com/hilodirectoryb2c.onmicrosoft.com/oauth2/v2.0/token?p=B2C_1A_B2C_1_PasswordFlow returned 400

et

This error originated from a custom integration.

Logger: homeassistant.setup
Source: custom_components/hilo/hilo_api.py:71 
Integration: hilo (documentation, issues) 
First occurred: 10:09:18 AM (1 occurrences) 
Last logged: 10:09:18 AM

Error during setup of component hilo
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/setup.py", line 254, in _async_setup_component
    result = await task
  File "/config/custom_components/hilo/__init__.py", line 68, in async_setup
    return await _async_process_config(hass, config)
  File "/config/custom_components/hilo/__init__.py", line 90, in _async_process_config
    await hilo.async_update_all_devices()
  File "/config/custom_components/hilo/hilo_api.py", line 213, in async_update_all_devices
    await self.get_devices()
  File "/config/custom_components/hilo/hilo_api.py", line 193, in get_devices
    url = f"{await self.location_url}/Devices"
  File "/config/custom_components/hilo/hilo_api.py", line 57, in location_url
    self._location_id = await self.get_location_id()
  File "/config/custom_components/hilo/hilo_api.py", line 159, in get_location_id
    req = await self._request(url)
  File "/config/custom_components/hilo/hilo_api.py", line 111, in _request
    await self.refresh_token()
  File "/config/custom_components/hilo/hilo_api.py", line 150, in _refresh_token
    self._access_token = await self.get_access_token()
  File "/config/custom_components/hilo/hilo_api.py", line 137, in get_access_token
    req = await self.async_call(url, method="post", headers=headers, data=body)
  File "/config/custom_components/hilo/hilo_api.py", line 95, in async_call
    return await try_again(f"{url} returned {resp.status}")
  File "/config/custom_components/hilo/hilo_api.py", line 73, in try_again
    return await self.async_call(
  File "/config/custom_components/hilo/hilo_api.py", line 95, in async_call
    return await try_again(f"{url} returned {resp.status}")
  File "/config/custom_components/hilo/hilo_api.py", line 73, in try_again
    return await self.async_call(
  File "/config/custom_components/hilo/hilo_api.py", line 95, in async_call
    return await try_again(f"{url} returned {resp.status}")
  File "/config/custom_components/hilo/hilo_api.py", line 73, in try_again
    return await self.async_call(
  File "/config/custom_components/hilo/hilo_api.py", line 95, in async_call
    return await try_again(f"{url} returned {resp.status}")
  File "/config/custom_components/hilo/hilo_api.py", line 71, in try_again
    raise HomeAssistantError("Retry limit reached")
homeassistant.exceptions.HomeAssistantError: Retry limit reached
valleedelisle commented 2 years ago

Idéalement il faudrait voir ce qui est retourner par le serveur dans le text du code 400. Je n'ai jamais eu ce code de mon coté.

J'ai essayé de reproduire aussi avec hass.io et sans succès.

Pouvez vous retirer le # devant cette ligne (tout en gardant l'indentation) dans le fichier custom_components/hilo/hilo_api.py:

            #_LOGGER.debug(f"Response: {resp.status} {resp.text}")

Ensuite, repartez home assistant et surveillez le le fichier home-assistant.log qui devrait contenir ce qui est retourné par le serveur.

Vous pourrez alors faire un grep " 400 " home-assitant.log pour sortir le message en question.

Merci,

DVD

Fox350 commented 2 years ago

M'a passé par l'idée de mettre des quotes pour nom d'usager et mot de passe pour être certain de les passer en string. Si ça ne fonctionne pas, je recueille les logs demandés. Merci!

Fox350 commented 2 years ago

Bonjour, voici l'erreur concernée dans homeassistant.log.

2021-10-25 18:20:30 ERROR (MainThread) [custom_components.hilo.hilo_api] post on https://hilodirectoryb2c.b2clogin.com/hilodirectoryb2c.onmicrosoft.com/oauth2/v2.0/token?p=B2C_1A_B2C_1_PasswordFlow failed: 400 <bound method ClientResponse.text of <ClientResponse(https://hilodirectoryb2c.b2clogin.com/hilodirectoryb2c.onmicrosoft.com/oauth2/v2.0/token?p=B2C_1A_B2C_1_PasswordFlow) [400 Bad Request]> <CIMultiDictProxy('Cache-Control': 'no-store, must-revalidate, no-cache', 'Content-Type': 'application/json; charset=utf-8', 'Set-Cookie': 'x-ms-cpim-trans=; domain=hilodirectoryb2c.b2clogin.com; expires=Tue, 25-Oct-2011 22:20:30 GMT; path=/; SameSite=None; secure; HttpOnly', 'x-ms-gateway-requestid': '137f4747-6610-4fe1-b1bc-95ed35e3d579', 'X-Frame-Options': 'DENY', 'Public': 'OPTIONS,TRACE,GET,HEAD,POST', 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains', 'X-Content-Type-Options': 'nosniff', 'X-XSS-Protection': '1; mode=block', 'Allow': 'OPTIONS', 'Allow':

'TRACE', 'Allow': 'GET', 'Allow': 'HEAD', 'Allow': 'POST', 'Date': 'Mon, 25 Oct 2021 22:20:30 GMT', 'Content-Length': '217')>

2021-10-25 18:20:30 ERROR (MainThread) [custom_components.hilo.hilo_api] Retry #2: https://hilodirectoryb2c.b2clogin.com/hilodirectoryb2c.onmicrosoft.com/oauth2/v2.0/token?p=B2C_1A_B2C_1_PasswordFlow returned 400

J'augmente le niveau du logger à débug et vérifie si j'ai plus de données.

Avec niveau du logger à debug :

2021-10-25 18:35:55 DEBUG (MainThread) [custom_components.hilo.hilo_api] Response: 400 <bound method ClientResponse.text of <ClientResponse(https://hilodirectoryb2c.b2clogin.com/hilodirectoryb2c.onmicrosoft.com/oauth2/v2.0/token?p=B2C_1A_B2C_1_PasswordFlow) [400 Bad Request]> <CIMultiDictProxy('Cache-Control': 'no-store, must-revalidate, no-cache', 'Content-Type': 'application/json; charset=utf-8', 'Set-Cookie': 'x-ms-cpim-trans=; domain=hilodirectoryb2c.b2clogin.com; expires=Tue, 25-Oct-2011 22:35:55 GMT; path=/; SameSite=None; secure; HttpOnly', 'x-ms-gateway-requestid': 'e8e02991-2ed6-4a56-a74d-ab7b8ee53166', 'X-Frame-Options': 'DENY', 'Public': 'OPTIONS,TRACE,GET,HEAD,POST', 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains', 'X-Content-Type-Options': 'nosniff', 'X-XSS-Protection': '1; mode=block', 'Allow': 'OPTIONS', 'Allow': 'TRACE', 'Allow': 'GET', 'Allow': 'HEAD', 'Allow': 'POST', 'Date': 'Mon, 25 Oct 2021 22:35:54 GMT', 'Content-Length': '217')>

2021-10-25 18:35:55 ERROR (MainThread) [custom_components.hilo.hilo_api] post on https://hilodirectoryb2c.b2clogin.com/hilodirectoryb2c.onmicrosoft.com/oauth2/v2.0/token?p=B2C_1A_B2C_1_PasswordFlow failed: 400 <bound method ClientResponse.text of <ClientResponse(https://hilodirectoryb2c.b2clogin.com/hilodirectoryb2c.onmicrosoft.com/oauth2/v2.0/token?p=B2C_1A_B2C_1_PasswordFlow) [400 Bad Request]> <CIMultiDictProxy('Cache-Control': 'no-store, must-revalidate, no-cache', 'Content-Type': 'application/json; charset=utf-8', 'Set-Cookie': 'x-ms-cpim-trans=; domain=hilodirectoryb2c.b2clogin.com; expires=Tue, 25-Oct-2011 22:35:55 GMT; path=/; SameSite=None; secure; HttpOnly', 'x-ms-gateway-requestid': 'e8e02991-2ed6-4a56-a74d-ab7b8ee53166', 'X-Frame-Options': 'DENY', 'Public': 'OPTIONS,TRACE,GET,HEAD,POST', 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains', 'X-Content-Type-Options': 'nosniff', 'X-XSS-Protection': '1; mode=block', 'Allow': 'OPTIONS', 'Allow': 'TRACE', 'Allow': 'GET', 'Allow': 'HEAD', 'Allow': 'POST', 'Date': 'Mon, 25 Oct 2021 22:35:54 GMT', 'Content-Length': '217')>

2021-10-25 18:35:55 ERROR (MainThread) [custom_components.hilo.hilo_api] Retry #0: https://hilodirectoryb2c.b2clogin.com/hilodirectoryb2c.onmicrosoft.com/oauth2/v2.0/token?p=B2C_1A_B2C_1_PasswordFlow returned 400 2021-10-25 18:35:56 DEBUG (MainThread) [custom_components.hilo.hilo_api] Response: 400 <bound method ClientResponse.text of <ClientResponse(https://hilodirectoryb2c.b2clogin.com/hilodirectoryb2c.onmicrosoft.com/oauth2/v2.0/token?p=B2C_1A_B2C_1_PasswordFlow) [400 Bad Request]> <CIMultiDictProxy('Cache-Control': 'no-store, must-revalidate, no-cache', 'Content-Type': 'application/json; charset=utf-8', 'Set-Cookie': 'x-ms-cpim-trans=; domain=hilodirectoryb2c.b2clogin.com; expires=Tue, 25-Oct-2011 22:35:56 GMT; path=/; SameSite=None; secure; HttpOnly', 'x-ms-gateway-requestid': '14425427-208e-40aa-9234-71a2d71b4704', 'X-Frame-Options': 'DENY', 'Public': 'OPTIONS,TRACE,GET,HEAD,POST', 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains', 'X-Content-Type-Options': 'nosniff', 'X-XSS-Protection': '1; mode=block', 'Allow': 'OPTIONS', 'Allow': 'TRACE', 'Allow': 'GET', 'Allow': 'HEAD', 'Allow': 'POST', 'Date': 'Mon, 25 Oct 2021 22:35:55 GMT', 'Content-Length': '217')>

2021-10-25 18:35:56 ERROR (MainThread) [custom_components.hilo.hilo_api] post on https://hilodirectoryb2c.b2clogin.com/hilodirectoryb2c.onmicrosoft.com/oauth2/v2.0/token?p=B2C_1A_B2C_1_PasswordFlow failed: 400 <bound method ClientResponse.text of <ClientResponse(https://hilodirectoryb2c.b2clogin.com/hilodirectoryb2c.onmicrosoft.com/oauth2/v2.0/token?p=B2C_1A_B2C_1_PasswordFlow) [400 Bad Request]> <CIMultiDictProxy('Cache-Control': 'no-store, must-revalidate, no-cache', 'Content-Type': 'application/json; charset=utf-8', 'Set-Cookie': 'x-ms-cpim-trans=; domain=hilodirectoryb2c.b2clogin.com; expires=Tue, 25-Oct-2011 22:35:56 GMT; path=/; SameSite=None; secure; HttpOnly', 'x-ms-gateway-requestid': '14425427-208e-40aa-9234-71a2d71b4704', 'X-Frame-Options': 'DENY', 'Public': 'OPTIONS,TRACE,GET,HEAD,POST', 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains', 'X-Content-Type-Options': 'nosniff', 'X-XSS-Protection': '1; mode=block', 'Allow': 'OPTIONS', 'Allow': 'TRACE', 'Allow': 'GET', 'Allow': 'HEAD', 'Allow': 'POST', 'Date': 'Mon, 25 Oct 2021 22:35:55 GMT', 'Content-Length': '217')>

2021-10-25 18:35:56 ERROR (MainThread) [custom_components.hilo.hilo_api] Unable to post https://hilodirectoryb2c.b2clogin.com/hilodirectoryb2c.onmicrosoft.com/oauth2/v2.0/token?p=B2C_1A_B2C_1_PasswordFlow: https://hilodirectoryb2c.b2clogin.com/hilodirectoryb2c.onmicrosoft.com/oauth2/v2.0/token?p=B2C_1A_B2C_1_PasswordFlow returned 400 2021-10-25 18:35:56 ERROR (MainThread) [homeassistant.setup] Error during setup of component hilo Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/setup.py", line 254, in _async_setup_component result = await task File "/config/custom_components/hilo/init.py", line 68, in async_setup return await _async_process_config(hass, config) File "/config/custom_components/hilo/init.py", line 90, in _async_process_config await hilo.async_update_all_devices() File "/config/custom_components/hilo/hilo_api.py", line 213, in async_update_all_devices await self.get_devices() File "/config/custom_components/hilo/hilo_api.py", line 193, in get_devices url = f"{await self.location_url}/Devices" File "/config/custom_components/hilo/hilo_api.py", line 57, in location_url self._location_id = await self.get_location_id() File "/config/custom_components/hilo/hilo_api.py", line 159, in get_location_id req = await self._request(url) File "/config/custom_components/hilo/hilo_api.py", line 111, in _request await self.refresh_token() File "/config/custom_components/hilo/hilo_api.py", line 150, in _refresh_token self._access_token = await self.get_access_token() File "/config/custom_components/hilo/hilo_api.py", line 137, in get_access_token req = await self.async_call(url, method="post", headers=headers, data=body) File "/config/custom_components/hilo/hilo_api.py", line 95, in async_call return await try_again(f"{url} returned {resp.status}") File "/config/custom_components/hilo/hilo_api.py", line 73, in try_again return await self.async_call( File "/config/custom_components/hilo/hilo_api.py", line 95, in async_call return await try_again(f"{url} returned {resp.status}") File "/config/custom_components/hilo/hilo_api.py", line 73, in try_again return await self.async_call( File "/config/custom_components/hilo/hilo_api.py", line 95, in async_call return await try_again(f"{url} returned {resp.status}") File "/config/custom_components/hilo/hilo_api.py", line 73, in try_again return await self.async_call( File "/config/custom_components/hilo/hilo_api.py", line 95, in async_call return await try_again(f"{url} returned {resp.status}") File "/config/custom_components/hilo/hilo_api.py", line 71, in try_again raise HomeAssistantError("Retry limit reached") homeassistant.exceptions.HomeAssistantError: Retry limit reached

valleedelisle commented 2 years ago

Je ne vois rien d'anormal à part que tu n'as pas, as expected, de token reçu.

Je serais curieux de connaitre ta version de package home assistant / asyncio afin de reproduire le problème de mon coté et rendre le code compatible avec ta version.

Voici les miennes:

# pip freeze | grep -P "async|home[-]*assistant"
anel-pwrctrl-homeassistant==0.0.1.dev2
async-timeout==3.0.1
async-upnp-client==0.22.8
asyncclick==7.1.2.3
asynccmd==0.2.4
asyncio==3.4.3
asyncio-dgram==2.1.0
asyncio-mqtt==0.10.0
asyncpysupla==0.0.5
asyncssh==2.7.2
asyncstdlib==3.10.2
asynctest==0.13.0
evohome-async==0.3.15
foobot-async==1.0.0
home-assistant-frontend==20211007.1
# Editable install with no version control (homeassistant==2021.10.6)
-e /usr/src/homeassistant
homeassistant-pyozw==0.1.10
jsonrpc-async==2.1.0
kaiterra-async-client==0.0.2
onvif-zeep-async==1.2.0
pycoolmasternet-async==0.1.2
pyserial-asyncio==0.5
unasync==0.5.0
waqiasync==1.0.0
nmezheri commented 2 years ago

I get the same error,

2021-10-25 17:56:48 ERROR (MainThread) [custom_components.hilo.hilo_api] post on https://hilodirectoryb2c.b2clogin.com/hilodirectoryb2c.onmicrosoft.com/oauth2/v2.0/token?p=B2C_1A_B2C_1_Pa sswordFlow failed: 400 <bound method ClientResponse.text of <ClientResponse(https://hilodirectoryb2c.b2clogin.com/hilodirectoryb2c.onmicrosoft.com/oauth2/v2.0/token?p=B2C_1A_B2C_1_PasswordFlow) [400 Bad Request]

here is my lib:

anel-pwrctrl-homeassistant==0.0.1.dev2 async-timeout==3.0.1 async-upnp-client==0.22.8 asyncclick==7.1.2.3 asynccmd==0.2.4 asyncio==3.4.3 asyncio-dgram==2.1.0 asyncio-mqtt==0.10.0 asyncpysupla==0.0.5 asyncssh==2.7.2 asyncstdlib==3.10.2 asynctest==0.13.0 evohome-async==0.3.15 foobot-async==1.0.0 home-assistant-frontend==20211007.1

Editable install with no version control (homeassistant==2021.10.6)

-e /usr/src/homeassistant homeassistant-pyozw==0.1.10 jsonrpc-async==2.1.0 kaiterra-async-client==0.0.2 onvif-zeep-async==1.2.0 pycoolmasternet-async==0.1.2 pyserial-asyncio==0.5 unasync==0.5.0 waqiasync==1.0.0

To be honest I got similar errors before the merge of 35, my previous version was the code on this commit id, https://github.com/francispoisson/hilo/commit/9736fcdd9e0b2cc255adb5bd743045a4363da033 and still can't load the module. I use docker version (supervisord), I cloned the code from this repo in the correct path.

nmezheri commented 2 years ago

I will try to go back and see whats the last commit that worked at least for me.

https://github.com/francispoisson/hilo/commit/b239b5c9b5638c9940751407796ff55bf0320be3 image

https://github.com/francispoisson/hilo/commit/3dfddc16319c1552ade25a21723b32c265e9f956 image

https://github.com/francispoisson/hilo/commit/fb62af0a12d3430ff70311b17e9e3a0b4eb6d94a image

It looks it's broken hilo side, I restored very old backup that was working just fine, and it's broken now, image

Fox350 commented 2 years ago

J'aimerais vraiment te fournir ces renseignements mais je suis un peu perdu : j'ai HA dans une VM sous esx 6.5. Je peux aller en mode terminal soit via la console ou via un addon terminal ssh. Par contre, c'est purement des commandes pour le core de ha, pas les consoles linux standard. Je fouille un peu pour pouvoir soumettre la commande "pip freeze | grep -P "async|home[-]*assistant"" et retourner les infos.

valleedelisle commented 2 years ago

Si l'un d'entre vous est à l'aise de faire une session tmate, mon adresse courriel est dans mon profil github. L'erreur 400 signifie que le serveur reçoit une requête non-conforme, donc il ne reçoit pas les données du POST comme il se doit.

Je ne voulais pas vous demander de poster la requête en soit car elle contiendrais vos username/password mais je crois que ça serait bon d'y jeter un coup d’œil.

On pourrait essayer aussi de revenir à la notation en query string au lieu de passé un dict en remplaçant ça:

        body = {
            "grant_type": "password",
            "scope": "openid 9870f087-25f8-43b6-9cad-d4b74ce512e1 offline_access",
            "client_id": "9870f087-25f8-43b6-9cad-d4b74ce512e1",
            "response_type": "token id_token",
            "username": self._username,
            "password": self._password
        }

Par ca:

        body = f'grant_type=password&scope=openid 9870f087-25f8-43b6-9cad-d4b74ce512e1 offline_access&client_id=9870f087-25f8-43b6-9cad-d4b74ce512e1&response_type=token id_token&username={self._username}&password={self._password}'

Mais je serais surpris que ça change quelque chose.

Une autre chose, j'essaierais aussi de changer mon mot de passe par l'application Hilo. C'est possible qu'il y ait une corruption quelconques sur les serveurs d'Hilo. En changeant le mot de passe, j'ose espérer que ça la corrigerais.

Une autre hypothèse pourrait être que vos comptes aient été migrés vers une nouvelle flotte de serveurs avec une nouvelle microversion des API. J'ai vu que plusieurs API call ont été dépréciés dans le swagger courant..

nmezheri commented 2 years ago

yay nice one, I updated the password and all looks great now, TY.

body = f'gran.... didn't work.

nmezheri commented 2 years ago

Checked the code a little bit, I prepared this curl command to test your credentials:

curl -X POST 'https://hilodirectoryb2c.b2clogin.com/hilodirectoryb2c.onmicrosoft.com/oauth2/v2.0/token?p=B2C_1A_B2C_1_PasswordFlow' -H 'Content-Type: application/x-www-form-urlencoded' -d 'grant_type=password&scope=openid+9870f087-25f8-43b6-9cad-d4b74ce512e1+offline_access&client_id=9870f087-25f8-43b6-9cad-d4b74ce512e1&response_type=token+id_token&username=__YOUR_USERNAME__&password=__YOUR_PASSWORD__'

Just replace YOUR_USERNAME and YOUR_PASSWORD

when it successed, you get back:

{"access_token": ..............

when it fails you get back:

{"error":"access_denied" ..............

valleedelisle commented 2 years ago

Thanks for the feedback, I'm glad that changing the password worked, it didn't make any sense to me.

Fox350 commented 2 years ago

Hy all and thanks for your help. I did change my password twice this morning, full of hope, wihthout success until.... The third time I did remove my special character $ keeping only Capitals, lower case and number. Success. I'll try to change it back toonight and let you know for sure at 100% that it was not related to a delay. Almost sure cause I was able to login in Hilo app right away after every password change. Thanks!

arnaud-42 commented 2 years ago

Pareil ici depuis la derniere mise a jour. Finalement j'ai egalement changer mon password. La premiere fois j'ai garde un caractere special mais ca n'a pas marche, la seconde je l'ai enleve et ca a fonctionne.

isbkch commented 2 years ago

Je confirme que simplifier le mot de passe fonctionne pour moi aussi. Je me rappelle avoir eu ce problème l'hivers passé où j'ai du enlever tous les caractères spéciaux de mon password pour que ca fonctionne...

valleedelisle commented 2 years ago

Je vais essaye de comprendre ce qui se passe avec ça, content qu'on ait isolé le problème. Pourtant, j'ai laissé la fonction d'escaping en place. Note à moi même: choisis un mot de passe plus complex!!

isbkch commented 2 years ago

@valleedelisle voici le issue que j'avais ouvert en Fevrier par rapport au mots de passe: #4

Fox350 commented 2 years ago

Merci beaucoup pour votre travail et le développement. C'est tout a fait normal et compréhensible d'éprouver ce type de problème et sans vous, on aurait juste Hilo... Merci!

Télécharger Outlook pour Androidhttps://aka.ms/AAb9ysg


From: David Vallee Delisle @.> Sent: Tuesday, October 26, 2021 12:32:02 PM To: francispoisson/hilo @.> Cc: Fox350 @.>; Author @.> Subject: Re: [francispoisson/hilo] Integration failed to load with merge #35 (Issue #36)

Je vais essaye de comprendre ce qui se passe avec ça, content qu'on ait isolé le problème. Pourtant, j'ai laissé la fonction d'escaping en place. Note à moi même: choisis un mot de passe plus complex!!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/francispoisson/hilo/issues/36#issuecomment-952112001, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ASVQARJM22LPMGZCOPLIESDUI3JYFANCNFSM5GUATBFA. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

Mazotis commented 2 years ago

Voilà. Cela devrait vous permettre de maintenir un mot de passe sécuritaire et règle le problème pour mon installation hass

descha000 commented 2 years ago

je confirme que moi aussi, en enlevant les caracteres speciaux de mon mot de passe, ca a réglé le problème. J'en comprends que Hilo donne l'indication dans l'app d'utiliser 3 des 4 suivants: majuscules, minuscules, special char et chiffres, mais que leur API pour obtenir le token ne manage pas les special chars... Merci gang pour vos efforts à supporter cette intégration!