-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[somfytahoma] make token refreshing independent on event polling frequency #19038
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
base: main
Are you sure you want to change the base?
Conversation
3e1da8d
to
2a8cbbe
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes token refresh timing issues in the SomfyTahoma binding by decoupling token refresh from event polling frequency. The token refresh now uses its own scheduled future that triggers 30 seconds before token expiration, making it independent of the event polling configuration.
- Introduces a dedicated scheduled future for token refresh operations
- Removes token expiration checking from the event polling loop
- Updates configuration constraints to ensure event polling is more frequent than device status reconciliation
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
config.xml | Updates parameter constraints and descriptions for refresh and statusTimeout |
SomfyTahomaBridgeHandler.java | Implements independent token refresh scheduling and removes token checking from event polling |
...src/main/java/org/openhab/binding/somfytahoma/internal/handler/SomfyTahomaBridgeHandler.java
Outdated
Show resolved
Hide resolved
bundles/org.openhab.binding.somfytahoma/src/main/resources/OH-INF/config/config.xml
Show resolved
Hide resolved
ceeab00
to
ffc5879
Compare
<default>300</default> | ||
</parameter> | ||
|
||
<parameter name="retries" type="integer" required="false"> | ||
<label>Retries</label> | ||
<description>Specifies the number of retries when command execution</description> | ||
<description>Specifies how many times the command should be retried upon failure</description> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As you adjusted 2 parameter descriptions, please update accordingly the properties file.
…uency Signed-off-by: Ondrej Pecta <[email protected]>
ffc5879
to
ffe5cc1
Compare
This PR fixes bug and possible misconfiguation mentioned here #18987
Now the token refresh has its own scheduled future and is independent on frequency of event polling from the cloud.