-
Notifications
You must be signed in to change notification settings - Fork 70
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
Authentication Issues After Home Assistant Restart #278
Comments
You are running into #260, the quick fix is to run an NTP time sync, generally by doing a full hardware level restart. You are correct that 0.18.5 tries to fix this by catching that specific exception and ignoring it, since there's not an official way to adjust the allowed clock skew in Currently this integration is only using 0.18.4, I wasn't fully confident about updating it yet and my development branch has some other changes that aren't ready to pull in yet. You can edit the manifest file to use 0.18.5 instead if you want to try that, but I recommend trying the restart first and only doing that if you continue to see issues with access token verification. |
pycognito.exceptions.TokenVerificationException: Your 'access_token'
token could not be verified (The token is not yet valid (iat)).
that is your time is out of sync with amazon servers
…On Mon, May 6, 2024 at 11:16 AM Mike Koch ***@***.***> wrote:
After having to restart Home Assistant to use a different HACS package, my
Emporia authentication stopped working. After trying a couple of things, I
ended up uninstalling/reinstalling the Emporia Vue package, and now
attempting to authenticate results in the following:
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 495, in authenticate
self._set_tokens(tokens)
File "/usr/local/lib/python3.12/site-packages/pycognito/__init__.py", line 767, in _set_tokens
self.verify_token(
File "/usr/local/lib/python3.12/site-packages/pycognito/__init__.py", line 266, in verify_token
raise TokenVerificationException(
pycognito.exceptions.TokenVerificationException: Your 'access_token' token could not be verified (The token is not yet valid (iat)).
It looks like something may have changed in PyEmVue 0.18.5
<https://github.com/magico13/PyEmVue/releases/tag/v0.18.5> regarding iat
verification. Has this package been updateed to use PyEmVue 0.18.5 by
chance?
—
Reply to this email directly, view it on GitHub
<#278>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BGBTIU6MYJXEDX7OJIERPF3ZA6NEDAVCNFSM6AAAAABHJHLH32VHI2DSMVQWIX3LMV43ASLTON2WKOZSGI4DCMJRHEZDQMQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Thanks for pointing me in the direction regarding NTP syncing. I did a reboot of the VM that's running HA, and all is good now. |
After having to restart Home Assistant to use a different HACS package, my Emporia authentication stopped working. After trying a couple of things, I ended up uninstalling/reinstalling the Emporia Vue package, and now attempting to authenticate results in the following:
It looks like something may have changed in PyEmVue 0.18.5 regarding iat verification. Has this package been updateed to use PyEmVue 0.18.5 by chance?
The text was updated successfully, but these errors were encountered: