Skip to content

Commit

Permalink
[veSync] Mist Model updates for regional EU model
Browse files Browse the repository at this point in the history
[veSync] Mist Model updates for regional EU model

Signed-off-by: dag81 <[email protected]>
  • Loading branch information
dag81 committed Nov 28, 2024
1 parent e58107b commit 034e3b4
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 22 deletions.
40 changes: 21 additions & 19 deletions bundles/org.openhab.binding.vesync/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,25 +90,27 @@ Channel names in **bold** are read/write, everything else is read-only

### AirHumidifier Thing

| Channel | Type | Description | Model's Supported | Controllable Values | Unit |
|----------------------------|----------------------|---------------------------------------------------------------|------------------------------------------------------|---------------------|------|
| **enabled** | Switch | Whether the hardware device is enabled (Switched on) | 200S, Dual200S, 300S, 600S, OasisMist, OasisMist1000 | [ON, OFF] | |
| **display** | Switch | Whether the display is enabled (display is shown) | 200S, Dual200S, 300S, 600S, OasisMist, OasisMist1000 | [ON, OFF] | |
| waterLacking | Switch | Indicator whether the unit is lacking water | 200S, Dual200S, 300S, 600S, OasisMist, OasisMist1000 | | |
| humidityHigh | Switch | Indicator for high humidity | 200S, Dual200S, 300S, 600S, OasisMist | | |
| waterTankLifted | Switch | Indicator for whether the water tank is removed | 200S, Dual200S, 300S, 600S, OasisMist, OasisMist1000 | | |
| **stopAtHumiditySetpoint** | Switch | Whether the unit is set to stop when the set point is reached | 200S, Dual200S, 300S, 600S, OasisMist, OasisMist1000 | [ON, OFF] | |
| humidity | Number:Dimensionless | Indicator for the currently measured humidity % level | 200S, Dual200S, 300S, 600S, OasisMist, OasisMist1000 | | |
| **mistLevel** | Number:Dimensionless | The current mist level set | 300S | [1...2] | one |
| **mistLevel** | Number:Dimensionless | The current mist level set | 200S, Dual200S, 600S, OasisMist, OasisMist1000 | [1...3] | one |
| **humidifierMode** | String | The current mode of operation | 200S, Dual200S, 300S, 600S, OasisMist, OasisMist1000 | [auto, sleep] | |
| **nightLightMode** | String | The night light mode | 200S, Dual200S, 300S | [on, dim, off] | |
| **humiditySetpoint** | Number:Dimensionless | Humidity % set point to reach | 200S, Dual200S, 300S, 600S, OasisMist, OasisMist1000 | [30...80] | |
| warmEnabled | Switch | Indicator for warm mist mode | 600S, OasisMist | | |
| **warmLevel** | Number:Dimensionless | The current warm mist level set | 600S, OasisMist | [0..3] | one |
| errorCode | Number:Dimensionless | The error code reported by the device | OasisMist1000 | | one |
| timerExpiry | DateTime | The expected expiry time of the current timer | OasisMist1000 | | |
| schedulesCount | Number:Dimensionless | The number schedules configured | OasisMist1000 | | one |
| Channel | Type | Description | Model's Supported | Controllable Values | Unit |
|----------------------------|----------------------|---------------------------------------------------------------|------------------------------------------------------|---------------------------|------|
| **enabled** | Switch | Whether the hardware device is enabled (Switched on) | 200S, Dual200S, 300S, 600S, OasisMist, OasisMist1000 | [ON, OFF] | |
| **display** | Switch | Whether the display is enabled (display is shown) | 200S, Dual200S, 300S, 600S, OasisMist, OasisMist1000 | [ON, OFF] | |
| waterLacking | Switch | Indicator whether the unit is lacking water | 200S, Dual200S, 300S, 600S, OasisMist, OasisMist1000 | | |
| humidityHigh | Switch | Indicator for high humidity | 200S, Dual200S, 300S, 600S, OasisMist | | |
| waterTankLifted | Switch | Indicator for whether the water tank is removed | 200S, Dual200S, 300S, 600S, OasisMist, OasisMist1000 | | |
| **stopAtHumiditySetpoint** | Switch | Whether the unit is set to stop when the set point is reached | 200S, Dual200S, 300S, 600S, OasisMist, OasisMist1000 | [ON, OFF] | |
| humidity | Number:Dimensionless | Indicator for the currently measured humidity % level | 200S, Dual200S, 300S, 600S, OasisMist, OasisMist1000 | | |
| **mistLevel** | Number:Dimensionless | The current mist level set | 300S | [1...2] | one |
| **mistLevel** | Number:Dimensionless | The current mist level set | 200S, Dual200S, 600S, OasisMist, OasisMist1000 | [1...3] | one |
| **humidifierMode** | String | The current mode of operation | 200S, Dual200S, OasisMist (EU Revision) | [auto, manual] | |
| **humidifierMode** | String | The current mode of operation | 300S, OasisMist1000 | [auto, manual, sleep] | |
| **humidifierMode** | String | The current mode of operation | 600S, OasisMist (Non EU Revisions) | [humidity, manual, sleep] | |
| **nightLightMode** | String | The night light mode | 200S, Dual200S, 300S | [on, dim, off] | |
| **humiditySetpoint** | Number:Dimensionless | Humidity % set point to reach | 200S, Dual200S, 300S, 600S, OasisMist, OasisMist1000 | [30...80] | |
| warmEnabled | Switch | Indicator for warm mist mode | 600S, OasisMist | | |
| **warmLevel** | Number:Dimensionless | The current warm mist level set | 600S, OasisMist | [0..3] | one |
| errorCode | Number:Dimensionless | The error code reported by the device | OasisMist1000 | | one |
| timerExpiry | DateTime | The expected expiry time of the current timer | OasisMist1000 | | |
| schedulesCount | Number:Dimensionless | The number schedules configured | OasisMist1000 | | one |

