Skip to content

Conversation

dag81
Copy link
Contributor

@dag81 dag81 commented May 11, 2025

This is to allow users to adjust the timeout when responses are required to compensate either for slow gateway's or starvation on the runtime. This relates to the last few discussion points around 11/05 here: https://community.openhab.org/t/binding-request-linktap/77192/44.

From tracing the software through, it can only be I suspect either starvation of jetty being able to service the request's in the time given when the system is under full load likely based on how the CPU's are thread balancing on PI hardware, or the older generation of device isn't responding. (I doubt this is the case as generally the GW's have been very stable).

This therefore adds a advanced option, where users can increase the timeout to be between 3 - 30 seconds for how long the binding will wait for the underlying jetty to have capacity to process the response.

If trace mode is enabled jetty requests are traced - to check for starvation (e.g. never exit the queued state). This is so its clear if other bindings are locking the http client are potentially starving the binding from being able to execute http requests. The impact of the jetty traces should be minimal overall. It will only go through those flows during the initial connection setup, or when commands are issued. In normal operation the GW send's data to the servlet which isn't logging more information, only if it was operating in the failsafe polling mode would it potentially be adding a bit more trace data.

dag81 added 4 commits May 11, 2025 22:00
[linktap] Addition of timeout config option

Signed-off-by: David Goodyear <david.goodyear@gmail.com>
[linktap] Cleanup of unrequired variable

Signed-off-by: David Goodyear <david.goodyear@gmail.com>
[linktap] Revert accidental removal of config code

Signed-off-by: David Goodyear <david.goodyear@gmail.com>
[linktap] Remove commented out line

Signed-off-by: David Goodyear <david.goodyear@gmail.com>
@dag81 dag81 added the enhancement An enhancement or new feature for an existing add-on label May 11, 2025
dag81 added 8 commits May 11, 2025 22:38
[linktap] Align const to final setting name

Signed-off-by: David Goodyear <david.goodyear@gmail.com>
[linktap] Cleanup to use handler function

Signed-off-by: David Goodyear <david.goodyear@gmail.com>
[linktap] Comment for magic number

Signed-off-by: David Goodyear <david.goodyear@gmail.com>
[linktap] Revert i18n file

Signed-off-by: David Goodyear <david.goodyear@gmail.com>
[linktap] Missed call remap to single method

Signed-off-by: David Goodyear <david.goodyear@gmail.com>
[linktap] Remove unnecessary parameter addition

Signed-off-by: David Goodyear <david.goodyear@gmail.com>
[linktap] Spotless apply

Signed-off-by: David Goodyear <david.goodyear@gmail.com>
[linktap] i18n additions for new config

Signed-off-by: David Goodyear <david.goodyear@gmail.com>
@openhab-bot
Copy link
Collaborator

This pull request has been mentioned on openHAB Community. There might be relevant details there:

https://community.openhab.org/t/binding-request-linktap/77192/48

@dag81
Copy link
Contributor Author

dag81 commented May 13, 2025

Technically the changes are in my branch and tested - seems to be having issues syncing the PR request with the final commits. Will check tomorrow the state of play - to see if its up to date, so I can remove the draft status and WIP from the title. Apologies I only just saw there was a work in progress label now :(

[linktap] force push

Signed-off-by: David Goodyear <david.goodyear@gmail.com>
@dag81 dag81 force-pushed the feature/TLTimeoutConfigurable branch from 88e1239 to 51b3cf5 Compare May 13, 2025 17:41
[linktap] adjust scope to private

Signed-off-by: David Goodyear <david.goodyear@gmail.com>
@dag81 dag81 marked this pull request as ready for review May 13, 2025 19:54
@dag81 dag81 changed the title WIP: [linktap] Communications timeout configuration [linktap] Communications timeout configuration May 13, 2025
Copy link
Contributor

@jlaur jlaur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Two minor comments left, otherwise LGTM.

[linktap] missed renames

Signed-off-by: David Goodyear <david.goodyear@gmail.com>
@dag81 dag81 requested a review from jlaur May 23, 2025 20:36
Copy link
Contributor

@jlaur jlaur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jlaur jlaur changed the title [linktap] Communications timeout configuration [linktap] Add communication timeout configuration parameter May 23, 2025
@jlaur jlaur merged commit fe1dddd into openhab:main May 23, 2025
2 checks passed
@jlaur jlaur added this to the 5.0 milestone May 23, 2025
@dag81
Copy link
Contributor Author

dag81 commented May 23, 2025

@jlaur Thank you for the quick turnaround 💯 👍

phenix1990 pushed a commit to phenix1990/openhab-addons that referenced this pull request Jul 31, 2025
…18679)

Signed-off-by: David Goodyear <david.goodyear@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement An enhancement or new feature for an existing add-on

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants