From 034e3b423e1707e7a70926b2118707cb9cbd083d Mon Sep 17 00:00:00 2001 From: dag81 Date: Thu, 28 Nov 2024 02:46:08 +0000 Subject: [PATCH] [veSync] Mist Model updates for regional EU model [veSync] Mist Model updates for regional EU model Signed-off-by: dag81 --- bundles/org.openhab.binding.vesync/README.md | 40 ++++++++++--------- .../VeSyncDeviceAirHumidifierHandler.java | 23 +++++++++-- .../resources/OH-INF/i18n/vesync.properties | 1 + .../resources/OH-INF/thing/thing-types.xml | 1 + .../update/air-humidifier-instructions.xml | 3 ++ 5 files changed, 46 insertions(+), 22 deletions(-) diff --git a/bundles/org.openhab.binding.vesync/README.md b/bundles/org.openhab.binding.vesync/README.md index c9a9de9bb172b..1e90f87598cdc 100644 --- a/bundles/org.openhab.binding.vesync/README.md +++ b/bundles/org.openhab.binding.vesync/README.md @@ -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 diff --git a/bundles/org.openhab.binding.vesync/src/main/java/org/openhab/binding/vesync/internal/handlers/VeSyncDeviceAirHumidifierHandler.java b/bundles/org.openhab.binding.vesync/src/main/java/org/openhab/binding/vesync/internal/handlers/VeSyncDeviceAirHumidifierHandler.java index da048d20d4324..fa43f4bfe16cd 100644 --- a/bundles/org.openhab.binding.vesync/src/main/java/org/openhab/binding/vesync/internal/handlers/VeSyncDeviceAirHumidifierHandler.java +++ b/bundles/org.openhab.binding.vesync/src/main/java/org/openhab/binding/vesync/internal/handlers/VeSyncDeviceAirHumidifierHandler.java @@ -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 AUTO_MAN_HUM_SLEEP_MODES = Arrays.asList(MODE_AUTO, MODE_AUTO_HUMIDITY, + MODE_MANUAL, MODE_SLEEP); + private static final List AUTO_MAN_SLEEP_MODES = Arrays.asList(MODE_AUTO, MODE_MANUAL, MODE_SLEEP); + private static final List HUM_MAN_SLEEP_MODES = Arrays.asList(MODE_AUTO_HUMIDITY, MODE_MANUAL, MODE_SLEEP); + private static final List AUTO_MAN_MODES = Arrays.asList(MODE_AUTO, MODE_MANUAL); private static final List CLASSIC_300S_NIGHT_LIGHT_MODES = Arrays.asList(MODE_ON, MODE_DIM, MODE_OFF); @@ -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 SUPPORTED_MODEL_FAMILIES = Arrays.asList(LV600S, CLASSIC300S, CLASSIC200S, DUAL200S, OASIS_MIST); @@ -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); } }; @@ -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; diff --git a/bundles/org.openhab.binding.vesync/src/main/resources/OH-INF/i18n/vesync.properties b/bundles/org.openhab.binding.vesync/src/main/resources/OH-INF/i18n/vesync.properties index a67c8ccaa4641..5fa286a6e089f 100644 --- a/bundles/org.openhab.binding.vesync/src/main/resources/OH-INF/i18n/vesync.properties +++ b/bundles/org.openhab.binding.vesync/src/main/resources/OH-INF/i18n/vesync.properties @@ -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 diff --git a/bundles/org.openhab.binding.vesync/src/main/resources/OH-INF/thing/thing-types.xml b/bundles/org.openhab.binding.vesync/src/main/resources/OH-INF/thing/thing-types.xml index 111ca6e4f91a5..067eea831f66f 100644 --- a/bundles/org.openhab.binding.vesync/src/main/resources/OH-INF/thing/thing-types.xml +++ b/bundles/org.openhab.binding.vesync/src/main/resources/OH-INF/thing/thing-types.xml @@ -333,6 +333,7 @@ + diff --git a/bundles/org.openhab.binding.vesync/src/main/resources/OH-INF/update/air-humidifier-instructions.xml b/bundles/org.openhab.binding.vesync/src/main/resources/OH-INF/update/air-humidifier-instructions.xml index fa054fa01ec75..cb3d320613630 100644 --- a/bundles/org.openhab.binding.vesync/src/main/resources/OH-INF/update/air-humidifier-instructions.xml +++ b/bundles/org.openhab.binding.vesync/src/main/resources/OH-INF/update/air-humidifier-instructions.xml @@ -10,6 +10,9 @@ vesync:deviceAFTimerExpiry + + vesync:airHumidifierModeType +