mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-10 15:11:59 +01:00
[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:
parent
586f46f909
commit
7867933f9f
@ -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
|
||||
|
@ -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, "");
|
||||
|
@ -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)
|
||||
|
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user