Fix Zigbee name stylization (#13954)

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
This commit is contained in:
Jacob Laursen
2022-12-17 17:25:38 +01:00
committed by GitHub
parent d20b10317c
commit 6753234e32
30 changed files with 114 additions and 114 deletions

View File

@@ -44,7 +44,7 @@ public class OpenWebNetBindingConstants {
public static final String THING_LABEL_GENERIC_DEVICE = "GENERIC Device";
// bridges
public static final ThingTypeUID THING_TYPE_ZB_GATEWAY = new ThingTypeUID(BINDING_ID, "zb_gateway");
public static final String THING_LABEL_ZB_GATEWAY = "ZigBee USB Gateway";
public static final String THING_LABEL_ZB_GATEWAY = "Zigbee USB Gateway";
public static final ThingTypeUID THING_TYPE_BUS_GATEWAY = new ThingTypeUID(BINDING_ID, "bus_gateway");
public static final String THING_LABEL_BUS_GATEWAY = "BUS Gateway";
// other thing types
@@ -81,14 +81,14 @@ public class OpenWebNetBindingConstants {
public static final String THING_LABEL_BUS_AUX = "Auxiliary";
// ZIGBEE
public static final ThingTypeUID THING_TYPE_ZB_ON_OFF_SWITCH = new ThingTypeUID(BINDING_ID, "zb_on_off_switch");
public static final String THING_LABEL_ZB_ON_OFF_SWITCH = "ZigBee Switch";
public static final String THING_LABEL_ZB_ON_OFF_SWITCH = "Zigbee Switch";
public static final ThingTypeUID THING_TYPE_ZB_ON_OFF_SWITCH_2UNITS = new ThingTypeUID(BINDING_ID,
"zb_on_off_switch2u");
public static final String THING_LABEL_ZB_ON_OFF_SWITCH_2UNITS = "ZigBee 2-units Switch";
public static final String THING_LABEL_ZB_ON_OFF_SWITCH_2UNITS = "Zigbee 2-units Switch";
public static final ThingTypeUID THING_TYPE_ZB_DIMMER = new ThingTypeUID(BINDING_ID, "zb_dimmer");
public static final String THING_LABEL_ZB_DIMMER = "ZigBee Dimmer";
public static final String THING_LABEL_ZB_DIMMER = "Zigbee Dimmer";
public static final ThingTypeUID THING_TYPE_ZB_AUTOMATION = new ThingTypeUID(BINDING_ID, "zb_automation");
public static final String THING_LABEL_ZB_AUTOMATION = "ZigBee Automation";
public static final String THING_LABEL_ZB_AUTOMATION = "Zigbee Automation";
// #SUPPORTED THINGS SETS
// ## Generic

View File

@@ -206,7 +206,7 @@ public class OpenWebNetDeviceDiscoveryService extends AbstractDiscoveryService
default:
logger.warn("Device type {} is not supported, default to GENERIC device (WHERE={})", deviceType, where);
if (where instanceof WhereZigBee) {
thingLabel = "ZigBee " + thingLabel;
thingLabel = "Zigbee " + thingLabel;
}
if (baseMsg != null) {
deviceWho = baseMsg.getWho();

View File

@@ -44,9 +44,9 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* The {@link UsbGatewayDiscoveryService} extends {@link AbstractDiscoveryService} to detect ZigBee USB gateways
* The {@link UsbGatewayDiscoveryService} extends {@link AbstractDiscoveryService} to detect Zigbee USB gateways
* connected via serial port. The service will iterate over the available serial ports and open each one to test if a
* OpenWebNet ZigBee USB gateway is connected. On successful connection, a new DiscoveryResult is created.
* OpenWebNet Zigbee USB gateway is connected. On successful connection, a new DiscoveryResult is created.
*
* @author Massimo Valla - Initial contribution
*/
@@ -74,7 +74,7 @@ public class UsbGatewayDiscoveryService extends AbstractDiscoveryService impleme
private boolean scanning;
/**
* Constructs a new UsbGatewayDiscoveryService with the specified ZigBee USB Bridge ThingTypeUID
* Constructs a new UsbGatewayDiscoveryService with the specified Zigbee USB Bridge ThingTypeUID
*/
@Activate
public UsbGatewayDiscoveryService(final @Reference SerialPortManager spm) {
@@ -89,7 +89,7 @@ public class UsbGatewayDiscoveryService extends AbstractDiscoveryService impleme
*/
@Override
protected void startScan() {
logger.debug("Started OpenWebNet ZigBee USB Gateway discovery scan");
logger.debug("Started OpenWebNet Zigbee USB Gateway discovery scan");
removeOlderResults(getTimestampOfLastScan());
scanning = true;
Stream<SerialPortIdentifier> portEnum = serialPortManager.getIdentifiers();
@@ -103,7 +103,7 @@ public class UsbGatewayDiscoveryService extends AbstractDiscoveryService impleme
logger.debug("[{}] serial port is owned by: {}", currentScannedPortName,
portIdentifier.getCurrentOwner());
} else {
logger.debug("[{}] trying to connect to a ZigBee USB Gateway...", currentScannedPortName);
logger.debug("[{}] trying to connect to a Zigbee USB Gateway...", currentScannedPortName);
USBGateway gw = new USBGateway(currentScannedPortName);
zbGateway = gw;
gw.subscribe(this);
@@ -117,7 +117,7 @@ public class UsbGatewayDiscoveryService extends AbstractDiscoveryService impleme
gw.connect();
portCheckLatch.await();
} catch (OWNException e) {
logger.debug("[{}] OWNException while trying to connect to a ZigBee USB Gateway: {}",
logger.debug("[{}] OWNException while trying to connect to a Zigbee USB Gateway: {}",
currentScannedPortName, e.getMessage());
cancelConnectTimeout();
endGwConnection();
@@ -141,7 +141,7 @@ public class UsbGatewayDiscoveryService extends AbstractDiscoveryService impleme
endGwConnection();
portCheckLatch.countDown();
super.stopScan();
logger.debug("Stopped OpenWebNet ZigBee USB Gateway discovery scan");
logger.debug("Stopped OpenWebNet Zigbee USB Gateway discovery scan");
}
/**
@@ -166,7 +166,7 @@ public class UsbGatewayDiscoveryService extends AbstractDiscoveryService impleme
}
/**
* Create and notify a new ZigBee USB Gateway thing has been discovered
* Create and notify a new Zigbee USB Gateway thing has been discovered
*/
private void bridgeDiscovered() {
USBGateway gw = zbGateway;
@@ -182,7 +182,7 @@ public class UsbGatewayDiscoveryService extends AbstractDiscoveryService impleme
DiscoveryResult discoveryResult = DiscoveryResultBuilder.create(gatewayUID).withProperties(gwProperties)
.withLabel(OpenWebNetBindingConstants.THING_LABEL_ZB_GATEWAY + " (" + gw.getSerialPortName() + ")")
.withRepresentationProperty(OpenWebNetBindingConstants.PROPERTY_ZIGBEEID).build();
logger.debug("--- ZigBee USB Gateway thing discovered: {} fw: {}", discoveryResult.getLabel(),
logger.debug("--- Zigbee USB Gateway thing discovered: {} fw: {}", discoveryResult.getLabel(),
gw.getFirmwareVersion());
thingDiscovered(discoveryResult);
}
@@ -190,7 +190,7 @@ public class UsbGatewayDiscoveryService extends AbstractDiscoveryService impleme
@Override
public void onConnected() {
logger.debug("[{}] found ZigBee USB Gateway", currentScannedPortName);
logger.debug("[{}] found Zigbee USB Gateway", currentScannedPortName);
cancelConnectTimeout();
bridgeDiscovered();
endGwConnection();

View File

@@ -162,14 +162,14 @@ public class OpenWebNetBridgeHandler extends ConfigStatusBridgeHandler implement
}
/**
* Init a ZigBee gateway based on config
* Init a Zigbee gateway based on config
*/
private @Nullable OpenGateway initZigBeeGateway() {
logger.debug("Initializing ZigBee USB Gateway");
logger.debug("Initializing Zigbee USB Gateway");
OpenWebNetZigBeeBridgeConfig zbBridgeConfig = getConfigAs(OpenWebNetZigBeeBridgeConfig.class);
String serialPort = zbBridgeConfig.getSerialPort();
if (serialPort == null || serialPort.isEmpty()) {
logger.warn("Cannot connect ZigBee USB Gateway. No serial port has been provided in Bridge configuration.");
logger.warn("Cannot connect Zigbee USB Gateway. No serial port has been provided in Bridge configuration.");
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.CONFIGURATION_ERROR,
"@text/offline.conf-error-no-serial-port");
return null;
@@ -539,7 +539,7 @@ public class OpenWebNetBridgeHandler extends ConfigStatusBridgeHandler implement
return;
}
if (gw instanceof USBGateway) {
logger.info("---- CONNECTED to ZigBee USB gateway bridge '{}' (serialPort: {})", thing.getUID(),
logger.info("---- CONNECTED to Zigbee USB gateway bridge '{}' (serialPort: {})", thing.getUID(),
((USBGateway) gw).getSerialPortName());
} else {
logger.info("---- CONNECTED to BUS gateway bridge '{}' ({}:{})", thing.getUID(),

View File

@@ -16,7 +16,7 @@ import org.eclipse.jdt.annotation.NonNullByDefault;
import org.eclipse.jdt.annotation.Nullable;
/**
* ZigBee USB Bridge configuration object
* Zigbee USB Bridge configuration object
*
* @author Massimo Valla - Initial contribution
*

View File

@@ -5,6 +5,6 @@
<name>OpenWebNet (BTicino/Legrand) Binding</name>
<description>The OpenWebNet Binding integrates the BTicino/Legrand 'MyHOME' connected home system using the OpenWebNet
protocol. It supports BUS (SCS) and ZigBee USB gateways and devices.</description>
protocol. It supports BUS (SCS) and Zigbee USB gateways and devices.</description>
</binding:binding>

View File

@@ -1,7 +1,7 @@
# binding
binding.openwebnet.name = OpenWebNet (BTicino/Legrand) Binding
binding.openwebnet.description = The OpenWebNet Binding integrates the BTicino/Legrand 'MyHOME' connected home system using the OpenWebNet protocol. It supports BUS (SCS) and ZigBee USB gateways and devices.
binding.openwebnet.description = The OpenWebNet Binding integrates the BTicino/Legrand 'MyHOME' connected home system using the OpenWebNet protocol. It supports BUS (SCS) and Zigbee USB gateways and devices.
# thing types
@@ -37,16 +37,16 @@ thing-type.openwebnet.bus_thermo_zone.label = Thermo Zone
thing-type.openwebnet.bus_thermo_zone.description = An OpenWebNet BUS/SCS configured thermo zone (managed via Central Unit or stand alone).
thing-type.openwebnet.generic_device.label = Generic Device
thing-type.openwebnet.generic_device.description = An OpenWebNet Generic Device.
thing-type.openwebnet.zb_automation.label = ZigBee Automation
thing-type.openwebnet.zb_automation.description = An OpenWebNet ZigBee automation device to control roller shutters, blinds, etc. BTicino models: xxx/yyyy/etc.
thing-type.openwebnet.zb_dimmer.label = ZigBee Dimmer
thing-type.openwebnet.zb_dimmer.description = An OpenWebNet ZigBee dimmer for the dimmer control of 1 light. BTicino models: 4585/4594/etc.
thing-type.openwebnet.zb_gateway.label = ZigBee USB Gateway
thing-type.openwebnet.zb_gateway.description = This USB gateway (BTicino/Legrand models: BTI-3578/088328) connects to a BTicino/Legrand ZigBee network and uses the OpenWebNet protocol. For more information see: https://catalogo.bticino.it/BTI-3578-IT and https://www.legrand.com/ecatalogue/088328-openweb-net-zigbee-gateway-radio-interface.html
thing-type.openwebnet.zb_on_off_switch.label = ZigBee Switch
thing-type.openwebnet.zb_on_off_switch.description = An OpenWebNet ZigBee switch (actuator) for the control of 1 load/light. BTicino models: 4591/3684/etc.
thing-type.openwebnet.zb_on_off_switch2u.label = ZigBee 2-units Switch
thing-type.openwebnet.zb_on_off_switch2u.description = An OpenWebNet ZigBee 2-units switch (actuator) for the control of 2 loads/lights. BTicino model: 4592
thing-type.openwebnet.zb_automation.label = Zigbee Automation
thing-type.openwebnet.zb_automation.description = An OpenWebNet Zigbee automation device to control roller shutters, blinds, etc. BTicino models: xxx/yyyy/etc.
thing-type.openwebnet.zb_dimmer.label = Zigbee Dimmer
thing-type.openwebnet.zb_dimmer.description = An OpenWebNet Zigbee dimmer for the dimmer control of 1 light. BTicino models: 4585/4594/etc.
thing-type.openwebnet.zb_gateway.label = Zigbee USB Gateway
thing-type.openwebnet.zb_gateway.description = This USB gateway (BTicino/Legrand models: BTI-3578/088328) connects to a BTicino/Legrand Zigbee network and uses the OpenWebNet protocol. For more information see: https://catalogo.bticino.it/BTI-3578-IT and https://www.legrand.com/ecatalogue/088328-openweb-net-zigbee-gateway-radio-interface.html
thing-type.openwebnet.zb_on_off_switch.label = Zigbee Switch
thing-type.openwebnet.zb_on_off_switch.description = An OpenWebNet Zigbee switch (actuator) for the control of 1 load/light. BTicino models: 4591/3684/etc.
thing-type.openwebnet.zb_on_off_switch2u.label = Zigbee 2-units Switch
thing-type.openwebnet.zb_on_off_switch2u.description = An OpenWebNet Zigbee 2-units switch (actuator) for the control of 2 loads/lights. BTicino model: 4592
# thing types config
@@ -99,15 +99,15 @@ thing-type.config.openwebnet.generic_device.where.description = It identifies on
thing-type.config.openwebnet.zb_automation.shutterRun.label = Shutter Run
thing-type.config.openwebnet.zb_automation.shutterRun.description = Time (in ms) to go from max position (e.g. CLOSED) to the other position (e.g. OPEN). Example: 12000 (=12sec). Use AUTO (default) to calibrate the shutter automatically (UP->DOWN->Position%) the first time a Position command (%) is sent.
thing-type.config.openwebnet.zb_automation.where.label = OpenWebNet Address (where)
thing-type.config.openwebnet.zb_automation.where.description = It identifies one ZigBee device. Example: 765432101#9
thing-type.config.openwebnet.zb_automation.where.description = It identifies one Zigbee device. Example: 765432101#9
thing-type.config.openwebnet.zb_dimmer.where.label = OpenWebNet Address (where)
thing-type.config.openwebnet.zb_dimmer.where.description = It identifies one ZigBee device. Example: 765432101#9
thing-type.config.openwebnet.zb_dimmer.where.description = It identifies one Zigbee device. Example: 765432101#9
thing-type.config.openwebnet.zb_gateway.serialPort.label = Serial Port
thing-type.config.openwebnet.zb_gateway.serialPort.description = Serial port where the OpenWebNet ZigBee USB Gateway is connected. Example: COM3 (Win), /dev/ttyUSB0 (Linux), etc.
thing-type.config.openwebnet.zb_gateway.serialPort.description = Serial port where the OpenWebNet Zigbee USB Gateway is connected. Example: COM3 (Win), /dev/ttyUSB0 (Linux), etc.
thing-type.config.openwebnet.zb_on_off_switch.where.label = OpenWebNet Address (where)
thing-type.config.openwebnet.zb_on_off_switch.where.description = It identifies one ZigBee device. Example: 765432101#9
thing-type.config.openwebnet.zb_on_off_switch.where.description = It identifies one Zigbee device. Example: 765432101#9
thing-type.config.openwebnet.zb_on_off_switch2u.where.label = OpenWebNet Address (where)
thing-type.config.openwebnet.zb_on_off_switch2u.where.description = It identifies one ZigBee device. Example: 765432100#9 (use unit=00 at the end)
thing-type.config.openwebnet.zb_on_off_switch2u.where.description = It identifies one Zigbee device. Example: 765432100#9 (use unit=00 at the end)
# channel types

View File

@@ -10,8 +10,8 @@
<bridge-type-ref id="zb_gateway"/>
</supported-bridge-type-refs>
<label>ZigBee Automation</label>
<description>An OpenWebNet ZigBee automation device to control roller shutters, blinds, etc. BTicino models:
<label>Zigbee Automation</label>
<description>An OpenWebNet Zigbee automation device to control roller shutters, blinds, etc. BTicino models:
xxx/yyyy/etc.</description>
<channels>
@@ -38,7 +38,7 @@
</parameter>
<parameter name="where" type="text" required="true">
<label>OpenWebNet Address (where)</label>
<description>It identifies one ZigBee device. Example: 765432101#9</description>
<description>It identifies one Zigbee device. Example: 765432101#9</description>
</parameter>
</config-description>

View File

@@ -4,14 +4,14 @@
xmlns:thing="https://openhab.org/schemas/thing-description/v1.0.0"
xsi:schemaLocation="https://openhab.org/schemas/thing-description/v1.0.0 https://openhab.org/schemas/thing-description-1.0.0.xsd">
<!-- Thing for ZigBee Dimmer (BTicino 4585/4594/...) -->
<!-- Thing for Zigbee Dimmer (BTicino 4585/4594/...) -->
<thing-type id="zb_dimmer">
<supported-bridge-type-refs>
<bridge-type-ref id="zb_gateway"/>
</supported-bridge-type-refs>
<label>ZigBee Dimmer</label>
<description>An OpenWebNet ZigBee dimmer for the dimmer control of 1 light. BTicino models: 4585/4594/etc.</description>
<label>Zigbee Dimmer</label>
<description>An OpenWebNet Zigbee dimmer for the dimmer control of 1 light. BTicino models: 4585/4594/etc.</description>
<channels>
<channel id="brightness" typeId="brightness"/>
@@ -28,7 +28,7 @@
<config-description>
<parameter name="where" type="text" required="true">
<label>OpenWebNet Address (where)</label>
<description>It identifies one ZigBee device. Example: 765432101#9</description>
<description>It identifies one Zigbee device. Example: 765432101#9</description>
</parameter>
</config-description>

View File

@@ -4,10 +4,10 @@
xmlns:thing="https://openhab.org/schemas/thing-description/v1.0.0"
xsi:schemaLocation="https://openhab.org/schemas/thing-description/v1.0.0 https://openhab.org/schemas/thing-description-1.0.0.xsd">
<!-- OpenWebNet ZigBee USB Gateway -->
<!-- OpenWebNet Zigbee USB Gateway -->
<bridge-type id="zb_gateway">
<label>ZigBee USB Gateway</label>
<description>This USB gateway (BTicino/Legrand models: BTI-3578/088328) connects to a BTicino/Legrand ZigBee network
<label>Zigbee USB Gateway</label>
<description>This USB gateway (BTicino/Legrand models: BTI-3578/088328) connects to a BTicino/Legrand Zigbee network
and uses the OpenWebNet protocol. For more information see: https://catalogo.bticino.it/BTI-3578-IT and
https://www.legrand.com/ecatalogue/088328-openweb-net-zigbee-gateway-radio-interface.html</description>
@@ -24,7 +24,7 @@
<context>serial-port</context>
<limitToOptions>false</limitToOptions>
<label>Serial Port</label>
<description>Serial port where the OpenWebNet ZigBee USB Gateway is connected. Example: COM3 (Win), /dev/ttyUSB0
<description>Serial port where the OpenWebNet Zigbee USB Gateway is connected. Example: COM3 (Win), /dev/ttyUSB0
(Linux), etc.</description>
</parameter>
</config-description>

View File

@@ -10,8 +10,8 @@
<bridge-type-ref id="zb_gateway"/>
</supported-bridge-type-refs>
<label>ZigBee Switch</label>
<description>An OpenWebNet ZigBee switch (actuator) for the control of 1 load/light. BTicino models: 4591/3684/etc.</description>
<label>Zigbee Switch</label>
<description>An OpenWebNet Zigbee switch (actuator) for the control of 1 load/light. BTicino models: 4591/3684/etc.</description>
<channels>
<channel id="switch_01" typeId="switch"/>
@@ -28,7 +28,7 @@
<config-description>
<parameter name="where" type="text" required="true">
<label>OpenWebNet Address (where)</label>
<description>It identifies one ZigBee device. Example: 765432101#9</description>
<description>It identifies one Zigbee device. Example: 765432101#9</description>
</parameter>
</config-description>

View File

@@ -4,14 +4,14 @@
xmlns:thing="https://openhab.org/schemas/thing-description/v1.0.0"
xsi:schemaLocation="https://openhab.org/schemas/thing-description/v1.0.0 https://openhab.org/schemas/thing-description-1.0.0.xsd">
<!-- Thing for ZigBee OnOff Switch with 2 units (BTicino 4592) -->
<!-- Thing for Zigbee OnOff Switch with 2 units (BTicino 4592) -->
<thing-type id="zb_on_off_switch2u">
<supported-bridge-type-refs>
<bridge-type-ref id="zb_gateway"/>
</supported-bridge-type-refs>
<label>ZigBee 2-units Switch</label>
<description>An OpenWebNet ZigBee 2-units switch (actuator) for the control of 2 loads/lights. BTicino model: 4592</description>
<label>Zigbee 2-units Switch</label>
<description>An OpenWebNet Zigbee 2-units switch (actuator) for the control of 2 loads/lights. BTicino model: 4592</description>
<channels>
<channel id="switch_01" typeId="switch"/>
@@ -29,7 +29,7 @@
<config-description>
<parameter name="where" type="text" required="true">
<label>OpenWebNet Address (where)</label>
<description>It identifies one ZigBee device. Example: 765432100#9 (use unit=00 at the end)</description>
<description>It identifies one Zigbee device. Example: 765432100#9 (use unit=00 at the end)</description>
</parameter>
</config-description>