public void handleCommand(ChannelUID channelUID, Command command) {
}
- @SuppressWarnings("null")
@Override
public void initialize() {
this.config = getConfigAs(BuienradarConfiguration.class);
return;
}
try {
- @SuppressWarnings("null")
final Optional<List<Prediction>> predictionsOpt = client.getPredictions(location);
if (!predictionsOpt.isPresent()) {
// Did not get a result, retry the retrieval.
- logger.warn("Did not get a result from buienradar. Retrying. {} tries remaining, waiting {} seconds.",
- tries, retryInSeconds);
+ // Buienradar is not a very stable source and returns nothing quite regular
+ if (tries <= 2) {
+ logger.warn(
+ "Did not get a result from buienradar. Retrying. {} tries remaining, waiting {} seconds.",
+ tries, retryInSeconds);
+ } else {
+ logger.debug(
+ "Did not get a result from buienradar. Retrying. {} tries remaining, waiting {} seconds.",
+ tries, retryInSeconds);
+ }
scheduler.schedule(() -> refresh(tries - 1, nextRefresh, retryInSeconds * 2), retryInSeconds,
TimeUnit.SECONDS);
return;
}
}
- @SuppressWarnings("null")
@Override
public void dispose() {
try {
</parameter>
<parameter name="exponentialBackoffRetryBaseInSeconds" type="integer" required="true" min="1" unit="s">
- <label>Exponential Backoff Base for Retries</label>
- <description>Exponential back-off base value for retries in seconds. For example, when this is 2 seconds, will retry
- at 2, 4, 8, 16, 32, 64 seconds.</description>
- <default>5</default>
+ <label>Doubling Backoff Base for Retries</label>
+ <description>Doubling back-off base value for retries in seconds. For example, when this is 30 seconds, will retry
+ at 30, 60, 120, 240 seconds.</description>
+ <default>30</default>
</parameter>
</config-description>