From 95235b3b79c0e0f4ec9aef9664c68e1d4dc14392 Mon Sep 17 00:00:00 2001 From: t2000 Date: Mon, 11 Jan 2021 19:39:56 +0100 Subject: [PATCH] [smartmeter] Fix flooding logs with warnings if serial port is not accesible (#9781) Fixes #9780 Signed-off-by: Stefan Triller --- .../openhab/binding/smartmeter/internal/MeterDevice.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bundles/org.openhab.binding.smartmeter/src/main/java/org/openhab/binding/smartmeter/internal/MeterDevice.java b/bundles/org.openhab.binding.smartmeter/src/main/java/org/openhab/binding/smartmeter/internal/MeterDevice.java index 22043c68e2582..b2008b3729dce 100644 --- a/bundles/org.openhab.binding.smartmeter/src/main/java/org/openhab/binding/smartmeter/internal/MeterDevice.java +++ b/bundles/org.openhab.binding.smartmeter/src/main/java/org/openhab/binding/smartmeter/internal/MeterDevice.java @@ -164,13 +164,13 @@ public Disposable readValues(long timeout, ScheduledExecutorService executorServ return Flowable.fromPublisher(connector.getMeterValues(initMessage, period, executorService)) .timeout(timeout + period.toMillis(), TimeUnit.MILLISECONDS, Schedulers.from(executorService)) .doOnSubscribe(sub -> { - logger.info("Opening connection to {}", getDeviceId()); + logger.debug("Opening connection to {}", getDeviceId()); connector.openConnection(); }).doOnError(ex -> { if (ex instanceof TimeoutException) { - logger.warn("Timeout occured for {}; {}", getDeviceId(), ex.getMessage()); + logger.debug("Timeout occured for {}; {}", getDeviceId(), ex.getMessage()); } else { - logger.warn("Failed to read: {}. Closing connection and trying again in {} seconds...; {}", + logger.debug("Failed to read: {}. Closing connection and trying again in {} seconds...; {}", ex.getMessage(), RETRY_DELAY, getDeviceId(), ex); } connector.closeConnection();