diff --git a/bundles/org.openhab.binding.haywardomnilogic/src/main/java/org/openhab/binding/haywardomnilogic/internal/handler/HaywardBridgeHandler.java b/bundles/org.openhab.binding.haywardomnilogic/src/main/java/org/openhab/binding/haywardomnilogic/internal/handler/HaywardBridgeHandler.java index 3c52d51f1..038c2c8ab 100644 --- a/bundles/org.openhab.binding.haywardomnilogic/src/main/java/org/openhab/binding/haywardomnilogic/internal/handler/HaywardBridgeHandler.java +++ b/bundles/org.openhab.binding.haywardomnilogic/src/main/java/org/openhab/binding/haywardomnilogic/internal/handler/HaywardBridgeHandler.java @@ -199,6 +199,7 @@ public class HaywardBridgeHandler extends BaseBridgeHandler { xmlResponse = httpXmlResponse(urlParameters); if (xmlResponse.isEmpty()) { + logger.debug("Hayward Connection thing: Login XML response was null"); return false; } @@ -227,7 +228,7 @@ public class HaywardBridgeHandler extends BaseBridgeHandler { xmlResponse = httpXmlResponse(urlParameters); if (xmlResponse.isEmpty()) { - logger.debug("Hayward Connection thing: Login XML response was null"); + logger.debug("Hayward Connection thing: getApiDef XML response was null"); return false; } return true; @@ -277,12 +278,12 @@ public class HaywardBridgeHandler extends BaseBridgeHandler { String xmlResponse = httpXmlResponse(urlParameters); if (xmlResponse.isEmpty()) { - logger.debug("Hayward Connection thing: requestConfig XML response was null"); + logger.debug("Hayward Connection thing: getMSPConfig XML response was null"); return "Fail"; } if (evaluateXPath("//Backyard/Name/text()", xmlResponse).isEmpty()) { - logger.debug("Hayward Connection thing: requestConfiguration XML response: {}", xmlResponse); + logger.debug("Hayward Connection thing: getMSPConfig XML response: {}", xmlResponse); return "Fail"; } return xmlResponse; @@ -294,6 +295,10 @@ public class HaywardBridgeHandler extends BaseBridgeHandler { String xmlResponse = getMspConfig(); + if (xmlResponse.contentEquals("Fail")) { + return false; + } + // Get Units (Standard, Metric) property1 = evaluateXPath("//System/Units/text()", xmlResponse); account.units = property1.get(0);