diff --git a/bundles/org.openhab.binding.rfxcom/README.md b/bundles/org.openhab.binding.rfxcom/README.md index a931a37811d7a..8cc9863804646 100644 --- a/bundles/org.openhab.binding.rfxcom/README.md +++ b/bundles/org.openhab.binding.rfxcom/README.md @@ -499,12 +499,13 @@ A Lucci Air DC fan device ##### Channels -| Name | Channel Type | Item Type | Remarks | -|--------------|-------------------------------------|---------------|---------------------------------------------------------------| -| commandString| [commandString](#channels) | String | Options: POWER, UP, DOWN, LIGHT, REVERSE, NATURAL_FLOW, PAIR | -| fanSpeed | [fanspeedcontrol](#channels) | RollerShutter | Options: UP / DOWN | -| fanLight | [fanlight](#channels) | Switch | | -| signalLevel | [system.signal-strength](#channels) | Number | | +| Name | Channel Type | Item Type | Remarks | +|-----------------|-------------------------------------|---------------|--------------------------------------------------------------| +| commandString | [commandString](#channels) | String | Options: POWER, UP, DOWN, LIGHT, REVERSE, NATURAL_FLOW, PAIR | +| fanSpeedControl | [fanspeedcontrol](#channels) | RollerShutter | Options: UP / DOWN | +| fanSpeed | [fanspeed](#channels) | Number | Options: 1,2,3,4,5,6 | +| fanLight | [fanlight](#channels) | Switch | | +| signalLevel | [system.signal-strength](#channels) | Number | | ##### Configuration Options @@ -542,13 +543,13 @@ A Novy extractor fan. ##### Channels -| Name | Channel Type | Item Type | Remarks | -|--------------|-------------------------------------|---------------|--------------------------| -| command | [command](#channels) | Switch | | -| commandString| [commandString](#channels) | String | Options: POWER, UP, DOWN, LIGHT, LEARN, RESET_FILTER | -| fanSpeed | [fanspeedcontrol](#channels) | RollerShutter | Options: UP / DOWN | -| fanLight | [fanlight](#channels) | Switch | | -| signalLevel | [system.signal-strength](#channels) | Number | | +| Name | Channel Type | Item Type | Remarks | +|-----------------|-------------------------------------|---------------|--------------------------| +| command | [command](#channels) | Switch | | +| commandString | [commandString](#channels) | String | Options: POWER, UP, DOWN, LIGHT, LEARN, RESET_FILTER | +| fanSpeedControl | [fanspeedcontrol](#channels) | RollerShutter | Options: UP / DOWN | +| fanLight | [fanlight](#channels) | Switch | | +| signalLevel | [system.signal-strength](#channels) | Number | | ##### Configuration Options diff --git a/bundles/org.openhab.binding.rfxcom/src/main/java/org/openhab/binding/rfxcom/internal/messages/RFXComFanMessage.java b/bundles/org.openhab.binding.rfxcom/src/main/java/org/openhab/binding/rfxcom/internal/messages/RFXComFanMessage.java index 831d0931af949..ccb6b60876563 100644 --- a/bundles/org.openhab.binding.rfxcom/src/main/java/org/openhab/binding/rfxcom/internal/messages/RFXComFanMessage.java +++ b/bundles/org.openhab.binding.rfxcom/src/main/java/org/openhab/binding/rfxcom/internal/messages/RFXComFanMessage.java @@ -106,6 +106,12 @@ public enum Commands implements ByteEnumWrapperWithSupportedSubTypes { LUCCI_AIR_DC_REVERSE(5, LUCCI_AIR_DC), LUCCI_AIR_DC_NATURAL_FLOW(6, LUCCI_AIR_DC), LUCCI_AIR_DC_PAIR(7, LUCCI_AIR_DC), + LUCCI_AIR_DC_SPEED_1(8, 1, LUCCI_AIR_DC), + LUCCI_AIR_DC_SPEED_2(9, 2, LUCCI_AIR_DC), + LUCCI_AIR_DC_SPEED_3(10, 3, LUCCI_AIR_DC), + LUCCI_AIR_DC_SPEED_4(11, 4, LUCCI_AIR_DC), + LUCCI_AIR_DC_SPEED_5(12, 5, LUCCI_AIR_DC), + LUCCI_AIR_DC_SPEED_6(13, 6, LUCCI_AIR_DC), LUCCI_AIR_DC_II_POWER_OFF(1, 0, LUCCI_AIR_DC_II), LUCCI_AIR_DC_II_SPEED_1(2, 1, LUCCI_AIR_DC_II), @@ -141,7 +147,7 @@ public enum Commands implements ByteEnumWrapperWithSupportedSubTypes { @Nullable public static Commands bySpeed(SubType subType, int speed) { for (Commands value : values()) { - if (value.supportedBySubTypes.contains(subType) && value.speed == speed) { + if (value.supportedBySubTypes.contains(subType) && value.speed != null && value.speed == speed) { return value; } } @@ -169,7 +175,9 @@ public List supportedBySubTypes() { LUCCI_AIR_DC_II_LIGHT, FALMEC_LIGHT_ON, NOVY_LIGHT); private static final List ON_COMMANDS = Arrays.asList(HI, MED, LOW, FALMEC_SPEED_1, FALMEC_SPEED_2, FALMEC_SPEED_3, FALMEC_SPEED_4, LUCCI_AIR_DC_II_SPEED_1, LUCCI_AIR_DC_II_SPEED_2, LUCCI_AIR_DC_II_SPEED_3, - LUCCI_AIR_DC_II_SPEED_4, LUCCI_AIR_DC_II_SPEED_5, LUCCI_AIR_DC_II_SPEED_6); + LUCCI_AIR_DC_II_SPEED_4, LUCCI_AIR_DC_II_SPEED_5, LUCCI_AIR_DC_II_SPEED_6, LUCCI_AIR_DC_SPEED_1, + LUCCI_AIR_DC_SPEED_2, LUCCI_AIR_DC_SPEED_3, LUCCI_AIR_DC_SPEED_4, LUCCI_AIR_DC_SPEED_5, + LUCCI_AIR_DC_SPEED_6); private static final List OFF_COMMANDS = Arrays.asList(OFF, FALMEC_POWER_OFF, LUCCI_AIR_DC_II_POWER_OFF); private SubType subType; @@ -321,6 +329,12 @@ private State handleFanSpeedChannel() { case FT1211R_SPEED_3: case FT1211R_SPEED_4: case FT1211R_SPEED_5: + case LUCCI_AIR_DC_SPEED_1: + case LUCCI_AIR_DC_SPEED_2: + case LUCCI_AIR_DC_SPEED_3: + case LUCCI_AIR_DC_SPEED_4: + case LUCCI_AIR_DC_SPEED_5: + case LUCCI_AIR_DC_SPEED_6: case LUCCI_AIR_DC_II_POWER_OFF: case LUCCI_AIR_DC_II_SPEED_1: case LUCCI_AIR_DC_II_SPEED_2: @@ -460,6 +474,9 @@ private Commands handleFanLightCommand(String channelId, Type type) throws RFXCo case LUCCI_AIR_DC_II: return LUCCI_AIR_DC_II_LIGHT; + + default: + // return exception } } else if (type == OnOffType.OFF && subType == FALMEC) { return Commands.FALMEC_LIGHT_OFF; diff --git a/bundles/org.openhab.binding.rfxcom/src/main/resources/OH-INF/thing/fan_lucci_dc.xml b/bundles/org.openhab.binding.rfxcom/src/main/resources/OH-INF/thing/fan_lucci_dc.xml index 847de91075aff..ad78536c5b086 100644 --- a/bundles/org.openhab.binding.rfxcom/src/main/resources/OH-INF/thing/fan_lucci_dc.xml +++ b/bundles/org.openhab.binding.rfxcom/src/main/resources/OH-INF/thing/fan_lucci_dc.xml @@ -17,7 +17,8 @@ - + + diff --git a/bundles/org.openhab.binding.rfxcom/src/main/resources/OH-INF/thing/fan_novy.xml b/bundles/org.openhab.binding.rfxcom/src/main/resources/OH-INF/thing/fan_novy.xml index 1fc31a9c4433a..65b8b2890ee9f 100644 --- a/bundles/org.openhab.binding.rfxcom/src/main/resources/OH-INF/thing/fan_novy.xml +++ b/bundles/org.openhab.binding.rfxcom/src/main/resources/OH-INF/thing/fan_novy.xml @@ -17,6 +17,8 @@ + +