Skip to content

[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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

octa22
Copy link
Contributor

@octa22 octa22 commented Jul 24, 2025

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.

@octa22 octa22 added the bug An unexpected problem or unintended behavior of an add-on label Jul 24, 2025
@octa22 octa22 force-pushed the somfytahoma-binding-refresh-fix branch from 3e1da8d to 2a8cbbe Compare July 24, 2025 21:33
@lsiepel lsiepel requested a review from Copilot July 25, 2025 08:11
Copy link

@Copilot Copilot AI left a 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

@lsiepel lsiepel removed their assignment Jul 25, 2025
@octa22 octa22 force-pushed the somfytahoma-binding-refresh-fix branch 2 times, most recently from ceeab00 to ffc5879 Compare July 25, 2025 15:56
<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>
Copy link
Contributor

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.

@octa22 octa22 force-pushed the somfytahoma-binding-refresh-fix branch from ffc5879 to ffe5cc1 Compare July 26, 2025 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An unexpected problem or unintended behavior of an add-on
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants