mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-10 15:11:59 +01:00
[somfytahoma] improvements for the Hitachi air to water heating system (#12612)
Signed-off-by: Ondrej Pecta <opecta@gmail.com>
This commit is contained in:
parent
2a4482a26a
commit
640ee600d9
@ -147,6 +147,9 @@ Please see the example below.
|
||||
| hitachi (yutaki) air to water heating zone | yutaki_mode | actual mode of the heat pump (Eco, Comfort) |
|
||||
| hitachi (yutaki) air to water heating zone | yutaki_target_mode | sets the mode of the heat pump (Eco, Comfort) |
|
||||
| hitachi (yutaki) air to water heating zone | zone_mode | sets the zone mode (Auto, Manual) |
|
||||
| hitachi (yutaki) air to water heating zone | thermostat_setting_zone1 | controls the thermostat setting for the zone 1 |
|
||||
| hitachi (yutaki) air to water heating zone | wh_setting_temp_zone1 | controls the water heating setting temperature for the zone 1 |
|
||||
| hitachi (yutaki) air to water heating zone | room_ambient_temp_zone1 | controls the room ambient temperature for the zone 1 |
|
||||
| hitachi (yutaki) domestic hot water | anti_legionella | controls the anti legionella mode (Run, Stop) |
|
||||
| hitachi (yutaki) domestic hot water | anti_legionella_temp | controls the anti legionella temperature |
|
||||
| hitachi (yutaki) domestic hot water | target_boost_mode | controls the boost mode (No request, Enabled, Disabled) |
|
||||
|
@ -321,6 +321,9 @@ public class SomfyTahomaBindingConstants {
|
||||
public static final String YUTAKI_TARGET_MODE = "yutaki_target_mode";
|
||||
public static final String YUTAKI_MODE = "yutaki_mode";
|
||||
public static final String HOLIDAY_MODE = "holiday_mode";
|
||||
public static final String THERMOSTAT_SETTING_ZONE1 = "thermostat_setting_zone1";
|
||||
public static final String WH_SETTING_TEMP_ZONE1 = "wh_setting_temp_zone1";
|
||||
public static final String ROOM_AMBIENT_TEMP_ZONE1 = "room_ambient_temp_zone1";
|
||||
|
||||
// Hitachi Air To Water Main Component
|
||||
public static final String AUTO_MANU_MODE = "auto_manu_mode";
|
||||
|
@ -182,6 +182,16 @@ public abstract class SomfyTahomaBaseThingHandler extends BaseThingHandler {
|
||||
}
|
||||
}
|
||||
|
||||
protected void sendTempCommand(String cmd, Command command) {
|
||||
if (command instanceof DecimalType || command instanceof QuantityType) {
|
||||
BigDecimal temperature = toTemperature(command);
|
||||
if (temperature != null) {
|
||||
String param = "[" + temperature.toPlainString() + "]";
|
||||
sendCommand(cmd, param);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void sendCommandToSameDevicesInPlace(String cmd) {
|
||||
sendCommandToSameDevicesInPlace(cmd, "[]");
|
||||
}
|
||||
|
@ -39,6 +39,9 @@ public class SomfyTahomaHitachiATWHZHandler extends SomfyTahomaBaseThingHandler
|
||||
stateNames.put(YUTAKI_MODE, "modbus:YutakiModeState");
|
||||
stateNames.put(HOLIDAY_MODE, "modbus:HolidayModeZone1State");
|
||||
stateNames.put(ALARM_NUMBER, "modbus:AlarmNumberState");
|
||||
stateNames.put(THERMOSTAT_SETTING_ZONE1, "modbus:ThermostatSettingStatusZone1State");
|
||||
stateNames.put(WH_SETTING_TEMP_ZONE1, "modbus:WaterHeatingSettingTemperatureStatusZone1State");
|
||||
stateNames.put(ROOM_AMBIENT_TEMP_ZONE1, "modbus:RoomAmbientTemperatureStatusZone1State");
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -47,25 +50,38 @@ public class SomfyTahomaHitachiATWHZHandler extends SomfyTahomaBaseThingHandler
|
||||
if (command instanceof RefreshType) {
|
||||
return;
|
||||
} else {
|
||||
if (command instanceof StringType) {
|
||||
switch (channelUID.getId()) {
|
||||
case ZONE_MODE:
|
||||
switch (channelUID.getId()) {
|
||||
case ZONE_MODE:
|
||||
if (command instanceof StringType) {
|
||||
sendCommand("setAutoManuMode", "[\"" + command + "\"]");
|
||||
break;
|
||||
case CIRCUIT_CONTROL:
|
||||
}
|
||||
break;
|
||||
case CIRCUIT_CONTROL:
|
||||
if (command instanceof StringType) {
|
||||
sendCommand("setControlCircuit1", "[\"" + command + "\"]");
|
||||
break;
|
||||
case YUTAKI_TARGET_MODE:
|
||||
}
|
||||
break;
|
||||
case YUTAKI_TARGET_MODE:
|
||||
if (command instanceof StringType) {
|
||||
sendCommand("setTargetMode", "[\"" + command + "\"]");
|
||||
break;
|
||||
case HOLIDAY_MODE:
|
||||
}
|
||||
break;
|
||||
case HOLIDAY_MODE:
|
||||
if (command instanceof StringType) {
|
||||
sendCommand("setHolidayMode", "[\"" + command + "\"]");
|
||||
break;
|
||||
default:
|
||||
getLogger().debug("This channel doesn't accept any commands");
|
||||
}
|
||||
} else {
|
||||
getLogger().debug("This thing accepts only String commands");
|
||||
}
|
||||
break;
|
||||
case THERMOSTAT_SETTING_ZONE1:
|
||||
sendTempCommand("setThermostatSettingControlZone1", command);
|
||||
break;
|
||||
case WH_SETTING_TEMP_ZONE1:
|
||||
sendTempCommand("setWaterHeatingSettingTemperatureControlZone1", command);
|
||||
break;
|
||||
case ROOM_AMBIENT_TEMP_ZONE1:
|
||||
sendTempCommand("setRoomAmbientTemperatureControlZone1", command);
|
||||
break;
|
||||
default:
|
||||
getLogger().debug("This channel doesn't accept any commands");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -14,11 +14,7 @@ package org.openhab.binding.somfytahoma.internal.handler;
|
||||
|
||||
import static org.openhab.binding.somfytahoma.internal.SomfyTahomaBindingConstants.*;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
import org.openhab.core.library.types.DecimalType;
|
||||
import org.openhab.core.library.types.QuantityType;
|
||||
import org.openhab.core.library.types.StringType;
|
||||
import org.openhab.core.thing.ChannelUID;
|
||||
import org.openhab.core.thing.Thing;
|
||||
@ -53,6 +49,8 @@ public class SomfyTahomaHitachiATWMCHandler extends SomfyTahomaBaseThingHandler
|
||||
stateNames.put(LIQUID_TEMP_THMI, "modbus:LiquidTemperatureTHMIState");
|
||||
stateNames.put(LIQUID_TEMP, "modbus:LiquidTemperatureState");
|
||||
stateNames.put(COMPRESSOR_RUNNING_CURRENT, "modbus:CompressorRunningCurrentState");
|
||||
// override state type because the cloud sends consumption in percent
|
||||
cacheStateType(COMPRESSOR_RUNNING_CURRENT, TYPE_DECIMAL);
|
||||
stateNames.put(WATER_TEMP_SETTING, "modbus:WaterTemperatureSettingState");
|
||||
stateNames.put(YUTAKI_OPERATING_MODE, "modbus:YutakiVirtualOperatingModeState");
|
||||
stateNames.put(ALARM_NUMBER, "modbus:AlarmNumberState");
|
||||
@ -98,14 +96,4 @@ public class SomfyTahomaHitachiATWMCHandler extends SomfyTahomaBaseThingHandler
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void sendTempCommand(String cmd, Command command) {
|
||||
if (command instanceof DecimalType || command instanceof QuantityType) {
|
||||
BigDecimal temperature = toTemperature(command);
|
||||
if (temperature != null) {
|
||||
String param = "[" + temperature.toPlainString() + "]";
|
||||
sendCommand(cmd, param);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -14,11 +14,7 @@ package org.openhab.binding.somfytahoma.internal.handler;
|
||||
|
||||
import static org.openhab.binding.somfytahoma.internal.SomfyTahomaBindingConstants.*;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
import org.openhab.core.library.types.DecimalType;
|
||||
import org.openhab.core.library.types.QuantityType;
|
||||
import org.openhab.core.library.types.StringType;
|
||||
import org.openhab.core.thing.ChannelUID;
|
||||
import org.openhab.core.thing.Thing;
|
||||
@ -85,14 +81,4 @@ public class SomfyTahomaHitachiDHWHandler extends SomfyTahomaBaseThingHandler {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void sendTempCommand(String cmd, Command command) {
|
||||
if (command instanceof DecimalType || command instanceof QuantityType) {
|
||||
BigDecimal temperature = toTemperature(command);
|
||||
if (temperature != null) {
|
||||
String param = "[" + temperature.toPlainString() + "]";
|
||||
sendCommand(cmd, param);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -283,6 +283,8 @@ channel-type.somfytahoma.radio_battery.label = Radio Part Battery State
|
||||
channel-type.somfytahoma.radio_battery.description = State of the radio part of the Somfy sensor
|
||||
channel-type.somfytahoma.rocker.label = Rocker Position
|
||||
channel-type.somfytahoma.rocker.description = A channel for controlling the rocker position
|
||||
channel-type.somfytahoma.room_ambient_temp_zone1.label = Zone 1 Room Ambient Temperature
|
||||
channel-type.somfytahoma.room_ambient_temp_zone1.description = Room ambient temperature control for the zone 1
|
||||
channel-type.somfytahoma.rssi.label = RSSI
|
||||
channel-type.somfytahoma.rssi.description = Relative received signal strength state
|
||||
channel-type.somfytahoma.scenarios.label = Scenarios
|
||||
@ -325,6 +327,8 @@ channel-type.somfytahoma.target_temperature.label = Target Temperature
|
||||
channel-type.somfytahoma.target_temperature.description = The target temperature of the heating system
|
||||
channel-type.somfytahoma.temperature.label = Temperature
|
||||
channel-type.somfytahoma.temperature.description = The temperature value of the sensor
|
||||
channel-type.somfytahoma.thermostat_setting_zone1.label = Zone 1 Thermostat Setting
|
||||
channel-type.somfytahoma.thermostat_setting_zone1.description = Thermostat setting control for the zone 1
|
||||
channel-type.somfytahoma.unit_control.label = Unit Control
|
||||
channel-type.somfytahoma.unit_control.description = Unit control
|
||||
channel-type.somfytahoma.unit_control.state.option.run = Run
|
||||
@ -350,6 +354,8 @@ channel-type.somfytahoma.water_outlet_temp.label = Water Outlet Temperature
|
||||
channel-type.somfytahoma.water_outlet_temp.description = Water outlet temperature state
|
||||
channel-type.somfytahoma.water_temp_setting.label = Water Temperature Setting
|
||||
channel-type.somfytahoma.water_temp_setting.description = Water temperature setting state
|
||||
channel-type.somfytahoma.wh_setting_temp_zone1.label = Zone 1 Water Heating Setting Temperature
|
||||
channel-type.somfytahoma.wh_setting_temp_zone1.description = Water heating setting temperature control for the zone 1
|
||||
channel-type.somfytahoma.yutaki_boost_mode.label = Boost Mode
|
||||
channel-type.somfytahoma.yutaki_boost_mode.description = Boost mode state
|
||||
channel-type.somfytahoma.yutaki_boost_mode.state.option.enabled = Enabled
|
||||
|
@ -810,6 +810,27 @@
|
||||
<state pattern="%d %unit%" readOnly="true"></state>
|
||||
</channel-type>
|
||||
|
||||
<channel-type id="thermostat_setting_zone1">
|
||||
<item-type>Number:Temperature</item-type>
|
||||
<label>Zone 1 Thermostat Setting</label>
|
||||
<description>Thermostat setting control for the zone 1</description>
|
||||
<state pattern="%d %unit%"></state>
|
||||
</channel-type>
|
||||
|
||||
<channel-type id="wh_setting_temp_zone1">
|
||||
<item-type>Number:Temperature</item-type>
|
||||
<label>Zone 1 Water Heating Setting Temperature</label>
|
||||
<description>Water heating setting temperature control for the zone 1</description>
|
||||
<state pattern="%d %unit%"></state>
|
||||
</channel-type>
|
||||
|
||||
<channel-type id="room_ambient_temp_zone1">
|
||||
<item-type>Number:Temperature</item-type>
|
||||
<label>Zone 1 Room Ambient Temperature</label>
|
||||
<description>Room ambient temperature control for the zone 1</description>
|
||||
<state pattern="%d %unit%"></state>
|
||||
</channel-type>
|
||||
|
||||
<channel-type id="yutaki_operating_mode">
|
||||
<item-type>String</item-type>
|
||||
<label>Yutaki Operating Mode</label>
|
||||
|
@ -17,6 +17,9 @@
|
||||
<channel id="yutaki_mode" typeId="yutaki_mode"></channel>
|
||||
<channel id="holiday_mode" typeId="holiday_mode"></channel>
|
||||
<channel id="alarm_number" typeId="alarm_number"></channel>
|
||||
<channel id="thermostat_setting_zone1" typeId="thermostat_setting_zone1"></channel>
|
||||
<channel id="wh_setting_temp_zone1" typeId="wh_setting_temp_zone1"></channel>
|
||||
<channel id="room_ambient_temp_zone1" typeId="room_ambient_temp_zone1"></channel>
|
||||
</channels>
|
||||
<representation-property>url</representation-property>
|
||||
<config-description-ref uri="thing-type:somfytahoma:device"/>
|
||||
|
Loading…
Reference in New Issue
Block a user