diff --git a/bundles/org.smarthomej.binding.viessmann/src/main/java/org/smarthomej/binding/viessmann/internal/handler/ViessmannBridgeHandler.java b/bundles/org.smarthomej.binding.viessmann/src/main/java/org/smarthomej/binding/viessmann/internal/handler/ViessmannBridgeHandler.java index a3314f043a..fb526a6793 100644 --- a/bundles/org.smarthomej.binding.viessmann/src/main/java/org/smarthomej/binding/viessmann/internal/handler/ViessmannBridgeHandler.java +++ b/bundles/org.smarthomej.binding.viessmann/src/main/java/org/smarthomej/binding/viessmann/internal/handler/ViessmannBridgeHandler.java @@ -41,6 +41,8 @@ import org.smarthomej.binding.viessmann.internal.dto.features.FeatureDataDTO; import org.smarthomej.binding.viessmann.internal.dto.features.FeaturesDTO; +import com.google.gson.JsonSyntaxException; + /** * The {@link ViessmannBridgeHandler} is responsible for handling the api connection. * @@ -197,12 +199,16 @@ private void pollingFeatures() { } public void getAllFeaturesByDeviceId(String deviceId) { - FeaturesDTO allFeatures = api.getAllFeatures(deviceId); - if (allFeatures != null) { - List featuresData = allFeatures.data; - for (FeatureDataDTO featureDataDTO : featuresData) { - notifyChildHandlers(featureDataDTO); + try { + FeaturesDTO allFeatures = api.getAllFeatures(deviceId); + if (allFeatures != null) { + List featuresData = allFeatures.data; + for (FeatureDataDTO featureDataDTO : featuresData) { + notifyChildHandlers(featureDataDTO); + } } + } catch (JsonSyntaxException | IllegalStateException e) { + logger.warn("Parsing Viessmann response fails: {}", e); } }