[freeboxos] Change default timeout to 10s (#17309)

Fixes #17231

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
This commit is contained in:
lolodomo 2024-08-22 20:43:47 +02:00 committed by Ciprian Pascu
parent 586f46f909
commit 7867933f9f
4 changed files with 4 additions and 4 deletions

View File

@ -49,7 +49,7 @@ FreeboxOS binding has the following configuration parameters:
| Parameter Label | Parameter ID | Description | Default |
|-----------------|--------------|----------------------------------------------------------------------------| |
| Timeout | timeout | The timeout for reading from the API in seconds. | 8 |
| Timeout | timeout | The timeout for reading from the API in seconds. | 10 |
| Callback URL | callbackUrl | URL to use for playing notification sounds, e.g. 'http://192.168.0.2:8080' | |
## Thing Configuration

View File

@ -103,7 +103,7 @@ public class FreeboxOsHandlerFactory extends BaseThingHandlerFactory {
@Modified
public void configChanged(Map<String, Object> config) {
String timeout = (String) config.getOrDefault(TIMEOUT, "8");
String timeout = (String) config.getOrDefault(TIMEOUT, "10");
apiHandler.setTimeout(TimeUnit.SECONDS.toMillis(Long.parseLong(timeout)));
callbackURL = (String) config.getOrDefault(CALLBACK_URL, "");

View File

@ -69,7 +69,7 @@ public class ApiHandler {
private final HttpClient httpClient;
private final Gson gson;
private long timeoutInMs = TimeUnit.SECONDS.toMillis(8);
private long timeoutInMs = TimeUnit.SECONDS.toMillis(10);
public ApiHandler(HttpClientFactory httpClientFactory, TimeZoneProvider timeZoneProvider) {
this.gson = new GsonBuilder().setFieldNamingPolicy(FieldNamingPolicy.LOWER_CASE_WITH_UNDERSCORES)

View File

@ -13,7 +13,7 @@
<parameter name="timeout" type="integer" required="false" min="1" unit="s">
<label>Timeout</label>
<description>The timeout for reading from the API in seconds.</description>
<default>8</default>
<default>10</default>
</parameter>
<parameter name="callbackUrl" type="text" required="false">
<label>Callback URL</label>