From 766a451a7cae05634826b6a6ca5cced16bb42493 Mon Sep 17 00:00:00 2001 From: lsiepel Date: Fri, 31 Mar 2023 09:24:34 +0200 Subject: [PATCH] [zway] Code improvements (#14688) * Code improvements Signed-off-by: lsiepel --- .../zway/internal/ZWayHandlerFactory.java | 5 +- .../config/ZWayBridgeConfiguration.java | 30 ++-- .../ZWayZAutomationDeviceConfiguration.java | 12 +- .../config/ZWayZWaveDeviceConfiguration.java | 12 +- .../converter/ZWayDeviceStateConverter.java | 27 ++-- .../discovery/ZWayBridgeDiscoveryService.java | 4 +- .../discovery/ZWayDeviceDiscoveryService.java | 15 +- .../internal/handler/ZWayBridgeHandler.java | 20 +-- .../internal/handler/ZWayDeviceHandler.java | 6 +- .../resources/OH-INF/i18n/zway.properties | 152 ++++++++++-------- 10 files changed, 155 insertions(+), 128 deletions(-) diff --git a/bundles/org.openhab.binding.zway/src/main/java/org/openhab/binding/zway/internal/ZWayHandlerFactory.java b/bundles/org.openhab.binding.zway/src/main/java/org/openhab/binding/zway/internal/ZWayHandlerFactory.java index f6d56b2d4..f158d7d23 100644 --- a/bundles/org.openhab.binding.zway/src/main/java/org/openhab/binding/zway/internal/ZWayHandlerFactory.java +++ b/bundles/org.openhab.binding.zway/src/main/java/org/openhab/binding/zway/internal/ZWayHandlerFactory.java @@ -20,6 +20,8 @@ import java.util.Set; import java.util.stream.Collectors; import java.util.stream.Stream; +import org.eclipse.jdt.annotation.NonNullByDefault; +import org.eclipse.jdt.annotation.Nullable; import org.openhab.binding.zway.internal.discovery.ZWayDeviceDiscoveryService; import org.openhab.binding.zway.internal.handler.ZWayBridgeHandler; import org.openhab.binding.zway.internal.handler.ZWayZAutomationDeviceHandler; @@ -41,6 +43,7 @@ import org.osgi.service.component.annotations.Component; * * @author Patrick Hecker - Initial contribution */ +@NonNullByDefault @Component(service = ThingHandlerFactory.class, configurationPid = "binding.zway") public class ZWayHandlerFactory extends BaseThingHandlerFactory { @@ -56,7 +59,7 @@ public class ZWayHandlerFactory extends BaseThingHandlerFactory { } @Override - protected ThingHandler createHandler(Thing thing) { + protected @Nullable ThingHandler createHandler(Thing thing) { if (ZWayBridgeHandler.SUPPORTED_THING_TYPE.equals(thing.getThingTypeUID())) { ZWayBridgeHandler handler = new ZWayBridgeHandler((Bridge) thing); registerDeviceDiscoveryService(handler); diff --git a/bundles/org.openhab.binding.zway/src/main/java/org/openhab/binding/zway/internal/config/ZWayBridgeConfiguration.java b/bundles/org.openhab.binding.zway/src/main/java/org/openhab/binding/zway/internal/config/ZWayBridgeConfiguration.java index cd4122275..9861cc4f9 100644 --- a/bundles/org.openhab.binding.zway/src/main/java/org/openhab/binding/zway/internal/config/ZWayBridgeConfiguration.java +++ b/bundles/org.openhab.binding.zway/src/main/java/org/openhab/binding/zway/internal/config/ZWayBridgeConfiguration.java @@ -14,22 +14,24 @@ package org.openhab.binding.zway.internal.config; import static org.openhab.binding.zway.internal.ZWayBindingConstants.*; -import org.apache.commons.lang3.builder.ToStringBuilder; +import org.eclipse.jdt.annotation.NonNullByDefault; +import org.eclipse.jdt.annotation.Nullable; /** * The {@link ZWayBridgeConfiguration} class defines the model for a bridge configuration. * * @author Patrick Hecker - Initial contribution, remove openHAB configuration */ +@NonNullByDefault public class ZWayBridgeConfiguration { - private String zwayServerIpAddress; - private Integer zwayServerPort; - private String zwayServerProtocol; + private String zwayServerIpAddress = "localhost"; + private Integer zwayServerPort = 8083; + private String zwayServerProtocol = "http"; - private String zwayServerUsername; - private String zwayServerPassword; + private String zwayServerUsername = "admin"; + private @Nullable String zwayServerPassword; - private Integer pollingInterval; + private Integer pollingInterval = 3600; public String getZWayIpAddress() { return zwayServerIpAddress; @@ -63,7 +65,7 @@ public class ZWayBridgeConfiguration { this.zwayServerUsername = username; } - public String getZWayPassword() { + public @Nullable String getZWayPassword() { return zwayServerPassword; } @@ -81,11 +83,11 @@ public class ZWayBridgeConfiguration { @Override public String toString() { - return new ToStringBuilder(this).append(BRIDGE_CONFIG_ZWAY_SERVER_IP_ADDRESS, this.getZWayIpAddress()) - .append(BRIDGE_CONFIG_ZWAY_SERVER_PORT, this.getZWayPort()) - .append(BRIDGE_CONFIG_ZWAY_SERVER_PROTOCOL, this.getZWayProtocol()) - .append(BRIDGE_CONFIG_ZWAY_SERVER_USERNAME, this.getZWayUsername()) - .append(BRIDGE_CONFIG_ZWAY_SERVER_PASSWORD, this.getZWayPassword()) - .append(BRIDGE_CONFIG_POLLING_INTERVAL, this.getPollingInterval()).toString(); + return getClass().getSimpleName() + "{ " + BRIDGE_CONFIG_ZWAY_SERVER_IP_ADDRESS + "=" + getZWayIpAddress() + + ", " + BRIDGE_CONFIG_ZWAY_SERVER_PORT + "=" + getZWayPort() + ", " + + BRIDGE_CONFIG_ZWAY_SERVER_PROTOCOL + "=" + getZWayProtocol() + ", " + + BRIDGE_CONFIG_ZWAY_SERVER_USERNAME + "=" + getZWayUsername() + ", " + + BRIDGE_CONFIG_ZWAY_SERVER_PASSWORD + "=" + getZWayPassword() + ", " + BRIDGE_CONFIG_POLLING_INTERVAL + + "=" + this.getPollingInterval() + "}"; } } diff --git a/bundles/org.openhab.binding.zway/src/main/java/org/openhab/binding/zway/internal/config/ZWayZAutomationDeviceConfiguration.java b/bundles/org.openhab.binding.zway/src/main/java/org/openhab/binding/zway/internal/config/ZWayZAutomationDeviceConfiguration.java index 9a92f2184..d6d4d8ef1 100644 --- a/bundles/org.openhab.binding.zway/src/main/java/org/openhab/binding/zway/internal/config/ZWayZAutomationDeviceConfiguration.java +++ b/bundles/org.openhab.binding.zway/src/main/java/org/openhab/binding/zway/internal/config/ZWayZAutomationDeviceConfiguration.java @@ -14,26 +14,28 @@ package org.openhab.binding.zway.internal.config; import static org.openhab.binding.zway.internal.ZWayBindingConstants.DEVICE_CONFIG_VIRTUAL_DEVICE_ID; -import org.apache.commons.lang3.builder.ToStringBuilder; +import org.eclipse.jdt.annotation.NonNullByDefault; +import org.eclipse.jdt.annotation.Nullable; /** * The {@link ZWayZAutomationDeviceConfiguration} class defines the model for a Z-Way device configuration. * * @author Patrick Hecker - Initial contribution */ +@NonNullByDefault public class ZWayZAutomationDeviceConfiguration { - private String deviceId; + private @Nullable String deviceId; - public String getDeviceId() { + public @Nullable String getDeviceId() { return deviceId; } - public void setDeviceId(String deviceId) { + public void setDeviceId(@Nullable String deviceId) { this.deviceId = deviceId; } @Override public String toString() { - return new ToStringBuilder(this).append(DEVICE_CONFIG_VIRTUAL_DEVICE_ID, this.getDeviceId()).toString(); + return getClass().getSimpleName() + "{ " + DEVICE_CONFIG_VIRTUAL_DEVICE_ID + "=" + getDeviceId() + "}"; } } diff --git a/bundles/org.openhab.binding.zway/src/main/java/org/openhab/binding/zway/internal/config/ZWayZWaveDeviceConfiguration.java b/bundles/org.openhab.binding.zway/src/main/java/org/openhab/binding/zway/internal/config/ZWayZWaveDeviceConfiguration.java index 86b802dcb..4cf8f38fc 100644 --- a/bundles/org.openhab.binding.zway/src/main/java/org/openhab/binding/zway/internal/config/ZWayZWaveDeviceConfiguration.java +++ b/bundles/org.openhab.binding.zway/src/main/java/org/openhab/binding/zway/internal/config/ZWayZWaveDeviceConfiguration.java @@ -14,26 +14,28 @@ package org.openhab.binding.zway.internal.config; import static org.openhab.binding.zway.internal.ZWayBindingConstants.DEVICE_CONFIG_NODE_ID; -import org.apache.commons.lang3.builder.ToStringBuilder; +import org.eclipse.jdt.annotation.NonNullByDefault; +import org.eclipse.jdt.annotation.Nullable; /** * The {@link ZWayZWaveDeviceConfiguration} class defines the model for a Z-Wave device configuration. * * @author Patrick Hecker - Initial contribution */ +@NonNullByDefault public class ZWayZWaveDeviceConfiguration { - private Integer nodeId; + private @Nullable Integer nodeId; - public Integer getNodeId() { + public @Nullable Integer getNodeId() { return nodeId; } - public void setNodeId(Integer nodeId) { + public void setNodeId(@Nullable Integer nodeId) { this.nodeId = nodeId; } @Override public String toString() { - return new ToStringBuilder(this).append(DEVICE_CONFIG_NODE_ID, this.getNodeId()).toString(); + return getClass().getSimpleName() + "{ " + DEVICE_CONFIG_NODE_ID + "=" + getNodeId() + "}"; } } diff --git a/bundles/org.openhab.binding.zway/src/main/java/org/openhab/binding/zway/internal/converter/ZWayDeviceStateConverter.java b/bundles/org.openhab.binding.zway/src/main/java/org/openhab/binding/zway/internal/converter/ZWayDeviceStateConverter.java index 29da0abb1..be6ae37f8 100644 --- a/bundles/org.openhab.binding.zway/src/main/java/org/openhab/binding/zway/internal/converter/ZWayDeviceStateConverter.java +++ b/bundles/org.openhab.binding.zway/src/main/java/org/openhab/binding/zway/internal/converter/ZWayDeviceStateConverter.java @@ -12,6 +12,8 @@ */ package org.openhab.binding.zway.internal.converter; +import org.eclipse.jdt.annotation.NonNullByDefault; +import org.eclipse.jdt.annotation.Nullable; import org.openhab.core.library.types.DecimalType; import org.openhab.core.library.types.HSBType; import org.openhab.core.library.types.OnOffType; @@ -41,6 +43,7 @@ import de.fh_zwickau.informatik.sensor.model.devices.types.ToggleButton; * * @author Patrick Hecker - Initial contribution */ +@NonNullByDefault public class ZWayDeviceStateConverter { public static State toState(Device device, Channel channel) { // Store level locally @@ -52,7 +55,7 @@ public class ZWayDeviceStateConverter { } else if (device instanceof Doorlock) { return getBinaryState(level.toLowerCase()); } else if (device instanceof SensorBinary) { - if (channel.getAcceptedItemType().equals("Contact")) { + if ("Contact".equals(channel.getAcceptedItemType())) { return getDoorlockState(level.toLowerCase()); } else { return getBinaryState(level.toLowerCase()); @@ -62,8 +65,8 @@ public class ZWayDeviceStateConverter { } else if (device instanceof SwitchBinary) { return getBinaryState(level.toLowerCase()); } else if (device instanceof SwitchMultilevel) { - if (channel.getAcceptedItemType().equals("Rollershutter") - || channel.getAcceptedItemType().equals("Dimmer")) { + if ("Rollershutter".equals(channel.getAcceptedItemType()) + || "Dimmer".equals(channel.getAcceptedItemType())) { return getPercentState(level); } else { return getMultilevelState(level); @@ -89,14 +92,14 @@ public class ZWayDeviceStateConverter { * @param multilevel sensor value * @return transformed openHAB state */ - private static State getMultilevelState(String multilevelValue) { + private static State getMultilevelState(@Nullable String multilevelValue) { if (multilevelValue != null) { return new DecimalType(multilevelValue); } return UnDefType.UNDEF; } - private static State getPercentState(String multilevelValue) { + private static State getPercentState(@Nullable String multilevelValue) { if (multilevelValue != null) { return new PercentType(multilevelValue); } @@ -109,11 +112,11 @@ public class ZWayDeviceStateConverter { * @param binary switch value * @return transformed openHAB state */ - private static State getBinaryState(String binarySwitchState) { + private static State getBinaryState(@Nullable String binarySwitchState) { if (binarySwitchState != null) { - if (binarySwitchState.equals("on")) { + if ("on".equals(binarySwitchState)) { return OnOffType.ON; - } else if (binarySwitchState.equals("off")) { + } else if ("off".equals(binarySwitchState)) { return OnOffType.OFF; } } @@ -128,11 +131,11 @@ public class ZWayDeviceStateConverter { * @param binary sensor state * @return */ - private static State getDoorlockState(String binarySensorState) { + private static State getDoorlockState(@Nullable String binarySensorState) { if (binarySensorState != null) { - if (binarySensorState.equals("on")) { + if ("on".equals(binarySensorState)) { return OpenClosedType.OPEN; - } else if (binarySensorState.equals("off")) { + } else if ("off".equals(binarySensorState)) { return OpenClosedType.CLOSED; } } @@ -145,7 +148,7 @@ public class ZWayDeviceStateConverter { * @param Z-Way color value * @return transformed openHAB state */ - private static State getColorState(Color colorSwitchState) { + private static State getColorState(@Nullable Color colorSwitchState) { if (colorSwitchState != null && colorSwitchState.getRed() != null && colorSwitchState.getGreen() != null && colorSwitchState.getBlue() != null) { HSBType hsbType = HSBType.fromRGB(colorSwitchState.getRed(), colorSwitchState.getGreen(), diff --git a/bundles/org.openhab.binding.zway/src/main/java/org/openhab/binding/zway/internal/discovery/ZWayBridgeDiscoveryService.java b/bundles/org.openhab.binding.zway/src/main/java/org/openhab/binding/zway/internal/discovery/ZWayBridgeDiscoveryService.java index 8e6442512..31c84f35b 100644 --- a/bundles/org.openhab.binding.zway/src/main/java/org/openhab/binding/zway/internal/discovery/ZWayBridgeDiscoveryService.java +++ b/bundles/org.openhab.binding.zway/src/main/java/org/openhab/binding/zway/internal/discovery/ZWayBridgeDiscoveryService.java @@ -24,6 +24,7 @@ import java.util.Enumeration; import java.util.regex.Pattern; import org.apache.commons.net.util.SubnetUtils; +import org.eclipse.jdt.annotation.NonNullByDefault; import org.openhab.binding.zway.internal.ZWayBindingConstants; import org.openhab.core.config.discovery.AbstractDiscoveryService; import org.openhab.core.config.discovery.DiscoveryResult; @@ -39,6 +40,7 @@ import org.slf4j.LoggerFactory; * * @author Patrick Hecker - Initial contribution */ +@NonNullByDefault @Component(service = DiscoveryService.class, configurationPid = "discovery.zway") public class ZWayBridgeDiscoveryService extends AbstractDiscoveryService { @@ -124,7 +126,7 @@ public class ZWayBridgeDiscoveryService extends AbstractDiscoveryService { .withLabel("Z-Way Server " + ipAddress).build(); thingDiscovered(discoveryResult); } - } catch (Exception e) { + } catch (IOException e) { logger.warn("Discovery resulted in an unexpected exception", e); } } diff --git a/bundles/org.openhab.binding.zway/src/main/java/org/openhab/binding/zway/internal/discovery/ZWayDeviceDiscoveryService.java b/bundles/org.openhab.binding.zway/src/main/java/org/openhab/binding/zway/internal/discovery/ZWayDeviceDiscoveryService.java index 58027ae10..ffb0cc884 100644 --- a/bundles/org.openhab.binding.zway/src/main/java/org/openhab/binding/zway/internal/discovery/ZWayDeviceDiscoveryService.java +++ b/bundles/org.openhab.binding.zway/src/main/java/org/openhab/binding/zway/internal/discovery/ZWayDeviceDiscoveryService.java @@ -17,6 +17,8 @@ import java.util.Map; import java.util.concurrent.ScheduledFuture; import java.util.concurrent.TimeUnit; +import org.eclipse.jdt.annotation.NonNullByDefault; +import org.eclipse.jdt.annotation.Nullable; import org.openhab.binding.zway.internal.ZWayBindingConstants; import org.openhab.binding.zway.internal.handler.ZWayBridgeHandler; import org.openhab.core.config.discovery.AbstractDiscoveryService; @@ -41,6 +43,7 @@ import de.fh_zwickau.informatik.sensor.model.zwaveapi.devices.ZWaveDevice; * * @author Patrick Hecker - Initial contribution */ +@NonNullByDefault public class ZWayDeviceDiscoveryService extends AbstractDiscoveryService { private final Logger logger = LoggerFactory.getLogger(getClass()); @@ -51,7 +54,7 @@ public class ZWayDeviceDiscoveryService extends AbstractDiscoveryService { private ZWayBridgeHandler mBridgeHandler; private ZWayDeviceScan mZWayDeviceScanningRunnable; - private ScheduledFuture mZWayDeviceScanningJob; + private @Nullable ScheduledFuture mZWayDeviceScanningJob; public ZWayDeviceDiscoveryService(ZWayBridgeHandler bridgeHandler) { super(ZWayBindingConstants.SUPPORTED_DEVICE_THING_TYPES_UIDS, SEARCH_TIME); @@ -65,7 +68,7 @@ public class ZWayDeviceDiscoveryService extends AbstractDiscoveryService { logger.debug("Starting scan on Z-Way Server {}", mBridgeHandler.getThing().getUID()); // Z-Way bridge have to be ONLINE because configuration is needed - if (mBridgeHandler == null || !mBridgeHandler.getThing().getStatus().equals(ThingStatus.ONLINE)) { + if (!mBridgeHandler.getThing().getStatus().equals(ThingStatus.ONLINE)) { logger.debug("Z-Way bridge handler not found or not ONLINE."); return; } @@ -213,7 +216,8 @@ public class ZWayDeviceDiscoveryService extends AbstractDiscoveryService { @Override protected void startBackgroundDiscovery() { - if (mZWayDeviceScanningJob == null || mZWayDeviceScanningJob.isCancelled()) { + ScheduledFuture mZWayDeviceScanningJobLocal = mZWayDeviceScanningJob; + if (mZWayDeviceScanningJobLocal == null || mZWayDeviceScanningJobLocal.isCancelled()) { logger.debug("Starting background scanning job"); mZWayDeviceScanningJob = scheduler.scheduleWithFixedDelay(mZWayDeviceScanningRunnable, INITIAL_DELAY, SCAN_INTERVAL, TimeUnit.SECONDS); @@ -224,8 +228,9 @@ public class ZWayDeviceDiscoveryService extends AbstractDiscoveryService { @Override protected void stopBackgroundDiscovery() { - if (mZWayDeviceScanningJob != null && !mZWayDeviceScanningJob.isCancelled()) { - mZWayDeviceScanningJob.cancel(false); + ScheduledFuture mZWayDeviceScanningJobLocal = mZWayDeviceScanningJob; + if (mZWayDeviceScanningJobLocal != null && !mZWayDeviceScanningJobLocal.isCancelled()) { + mZWayDeviceScanningJobLocal.cancel(false); mZWayDeviceScanningJob = null; } } diff --git a/bundles/org.openhab.binding.zway/src/main/java/org/openhab/binding/zway/internal/handler/ZWayBridgeHandler.java b/bundles/org.openhab.binding.zway/src/main/java/org/openhab/binding/zway/internal/handler/ZWayBridgeHandler.java index e9e39e0f6..9810e4d45 100644 --- a/bundles/org.openhab.binding.zway/src/main/java/org/openhab/binding/zway/internal/handler/ZWayBridgeHandler.java +++ b/bundles/org.openhab.binding.zway/src/main/java/org/openhab/binding/zway/internal/handler/ZWayBridgeHandler.java @@ -387,18 +387,13 @@ public class ZWayBridgeHandler extends BaseBridgeHandler implements IZWayApiCall // Z-Way IP address String zWayIpAddress = config.getZWayIpAddress(); - if (zWayIpAddress == null || zWayIpAddress.isBlank()) { + if (zWayIpAddress.isBlank()) { config.setZWayIpAddress("localhost"); // default value } - // Z-Way Port - if (config.getZWayPort() == null) { - config.setZWayPort(8083); - } - // Z-Way Protocol String zWayProtocol = config.getZWayProtocol(); - if (zWayProtocol == null || zWayProtocol.isBlank()) { + if (zWayProtocol.isBlank()) { config.setZWayProtocol("http"); } @@ -412,19 +407,10 @@ public class ZWayBridgeHandler extends BaseBridgeHandler implements IZWayApiCall // Z-Way Username String zWayUsername = config.getZWayUsername(); - if (zWayUsername == null || zWayUsername.isBlank()) { + if (zWayUsername.isBlank()) { config.setZWayUsername("admin"); // default value } - /*********************************** - ****** General configuration ****** - **********************************/ - - // Polling interval - if (config.getPollingInterval() == null) { - config.setPollingInterval(3600); - } - return config; } diff --git a/bundles/org.openhab.binding.zway/src/main/java/org/openhab/binding/zway/internal/handler/ZWayDeviceHandler.java b/bundles/org.openhab.binding.zway/src/main/java/org/openhab/binding/zway/internal/handler/ZWayDeviceHandler.java index 4c5464422..b65632269 100644 --- a/bundles/org.openhab.binding.zway/src/main/java/org/openhab/binding/zway/internal/handler/ZWayDeviceHandler.java +++ b/bundles/org.openhab.binding.zway/src/main/java/org/openhab/binding/zway/internal/handler/ZWayDeviceHandler.java @@ -257,7 +257,7 @@ public abstract class ZWayDeviceHandler extends BaseThingHandler { Map properties = getThing().getProperties(); // Load location from properties String location = properties.get(ZWayBindingConstants.DEVICE_PROP_LOCATION); - if (location != null && !location.equals("") && getThing().getLocation() == null) { + if (location != null && !location.isBlank() && getThing().getLocation() == null) { logger.debug("Set location to {}", location); ThingBuilder thingBuilder = editThing(); thingBuilder.withLocation(location); @@ -371,7 +371,7 @@ public abstract class ZWayDeviceHandler extends BaseThingHandler { // Load device id from channel's properties for the compatibility of ZAutomation and ZWave devices final Channel channel = getThing().getChannel(channelUID.getId()); - final String deviceId = channel.getProperties().get("deviceId"); + final String deviceId = channel != null ? channel.getProperties().get("deviceId") : null; if (deviceId != null) { DeviceList deviceList = zwayBridgeHandler.getDeviceList(); @@ -707,7 +707,7 @@ public abstract class ZWayDeviceHandler extends BaseThingHandler { } // If at least one rule could mapped to a channel - if (!id.equals("")) { + if (!id.isBlank()) { addChannel(id, acceptedItemType, device.getMetrics().getTitle(), properties); logger.debug( diff --git a/bundles/org.openhab.binding.zway/src/main/resources/OH-INF/i18n/zway.properties b/bundles/org.openhab.binding.zway/src/main/resources/OH-INF/i18n/zway.properties index 2ca37a4ce..9b766e06e 100644 --- a/bundles/org.openhab.binding.zway/src/main/resources/OH-INF/i18n/zway.properties +++ b/bundles/org.openhab.binding.zway/src/main/resources/OH-INF/i18n/zway.properties @@ -1,16 +1,101 @@ # add-on + addon.zway.name = Z-Way Binding addon.zway.description = Z-Way is a home automation software to configure and control a Z-Wave network. The ZAutomation interface provides all Z-Wave devices and handles incoming commands. The Z-Way Binding uses this HTTP interface to load all device and make them available during the discovery process.
Currently only a continuous polling is available! # thing types + +thing-type.zway.zwayDevice.label = Z-Wave Device +thing-type.zway.zwayDevice.description = A Z-Wave device represents a device of real world. Each device function will be mapped to a separate channel. The bridge is necessary as an intermediary between openHAB thing and Z-Way device. thing-type.zway.zwayServer.label = Z-Way Server thing-type.zway.zwayServer.description = The Z-Way server represents a bridge with general settings and communication tasks. +thing-type.zway.zwayVirtualDevice.label = Z-Way Virtual Device +thing-type.zway.zwayVirtualDevice.description = A Z-Way virtual device represents one sensor, actor or Z-Way App with the corresponding channel. The bridge is necessary as an intermediary between openHAB thing and Z-Way device. +# thing types config + +bridge-type.config.zway.zwayServer.group.binding.label = Options +bridge-type.config.zway.zwayServer.group.binding.description = These settings affect functions of the binding. +bridge-type.config.zway.zwayServer.group.zwayServer.label = Z-Way Server +bridge-type.config.zway.zwayServer.group.zwayServer.description = The configuration of the Z-Way server. Except for the username and password all the information detected during the discovery. +bridge-type.config.zway.zwayServer.pollingInterval.label = Polling Interval +bridge-type.config.zway.zwayServer.pollingInterval.description = Refresh device states and registration from Z-Way server. +bridge-type.config.zway.zwayServer.zwayServerIpAddress.label = IP Address +bridge-type.config.zway.zwayServer.zwayServerIpAddress.description = The IP address or hostname of the Z-Way server. If Z-Way and openHAB are running on the same machine, the default value can be used. +bridge-type.config.zway.zwayServer.zwayServerPassword.label = Password +bridge-type.config.zway.zwayServer.zwayServerPassword.description = Password to access the Z-Way server. +bridge-type.config.zway.zwayServer.zwayServerPort.label = Port +bridge-type.config.zway.zwayServer.zwayServerPort.description = The port of the Z-Way server +bridge-type.config.zway.zwayServer.zwayServerProtocol.label = Protocol +bridge-type.config.zway.zwayServer.zwayServerProtocol.description = Protocol to connect to the Z-Way server (http or https) +bridge-type.config.zway.zwayServer.zwayServerProtocol.option.http = HTTP +bridge-type.config.zway.zwayServer.zwayServerProtocol.option.https = HTTPS +bridge-type.config.zway.zwayServer.zwayServerUsername.label = Username +bridge-type.config.zway.zwayServer.zwayServerUsername.description = Username to access the Z-Way server. +thing-type.config.zway.zwayDevice.nodeId.label = Node Id +thing-type.config.zway.zwayDevice.nodeId.description = Node Id of the Z-Wave device +thing-type.config.zway.zwayVirtualDevice.deviceId.label = Device Id +thing-type.config.zway.zwayVirtualDevice.deviceId.description = Device Id of virtual device + +# channel types + +channel-type.zway.actions.label = Actions +channel-type.zway.actions.description = Available actions of the Z-Wave Controller +channel-type.zway.actions.state.option.REFRESH = Refresh all things +channel-type.zway.battery.label = Battery +channel-type.zway.doorlock.label = Doorlock +channel-type.zway.exclusion.label = Exclusion +channel-type.zway.exclusion.description = Start exclusion mode (after a timeout the exclusion will be automatically finished). +channel-type.zway.inclusion.label = Inclusion +channel-type.zway.inclusion.description = Start inclusion mode (after a timeout the inclusion will be automatically finished). +channel-type.zway.secureInclusion.label = Secure Inclusion +channel-type.zway.secureInclusion.description = Change inclusion type for further inclusions. +channel-type.zway.sensorBarometer.label = Barometer +channel-type.zway.sensorBinary.label = Sensor Binary +channel-type.zway.sensorBinary.description = This channel represents a universal channel if no further device information is available. +channel-type.zway.sensorCO2.label = CO2 +channel-type.zway.sensorCo.label = Gas +channel-type.zway.sensorDiscrete.label = Sensor Discrete +channel-type.zway.sensorDiscrete.description = This channel represents a two-digit value. The first digit is the button/scene number and the second digit points to action/keyAttribute (have a look at http://z-wave.sigmadesigns.com/wp-content/uploads/2016/08/SDS12657-12-Z-Wave-Command-Class-Specification-A-M.pdf, p. 153). +channel-type.zway.sensorDoorWindow.label = DoorWindow +channel-type.zway.sensorEnergy.label = Energy +channel-type.zway.sensorFlood.label = Flood +channel-type.zway.sensorHumidity.label = Humidity +channel-type.zway.sensorLuminosity.label = Luminiscence +channel-type.zway.sensorMeterKWh.label = Energy +channel-type.zway.sensorMeterW.label = Energy +channel-type.zway.sensorMotion.label = Motion +channel-type.zway.sensorMultilevel.label = Sensor Multilevel +channel-type.zway.sensorMultilevel.description = This channel represents a universal channel if no further device information is available. +channel-type.zway.sensorSmoke.label = Smoke +channel-type.zway.sensorTamper.label = Tamper +channel-type.zway.sensorTemperature.label = Temperature +channel-type.zway.sensorUltraviolet.label = Ultraviolet +channel-type.zway.switchBinary.label = Switch Binary +channel-type.zway.switchBinary.description = This channel represents a universal channel if no further device information is available. +channel-type.zway.switchBlinds.label = Rollshutter +channel-type.zway.switchColor.label = Switch Color +channel-type.zway.switchColor.description = This channel represents the rgbw switch device type from Z-Way. +channel-type.zway.switchColorTemperature.label = Color Temperature +channel-type.zway.switchControl.label = Switch Control +channel-type.zway.switchControl.description = This channel represents a universal channel if no further device information is available. +channel-type.zway.switchMultilevel.label = Switch Multilevel +channel-type.zway.switchMultilevel.description = This channel represents a universal channel if no further device information is available. +channel-type.zway.switchPowerOutlet.label = PowerOutlet +channel-type.zway.thermostatMode.label = Thermostat Mode +channel-type.zway.thermostatMode.description = The channel allows the control or display of a thermostat (mode). A thermostat can have up to three states (modes): off, heating and cooling. The state of heating and cooling is alternately set at the state on. +channel-type.zway.thermostatModeCC.label = Thermostat Mode (Command Class) +channel-type.zway.thermostatModeCC.description = The channel allows the control or display of a thermostat (mode) from command class. The modes differ from device to device. +channel-type.zway.thermostatSetPoint.label = Thermostat Set Point + +# thing types + +thing-type.config.zway.zwayServer.pollingInterval.label = Polling Interval +thing-type.config.zway.zwayServer.pollingInterval.description = Refresh device states and registration from Z-Way server. thing-type.config.zway.zwayServer.zwayServer.label = Z-Way server thing-type.config.zway.zwayServer.zwayServer.description = The configuration of the Z-Way server. Except for the username and password all the information detected during the discovery. thing-type.config.zway.zwayServer.binding.label = Options thing-type.config.zway.zwayServer.binding.description = These settings affect functions of the binding. - thing-type.config.zway.zwayServer.zwayServerIpAddress.label = IP address thing-type.config.zway.zwayServer.zwayServerIpAddress.description = The IP address or hostname of the Z-Way server. If Z-Way and openHAB are running on the same machine, the default value can be used. thing-type.config.zway.zwayServer.zwayServerPort.label = Port @@ -22,71 +107,8 @@ thing-type.config.zway.zwayServer.zwayServerUsername.description = Username to a thing-type.config.zway.zwayServer.zwayServerPassword.label = Password thing-type.config.zway.zwayServer.zwayServerPassword.description = Password to access the Z-Way server. -thing-type.config.zway.zwayServer.pollingInterval.label = Polling Interval -thing-type.config.zway.zwayServer.pollingInterval.description = Refresh device states and registration from Z-Way server. - -thing-type.zway.zwayDevice.label = Z-Wave Device -thing-type.zway.zwayDevice.description = A Z-Wave device represents a device of real world. Each device function will be mapped to a separate channel. The bridge is necessary as an intermediary between openHAB thing and Z-Way device. - -thing-type.config.zway.zwayDevice.nodeId.label = Node Id -thing-type.config.zway.zwayDevice.nodeId.description = Node Id of the Z-Wave device - -thing-type.zway.zwayVirtualDevice.label = Z-Way Virtual Device -thing-type.zway.zwayVirtualDevice.description = A Z-Way virtual device represents one sensor, actor or Z-Way App with the corresponding channel. The bridge is necessary as an intermediary between openHAB thing and Z-Way device. - -thing-type.config.zway.zwayVirtualDevice.deviceId.label = Device Id -thing-type.config.zway.zwayVirtualDevice.deviceId.description = Device Id of virtual device - -# channel types -channel-type.zway.sensorTemperature.label = Temperature -channel-type.zway.sensorLuminosity.label = Luminiscence -channel-type.zway.sensorHumidity.label = Humidity -channel-type.zway.sensorBarometer.label = Barometer -channel-type.zway.sensorUltraviolet.label = Ultraviolet -channel-type.zway.sensorCO2.label = CarbonDioxide -channel-type.zway.sensorEnergy.label = Energy -channel-type.zway.sensorMeterKWh.label = Energy -channel-type.zway.sensorMeterW.label = Energy -channel-type.zway.sensorSmoke.label = Smoke -channel-type.zway.sensorCo.label = Gas -channel-type.zway.sensorFlood.label = Flood -channel-type.zway.sensorTamper.label = Tamper -channel-type.zway.sensorDoorWindow.label = DoorWindow -channel-type.zway.sensorMotion.label = Motion -channel-type.zway.switchPowerOutlet.label = PowerOutlet -channel-type.zway.switchColorTemperature.label = Color Temperature - # channel type without further information -channel-type.zway.battery.label = Battery -channel-type.zway.doorlock.label = Doorlock -channel-type.zway.sensorBinary.label = Sensor binary -channel-type.zway.sensorBinary.description = This channel represents a universal channel if no further device information is available. -channel-type.zway.sensorMultilevel.label = Sensor multilevel -channel-type.zway.sensorMultilevel.description = This channel represents a universal channel if no further device information is available. -channel-type.zway.switchBinary.label = Switch binary -channel-type.zway.switchBinary.description = This channel represents a universal channel if no further device information is available. -channel-type.zway.switchMultilevel.label = Switch multilevel -channel-type.zway.switchMultilevel.description = This channel represents a universal channel if no further device information is available. -channel-type.zway.switchColor.label = Switch color -channel-type.zway.switchColor.description = This channel represents the RGBW switch device type from Z-Way. -channel-type.zway.switchControl.label = Switch control -channel-type.zway.switchControl.description = This channel represents a universal channel if no further device information is available. -channel-type.zway.sensorDiscrete.label = Sensor discrete -channel-type.zway.sensorDiscrete.description = This channel represents a two-digit value. The first digit is the button/scene number and the second digit points to action/keyAttribute (have a look at http://z-wave.sigmadesigns.com/wp-content/uploads/2016/08/SDS12657-12-Z-Wave-Command-Class-Specification-A-M.pdf, p. 153). -channel-type.zway.thermostatMode.label = Thermostat mode -channel-type.zway.thermostatMode.description = The channel allows the control or display of a thermostat (mode). A thermostat can have up to three states (modes): off, heating and cooling. The state of heating and cooling is alternately set at the state on. -channel-type.zway.thermostatSetPoint.label = Thermostat set point +channel-type.zway.actions.option.REFRESH = Refresh all things channel-type.zway.thermostatModeV2.label = Thermostat mode (Command Class) channel-type.zway.thermostatModeV2.description = The channel allows the control or display of a thermostat (mode) from command class. The modes differ from device to device. - -channel-type.zway.actions.label = Actions -channel-type.zway.actions.description = Available actions of the Z-Wave Controller -channel-type.zway.actions.option.REFRESH = Refresh all things - -channel-type.zway.secureInclusion.label = Secure inclusion -channel-type.zway.secureInclusion.description = Change inclusion type for further inclusions. -channel-type.zway.inclusion.label = Inclusion -channel-type.zway.inclusion.description = Start inclusion mode (after a timeout the inclusion will be automatically finished). -channel-type.zway.exclusion.label = Exclusion -channel-type.zway.exclusion.description = Start exclusion mode (after a timeout the exclusion will be automatically finished).