[http] refresh and delay

(OH3 3.1, HTTP binding)

Is someone able to clarify the expected behaviour:

  • refresh - this is the time between activation of a new set of requests for an entire Thing.
  • delay - this is the time between requests between each Channel within a single Thing.

Is that correct? If not, what is?

Background: I have an HTTP Thing with ~10 Channels, but every once in a while the device that is being interrogated has a panic and the request times out. I assumed this was because openHAB was requesting all Thing Channels (with sightly different stateExtension URLs) at the same time, freaking it out. In the documentation, delay has the description:

Delay between two requests in ms (advanced parameter).

which is a little ambiguous. Which requests? A Thing? (Though that would then be the same as refresh, wouldn’t it). Or between the Channel requests within a Thing?

Delay: Between two requests within the same thing. Refresh: between refreshing the same channel.

Refresh: 300s, delay 1000ms:

t=0: request channel 1
t=1: request channel 2
t=2: request channel 3
t=300: request channel 1
t=301: request channel 2
t=302: request channel 3

And so on.

Please note that channels with the same stateExtensiob are refreshed with one request.

Cheers @J-N-K , that example is clear.

Does the request fire irrespective of the state of the previous request? i.e. does the timeout come into this at all?

For example t=0 takes longer than a second for Channel 1 to receive data; does Channel 2 wait, or go ahead at t=1 regardless?

The result of the previous request is not considered. Rate-Limiting just delays the sending of the second request by the delay time.