mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-10 23:22:02 +01:00
[openwebnet] Thermo: add support for 4-zones CU (#15111)
* [openwebnet] support for thermo cu discovery * [openwebnet] fixed discovery for 4-zones CU and support in ThermoHandler * [openwebnet] updated openwebnet.properties#cu.where.description * [openwebnet] updated OwnIdTest with CU-4 test * [openwebnet] Fix ownId for CU 4-zone case. Update README --------- Signed-off-by: Massimo Valla <mvcode00@gmail.com>
This commit is contained in:
parent
d449fb8c48
commit
c04c00cb63
@ -148,7 +148,7 @@ Thermo zones can be configured defining a `bus_thermo_zone` Thing for each zone
|
|||||||
|
|
||||||
- the `where` configuration parameter (`OpenWebNet Address`):
|
- the `where` configuration parameter (`OpenWebNet Address`):
|
||||||
- example BUS/SCS zone `1` --> `where="1"`
|
- example BUS/SCS zone `1` --> `where="1"`
|
||||||
- the `standAlone` configuration parameter (`boolean`, default: `true`): identifies if the zone is managed or not by a Central Unit (4 or 99 zones). `standAlone=true` means no Central Unit is present in the system.
|
- the `standAlone` configuration parameter (`boolean`, default: `true`): identifies if the zone is managed or not by a Central Unit (4- or 99-zones). `standAlone=true` means no Central Unit is present in the system.
|
||||||
|
|
||||||
Temperature sensors can be configured defining a `bus_thermo_sensor` Thing with the following parameters:
|
Temperature sensors can be configured defining a `bus_thermo_sensor` Thing with the following parameters:
|
||||||
|
|
||||||
@ -156,19 +156,18 @@ Temperature sensors can be configured defining a `bus_thermo_sensor` Thing with
|
|||||||
- example sensor `5` of external zone `00` --> `where="500"`
|
- example sensor `5` of external zone `00` --> `where="500"`
|
||||||
- example: slave sensor `3` of zone `2` --> `where="302"`
|
- example: slave sensor `3` of zone `2` --> `where="302"`
|
||||||
|
|
||||||
The (optional) Central Unit can be configured defining a `bus_themo_cu` Thing with the `where` configuration parameter (`OpenWebNet Address`) set to `where="0"`.
|
The (optional) Central Unit can be configured defining a `bus_themo_cu` Thing with the `where` configuration parameter (`OpenWebNet Address`) set to `where="#0"` for a 99-zone Central Unit or `where="#0#1"` for a 4-zone Central Unit.
|
||||||
|
|
||||||
##### Thermo Central Unit integration missing points
|
##### Thermo Central Unit integration missing points
|
||||||
|
|
||||||
- Read setPoint temperature and current mode
|
- Read setPoint temperature and current mode
|
||||||
- Holiday activation command (all zones)
|
- Holiday/Vacation activation command
|
||||||
- Discovery
|
|
||||||
|
|
||||||
#### Configuring Alarm and Auxiliary (AUX)
|
#### Configuring Alarm and Auxiliary (AUX)
|
||||||
|
|
||||||
**NOTE 1** Receiving AUX messages originating from the BUS is not supported yet, only sending messages to the BUS is supported
|
**NOTE 1** Receiving AUX messages originating from the BUS is not supported yet, only sending messages to the BUS is supported
|
||||||
|
|
||||||
**NOTE 2** Alarm messages on BUS are not sent by MyHOMEServer1, therfore this gateway cannot be used to integrate the BTicino Alarm system
|
**NOTE 2** Alarm messages on BUS are not sent by MyHOMEServer1, therefore this gateway cannot be used to integrate the BTicino Alarm system
|
||||||
|
|
||||||
BUS Auxiliary commands (WHO=9) can be used to send on the BUS commands to control, for example, external devices or a BTicino Alarm system.
|
BUS Auxiliary commands (WHO=9) can be used to send on the BUS commands to control, for example, external devices or a BTicino Alarm system.
|
||||||
|
|
||||||
@ -327,7 +326,7 @@ Bridge openwebnet:bus_gateway:mybridge "MyHOMEServer1" [ host="192.168.1.35", pa
|
|||||||
bus_energy_meter CENTRAL_Ta "Energy Meter Ta" [ where="51" ]
|
bus_energy_meter CENTRAL_Ta "Energy Meter Ta" [ where="51" ]
|
||||||
bus_energy_meter CENTRAL_Tb "Energy Meter Tb" [ where="52" ]
|
bus_energy_meter CENTRAL_Tb "Energy Meter Tb" [ where="52" ]
|
||||||
|
|
||||||
bus_thermo_cu CU_3550 "99 zones central unit" [ where="0" ]
|
bus_thermo_cu CU_3550 "99 zones Central Unit" [ where="#0" ]
|
||||||
bus_thermo_zone LR_zone "Living Room Zone" [ where="2"]
|
bus_thermo_zone LR_zone "Living Room Zone" [ where="2"]
|
||||||
bus_thermo_sensor EXT_tempsensor "External Temperature" [ where="500"]
|
bus_thermo_sensor EXT_tempsensor "External Temperature" [ where="500"]
|
||||||
|
|
||||||
@ -531,6 +530,7 @@ Special thanks for helping on testing this binding go to:
|
|||||||
[@rubenfuser](https://community.openhab.org/u/rubenfuser),
|
[@rubenfuser](https://community.openhab.org/u/rubenfuser),
|
||||||
[@stamate_viorel](https://community.openhab.org/u/stamate_viorel),
|
[@stamate_viorel](https://community.openhab.org/u/stamate_viorel),
|
||||||
[@marchino](https://community.openhab.org/u/marchino),
|
[@marchino](https://community.openhab.org/u/marchino),
|
||||||
[@the-ninth](https://community.openhab.org/u/the-ninth)
|
[@the-ninth](https://community.openhab.org/u/the-ninth),
|
||||||
|
[@giacob](https://community.openhab.org/u/giacob)
|
||||||
|
|
||||||
and many others at the fantastic openHAB community!
|
and many others at the fantastic openHAB community!
|
||||||
|
@ -59,6 +59,8 @@ public class OpenWebNetDeviceDiscoveryService extends AbstractDiscoveryService
|
|||||||
private @NonNullByDefault({}) OpenWebNetBridgeHandler bridgeHandler;
|
private @NonNullByDefault({}) OpenWebNetBridgeHandler bridgeHandler;
|
||||||
private @NonNullByDefault({}) ThingUID bridgeUID;
|
private @NonNullByDefault({}) ThingUID bridgeUID;
|
||||||
|
|
||||||
|
private boolean cuFound = false;
|
||||||
|
|
||||||
public OpenWebNetDeviceDiscoveryService() {
|
public OpenWebNetDeviceDiscoveryService() {
|
||||||
super(SUPPORTED_THING_TYPES, SEARCH_TIME_SEC);
|
super(SUPPORTED_THING_TYPES, SEARCH_TIME_SEC);
|
||||||
}
|
}
|
||||||
@ -72,6 +74,7 @@ public class OpenWebNetDeviceDiscoveryService extends AbstractDiscoveryService
|
|||||||
protected void startScan() {
|
protected void startScan() {
|
||||||
logger.info("------ SEARCHING for DEVICES on bridge '{}' ({}) ...", bridgeHandler.getThing().getLabel(),
|
logger.info("------ SEARCHING for DEVICES on bridge '{}' ({}) ...", bridgeHandler.getThing().getLabel(),
|
||||||
bridgeUID);
|
bridgeUID);
|
||||||
|
cuFound = false;
|
||||||
bridgeHandler.searchDevices();
|
bridgeHandler.searchDevices();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -237,15 +240,38 @@ public class OpenWebNetDeviceDiscoveryService extends AbstractDiscoveryService
|
|||||||
|
|
||||||
String whereConfig = w.value();
|
String whereConfig = w.value();
|
||||||
|
|
||||||
// remove # from discovered thermo zone/central unit or alarm zone
|
// remove # from discovered alarm zone
|
||||||
if (OpenWebNetBindingConstants.THING_TYPE_BUS_THERMO_ZONE.equals(thingTypeUID)
|
if (OpenWebNetBindingConstants.THING_TYPE_BUS_ALARM_ZONE.equals(thingTypeUID)) {
|
||||||
|| OpenWebNetBindingConstants.THING_TYPE_BUS_THERMO_CU.equals(thingTypeUID)) {
|
whereConfig = "" + ((WhereAlarm) w).getZone();
|
||||||
whereConfig = "" + ((WhereThermo) where).getZone();
|
|
||||||
} else if (OpenWebNetBindingConstants.THING_TYPE_BUS_ALARM_ZONE.equals(thingTypeUID)) {
|
|
||||||
whereConfig = "" + ((WhereAlarm) where).getZone();
|
|
||||||
}
|
}
|
||||||
if (w instanceof WhereZigBee && WhereZigBee.UNIT_02.equals(((WhereZigBee) where).getUnit())) {
|
|
||||||
logger.debug("UNIT=02 found (WHERE={}) -> will remove previous result if exists", where);
|
Map<String, Object> properties = new HashMap<>(2);
|
||||||
|
|
||||||
|
// detect Thermo CU type
|
||||||
|
if (OpenWebNetBindingConstants.THING_TYPE_BUS_THERMO_CU.equals(thingTypeUID)) {
|
||||||
|
cuFound = true;
|
||||||
|
logger.debug("CU found: {}", w);
|
||||||
|
if (w.value().charAt(0) == '#') { // 99-zone CU
|
||||||
|
thingLabel += " 99-zone";
|
||||||
|
logger.debug("@@@@@ THERMO CU found 99-zone: where={}, ownId={}, whereConfig={}", w, ownId,
|
||||||
|
whereConfig);
|
||||||
|
} else {
|
||||||
|
thingLabel += " 4-zone";
|
||||||
|
whereConfig = "#" + w.value();
|
||||||
|
logger.debug("@@@@ THERMO CU found 4-zone: where={}, ownId={}, whereConfig={}", w, ownId, whereConfig);
|
||||||
|
}
|
||||||
|
} else if (OpenWebNetBindingConstants.THING_TYPE_BUS_THERMO_ZONE.equals(thingTypeUID)) {
|
||||||
|
if (cuFound) {
|
||||||
|
// set param standalone = false for thermo zone
|
||||||
|
properties.put(OpenWebNetBindingConstants.CONFIG_PROPERTY_STANDALONE, false);
|
||||||
|
}
|
||||||
|
whereConfig = "" + ((WhereThermo) w).getZone();
|
||||||
|
logger.debug("@@@@@ THERMO ZONE found: where={}, ownId={}, whereConfig={}, standalone={}", w, ownId,
|
||||||
|
whereConfig, properties.get(OpenWebNetBindingConstants.CONFIG_PROPERTY_STANDALONE));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (w instanceof WhereZigBee && WhereZigBee.UNIT_02.equals(((WhereZigBee) w).getUnit())) {
|
||||||
|
logger.debug("UNIT=02 found (WHERE={}) -> will remove previous result if exists", w);
|
||||||
thingRemoved(thingUID); // remove previously discovered thing
|
thingRemoved(thingUID); // remove previously discovered thing
|
||||||
// re-create thingUID with new type
|
// re-create thingUID with new type
|
||||||
thingTypeUID = OpenWebNetBindingConstants.THING_TYPE_ZB_ON_OFF_SWITCH_2UNITS;
|
thingTypeUID = OpenWebNetBindingConstants.THING_TYPE_ZB_ON_OFF_SWITCH_2UNITS;
|
||||||
@ -256,7 +282,6 @@ public class OpenWebNetDeviceDiscoveryService extends AbstractDiscoveryService
|
|||||||
OpenWebNetBindingConstants.THING_TYPE_ZB_ON_OFF_SWITCH,
|
OpenWebNetBindingConstants.THING_TYPE_ZB_ON_OFF_SWITCH,
|
||||||
OpenWebNetBindingConstants.THING_TYPE_ZB_ON_OFF_SWITCH_2UNITS);
|
OpenWebNetBindingConstants.THING_TYPE_ZB_ON_OFF_SWITCH_2UNITS);
|
||||||
}
|
}
|
||||||
Map<String, Object> properties = new HashMap<>(2);
|
|
||||||
properties.put(OpenWebNetBindingConstants.CONFIG_PROPERTY_WHERE, whereConfig);
|
properties.put(OpenWebNetBindingConstants.CONFIG_PROPERTY_WHERE, whereConfig);
|
||||||
properties.put(OpenWebNetBindingConstants.PROPERTY_OWNID, ownId);
|
properties.put(OpenWebNetBindingConstants.PROPERTY_OWNID, ownId);
|
||||||
if (OpenWebNetBindingConstants.THING_TYPE_GENERIC_DEVICE.equals(thingTypeUID)) {
|
if (OpenWebNetBindingConstants.THING_TYPE_GENERIC_DEVICE.equals(thingTypeUID)) {
|
||||||
|
@ -743,7 +743,8 @@ public class OpenWebNetBridgeHandler extends ConfigStatusBridgeHandler implement
|
|||||||
if (str.indexOf('#') == 0) { // Thermo central unit (#0) or zone via central unit (#Z, Z=[1-99]) --> Z,
|
if (str.indexOf('#') == 0) { // Thermo central unit (#0) or zone via central unit (#Z, Z=[1-99]) --> Z,
|
||||||
// Alarm Zone (#Z) --> Z
|
// Alarm Zone (#Z) --> Z
|
||||||
str = str.substring(1);
|
str = str.substring(1);
|
||||||
} else if (str.indexOf('#') > 0) { // Thermo zone Z and actuator N (Z#N, Z=[1-99], N=[1-9]) --> Z
|
} else if (str.indexOf('#') > 0 && str.charAt(0) != '0') { // Thermo zone Z and actuator N (Z#N,
|
||||||
|
// Z=[1-99], N=[1-9]) --> Z
|
||||||
str = str.substring(0, str.indexOf('#'));
|
str = str.substring(0, str.indexOf('#'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -48,7 +48,7 @@ import org.slf4j.LoggerFactory;
|
|||||||
* commands/messages for Thermoregulation
|
* commands/messages for Thermoregulation
|
||||||
* Things. It extends the abstract {@link OpenWebNetThingHandler}.
|
* Things. It extends the abstract {@link OpenWebNetThingHandler}.
|
||||||
*
|
*
|
||||||
* @author Massimo Valla - Initial contribution
|
* @author Massimo Valla - Initial contribution. Added support for 4-zone CU
|
||||||
* @author Andrea Conte - Thermoregulation
|
* @author Andrea Conte - Thermoregulation
|
||||||
* @author Gilberto Cocchi - Thermoregulation
|
* @author Gilberto Cocchi - Thermoregulation
|
||||||
*/
|
*/
|
||||||
@ -64,7 +64,7 @@ public class OpenWebNetThermoregulationHandler extends OpenWebNetThingHandler {
|
|||||||
private Thermoregulation.Function currentFunction = Thermoregulation.Function.GENERIC;
|
private Thermoregulation.Function currentFunction = Thermoregulation.Function.GENERIC;
|
||||||
private Thermoregulation.OperationMode currentMode = Thermoregulation.OperationMode.MANUAL;
|
private Thermoregulation.OperationMode currentMode = Thermoregulation.OperationMode.MANUAL;
|
||||||
|
|
||||||
private boolean isStandAlone = false;
|
private boolean isStandAlone = true; // true if zone is not associated to a CU
|
||||||
|
|
||||||
private boolean isCentralUnit = false;
|
private boolean isCentralUnit = false;
|
||||||
|
|
||||||
@ -95,18 +95,19 @@ public class OpenWebNetThermoregulationHandler extends OpenWebNetThingHandler {
|
|||||||
if (!isCentralUnit) {
|
if (!isCentralUnit) {
|
||||||
Object standAloneConfig = getConfig().get(OpenWebNetBindingConstants.CONFIG_PROPERTY_STANDALONE);
|
Object standAloneConfig = getConfig().get(OpenWebNetBindingConstants.CONFIG_PROPERTY_STANDALONE);
|
||||||
if (standAloneConfig != null) {
|
if (standAloneConfig != null) {
|
||||||
// null in case of thermo_sensor
|
|
||||||
isStandAlone = Boolean.parseBoolean(standAloneConfig.toString());
|
isStandAlone = Boolean.parseBoolean(standAloneConfig.toString());
|
||||||
}
|
}
|
||||||
|
logger.debug("@@@@ THERMO ZONE INITIALIZE isStandAlone={}", isStandAlone);
|
||||||
} else {
|
} else {
|
||||||
// central unit must have WHERE=0
|
|
||||||
if (!deviceWhere.value().equals("0")) {
|
|
||||||
logger.warn("initialize() Invalid WHERE={} for Central Unit.", deviceWhere.value());
|
|
||||||
|
|
||||||
|
// central unit must have WHERE=#0 or WHERE=0 or WHERE=#0#n
|
||||||
|
String w = deviceWhere.value();
|
||||||
|
if (w == null || !("0".equals(w) || "#0".equals(w) || w.startsWith("#0#"))) {
|
||||||
|
logger.warn("initialize() Invalid WHERE={} for Central Unit.", deviceWhere.value());
|
||||||
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.CONFIGURATION_ERROR,
|
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.CONFIGURATION_ERROR,
|
||||||
"@text/offline.conf-error-where");
|
"@text/offline.conf-error-where");
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// reset state of signal channels (they will be setted when specific messages
|
// reset state of signal channels (they will be setted when specific messages
|
||||||
// are received)
|
// are received)
|
||||||
updateState(CHANNEL_CU_AT_LEAST_ONE_PROBE_MANUAL, OnOffType.OFF);
|
updateState(CHANNEL_CU_AT_LEAST_ONE_PROBE_MANUAL, OnOffType.OFF);
|
||||||
@ -266,7 +267,7 @@ public class OpenWebNetThermoregulationHandler extends OpenWebNetThingHandler {
|
|||||||
|
|
||||||
private String getWhere(String where) {
|
private String getWhere(String where) {
|
||||||
if (isCentralUnit) {
|
if (isCentralUnit) {
|
||||||
return "#0";
|
return where;
|
||||||
} else {
|
} else {
|
||||||
return isStandAlone ? where : "#" + where;
|
return isStandAlone ? where : "#" + where;
|
||||||
}
|
}
|
||||||
@ -295,6 +296,8 @@ public class OpenWebNetThermoregulationHandler extends OpenWebNetThingHandler {
|
|||||||
protected void handleMessage(BaseOpenMessage msg) {
|
protected void handleMessage(BaseOpenMessage msg) {
|
||||||
super.handleMessage(msg);
|
super.handleMessage(msg);
|
||||||
|
|
||||||
|
logger.debug("@@@@ Thermo.handleMessage(): {}", msg.toStringVerbose());
|
||||||
|
|
||||||
if (isCentralUnit) {
|
if (isCentralUnit) {
|
||||||
if (msg.getWhat() == null) {
|
if (msg.getWhat() == null) {
|
||||||
return;
|
return;
|
||||||
@ -572,21 +575,21 @@ public class OpenWebNetThermoregulationHandler extends OpenWebNetThingHandler {
|
|||||||
@Override
|
@Override
|
||||||
protected void refreshDevice(boolean refreshAll) {
|
protected void refreshDevice(boolean refreshAll) {
|
||||||
logger.debug("--- refreshDevice() : refreshing SINGLE... ({})", thing.getUID());
|
logger.debug("--- refreshDevice() : refreshing SINGLE... ({})", thing.getUID());
|
||||||
|
|
||||||
|
if (deviceWhere != null) {
|
||||||
|
String w = deviceWhere.value();
|
||||||
|
|
||||||
if (isCentralUnit) {
|
if (isCentralUnit) {
|
||||||
// TODO: 4 zone central -> zone #0 CAN be also a zone with its temp.. with
|
// TODO: 4 zone central -> zone #0 CAN be also a zone with its temp.. with
|
||||||
// 99-zones central no! let's assume it's a 99 zone
|
// 99-zones central no! let's assume it's a 99 zone
|
||||||
try {
|
try {
|
||||||
send(Thermoregulation.requestStatus("#0"));
|
send(Thermoregulation.requestStatus(w));
|
||||||
} catch (OWNException e) {
|
} catch (OWNException e) {
|
||||||
logger.warn("refreshDevice() central unit returned OWNException {}", e.getMessage());
|
logger.warn("refreshDevice() central unit returned OWNException {}", e.getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (deviceWhere != null) {
|
|
||||||
|
|
||||||
String w = deviceWhere.value();
|
|
||||||
try {
|
try {
|
||||||
send(Thermoregulation.requestTemperature(w));
|
send(Thermoregulation.requestTemperature(w));
|
||||||
|
|
||||||
@ -615,6 +618,8 @@ public class OpenWebNetThermoregulationHandler extends OpenWebNetThingHandler {
|
|||||||
} catch (OWNException e) {
|
} catch (OWNException e) {
|
||||||
logger.warn("refreshDevice() where='{}' returned OWNException {}", w, e.getMessage());
|
logger.warn("refreshDevice() where='{}' returned OWNException {}", w, e.getMessage());
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
logger.debug("refreshDevice() where is null");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -89,7 +89,7 @@ thing-type.config.openwebnet.bus_on_off_switch.where.description = Example: A/PL
|
|||||||
thing-type.config.openwebnet.bus_scenario_control.where.label = OpenWebNet Address (where)
|
thing-type.config.openwebnet.bus_scenario_control.where.label = OpenWebNet Address (where)
|
||||||
thing-type.config.openwebnet.bus_scenario_control.where.description = Example: scenario control module address 53 --> where=53. On local bus: where=53#4#01
|
thing-type.config.openwebnet.bus_scenario_control.where.description = Example: scenario control module address 53 --> where=53. On local bus: where=53#4#01
|
||||||
thing-type.config.openwebnet.bus_thermo_cu.where.label = OpenWebNet Address (where)
|
thing-type.config.openwebnet.bus_thermo_cu.where.label = OpenWebNet Address (where)
|
||||||
thing-type.config.openwebnet.bus_thermo_cu.where.description = The Central Unit can only assume where=0.
|
thing-type.config.openwebnet.bus_thermo_cu.where.description = For Thermo Central Unit 99-zones --> where=#0, for 4-zones --> where=#0#1
|
||||||
thing-type.config.openwebnet.bus_thermo_sensor.where.label = OpenWebNet Address (where)
|
thing-type.config.openwebnet.bus_thermo_sensor.where.label = OpenWebNet Address (where)
|
||||||
thing-type.config.openwebnet.bus_thermo_sensor.where.description = Example: sensor 3 of zone 2 --> where=302. Sensor 5 of external zone 00 --> where=500
|
thing-type.config.openwebnet.bus_thermo_sensor.where.description = Example: sensor 3 of zone 2 --> where=302. Sensor 5 of external zone 00 --> where=500
|
||||||
thing-type.config.openwebnet.bus_thermo_zone.standAlone.label = Stand-alone
|
thing-type.config.openwebnet.bus_thermo_zone.standAlone.label = Stand-alone
|
||||||
|
@ -38,11 +38,11 @@
|
|||||||
<representation-property>ownId</representation-property>
|
<representation-property>ownId</representation-property>
|
||||||
|
|
||||||
<config-description>
|
<config-description>
|
||||||
<parameter name="where" type="text" readOnly="true">
|
<parameter name="where" type="text" required="true">
|
||||||
<label>OpenWebNet Address (where)</label>
|
<label>OpenWebNet Address (where)</label>
|
||||||
<description>The Central Unit can only assume where=0.</description>
|
<description>For Thermo Central Unit 99-zones --> where=#0, for 4-zones --> where=#0#1</description>
|
||||||
<default>0</default>
|
|
||||||
</parameter>
|
</parameter>
|
||||||
|
|
||||||
</config-description>
|
</config-description>
|
||||||
</thing-type>
|
</thing-type>
|
||||||
</thing:thing-descriptions>
|
</thing:thing-descriptions>
|
||||||
|
@ -38,7 +38,7 @@ import org.slf4j.LoggerFactory;
|
|||||||
* using {@link OpenWebNetBridgeHandler} methods: normalizeWhere(),
|
* using {@link OpenWebNetBridgeHandler} methods: normalizeWhere(),
|
||||||
* ownIdFromWhoWhere(), ownIdFromMessage(), thingIdFromWhere()
|
* ownIdFromWhoWhere(), ownIdFromMessage(), thingIdFromWhere()
|
||||||
*
|
*
|
||||||
* @author Massimo Valla - Initial contribution, updates
|
* @author Massimo Valla - Initial contribution, various updates
|
||||||
* @author Andrea Conte - Energy management
|
* @author Andrea Conte - Energy management
|
||||||
* @author Giovanni Fabiani - Auxiliary message support
|
* @author Giovanni Fabiani - Auxiliary message support
|
||||||
*/
|
*/
|
||||||
@ -59,7 +59,10 @@ public class OwnIdTest {
|
|||||||
* BUS Switch 51 51 1.51 51
|
* BUS Switch 51 51 1.51 51
|
||||||
* BUS Local Bus 25#4#01 25h4h01 1.25h4h01 25h4h01
|
* BUS Local Bus 25#4#01 25h4h01 1.25h4h01 25h4h01
|
||||||
* BUS Autom 93 93 2.93 93
|
* BUS Autom 93 93 2.93 93
|
||||||
* BUS Thermo #1 or 1 1 4.1 1
|
* BUS Thermo zone 1 1 4.1 1
|
||||||
|
* BUS Thermo zone CU #1 1 4.1 1
|
||||||
|
* BUS Thermo CU 99-z #0 0 4.0 0
|
||||||
|
* BUS Thermo CU 4-z #0#1 0h1 4.0h1 0h1
|
||||||
* BUS Thermo actuator 1#2 1 4.1 1
|
* BUS Thermo actuator 1#2 1 4.1 1
|
||||||
* BUS TempSensor 500 500 4.500 500
|
* BUS TempSensor 500 500 4.500 500
|
||||||
* BUS Energy 51 51 18.51 51
|
* BUS Energy 51 51 18.51 51
|
||||||
@ -76,15 +79,17 @@ public class OwnIdTest {
|
|||||||
|
|
||||||
public enum TEST {
|
public enum TEST {
|
||||||
// @formatter:off
|
// @formatter:off
|
||||||
// msg, who, where, normW, ownId, thingId
|
// msg, who, where, normalizeWhere, ownId, thingId
|
||||||
zb_switch("*1*1*789309801#9##", Who.fromValue(1), new WhereZigBee("789309801#9"), "789309800h9", "1.789309800h9", "789309800h9"),
|
zb_switch("*1*1*789309801#9##", Who.fromValue(1), new WhereZigBee("789309801#9"), "789309800h9", "1.789309800h9", "789309800h9"),
|
||||||
zb_switch_2u_1("*1*1*789301201#9##", Who.fromValue(1), new WhereZigBee("789301201#9"), "789301200h9", "1.789301200h9", "789301200h9"),
|
zb_switch_2u_1("*1*1*789301201#9##", Who.fromValue(1), new WhereZigBee("789301201#9"), "789301200h9", "1.789301200h9", "789301200h9"),
|
||||||
zb_switch_2u_2("*1*1*789301202#9##", Who.fromValue(1), new WhereZigBee("789301202#9"), "789301200h9", "1.789301200h9", "789301200h9"),
|
zb_switch_2u_2("*1*1*789301202#9##", Who.fromValue(1), new WhereZigBee("789301202#9"), "789301200h9", "1.789301200h9", "789301200h9"),
|
||||||
bus_switch("*1*1*51##", Who.fromValue(1), new WhereLightAutom("51"),"51", "1.51", "51"),
|
bus_switch("*1*1*51##", Who.fromValue(1), new WhereLightAutom("51"),"51", "1.51", "51"),
|
||||||
bus_localbus("*1*1*25#4#01##", Who.fromValue(1), new WhereLightAutom("25#4#01"), "25h4h01", "1.25h4h01", "25h4h01"),
|
bus_localbus("*1*1*25#4#01##", Who.fromValue(1), new WhereLightAutom("25#4#01"), "25h4h01", "1.25h4h01", "25h4h01"),
|
||||||
bus_autom("*2*0*93##",Who.fromValue(2), new WhereLightAutom("93"), "93", "2.93", "93"),
|
bus_autom("*2*0*93##",Who.fromValue(2), new WhereLightAutom("93"), "93", "2.93", "93"),
|
||||||
bus_thermo_via_cu("*#4*#1*0*0020##", Who.fromValue(4), new WhereThermo("#1"), "1", "4.1", "1"),
|
bus_thermo_zone("*#4*1*0*0020##", Who.fromValue(4), new WhereThermo("1"), "1", "4.1", "1"),
|
||||||
bus_thermo("*#4*1*0*0020##", Who.fromValue(4), new WhereThermo("1"), "1", "4.1", "1"),
|
bus_thermo_zone_via_cu("*#4*#1*0*0020##", Who.fromValue(4), new WhereThermo("#1"), "1", "4.1", "1"),
|
||||||
|
bus_thermo_cu_99("*#4*#0##", Who.fromValue(4), new WhereThermo("#0") ,"0", "4.0", "0"),
|
||||||
|
bus_thermo_cu_4("*#4*#0#1##", Who.fromValue(4), new WhereThermo("#0#1") ,"0h1", "4.0h1", "0h1"),
|
||||||
bus_thermo_act("*#4*1#2*20*0##", Who.fromValue(4), new WhereThermo("1#2") ,"1", "4.1", "1"),
|
bus_thermo_act("*#4*1#2*20*0##", Who.fromValue(4), new WhereThermo("1#2") ,"1", "4.1", "1"),
|
||||||
bus_tempSensor("*#4*500*15*1*0020*0001##",Who.fromValue(4), new WhereThermo("500"), "500", "4.500", "500"),
|
bus_tempSensor("*#4*500*15*1*0020*0001##",Who.fromValue(4), new WhereThermo("500"), "500", "4.500", "500"),
|
||||||
bus_energy("*#18*51*113##", Who.fromValue(18), new WhereEnergyManagement("51"), "51", "18.51", "51"),
|
bus_energy("*#18*51*113##", Who.fromValue(18), new WhereEnergyManagement("51"), "51", "18.51", "51"),
|
||||||
|
Loading…
Reference in New Issue
Block a user