]> git.basschouten.com Git - openhab-addons.git/commitdiff
[freeboxos] Change default timeout to 10s (#17309)
authorlolodomo <lg.hc@free.fr>
Thu, 22 Aug 2024 18:43:47 +0000 (20:43 +0200)
committerGitHub <noreply@github.com>
Thu, 22 Aug 2024 18:43:47 +0000 (20:43 +0200)
Fixes #17231

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
bundles/org.openhab.binding.freeboxos/README.md
bundles/org.openhab.binding.freeboxos/src/main/java/org/openhab/binding/freeboxos/internal/FreeboxOsHandlerFactory.java
bundles/org.openhab.binding.freeboxos/src/main/java/org/openhab/binding/freeboxos/internal/api/ApiHandler.java
bundles/org.openhab.binding.freeboxos/src/main/resources/OH-INF/addon/addon.xml

index f195a1ab50a6555ec9372db43193eda29a37498e..bcd01cd3463c1d73a02c06572600298e2f02c8c6 100644 (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.                           |       |
+| 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
index 9f3a0927c28c46e24e69eaf7f898e1f61ceb4337..795caaca4449973f6db22f72659a8f136f9f9bb6 100644 (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, "");
index 9fcb2ad5c88eca87c494228a06bac327b596463f..2db83df732330ce9cf5100df02d8d71a883d0672 100644 (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)
index b2b1343925a33decfaccf98788eb1126a8a3eb53..8dd09cae39e7e8e1a74e7ec48a11cfa33e6991cd 100644 (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>