## Full Example

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,17 @@ public class VeSyncDeviceAirHumidifierHandler extends VeSyncBaseDeviceHandler {
public static final String DEV_FAMILY_DUAL_200S = "Dual 200S";
public static final String DEV_FAMILY_600S = "600S";
public static final String DEV_FAMILY_OASIS_MIST = "Oasis Mist";
public static final String DEV_FAMILY_SUPERIOR_6000S = "Superior 6000S";

public static final String DEV_FAMILY_OASIS_MIST_1000 = "Oasis Mist 1000";

private static final List<String> AUTO_MAN_HUM_SLEEP_MODES = Arrays.asList(MODE_AUTO, MODE_AUTO_HUMIDITY,
MODE_MANUAL, MODE_SLEEP);

private static final List<String> AUTO_MAN_SLEEP_MODES = Arrays.asList(MODE_AUTO, MODE_MANUAL, MODE_SLEEP);

private static final List<String> HUM_MAN_SLEEP_MODES = Arrays.asList(MODE_AUTO_HUMIDITY, MODE_MANUAL, MODE_SLEEP);

private static final List<String> AUTO_MAN_MODES = Arrays.asList(MODE_AUTO, MODE_MANUAL);

private static final List<String> CLASSIC_300S_NIGHT_LIGHT_MODES = Arrays.asList(MODE_ON, MODE_DIM, MODE_OFF);
Expand All @@ -95,17 +101,25 @@ public class VeSyncDeviceAirHumidifierHandler extends VeSyncBaseDeviceHandler {
Collections.emptyList());

public static final VeSyncDeviceHumidifierMetadata LV600S = new VeSyncDeviceHumidifierMetadata(1, DEV_FAMILY_600S,
Arrays.asList("A602S"), Collections.emptyList(), AUTO_MAN_SLEEP_MODES, 1, 3, 0, 3, true,
Arrays.asList("A602S"), Collections.emptyList(), HUM_MAN_SLEEP_MODES, 1, 3, 0, 3, true,
CLASSIC_300S_NIGHT_LIGHT_MODES);

public static final VeSyncDeviceHumidifierMetadata OASIS_MIST_EU = new VeSyncDeviceHumidifierMetadata(1,
DEV_FAMILY_OASIS_MIST, Collections.emptyList(), Arrays.asList("LUH-O451S-WEU"), AUTO_MAN_MODES,
1, 3, 0, 3, true, Collections.emptyList());

public static final VeSyncDeviceHumidifierMetadata OASIS_MIST = new VeSyncDeviceHumidifierMetadata(1,
DEV_FAMILY_OASIS_MIST, Arrays.asList("O451S"), Collections.emptyList(), AUTO_MAN_SLEEP_MODES, 1, 3, 0, 3,
true, Collections.emptyList());
DEV_FAMILY_OASIS_MIST, Arrays.asList("O451S", "O601S"), Collections.emptyList(), AUTO_MAN_HUM_SLEEP_MODES,
1, 3, 0, 3, true, Collections.emptyList());

