-
Notifications
You must be signed in to change notification settings - Fork 11
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
session expired - daily #26
Comments
Same issue - bu i know that the api send a new refreshtoken that can use for refresh the tokens. If the node has a internal timer to call the api eg. every day so the tokens must not refreshed manually and the session don't expire. |
@HubertusH I have switched to homebridge as that works reliably. I think there is some issue with the stored tokens. The session expires when I restart NR of something like it or maybe a timing issue. |
Hi, The access token has indeed a rather low TTL (1 hr). However, the refresh token should be valid for 14 days and is actually handled by the module. I will try to reproduce this issue, but if you happen to have any logs that might help, feel free to add them to this ticket :) Thanks. |
@nikkow I am not sure how to reproduce it, will look into it. Looking in the somfy-api code:
This returns a reject with an error that token has refreshed, is that correct ? |
Yes, in order to fall into the retry policy of the original request: node-red-contrib-tahoma/src/core/somfy-api.ts Lines 83 to 85 in 32ee6a5
|
I am having this same issue. I programmed a flow to operate my shutter blinds twice a day, but consistently after 2-3 days the session expires. B.t.w. I am running NR in a Docker container (on a RPi). I am quite a novice NR user, and I am not very familiar yet with where I can find logging that could help us diagnosing this. What can I do to provide more context to pinpoint the issues? Update 1
Update 2 I see that the following warning is also logged when the container is started:
I don't know if the keys are somehow stored in the credentials file ( |
Same problem here. Let me know if I can help and provide any details. |
An extra remark on my previous comment, just for info: |
i build for me a workaround - it's not the solution!
that prevents empty tokens after restart node-red or the flows. in my case this works nearly 100% BR |
Hi, I refactored the session handling on 2.0.3. You should no longer encounter daily session expiration. However, please note that if the refresh token issued by Somfy expires, it won't be possible to automatically refresh the session. This might happen after a long period of inactivity (~14d, yet to be confirmed - this is not documented on Somfy's developer docs). @HubertusH the new session handling does not rely on context anymore. You might want to ensure that it has no side-impacts based on your setup. Thanks. |
Hi All, with version 2.0.3 I have received an email from somfy that says this:
|
Hello everyone.. just a notion.. I get the toke expired only if i do modifications to the flows.. is this your case as well? If i don't do any mods i get the +- 14 days expiration. Anyway.. i would love to have the option to enter the credentials to the node and let the node handle the re-authorization of token automatically. If the app can do this, i'm pretty sure that this plugin can as well.. :) |
The session expires every day and renders the node unusable.
Is there no way to auth/refresh the token from within the node automatically ? I see that the tokens are actually stored in the global var environment, shouldnt they be exposed to the node only ? (node.context)
The text was updated successfully, but these errors were encountered: