[melcloud] More data from the cloud (#18850)

* Added functionalities to HeatPump devices to set the flow temperature and get the unit status

Signed-off-by: Alessio Galliazzo <agalliazzo@gmail.com>
This commit is contained in:
Alessio Galliazzo
2026-04-19 14:37:04 +02:00
committed by GitHub
parent e9f6809fcb
commit b14de1d4b2
7 changed files with 476 additions and 66 deletions
+43 -27
View File
@@ -1,7 +1,7 @@
# MELCloud Binding
This is an openHAB binding for [Mitsubishi MELCloud](https://www.melcloud.com/).
Installing this binding you can control your Mitsubishi devices from openHAB without accessing the MELCloud App and benefiting from all openHAB automations.
Installing this binding, you can control your Mitsubishi devices from openHAB without accessing the MELCloud App and benefiting from all openHAB automations.
## Supported Things
@@ -68,10 +68,10 @@ MELCloud account configuration:
A.C. device and Heatpump device configuration:
| Config | Mandatory | Description |
|-----------------|-----------|---------------------------------------------------------------------------------------|
| deviceID | x | MELCloud device ID. |
| buildingID | | MELCloud building ID. If not defined, binding tries to find matching id by device ID. |
| Config | Mandatory | Description |
|-----------------|-----------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| deviceID | x | MELCloud device ID. |
| buildingID | | MELCloud building ID. If not defined, binding tries to find matching id by device ID. |
| pollingInterval | | Refresh time interval in seconds for updates from MELCloud. Minimum is 180, defaults to 360 seconds. Mitsubishi Electric introduced limits on their API so changing default value may cause excessive traffic and lock you out for several hours. |
## Channels
@@ -94,23 +94,31 @@ A.C. device channels
Heatpump device channels
| Channel | Type | Description | Read Only |
|---------------------|--------------------|----------------------------------------------------------------------------|-----------|
| power | Switch | Power Status of Device. | False |
| forcedHotWaterMode | Switch | If water mode is Heat Now (true) or Auto (false) | False |
| setTemperatureZone1 | Number:Temperature | Set Temperature Zone 1: Min = 10, Max = 30. | False |
| roomTemperatureZone1| Number:Temperature | Room temperature Zone 1. | True |
| tankWaterTemperature| Number:Temperature | Tank water temperature. | True |
| lastCommunication | DateTime | Last Communication time when MELCloud communicated to the device. | True |
| nextCommunication | DateTime | Next communication time when MELCloud will communicate to the device. | True |
| offline | Switch | Is device in offline state. | True |
| hasPendingCommand | Switch | Device has a pending command(s). | True |
| Channel | Type | Description | Read Only |
|----------------------------|--------------------|------------------------------------------------------------------------------------------------------------------------------------------|-----------|
| power | Switch | Power Status of Device. | False |
| forcedHotWaterMode | Switch | If water mode is Heat Now (true) or Auto (false) | False |
| setTemperatureZone1 | Number:Temperature | Set Temperature Zone 1: Min = 10, Max = 30. | False |
| roomTemperatureZone1 | Number:Temperature | Room temperature Zone 1. | True |
| setTemperatureZone2 | Number:Temperature | Set Temperature Zone 2: Min = 10, Max = 30. | False |
| roomTemperatureZone2 | Number:Temperature | Room temperature Zone 2. | True |
| tankWaterTemperature | Number:Temperature | Tank water temperature. | True |
| tankTargetWaterTemperature | Number:Temperature | Tank water target temperature for heating. | False |
| lastCommunication | DateTime | Last Communication time when MELCloud communicated to the device. | True |
| nextCommunication | DateTime | Next communication time when MELCloud will communicate to the device. | True |
| offline | Switch | Is device in offline state. | True |
| hasPendingCommand | Switch | Device has a pending command(s). | True |
| heatFlowTemperatureZone1 | Number:Temperature | Heat flow temperature Zone 1. | False |
| heatFlowTemperatureZone2 | Number:Temperature | Heat flow temperature Zone 2. | False |
| heatTemperatureModeZone1 | Number | Temperature control mode for Zone 1 (0 = "Heat thermostat", 1 = "Heat flow", 2 = "Heat curve", 3 = "Cool thermostat", 4 = "Cool flow" | False |
| heatTemperatureModeZone2 | Number | Temperature control mode for Zone 2 (0 = "Heat thermostat", 1 = "Heat flow", 2 = "Heat curve", 3 = "Cool thermostat", 4 = "Cool flow" | False |
| operationMode | String | Operation mode: "0" = Idle, "1" = Heat water, "2" = Heat zones, "3" = Cooling, "4" = Defrost, "5" = Stand-by, "6" = Legionella | False |
## Full Example for items configuration
### melcloud.things
```java
```plaintext
Bridge melcloud:melcloudaccount:myaccount "My MELCloud account" [ username="user.name@example.com", password="xxxxxx", language="0" ] {
Thing acdevice livingroom "Livingroom A.C. device" [ deviceID=123456, pollingInterval=360 ]
Thing heatpumpdevice attic "Attic Heatpump device" [ deviceID=789012, pollingInterval=360 ]
@@ -119,7 +127,7 @@ Bridge melcloud:melcloudaccount:myaccount "My MELCloud account" [ username="user
### melcloud.items
```java
```plaintext
Switch power { channel="melcloud:acdevice:myaccount:livingroom:power" }
String operationMode { channel="melcloud:acdevice:myaccount:livingroom:operationMode" }
Number setTemperature { channel="melcloud:acdevice:myaccount:livingroom:setTemperature" }
@@ -132,13 +140,21 @@ DateTime nextCommunication { channel="melcloud:acdevice:myaccount:livingroo
Switch offline { channel="melcloud:acdevice:myaccount:livingroom:offline" }
Switch hasPendingCommand { channel="melcloud:acdevice:myaccount:livingroom:hasPendingCommand" }
Switch heatpumpPower { channel="melcloud:heatpumpdevice:myaccount:attic:power" }
Switch heatpumpForcedHotWaterMode { channel="melcloud:heatpumpdevice:myaccount:attic:forcedHotWaterMode" }
Number heatpumpSetTemperatureZone1 { channel="melcloud:heatpumpdevice:myaccount:attic:setTemperatureZone1" }
Number heatpumpRoomTemperatureZone1{ channel="melcloud:heatpumpdevice:myaccount:attic:roomTemperatureZone1" }
Number heatpumpTankWaterTemperature{ channel="melcloud:heatpumpdevice:myaccount:attic:tankWaterTemperature" }
DateTime heatpumpLastCommunication { channel="melcloud:heatpumpdevice:myaccount:attic:lastCommunication" }
DateTime heatpumpNextCommunication { channel="melcloud:heatpumpdevice:myaccount:attic:nextCommunication" }
Switch heatpumpOffline { channel="melcloud:heatpumpdevice:myaccount:attic:offline" }
Switch heatpumpHasPendingCommand { channel="melcloud:heatpumpdevice:myaccount:attic:hasPendingCommand" }
Switch heatpumpPower { channel="melcloud:heatpumpdevice:myaccount:attic:power" }
Switch heatpumpForcedHotWaterMode { channel="melcloud:heatpumpdevice:myaccount:attic:forcedHotWaterMode" }
Number heatpumpSetTemperatureZone1 { channel="melcloud:heatpumpdevice:myaccount:attic:setTemperatureZone1" }
Number heatpumpRoomTemperatureZone1 { channel="melcloud:heatpumpdevice:myaccount:attic:roomTemperatureZone1" }
Number heatpumpSetTemperatureZone2 { channel="melcloud:heatpumpdevice:myaccount:attic:setTemperatureZone2" }
Number heatpumpRoomTemperatureZone2 { channel="melcloud:heatpumpdevice:myaccount:attic:roomTemperatureZone2" }
Number heatpumpTankWaterTemperature { channel="melcloud:heatpumpdevice:myaccount:attic:tankWaterTemperature" }
Number heatpumpTankTargetWaterTemperature { channel="melcloud:heatpumpdevice:myaccount:attic:tankTargetWaterTemperature" }
DateTime heatpumpLastCommunication { channel="melcloud:heatpumpdevice:myaccount:attic:lastCommunication" }
DateTime heatpumpNextCommunication { channel="melcloud:heatpumpdevice:myaccount:attic:nextCommunication" }
Switch heatpumpOffline { channel="melcloud:heatpumpdevice:myaccount:attic:offline" }
Switch heatpumpHasPendingCommand { channel="melcloud:heatpumpdevice:myaccount:attic:hasPendingCommand" }
Number heatpumpFlowTemperatureZone1 { channel="melcloud:heatpumpdevice:myaccount:attic:heatFlowTemperatureZone1" }
Number heatpumpFlowTemperatureZone2 { channel="melcloud:heatpumpdevice:myaccount:attic:heatFlowTemperatureZone2" }
String heatpumpHeatTemperatureModeZone1 { channel="melcloud:heatpumpdevice:myaccount:attic:heatTemperatureModeZone1" }
String heatpumpHeatTemperatureModeZone2 { channel="melcloud:heatpumpdevice:myaccount:attic:heatTemperatureModeZone2" }
String heatpumpHeatPumpOperationMode { channel="melcloud:heatpumpdevice:myaccount:attic:operationMode" }
```
@@ -26,6 +26,7 @@ import org.openhab.core.thing.ThingTypeUID;
*
* @author Luca Calcaterra - Initial contribution
* @author Wietse van Buitenen - Added heatpump device
* @author Alessio Galliazzo - Added heatpump functionalities for flow temperature and temperature control
*/
@NonNullByDefault
public class MelCloudBindingConstants {
@@ -42,14 +43,23 @@ public class MelCloudBindingConstants {
// List of all Channel ids
public static final String CHANNEL_POWER = "power";
public static final String CHANNEL_OPERATION_MODE = "operationMode";
public static final String CHANNEL_OPERATION_MODE_STRING = "operationModeString";
public static final String CHANNEL_SET_TEMPERATURE = "setTemperature";
public static final String CHANNEL_FAN_SPEED = "fanSpeed";
public static final String CHANNEL_VANE_HORIZONTAL = "vaneHorizontal";
public static final String CHANNEL_VANE_VERTICAL = "vaneVertical";
public static final String CHANNEL_SET_TEMPERATURE_ZONE1 = "setTemperatureZone1";
public static final String CHANNEL_ROOM_TEMPERATURE_ZONE1 = "roomTemperatureZone1";
public static final String CHANNEL_SET_TEMPERATURE_ZONE2 = "setTemperatureZone2";
public static final String CHANNEL_ROOM_TEMPERATURE_ZONE2 = "roomTemperatureZone2";
public static final String CHANNEL_FORCED_HOTWATERMODE = "forcedHotWaterMode";
public static final String CHANNEL_TANKWATERTEMPERATURE = "tankWaterTemperature";
public static final String CHANNEL_TANK_TARGET_WATER_TEMPERATURE = "tankTargetWaterTemperature";
public static final String CHANNEL_HEAT_TEMPERATURE_MODE_ZONE1 = "heatTemperatureModeZone1";
public static final String CHANNEL_HEAT_FLOW_TEMPERATURE_ZONE1 = "heatFlowTemperatureZone1";
public static final String CHANNEL_HEAT_TEMPERATURE_MODE_ZONE2 = "heatTemperatureModeZone2";
public static final String CHANNEL_HEAT_FLOW_TEMPERATURE_ZONE2 = "heatFlowTemperatureZone2";
// Read Only Channels
public static final String CHANNEL_ROOM_TEMPERATURE = "roomTemperature";
@@ -13,7 +13,6 @@
package org.openhab.binding.melcloud.internal.handler;
import static org.openhab.binding.melcloud.internal.MelCloudBindingConstants.*;
import static org.openhab.core.library.unit.SIUnits.CELSIUS;
import java.math.BigDecimal;
import java.math.RoundingMode;
@@ -25,10 +24,9 @@ import java.time.format.DateTimeFormatter;
import java.util.concurrent.ScheduledFuture;
import java.util.concurrent.TimeUnit;
import javax.measure.quantity.Temperature;
import org.eclipse.jdt.annotation.NonNullByDefault;
import org.eclipse.jdt.annotation.Nullable;
import org.openhab.binding.melcloud.internal.MelCloudBindingConstants;
import org.openhab.binding.melcloud.internal.api.dto.HeatpumpDeviceStatus;
import org.openhab.binding.melcloud.internal.config.HeatpumpDeviceConfig;
import org.openhab.binding.melcloud.internal.exceptions.MelCloudCommException;
@@ -37,6 +35,7 @@ import org.openhab.core.library.types.DateTimeType;
import org.openhab.core.library.types.DecimalType;
import org.openhab.core.library.types.OnOffType;
import org.openhab.core.library.types.QuantityType;
import org.openhab.core.library.types.StringType;
import org.openhab.core.library.unit.SIUnits;
import org.openhab.core.thing.Bridge;
import org.openhab.core.thing.Channel;
@@ -58,12 +57,19 @@ import org.slf4j.LoggerFactory;
* sent to one of the channels.
*
* @author Wietse van Buitenen - Initial contribution
* @author Alessio Galliazzo - Added heatpump functionalities for flow temperature and unit status
*/
@NonNullByDefault
public class MelCloudHeatpumpDeviceHandler extends BaseThingHandler {
private static final long EFFECTIVE_FLAG_POWER = 1L;
private static final long EFFECTIVE_FLAG_TEMPERATURE_ZONE1 = 8589934720L;
private static final long EFFECTIVE_FLAG_TEMPERATURE_ZONE1 = 0x200000080L;
private static final long EFFECTIVE_FLAG_TEMPERATURE_ZONE2 = 0x800000200L;
private static final long EFFECTIVE_FLAG_HOTWATER = 65536L;
private static final long EFFECTIVE_FLAG_HEAT_FLOW_TEMPERATURE_ZONE1 = 0x1000000000000L;
private static final long EFFECTIVE_FLAG_HEAT_FLOW_TEMPERATURE_ZONE2 = 0x1000000000000L;
private static final long EFFECTIVE_FLAG_HEAT_MODE_TEMPERATURE_ZONE1 = 0x08L;
private static final long EFFECTIVE_FLAG_HEAT_MODE_TEMPERATURE_ZONE2 = 0x10L;
private static final long EFFECTIVE_FLAG_TARGET_TANK_TEMPERATURE = 0x1000000000020L;
private final Logger logger = LoggerFactory.getLogger(MelCloudHeatpumpDeviceHandler.class);
private HeatpumpDeviceConfig config = new HeatpumpDeviceConfig();
@@ -124,6 +130,23 @@ public class MelCloudHeatpumpDeviceHandler extends BaseThingHandler {
}
}
@Nullable
private BigDecimal convertOHValueToHPTemperature(Object command, double rounding) {
if (command instanceof QuantityType<?> quantityCommand) {
QuantityType<?> normalizedCelsiusTemperature = quantityCommand.toUnit(SIUnits.CELSIUS);
if (normalizedCelsiusTemperature == null) {
logger.debug("Can't convert '{}' to unit Celsius", quantityCommand);
return null;
}
BigDecimal val = normalizedCelsiusTemperature.toBigDecimal().setScale(1, RoundingMode.HALF_UP);
double inverseRound = 1 / rounding;
double v = Math.round(val.doubleValue() * inverseRound) / inverseRound;
return new BigDecimal(v);
}
logger.debug("Can't convert '{}' to set temperature", command);
return null;
}
@Override
public void handleCommand(ChannelUID channelUID, Command command) {
logger.debug("Received command '{}' to channel {}", command, channelUID);
@@ -144,44 +167,70 @@ public class MelCloudHeatpumpDeviceHandler extends BaseThingHandler {
return;
}
HeatpumpDeviceStatus cmdtoSend = getHeatpumpDeviceStatusCopy(heatpumpDeviceStatus);
cmdtoSend.setEffectiveFlags(0L);
HeatpumpDeviceStatus commandToSend = getHeatpumpDeviceStatusCopy(heatpumpDeviceStatus);
commandToSend.setEffectiveFlags(0L);
switch (channelUID.getId()) {
case CHANNEL_POWER:
cmdtoSend.setPower(command == OnOffType.ON);
cmdtoSend.setEffectiveFlags(EFFECTIVE_FLAG_POWER);
commandToSend.setPower(command == OnOffType.ON);
commandToSend.setEffectiveFlags(EFFECTIVE_FLAG_POWER);
break;
case CHANNEL_SET_TEMPERATURE_ZONE1:
BigDecimal val = null;
if (command instanceof QuantityType) {
QuantityType<Temperature> quantity = new QuantityType<Temperature>(command.toString())
.toUnit(CELSIUS);
if (quantity != null) {
val = quantity.toBigDecimal().setScale(1, RoundingMode.HALF_UP);
// round nearest .5
double v = Math.round(val.doubleValue() * 2) / 2.0;
cmdtoSend.setSetTemperatureZone1(v);
cmdtoSend.setEffectiveFlags(EFFECTIVE_FLAG_TEMPERATURE_ZONE1);
}
BigDecimal v = this.convertOHValueToHPTemperature(command, 0.5);
if (v != null) {
commandToSend.setSetTemperatureZone1(v.doubleValue());
commandToSend.setEffectiveFlags(EFFECTIVE_FLAG_TEMPERATURE_ZONE1);
}
if (val == null) {
logger.debug("Can't convert '{}' to set temperature", command);
break;
case CHANNEL_SET_TEMPERATURE_ZONE2:
BigDecimal zone2Temperature = this.convertOHValueToHPTemperature(command, 0.5);
if (zone2Temperature != null) {
commandToSend.setSetTemperatureZone2(zone2Temperature.doubleValue());
commandToSend.setEffectiveFlags(EFFECTIVE_FLAG_TEMPERATURE_ZONE2);
}
break;
case CHANNEL_FORCED_HOTWATERMODE:
cmdtoSend.setForcedHotWaterMode(command == OnOffType.ON);
cmdtoSend.setEffectiveFlags(EFFECTIVE_FLAG_HOTWATER);
commandToSend.setForcedHotWaterMode(command == OnOffType.ON);
commandToSend.setEffectiveFlags(EFFECTIVE_FLAG_HOTWATER);
break;
case CHANNEL_HEAT_FLOW_TEMPERATURE_ZONE1:
BigDecimal heatFlowTemperatureZone1 = this.convertOHValueToHPTemperature(command, 1);
if (heatFlowTemperatureZone1 != null) {
commandToSend.setSetHeatFlowTemperatureZone1(heatFlowTemperatureZone1.doubleValue());
commandToSend.setEffectiveFlags(EFFECTIVE_FLAG_HEAT_FLOW_TEMPERATURE_ZONE1);
}
break;
case CHANNEL_HEAT_FLOW_TEMPERATURE_ZONE2:
BigDecimal heatFlowTemperatureZone2 = this.convertOHValueToHPTemperature(command, 1);
if (heatFlowTemperatureZone2 != null) {
commandToSend.setSetHeatFlowTemperatureZone2(heatFlowTemperatureZone2.doubleValue());
commandToSend.setEffectiveFlags(EFFECTIVE_FLAG_HEAT_FLOW_TEMPERATURE_ZONE2);
}
break;
case CHANNEL_HEAT_TEMPERATURE_MODE_ZONE1:
commandToSend.setOperationModeZone1(Integer.parseInt(command.toString()));
commandToSend.setEffectiveFlags(EFFECTIVE_FLAG_HEAT_MODE_TEMPERATURE_ZONE1);
break;
case CHANNEL_HEAT_TEMPERATURE_MODE_ZONE2:
commandToSend.setOperationModeZone2(Integer.parseInt(command.toString()));
commandToSend.setEffectiveFlags(EFFECTIVE_FLAG_HEAT_MODE_TEMPERATURE_ZONE2);
break;
case CHANNEL_TANK_TARGET_WATER_TEMPERATURE:
BigDecimal tankWaterTemperature = this.convertOHValueToHPTemperature(command, 1);
if (tankWaterTemperature != null) {
commandToSend.setSetTankWaterTemperature(tankWaterTemperature.doubleValue());
commandToSend.setEffectiveFlags(EFFECTIVE_FLAG_TARGET_TANK_TEMPERATURE);
}
break;
default:
logger.debug("Read-only or unknown channel {}, skipping update", channelUID);
}
if (cmdtoSend.getEffectiveFlags() > 0) {
cmdtoSend.setHasPendingCommand(true);
cmdtoSend.setDeviceID(config.deviceID);
if (commandToSend.getEffectiveFlags() > 0) {
commandToSend.setHasPendingCommand(true);
commandToSend.setDeviceID(config.deviceID);
try {
HeatpumpDeviceStatus newHeatpumpDeviceStatus = melCloudHandler.sendHeatpumpDeviceStatus(cmdtoSend);
HeatpumpDeviceStatus newHeatpumpDeviceStatus = melCloudHandler.sendHeatpumpDeviceStatus(commandToSend);
updateChannels(newHeatpumpDeviceStatus);
} catch (MelCloudLoginException e) {
logger.warn("Command '{}' to channel '{}' failed due to login error, reason {}. ", command, channelUID,
@@ -203,6 +252,14 @@ public class MelCloudHeatpumpDeviceHandler extends BaseThingHandler {
copy.setSetTemperatureZone1(heatpumpDeviceStatus.getSetTemperatureZone1());
copy.setForcedHotWaterMode(heatpumpDeviceStatus.getForcedHotWaterMode());
copy.setHasPendingCommand(heatpumpDeviceStatus.getHasPendingCommand());
copy.setSetHeatFlowTemperatureZone1(heatpumpDeviceStatus.getSetHeatFlowTemperatureZone1());
copy.setSetHeatFlowTemperatureZone2(heatpumpDeviceStatus.getSetHeatFlowTemperatureZone2());
copy.setSetCoolFlowTemperatureZone1(heatpumpDeviceStatus.getSetCoolFlowTemperatureZone1());
copy.setSetCoolFlowTemperatureZone2(heatpumpDeviceStatus.getSetCoolFlowTemperatureZone2());
copy.setOperationModeZone1(heatpumpDeviceStatus.getOperationModeZone1());
copy.setOperationModeZone2(heatpumpDeviceStatus.getOperationModeZone2());
copy.setSetTankWaterTemperature(heatpumpDeviceStatus.getSetTankWaterTemperature());
copy.setUnitStatus(heatpumpDeviceStatus.getUnitStatus());
}
return copy;
}
@@ -255,10 +312,18 @@ public class MelCloudHeatpumpDeviceHandler extends BaseThingHandler {
updateState(CHANNEL_SET_TEMPERATURE_ZONE1,
new QuantityType<>(heatpumpDeviceStatus.getSetTemperatureZone1(), SIUnits.CELSIUS));
break;
case CHANNEL_SET_TEMPERATURE_ZONE2:
updateState(CHANNEL_SET_TEMPERATURE_ZONE2,
new QuantityType<>(heatpumpDeviceStatus.getSetTemperatureZone2(), SIUnits.CELSIUS));
break;
case CHANNEL_ROOM_TEMPERATURE_ZONE1:
updateState(CHANNEL_ROOM_TEMPERATURE_ZONE1,
new DecimalType(heatpumpDeviceStatus.getRoomTemperatureZone1()));
break;
case CHANNEL_ROOM_TEMPERATURE_ZONE2:
updateState(CHANNEL_ROOM_TEMPERATURE_ZONE2,
new DecimalType(heatpumpDeviceStatus.getRoomTemperatureZone2()));
break;
case CHANNEL_FORCED_HOTWATERMODE:
updateState(CHANNEL_FORCED_HOTWATERMODE, OnOffType.from(heatpumpDeviceStatus.getForcedHotWaterMode()));
break;
@@ -276,6 +341,30 @@ public class MelCloudHeatpumpDeviceHandler extends BaseThingHandler {
case CHANNEL_OFFLINE:
updateState(CHANNEL_OFFLINE, OnOffType.from(heatpumpDeviceStatus.getOffline()));
break;
case CHANNEL_HEAT_FLOW_TEMPERATURE_ZONE1:
updateState(CHANNEL_HEAT_FLOW_TEMPERATURE_ZONE1,
new DecimalType(heatpumpDeviceStatus.getSetHeatFlowTemperatureZone1()));
break;
case CHANNEL_HEAT_TEMPERATURE_MODE_ZONE1:
updateState(CHANNEL_HEAT_TEMPERATURE_MODE_ZONE1,
new DecimalType(heatpumpDeviceStatus.getOperationModeZone1()));
break;
case CHANNEL_HEAT_FLOW_TEMPERATURE_ZONE2:
updateState(CHANNEL_HEAT_FLOW_TEMPERATURE_ZONE2,
new DecimalType(heatpumpDeviceStatus.getOperationModeZone2()));
break;
case CHANNEL_HEAT_TEMPERATURE_MODE_ZONE2:
updateState(CHANNEL_HEAT_TEMPERATURE_MODE_ZONE2,
new DecimalType(heatpumpDeviceStatus.getOperationModeZone2()));
break;
case CHANNEL_OPERATION_MODE:
updateState(MelCloudBindingConstants.CHANNEL_OPERATION_MODE,
new StringType(heatpumpDeviceStatus.getOperationMode().toString()));
break;
case CHANNEL_TANK_TARGET_WATER_TEMPERATURE:
updateState(CHANNEL_TANK_TARGET_WATER_TEMPERATURE,
new QuantityType<>(heatpumpDeviceStatus.getSetTankWaterTemperature(), SIUnits.CELSIUS));
break;
}
}
@@ -73,6 +73,33 @@ channel-type.melcloud.forcedHotWaterMode-channel.label = Forced Hot Water Mode
channel-type.melcloud.forcedHotWaterMode-channel.description = If water mode is Heat Now (true) or Auto (false)
channel-type.melcloud.hasPendingCommand-channel.label = Pending Command
channel-type.melcloud.hasPendingCommand-channel.description = Device has a pending command(s)
channel-type.melcloud.heatFlowTemperatureZone1-channel.label = Heat Flow Temp Zone1
channel-type.melcloud.heatFlowTemperatureZone1-channel.description = Set temperature for water flow for zone 1
channel-type.melcloud.heatFlowTemperatureZone2-channel.label = Heat Flow Temp Zone2
channel-type.melcloud.heatFlowTemperatureZone2-channel.description = Set temperature for water flow for zone 2
channel-type.melcloud.heatPumpOperationMode-channel.label = Operation Mode
channel-type.melcloud.heatPumpOperationMode-channel.description = Operation mode
channel-type.melcloud.heatPumpOperationMode-channel.state.option.0 = Idle
channel-type.melcloud.heatPumpOperationMode-channel.state.option.1 = Heat water
channel-type.melcloud.heatPumpOperationMode-channel.state.option.2 = Heat zones
channel-type.melcloud.heatPumpOperationMode-channel.state.option.3 = Cooling
channel-type.melcloud.heatPumpOperationMode-channel.state.option.4 = Defrost
channel-type.melcloud.heatPumpOperationMode-channel.state.option.5 = Stand-by
channel-type.melcloud.heatPumpOperationMode-channel.state.option.6 = Legionella
channel-type.melcloud.heatTemperatureModeZone1-channel.label = Flow Mode Zone1
channel-type.melcloud.heatTemperatureModeZone1-channel.description = Set flow mode for zone 1
channel-type.melcloud.heatTemperatureModeZone1-channel.state.option.0 = Heat thermostat
channel-type.melcloud.heatTemperatureModeZone1-channel.state.option.1 = Heat flow
channel-type.melcloud.heatTemperatureModeZone1-channel.state.option.2 = Heat curve
channel-type.melcloud.heatTemperatureModeZone1-channel.state.option.3 = Cool thermostat
channel-type.melcloud.heatTemperatureModeZone1-channel.state.option.4 = Cool flow
channel-type.melcloud.heatTemperatureModeZone2-channel.label = Flow Mode Zone2
channel-type.melcloud.heatTemperatureModeZone2-channel.description = Set flow mode for zone 2
channel-type.melcloud.heatTemperatureModeZone2-channel.state.option.0 = Heat thermostat
channel-type.melcloud.heatTemperatureModeZone2-channel.state.option.1 = Heat flow
channel-type.melcloud.heatTemperatureModeZone2-channel.state.option.2 = Heat curve
channel-type.melcloud.heatTemperatureModeZone2-channel.state.option.3 = Cool thermostat
channel-type.melcloud.heatTemperatureModeZone2-channel.state.option.4 = Cool flow
channel-type.melcloud.lastCommunication-channel.label = Last Communication
channel-type.melcloud.lastCommunication-channel.description = Last communication time between device and MELCloud
channel-type.melcloud.nextCommunication-channel.label = Next Communication
@@ -90,14 +117,20 @@ channel-type.melcloud.power-channel.label = Power
channel-type.melcloud.power-channel.description = Power status of device
channel-type.melcloud.roomTemperature-channel.label = Room Temperature
channel-type.melcloud.roomTemperature-channel.description = Room temperature
channel-type.melcloud.roomTemperatureZone1-channel.label = Room Temperature Zone 1
channel-type.melcloud.roomTemperatureZone1-channel.label = Room Temperature Zone1
channel-type.melcloud.roomTemperatureZone1-channel.description = Room temperature for zone 1
channel-type.melcloud.roomTemperatureZone2-channel.label = Room Temperature Zone2
channel-type.melcloud.roomTemperatureZone2-channel.description = Room temperature for zone 2
channel-type.melcloud.setTemperature-channel.label = Set Temperature
channel-type.melcloud.setTemperature-channel.description = Set temperature
channel-type.melcloud.setTemperatureZone1-channel.label = Set Temperature Zone 1
channel-type.melcloud.setTemperatureZone1-channel.label = Set Temperature Zone1
channel-type.melcloud.setTemperatureZone1-channel.description = Set temperature for zone 1
channel-type.melcloud.setTemperatureZone2-channel.label = Set Temperature Zone2
channel-type.melcloud.setTemperatureZone2-channel.description = Set temperature for zone 2
channel-type.melcloud.tankTargetWaterTemperature-channel.label = Tank Target Degrees
channel-type.melcloud.tankTargetWaterTemperature-channel.description = Setpoint temperature of water
channel-type.melcloud.tankWaterTemperature-channel.label = Tank Temperature
channel-type.melcloud.tankWaterTemperature-channel.description = Temperature of water in tank
channel-type.melcloud.tankWaterTemperature-channel.description = Temperature of water
channel-type.melcloud.vaneHorizontal-channel.label = Vane Horizontal
channel-type.melcloud.vaneHorizontal-channel.description = Vane horizontal
channel-type.melcloud.vaneHorizontal-channel.state.option.0 = Auto
@@ -19,6 +19,10 @@
<item-type>Switch</item-type>
<label>Pending Command</label>
<description>Device has a pending command(s)</description>
<tags>
<tag>Status</tag>
<tag>Info</tag>
</tags>
<state readOnly="true"/>
</channel-type>
@@ -26,6 +30,10 @@
<item-type>Switch</item-type>
<label>Is Offline</label>
<description>Is device in offline state.</description>
<tags>
<tag>Status</tag>
<tag>Info</tag>
</tags>
<state readOnly="true"/>
</channel-type>
@@ -60,7 +68,7 @@
<tag>Status</tag>
<tag>Mode</tag>
</tags>
<state readOnly="false">
<state>
<options>
<option value="1">Heat</option>
<option value="2">Dry</option>
@@ -79,7 +87,7 @@
<tag>Control</tag>
<tag>Temperature</tag>
</tags>
<state min="10" max="40" step="0.5" pattern="%.1f %unit%" readOnly="false"/>
<state min="10" max="40" step="0.5" pattern="%.1f %unit%"/>
</channel-type>
<channel-type id="fanSpeed-channel">
@@ -90,7 +98,7 @@
<tag>Status</tag>
<tag>Speed</tag>
</tags>
<state readOnly="false">
<state>
<options>
<option value="0">Auto</option>
<option value="1">1</option>
@@ -110,7 +118,7 @@
<tag>Status</tag>
<tag>Tilt</tag>
</tags>
<state readOnly="false">
<state>
<options>
<option value="0">Auto</option>
<option value="1">1</option>
@@ -131,7 +139,7 @@
<tag>Status</tag>
<tag>Tilt</tag>
</tags>
<state readOnly="false">
<state>
<options>
<option value="0">Auto</option>
<option value="1">1</option>
@@ -159,7 +167,7 @@
<channel-type id="tankWaterTemperature-channel">
<item-type>Number:Temperature</item-type>
<label>Tank Temperature</label>
<description>Temperature of water in tank</description>
<description>Temperature of water</description>
<tags>
<tag>Measurement</tag>
<tag>Temperature</tag>
@@ -167,6 +175,17 @@
<state readOnly="true" pattern="%.1f %unit%"/>
</channel-type>
<channel-type id="tankTargetWaterTemperature-channel">
<item-type>Number:Temperature</item-type>
<label>Tank target temperature</label>
<description>Setpoint temperature of water</description>
<tags>
<tag>Setpoint</tag>
<tag>Temperature</tag>
</tags>
<state min="20" max="65" step="1" pattern="%.0f %unit%"/>
</channel-type>
<channel-type id="forcedHotWaterMode-channel">
<item-type>Switch</item-type>
<label>Forced Hot Water Mode</label>
@@ -179,7 +198,7 @@
<channel-type id="roomTemperatureZone1-channel">
<item-type>Number:Temperature</item-type>
<label>Room Temperature Zone 1</label>
<label>Room Temperature Zone1</label>
<description>Room temperature for zone 1</description>
<tags>
<tag>Measurement</tag>
@@ -190,13 +209,116 @@
<channel-type id="setTemperatureZone1-channel">
<item-type>Number:Temperature</item-type>
<label>Set Temperature Zone 1</label>
<label>Set Temperature Zone1</label>
<description>Set temperature for zone 1</description>
<tags>
<tag>Setpoint</tag>
<tag>Temperature</tag>
</tags>
<state min="10" max="30" step="0.5" pattern="%.1f %unit%" readOnly="false"/>
<state min="10" max="30" step="0.5" pattern="%.1f %unit%"/>
</channel-type>
<channel-type id="roomTemperatureZone2-channel">
<item-type>Number:Temperature</item-type>
<label>Room Temperature Zone2</label>
<description>Room temperature for zone 2</description>
<tags>
<tag>Measurement</tag>
<tag>Temperature</tag>
</tags>
<state readOnly="true" pattern="%.1f %unit%"/>
</channel-type>
<channel-type id="setTemperatureZone2-channel">
<item-type>Number:Temperature</item-type>
<label>Set Temperature Zone2</label>
<description>Set temperature for zone 2</description>
<tags>
<tag>Setpoint</tag>
<tag>Temperature</tag>
</tags>
<state min="10" max="30" step="0.5" pattern="%.1f %unit%"/>
</channel-type>
<channel-type id="heatFlowTemperatureZone1-channel">
<item-type>Number:Temperature</item-type>
<label>Heat Flow Temp Zone1</label>
<description>Set temperature for water flow for zone 1</description>
<tags>
<tag>Setpoint</tag>
<tag>Temperature</tag>
</tags>
<state min="20" max="65" step="1" pattern="%.1f %unit%"/>
</channel-type>
<channel-type id="heatFlowTemperatureZone2-channel">
<item-type>Number:Temperature</item-type>
<label>Heat Flow Temp Zone2</label>
<description>Set temperature for water flow for zone 2</description>
<tags>
<tag>Setpoint</tag>
<tag>Temperature</tag>
</tags>
<state min="20" max="65" step="1" pattern="%.1f %unit%"/>
</channel-type>
<channel-type id="heatTemperatureModeZone1-channel">
<item-type>Number</item-type>
<label>Flow Mode Zone1</label>
<description>Set flow mode for zone 1</description>
<tags>
<tag>Setpoint</tag>
<tag>Mode</tag>
</tags>
<state>
<options>
<option value="0">Heat thermostat</option>
<option value="1">Heat flow</option>
<option value="2">Heat curve</option>
<option value="3">Cool thermostat</option>
<option value="4">Cool flow</option>
</options>
</state>
</channel-type>
<channel-type id="heatTemperatureModeZone2-channel">
<item-type>Number</item-type>
<label>Flow Mode Zone2</label>
<description>Set flow mode for zone 2</description>
<tags>
<tag>Setpoint</tag>
<tag>Mode</tag>
</tags>
<state>
<options>
<option value="0">Heat thermostat</option>
<option value="1">Heat flow</option>
<option value="2">Heat curve</option>
<option value="3">Cool thermostat</option>
<option value="4">Cool flow</option>
</options>
</state>
</channel-type>
<channel-type id="heatPumpOperationMode-channel">
<item-type>String</item-type>
<label>Operation Mode</label>
<description>Operation mode</description>
<tags>
<tag>Status</tag>
<tag>Mode</tag>
</tags>
<state readOnly="true">
<options>
<option value="0">Idle</option>
<option value="1">Heat water</option>
<option value="2">Heat zones</option>
<option value="3">Cooling</option>
<option value="4">Defrost</option>
<option value="5">Stand-by</option>
<option value="6">Legionella</option>
</options>
</state>
</channel-type>
</thing:thing-descriptions>
@@ -14,15 +14,29 @@
<channels>
<channel id="power" typeId="power-channel"/>
<channel id="tankWaterTemperature" typeId="tankWaterTemperature-channel"/>
<channel id="tankTargetWaterTemperature" typeId="tankTargetWaterTemperature-channel"/>
<channel id="forcedHotWaterMode" typeId="forcedHotWaterMode-channel"/>
<channel id="roomTemperatureZone1" typeId="roomTemperatureZone1-channel"/>
<channel id="setTemperatureZone1" typeId="setTemperatureZone1-channel"/>
<channel id="roomTemperatureZone2" typeId="roomTemperatureZone2-channel"/>
<channel id="setTemperatureZone2" typeId="setTemperatureZone2-channel"/>
<channel id="hasPendingCommand" typeId="hasPendingCommand-channel"/>
<channel id="heatFlowTemperatureZone1" typeId="heatFlowTemperatureZone1-channel"/>
<channel id="heatFlowTemperatureZone2" typeId="heatFlowTemperatureZone2-channel"/>
<channel id="heatTemperatureModeZone1" typeId="heatTemperatureModeZone1-channel"/>
<channel id="heatTemperatureModeZone2" typeId="heatTemperatureModeZone2-channel"/>
<channel id="operationMode" typeId="heatPumpOperationMode-channel"/>
<channel id="operationModeString" typeId="heatPumpOperationModeString-channel"/>
<channel id="offline" typeId="offline-channel"/>
<channel id="lastCommunication" typeId="lastCommunication-channel"/>
<channel id="nextCommunication" typeId="nextCommunication-channel"/>
<channel id="unitStatus" typeId="unitStatus-channel"/>
</channels>
<properties>
<property name="thingTypeVersion">1</property>
</properties>
<representation-property>deviceID</representation-property>
<config-description>
@@ -0,0 +1,126 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<update:update-descriptions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:update="https://openhab.org/schemas/update-description/v1.0.0"
xsi:schemaLocation="https://openhab.org/schemas/update-description/v1.0.0 https://openhab.org/schemas/update-description-1.0.0.xsd">
<thing-type uid="melcloud:heatpumpdevice">
<instruction-set targetVersion="1">
<update-channel id="hasPendingCommand">
<type>melcloud:hasPendingCommand-channel</type>
<tags>
<tag>Status</tag>
<tag>Info</tag>
</tags>
</update-channel>
<update-channel id="offline">
<type>melcloud:offline-channel</type>
<tags>
<tag>Status</tag>
<tag>Info</tag>
</tags>
</update-channel>
<update-channel id="roomTemperatureZone1">
<type>melcloud:roomTemperatureZone1-channel</type>
<label>Room Temperature Zone1</label>
<tags>
<tag>Measurement</tag>
<tag>Temperature</tag>
</tags>
</update-channel>
<update-channel id="setTemperatureZone1">
<type>melcloud:setTemperatureZone1-channel</type>
<label>Set Temperature Zone1</label>
<tags>
<tag>Setpoint</tag>
<tag>Temperature</tag>
</tags>
</update-channel>
<!-- New channels -->
<add-channel id="tankTargetWaterTemperature">
<type>melcloud:tankTargetWaterTemperature-channel</type>
<label>Tank Target Degrees</label>
<description>Setpoint temperature of water</description>
<tags>
<tag>Setpoint</tag>
<tag>Temperature</tag>
</tags>
</add-channel>
<add-channel id="roomTemperatureZone2">
<type>melcloud:roomTemperatureZone2-channel</type>
<label>Room Temperature Zone2</label>
<description>Room temperature for zone 2</description>
<tags>
<tag>Measurement</tag>
<tag>Temperature</tag>
</tags>
</add-channel>
<add-channel id="setTemperatureZone2">
<type>melcloud:setTemperatureZone2-channel</type>
<label>Set Temperature Zone2</label>
<description>Set temperature for zone 2</description>
<tags>
<tag>Setpoint</tag>
<tag>Temperature</tag>
</tags>
</add-channel>
<add-channel id="heatFlowTemperatureZone1">
<type>melcloud:heatFlowTemperatureZone1-channel</type>
<label>Heat Flow Temp Zone1</label>
<description>Set temperature for water flow for zone 1</description>
<tags>
<tag>Setpoint</tag>
<tag>Temperature</tag>
</tags>
</add-channel>
<add-channel id="heatFlowTemperatureZone2">
<type>melcloud:heatFlowTemperatureZone2-channel</type>
<label>Heat Flow Temp Zone2</label>
<description>Set temperature for water flow for zone 2</description>
<tags>
<tag>Setpoint</tag>
<tag>Temperature</tag>
</tags>
</add-channel>
<add-channel id="heatTemperatureModeZone1">
<type>melcloud:heatTemperatureModeZone1-channel</type>
<label>Flow Mode Zone1</label>
<description>Set flow mode for zone 1</description>
<tags>
<tag>Setpoint</tag>
<tag>Mode</tag>
</tags>
</add-channel>
<add-channel id="heatTemperatureModeZone2">
<type>melcloud:heatTemperatureModeZone2-channel</type>
<label>Flow Mode Zone2</label>
<description>Set flow mode for zone 2</description>
<tags>
<tag>Setpoint</tag>
<tag>Mode</tag>
</tags>
</add-channel>
<add-channel id="operationMode">
<type>melcloud:heatPumpOperationMode-channel</type>
<label>Operation Mode</label>
<description>Operation mode</description>
<tags>
<tag>Status</tag>
<tag>Mode</tag>
</tags>
</add-channel>
</instruction-set>
</thing-type>
</update:update-descriptions>