public static final VeSyncDeviceHumidifierMetadata OASIS_MIST_1000 = new VeSyncDeviceHumidifierMetadata(2,
DEV_FAMILY_OASIS_MIST_1000, Arrays.asList("M101S"), Collections.emptyList(), AUTO_MAN_SLEEP_MODES, 1, 3, 0,
3, false, Collections.emptyList());

public static final VeSyncDeviceHumidifierMetadata SUPERIOR_6000S = new VeSyncDeviceHumidifierMetadata(1,
DEV_FAMILY_SUPERIOR_6000S, Arrays.asList("S601S"), Collections.emptyList(), AUTO_MAN_HUM_SLEEP_MODES, 1, 10,
0, 10, true, Collections.emptyList());

public static final List<VeSyncDeviceMetadata> SUPPORTED_MODEL_FAMILIES = Arrays.asList(LV600S, CLASSIC300S,
CLASSIC200S, DUAL200S, OASIS_MIST);

Expand All @@ -123,6 +137,8 @@ public class VeSyncDeviceAirHumidifierHandler extends VeSyncBaseDeviceHandler {
put(LV600S.deviceFamilyName, LV600S);
put(OASIS_MIST.deviceFamilyName, OASIS_MIST);
put(OASIS_MIST_1000.deviceFamilyName, OASIS_MIST_1000);
// Disabled as undergoing validation
// put(SUPERIOR_6000S.deviceFamilyName, SUPERIOR_6000S);
}
};

Expand All @@ -148,6 +164,7 @@ protected String[] getChannelsToRemove() {
DEVICE_CHANNEL_AF_AUTO_OFF_CALC_TIME };
break;
case DEV_FAMILY_OASIS_MIST_1000:
case DEV_FAMILY_SUPERIOR_6000S:
toRemove = new String[] { DEVICE_CHANNEL_WARM_ENABLED, DEVICE_CHANNEL_WARM_LEVEL,
DEVICE_CHANNEL_AF_NIGHT_LIGHT };
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ thing-type.config.vesync.bridge.username.description = Name of a registered VeSy
channel-type.vesync.airHumidifierModeType.label = Operation Mode
channel-type.vesync.airHumidifierModeType.description = The operating mode the air humidifier is currently set to
channel-type.vesync.airHumidifierModeType.state.option.auto = Auto
channel-type.vesync.airHumidifierModeType.state.option.humidity = Humidity
channel-type.vesync.airHumidifierModeType.state.option.manual = Manual Control
channel-type.vesync.airHumidifierModeType.state.option.sleep = Sleeping Auto
channel-type.vesync.airPurifierFanLevelType.label = Fan Speed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,7 @@
<state readOnly="false">
<options>
<option value="auto">Auto</option>
<option value="humidity">Humidity</option>
<option value="manual">Manual Control</option>
<option value="sleep">Sleeping Auto</option>
</options>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
<add-channel id="timerExpiry">
<type>vesync:deviceAFTimerExpiry</type>
</add-channel>
<update-channel id="humidifierMode">
<type>vesync:airHumidifierModeType</type>
</update-channel>
</instruction-set>
</thing-type>
</update:update-descriptions>

0 comments on commit 034e3b4

Please sign in to comment.