-
-
Notifications
You must be signed in to change notification settings - Fork 7
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
Access Token Expired #71
Comments
Same problem here. Logs states that refresh token is not valid. Creating now token on netatmo page and even updating the other authentication keys did not help. |
For me what helped temporarily was to restart child bridge in which I am running the plugin. Values are updating now, but I suppose it is only a matter of time until stops and will require Access token renewal again. |
I tried that first, but didn’t work for me. Thats why I tried to update the keys and tokens one after another. |
Ok, fiddled around a bit more and found out that netatmo-token.json was not updated automatically. Once I deleted the old existing JSON and restarted the child bridge everything worekd again. The plugin created a new JSON file with the correct tokens. |
Same behaviour here:
homebridge-eveatmo plugin running in a child bridge. Did a |
Yes, it is a definitely bug, let's wait when dev will be have a time to look into that. |
Same problem here. Meanwhile I have disabled the plugin |
Same here. Disabled. |
In my case it helped just to restart the Homebridge instance twice. Once to get the new credentials, the second time to get it work. There seems to be an issue with the logical order after retrieving the keys or the keys are written to disk, but the variables are not set. Duno. |
Yes, I can confirm that - today it got stuck again with Access Token Expired and I did restart of child homebridge once - it did not started, so I did it for second time and it is running now. Hope it will be fixed soon. |
In my case after an update of credentials (cliend id, client secret, refresh token read_station) : |
Same problem here :-(( |
Hello everyone, Could be a problem with permissions (to write) the file, which stores the tokens. But then it also shouldn't have worked on the first run as well. But it could be a test to
Since I do not use child-bridges or other fancy stuff I'm not sure if these have any side-effects here. I'm in general not very happy with the And about what @vincentbls wrote:
On my first tests I had problems when I used the minimal set of permission-scopes (only read_station). Since then I created a new app and granted all(!) permissions. Should not be the problem here, but I just wanted to let you know. |
One addition to the "authentication switch" topic: Although the Netatmo API was never really stable or reliable, at least the old auth mechanism worked and did not need to store new tokens every now and then. |
I had the "Access token expired" problem twice during the last weeks on my Homebridge. I'm not using fancy stuff either (just a plain HB installation running on Ubuntu LTS on a small x64 server). I already granted all permissions for the token on dev.netatmo.com during the initial setup. The file owner/group for When I got the "token expired" error a few days ago, I could see that As far as I can see, it does not seem like a permissions problem. It seems like the token update simply stops after some time. I'll keep an eye on it. |
Hello, keep in mind than Netatmo servers had lot of issues these past two weeks! Several break down and so lost of access. That could explain things. From my side I had issues too during these breakdown, but then it's ok as soon as their servers are working |
Good point. If the API is down when the plugin tries to fetch a new token, there is a problem because the existing tokens have expired and it may be not possible to fetch a new token. I'm already preparing a new version (currently beta) and will also adapt when the token will be refreshed (doing it earlier to have more time, when it fails). |
Hi @skrollme Readded the password grant type and lets you choose which one you want to use. How it it possible to configure the grant type? Are users which are already migrated to the new auth (using a token) impacted after upgrading to 1.1.0? |
Please see the already updated Readme in the beta tag's branch, @jostrasser : https://github.com/skrollme/homebridge-eveatmo/tree/v1.1.0-beta1#readme
If you already upgrade to the refresh_token grant, you should not be affected, since refresh_token will be the new default grant_type in 1.1.0 |
Perfect... thanks @skrollme ! |
How will it survive update?Shouldn‘t it detect itself what auth. is used depending on username or token is set in configuration?Am 17.12.2022 um 14:43 schrieb Sebastian K ***@***.***>:
How it it possible to configure the grant type? Are users which are already migrated to the new auth (using a token) impacted after upgrading to 1.1.0?
Please see the already updated Readme in the beta tag's branch: https://github.com/skrollme/homebridge-eveatmo/tree/v1.1.0-beta1#readme
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: ***@***.***>
|
I updated from 1.0.0 to 1.1.0-b1 and didn't saw any impact after updating. However, I added |
And there is no auto-detection. If you want to use password-grant you have to set username, password AND grant_type. |
Hi everyone... I was the same problem with 1.0.1 version and always I back to 0.6.5 version (this use login y password), but today reading this blog... I tried desinstall homebridge-eveatmo and install again with version 1.0.1 and it worked perfect... |
Hi @skrollme You are well prepared ;) Authentication update Dear Netatmo developer, If the previous Access Token is still valid, the newly returned access token is identical but its expiration time is extended for 3 hours. In any case, the refresh token is not renewed. Starting from the 17/04/2023, this behavior will change to to be compliant with the recommendations of the RFC of the OAuth2 Authorization Framework (section 10.4) and improving the security of the data of our users. When refreshing tokens, Access Token and Refresh Token will be automatically renewed and former tokens invalidated. What does it means for me ? If you were already updating the tokens provided when refreshing your tokens, this change will not impact you. If you do not update the refresh token when refreshing your Access Token, your users will be disconnected after 3 hours as the former tokens will become invalidated. To fix it, you need to update the tokens as soon as you get the newly generated ones. Sincerely, Legrand - Netatmo - Bticino |
@jostrasser what are we gonna do with the deadline on 29 May? |
I think the latest implementation can maybe handle the upcoming change of Netatmo. @skrollme can you confirm this? Thanks! Related to: |
Both access_token and refresh_token are stored every time they are fetched, so yes - the plugin should be ready for the changes. |
Thanks for the confirmation! :) |
Describe the bug
After a few days homebridge-eveatmo plugin stopped updating Netatmo weatherstation values into the HomeKit - in logs errors that Access Token Expired (new authentication method used and worked after setting it up 2 days before). Restarted homebridge and Netatmo values started updating correctly into Homekit. See screenshot.
Version you use
The text was updated successfully, but these errors were encountered: