-
-
Notifications
You must be signed in to change notification settings - Fork 33
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
Possible Issue at Startup #380
Comments
Hi, Same issue at startup since a few days, no change when replacing DATA by AUTH in the module code. The only way to display informations is to generate a new refresh token but the problem appears again at next MM launch. |
Hi, I'm experiencing the same issue here. |
How about using the Client Credentials API to request a token instead of relying on the user to provide a token? https://dev.netatmo.com/apidocumentation/oauth#client-credential This should resolve the issue. Unfortunately I do not have any credentials for Netatmo as I do not have any devices else I would have made the changes for you. |
Hi, @bugsounet fixed it in his MMM-NetatmoThermostat module (same API … so same Issue). Solution consists in stocking a token in token.json local file. I m not a developper , so if someone could apply his solution... |
No... From doc, When authenticate So... just save token result on authenticate and use saved refresh_token on restart MM² Let's Restart MM² with this rule: [2024-06-14 12:10:31.030] [LOG] [NETATMO] Starting MMM-NetatmoThermostat module...
[2024-06-14 12:10:31.031] [LOG] [NETATMO] Use token.json for Authenticate
[2024-06-14 12:10:32.135] [LOG] [NETATMO] token.json was written successfully
[2024-06-14 12:10:32.136] [LOG] [NETATMO] Authenticated!
[2024-06-14 12:10:32.138] [LOG] [NETATMO] Token Expire Friday, June 14, 2024 3:09 PM access_token on config file is used ONLY on the first authenticate (first use of the module) and is no longer used after On restart of MM² must use saved token file (check presence of the file) For helping from my module
It's up to you to adapt it to this module |
Thanks! I'll try to reserve some time on the weekend to look at this. |
No problem, Thanks for them ;) |
Thanks @CFenner and @bugsounet |
Is there anything new? |
need help @CFenner ? If you have not time really, I can try in my side (auth/refresh /save part) |
(because i'm kind, i will code it) |
Good news:
|
i have choose an this way to test:
i'm so happy, everything works fine, still after a RPI reboot or a |
I 'm not completely agree with this method because I will destroy my fork once the modifications are made on the @CFenner repo So... it's only for testing :) |
@bugsounet Good job, it works perfectly ! Many thanks for your help ... |
Right ! @CFenner have merge my Pull Request Thanks for this testing but you have to return to @CFenner repository and make a Happy use, Note: @mumblebaj , you can now close this issue :) |
Fix merged from @bugsounet |
Hi,
I have noticed a few people posting that the module is not working when they startup in the morning. I believe that the below code is where the issue is.
I believe that you may want to call
self.notifications.AUTH
at startup which would then get a new token using the old token it had. Unless I am mistaken.Can you please check this out?
Thanks
The text was updated successfully, but these errors were encountered: