[openwebnet] added channel "function" for Central Unit (#12483)
* added channel "function" for Central Unit Signed-off-by: Conte Andrea <andrea@conte.com>
This commit is contained in:
@@ -176,8 +176,8 @@ The (optional) Central Unit can be configured defining a `bus_themo_cu` Thing.
|
|||||||
| Channel Type ID (channel ID) | Applies to Thing Type IDs | Item Type | Description | Read/Write | Advanced |
|
| Channel Type ID (channel ID) | Applies to Thing Type IDs | Item Type | Description | Read/Write | Advanced |
|
||||||
| ---------------------------- | -------------------------------------- | ------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :--------: | :------: |
|
| ---------------------------- | -------------------------------------- | ------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :--------: | :------: |
|
||||||
| `temperature` | `bus_thermo_zone`, `bus_thermo_sensor` | Number:Temperature | The zone currently sensed temperature | R | N |
|
| `temperature` | `bus_thermo_zone`, `bus_thermo_sensor` | Number:Temperature | The zone currently sensed temperature | R | N |
|
||||||
| `setpointTemperature` | `bus_thermo_zone`, `bus_thermo_cu` | Number:Temperature | The zone or Central Unit setpoint temperature | R/W | N |
|
| `setpointTemperature` | `bus_thermo_zone`, `bus_thermo_cu` | Number:Temperature | The zone or Central Unit setpoint temperature | R/W | N |
|
||||||
| `function` | `bus_thermo_zone` | String | The zone set thermo function: `COOLING`, `HEATING` or `GENERIC` (heating + cooling) | R/W | N |
|
| `function` | `bus_thermo_zone`, `bus_thermo_cu` | String | The zone set thermo function (`COOLING`, `HEATING`, `GENERIC`) or the Central Unit thermo function (`COOLING`, `HEATING`) | R/W | N |
|
||||||
| `mode` | `bus_thermo_zone`, `bus_thermo_cu` | String | The zone set mode (`MANUAL`, `PROTECTION`, `OFF`) or the Central Unit set mode ( `MANUAL`, `PROTECTION`, `OFF`, `WEEKLY`, `SCENARIO`) | R/W | N |
|
| `mode` | `bus_thermo_zone`, `bus_thermo_cu` | String | The zone set mode (`MANUAL`, `PROTECTION`, `OFF`) or the Central Unit set mode ( `MANUAL`, `PROTECTION`, `OFF`, `WEEKLY`, `SCENARIO`) | R/W | N |
|
||||||
| `speedFanCoil` | `bus_thermo_zone` | String | The zone fancoil speed: `AUTO`, `SPEED_1`, `SPEED_2`, `SPEED_3` | R/W | N |
|
| `speedFanCoil` | `bus_thermo_zone` | String | The zone fancoil speed: `AUTO`, `SPEED_1`, `SPEED_2`, `SPEED_3` | R/W | N |
|
||||||
| `actuators` | `bus_thermo_zone` | String | The zone actuator(s) status: `OFF`, `ON`, `OPENED`, `CLOSED` , `STOP`, `OFF_FAN_COIL`, `ON_SPEED_1`, `ON_SPEED_2`, `ON_SPEED_3`, `OFF_SPEED_1`, `OFF_SPEED_2`, `OFF_SPEED_3` | R | Y |
|
| `actuators` | `bus_thermo_zone` | String | The zone actuator(s) status: `OFF`, `ON`, `OPENED`, `CLOSED` , `STOP`, `OFF_FAN_COIL`, `ON_SPEED_1`, `ON_SPEED_2`, `ON_SPEED_3`, `OFF_SPEED_1`, `OFF_SPEED_2`, `OFF_SPEED_3` | R | Y |
|
||||||
|
|||||||
@@ -280,9 +280,9 @@ public class OpenWebNetThermoregulationHandler extends OpenWebNetThingHandler {
|
|||||||
super.handleMessage(msg);
|
super.handleMessage(msg);
|
||||||
|
|
||||||
if (isCentralUnit) {
|
if (isCentralUnit) {
|
||||||
if (msg.isCommand()) {
|
// there isn't a message used for setting OK for battery status so let's assume
|
||||||
updateModeAndFunction((Thermoregulation) msg);
|
// it's OK and then change to KO if according message is received
|
||||||
}
|
updateCUBatteryStatus(CU_BATTERY_OK);
|
||||||
|
|
||||||
if (msg.getWhat() == Thermoregulation.WhatThermo.REMOTE_CONTROL_DISABLED) {
|
if (msg.getWhat() == Thermoregulation.WhatThermo.REMOTE_CONTROL_DISABLED) {
|
||||||
updateCURemoteControlStatus(CU_REMOTE_CONTROL_DISABLED);
|
updateCURemoteControlStatus(CU_REMOTE_CONTROL_DISABLED);
|
||||||
@@ -290,8 +290,21 @@ public class OpenWebNetThermoregulationHandler extends OpenWebNetThingHandler {
|
|||||||
updateCURemoteControlStatus(CU_REMOTE_CONTROL_ENABLED);
|
updateCURemoteControlStatus(CU_REMOTE_CONTROL_ENABLED);
|
||||||
} else if (msg.getWhat() == Thermoregulation.WhatThermo.BATTERY_KO) {
|
} else if (msg.getWhat() == Thermoregulation.WhatThermo.BATTERY_KO) {
|
||||||
updateCUBatteryStatus(CU_BATTERY_KO);
|
updateCUBatteryStatus(CU_BATTERY_KO);
|
||||||
|
} // must intercept all possibile WHATs (will be implemented soon)
|
||||||
|
else if (msg.getWhat() == Thermoregulation.WhatThermo.AT_LEAST_ONE_PROBE_OFF) {
|
||||||
|
logger.debug("handleMessage() Ignoring unsupported WHAT {}. Frame={}", msg.getWhat(), msg);
|
||||||
|
} else if (msg.getWhat() == Thermoregulation.WhatThermo.AT_LEAST_ONE_PROBE_ANTIFREEZE) {
|
||||||
|
logger.debug("handleMessage() Ignoring unsupported WHAT {}. Frame={}", msg.getWhat(), msg);
|
||||||
|
} else if (msg.getWhat() == Thermoregulation.WhatThermo.AT_LEAST_ONE_PROBE_MANUAL) {
|
||||||
|
logger.debug("handleMessage() Ignoring unsupported WHAT {}. Frame={}", msg.getWhat(), msg);
|
||||||
|
} else if (msg.getWhat() == Thermoregulation.WhatThermo.FAILURE_DISCOVERED) {
|
||||||
|
logger.debug("handleMessage() Ignoring unsupported WHAT {}. Frame={}", msg.getWhat(), msg);
|
||||||
|
} else if (msg.getWhat() == Thermoregulation.WhatThermo.RELEASE_SENSOR_LOCAL_ADJUST) {
|
||||||
|
logger.debug("handleMessage() Ignoring unsupported WHAT {}. Frame={}", msg.getWhat(), msg);
|
||||||
|
} else {
|
||||||
|
// check and eventually parse mode and function
|
||||||
|
updateModeAndFunction((Thermoregulation) msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -439,9 +452,6 @@ public class OpenWebNetThermoregulationHandler extends OpenWebNetThingHandler {
|
|||||||
// TODO: 4 zone central -> zone #0 CAN be also a zone with its temp.. with 99-zones central no!
|
// 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
|
// let's assume it's a 99 zone
|
||||||
try {
|
try {
|
||||||
// there isn't a message used for setting OK for battery status so let's assume
|
|
||||||
// it's OK and then change to KO if according message is received
|
|
||||||
updateCUBatteryStatus(CU_BATTERY_OK);
|
|
||||||
send(Thermoregulation.requestStatus("#0"));
|
send(Thermoregulation.requestStatus("#0"));
|
||||||
} catch (OWNException e) {
|
} catch (OWNException e) {
|
||||||
logger.warn("refreshDevice() central unit returned OWNException {}", e.getMessage());
|
logger.warn("refreshDevice() central unit returned OWNException {}", e.getMessage());
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
<!-- read only -->
|
<!-- read only -->
|
||||||
<channel id="remoteControl" typeId="remoteControl"/>
|
<channel id="remoteControl" typeId="remoteControl"/>
|
||||||
<channel id="batteryStatus" typeId="batteryStatus"/>
|
<channel id="batteryStatus" typeId="batteryStatus"/>
|
||||||
|
<channel id="function" typeId="functionCentralUnit"/>
|
||||||
<!-- read/write -->
|
<!-- read/write -->
|
||||||
<channel id="setpointTemperature" typeId="setpointTemperature"/>
|
<channel id="setpointTemperature" typeId="setpointTemperature"/>
|
||||||
<channel id="mode" typeId="modeCentralUnit"/>
|
<channel id="mode" typeId="modeCentralUnit"/>
|
||||||
|
|||||||
@@ -66,6 +66,18 @@
|
|||||||
</state>
|
</state>
|
||||||
</channel-type>
|
</channel-type>
|
||||||
|
|
||||||
|
<channel-type id="functionCentralUnit">
|
||||||
|
<item-type>String</item-type>
|
||||||
|
<label>Thermo Function</label>
|
||||||
|
<description>Thermo function of the Central Unit</description>
|
||||||
|
<state readOnly="true">
|
||||||
|
<options>
|
||||||
|
<option value="HEATING">Heating</option>
|
||||||
|
<option value="COOLING">Cooling</option>
|
||||||
|
</options>
|
||||||
|
</state>
|
||||||
|
</channel-type>
|
||||||
|
|
||||||
<channel-type id="setpointTemperature">
|
<channel-type id="setpointTemperature">
|
||||||
<item-type>Number:Temperature</item-type>
|
<item-type>Number:Temperature</item-type>
|
||||||
<label>Setpoint Temperature</label>
|
<label>Setpoint Temperature</label>
|
||||||
|
|||||||
Reference in New Issue
Block a user