diff --git a/bundles/org.openhab.binding.miele/README.md b/bundles/org.openhab.binding.miele/README.md index 31a69d669..b2fb5b4bf 100644 --- a/bundles/org.openhab.binding.miele/README.md +++ b/bundles/org.openhab.binding.miele/README.md @@ -43,27 +43,25 @@ discovery.miele:removalGracePeriod=30 ## Thing Configuration +### Thing Configuration for Miele XGW3000 + +| Configuration Parameter | Description | +|-------------------------|---------------| +| ipAddress | Network address of the Miele@home gateway | +| interface | Network address of openHAB host interface where the binding will listen for multicast events coming from the Miele@home gateway. | +| userName | Name of a registered Miele@home user. | +| password | Password for the registered Miele@home user. | +| language | Language for state, program and phase texts. Leave blank for system language. | + +### Thing Configuration for appliance + +| Configuration Parameter | Description | +|-------------------------|---------------| +| uid | Unique identifier for specific appliance on the gateway. | + Each appliance needs the device UID as a configuration parameter. The UID is nowhere to be found on the appliances, but since the discovery works quite reliably, a manual configuration is not needed. -Once you got hold of the IDs, a manual configuration looks like this: - -``` -Bridge miele:xgw3000:dilbeek [ipAddress="192.168.0.18", interface="192.168.0.5"] { -Things: -Thing fridgefreezer freezer [uid="00124b000424be44#2"] -Thing hood hood [uid="001d63fffe020685#210"] -Thing fridge fridge [uid="00124b000424bdc0#2"] -Thing oven oven [uid="001d63fffe020390#210"] -Thing oven microwave [uid="001d63fffe0206eb#210"] -Thing hob hob [uid="00124b000424bed7#2"] -Thing dishwasher dishwasher [uid="001d63fffe020683#210"] -Thing tumbledryer dryer [uid="001d63fffe0200ba#210"] -Thing washingmachine washingmachine [uid="001d63fffe020505#210"] -Thing coffeemachine coffeemachine [uid="001d63fffe020505#190"] -} -``` - ## Channels ### Raw values diff --git a/bundles/org.openhab.binding.miele/src/main/java/org/openhab/binding/miele/internal/handler/MieleBridgeHandler.java b/bundles/org.openhab.binding.miele/src/main/java/org/openhab/binding/miele/internal/handler/MieleBridgeHandler.java index bb14464e4..eaae358d2 100644 --- a/bundles/org.openhab.binding.miele/src/main/java/org/openhab/binding/miele/internal/handler/MieleBridgeHandler.java +++ b/bundles/org.openhab.binding.miele/src/main/java/org/openhab/binding/miele/internal/handler/MieleBridgeHandler.java @@ -137,11 +137,6 @@ public class MieleBridgeHandler extends BaseBridgeHandler { "@text/offline.configuration-error.ip-multicast-interface-not-set"); return false; } - if (!IP_PATTERN.matcher((String) config.get(HOST)).matches()) { - updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.OFFLINE.CONFIGURATION_ERROR, - "@text/offline.configuration-error.invalid-ip-gateway [\"" + config.get(HOST) + "\"]"); - return false; - } if (!IP_PATTERN.matcher((String) config.get(INTERFACE)).matches()) { updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.OFFLINE.CONFIGURATION_ERROR, "@text/offline.configuration-error.invalid-ip-multicast-interface [\"" + config.get(INTERFACE) @@ -210,17 +205,20 @@ public class MieleBridgeHandler extends BaseBridgeHandler { } } catch (MieleRpcException e) { Throwable cause = e.getCause(); + String message; if (cause == null) { - logger.debug("An exception occurred while polling an appliance: '{}'", e.getMessage()); + message = e.getMessage(); + logger.debug("An exception occurred while polling an appliance: '{}'", message); } else { + message = cause.getMessage(); logger.debug("An exception occurred while polling an appliance: '{}' -> '{}'", e.getMessage(), - cause.getMessage()); + message); } if (lastBridgeConnectionState) { logger.debug("Connection to Miele Gateway {} lost.", host); lastBridgeConnectionState = false; } - updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.OFFLINE.COMMUNICATION_ERROR); + updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.OFFLINE.COMMUNICATION_ERROR, message); } } }; diff --git a/bundles/org.openhab.binding.miele/src/main/resources/OH-INF/i18n/miele.properties b/bundles/org.openhab.binding.miele/src/main/resources/OH-INF/i18n/miele.properties index 1a04ee1c8..2fc16547e 100644 --- a/bundles/org.openhab.binding.miele/src/main/resources/OH-INF/i18n/miele.properties +++ b/bundles/org.openhab.binding.miele/src/main/resources/OH-INF/i18n/miele.properties @@ -128,7 +128,6 @@ channel-type.miele.waterConsumption.description = Water consumption by the curre offline.configuration-error.bridge-missing = Bridge is missing offline.configuration-error.ip-address-not-set = Cannot connect to the Miele gateway: host IP address is not set. offline.configuration-error.ip-multicast-interface-not-set = Cannot connect to the Miele gateway: multicast interface is not set. -offline.configuration-error.invalid-ip-gateway = Invalid IP address for the Miele@Home gateway: {0} offline.configuration-error.invalid-ip-multicast-interface = Invalid IP address for the multicast interface: {0} offline.configuration-error.invalid-language = Invalid language: {0} offline.configuration-error.uid-not-set = Appliance ID is not set