[velbus] Fixed reading of alarm clock status on VMB4AN. (#10058)
Added support for VMBVP1 Signed-off-by: Cedric Boon <cedric.boon@hotmail.com>
This commit is contained in:
@@ -82,21 +82,23 @@ public class VelbusBindingConstants {
|
||||
public static final ThingTypeUID THING_TYPE_VMBPIRM = new ThingTypeUID(BINDING_ID, "vmbpirm");
|
||||
public static final ThingTypeUID THING_TYPE_VMBPIRO = new ThingTypeUID(BINDING_ID, "vmbpiro");
|
||||
public static final ThingTypeUID THING_TYPE_VMBRFR8S = new ThingTypeUID(BINDING_ID, "vmbrfr8s");
|
||||
public static final ThingTypeUID THING_TYPE_VMBVP1 = new ThingTypeUID(BINDING_ID, "vmbvp1");
|
||||
|
||||
// thing type sets
|
||||
public static final Set<ThingTypeUID> BRIDGE_THING_TYPES_UIDS = Collections
|
||||
.unmodifiableSet(new HashSet<>(Arrays.asList(BRIDGE_THING_TYPE, NETWORK_BRIDGE_THING_TYPE)));
|
||||
public static final Set<ThingTypeUID> SUPPORTED_THING_TYPES_UIDS = Collections.unmodifiableSet(
|
||||
new HashSet<>(Arrays.asList(THING_TYPE_VMB1BL, THING_TYPE_VMB1BLS, THING_TYPE_VMB1DM, THING_TYPE_VMB1LED,
|
||||
THING_TYPE_VMB1RY, THING_TYPE_VMB1RYNO, THING_TYPE_VMB1RYNOS, THING_TYPE_VMB1RYS, THING_TYPE_VMB1TS,
|
||||
THING_TYPE_VMB2BL, THING_TYPE_VMB2BLE, THING_TYPE_VMB2PBN, THING_TYPE_VMB4AN, THING_TYPE_VMB4DC,
|
||||
THING_TYPE_VMB4RY, THING_TYPE_VMB4RYLD, THING_TYPE_VMB4RYNO, THING_TYPE_VMB6IN, THING_TYPE_VMB6PBN,
|
||||
THING_TYPE_VMB7IN, THING_TYPE_VMB8IR, THING_TYPE_VMB8PB, THING_TYPE_VMB8PBU, THING_TYPE_VMBDME,
|
||||
THING_TYPE_VMBDMI, THING_TYPE_VMBDMIR, THING_TYPE_VMBEL1, THING_TYPE_VMBEL2, THING_TYPE_VMBEL4,
|
||||
THING_TYPE_VMBELO, THING_TYPE_VMBGP1, THING_TYPE_VMBGP1_2, THING_TYPE_VMBGP2, THING_TYPE_VMBGP2_2,
|
||||
THING_TYPE_VMBGP4, THING_TYPE_VMBGP4_2, THING_TYPE_VMBGP4PIR, THING_TYPE_VMBGP4PIR_2,
|
||||
THING_TYPE_VMBGPO, THING_TYPE_VMBGPOD, THING_TYPE_VMBGPOD_2, THING_TYPE_VMBMETEO,
|
||||
THING_TYPE_VMBPIRC, THING_TYPE_VMBPIRM, THING_TYPE_VMBPIRO, THING_TYPE_VMBRFR8S)));
|
||||
public static final Set<ThingTypeUID> SUPPORTED_THING_TYPES_UIDS = Collections
|
||||
.unmodifiableSet(new HashSet<>(Arrays.asList(THING_TYPE_VMB1BL, THING_TYPE_VMB1BLS, THING_TYPE_VMB1DM,
|
||||
THING_TYPE_VMB1LED, THING_TYPE_VMB1RY, THING_TYPE_VMB1RYNO, THING_TYPE_VMB1RYNOS,
|
||||
THING_TYPE_VMB1RYS, THING_TYPE_VMB1TS, THING_TYPE_VMB2BL, THING_TYPE_VMB2BLE, THING_TYPE_VMB2PBN,
|
||||
THING_TYPE_VMB4AN, THING_TYPE_VMB4DC, THING_TYPE_VMB4RY, THING_TYPE_VMB4RYLD, THING_TYPE_VMB4RYNO,
|
||||
THING_TYPE_VMB6IN, THING_TYPE_VMB6PBN, THING_TYPE_VMB7IN, THING_TYPE_VMB8IR, THING_TYPE_VMB8PB,
|
||||
THING_TYPE_VMB8PBU, THING_TYPE_VMBDME, THING_TYPE_VMBDMI, THING_TYPE_VMBDMIR, THING_TYPE_VMBEL1,
|
||||
THING_TYPE_VMBEL2, THING_TYPE_VMBEL4, THING_TYPE_VMBELO, THING_TYPE_VMBGP1, THING_TYPE_VMBGP1_2,
|
||||
THING_TYPE_VMBGP2, THING_TYPE_VMBGP2_2, THING_TYPE_VMBGP4, THING_TYPE_VMBGP4_2,
|
||||
THING_TYPE_VMBGP4PIR, THING_TYPE_VMBGP4PIR_2, THING_TYPE_VMBGPO, THING_TYPE_VMBGPOD,
|
||||
THING_TYPE_VMBGPOD_2, THING_TYPE_VMBMETEO, THING_TYPE_VMBPIRC, THING_TYPE_VMBPIRM,
|
||||
THING_TYPE_VMBPIRO, THING_TYPE_VMBRFR8S, THING_TYPE_VMBVP1)));
|
||||
|
||||
// Velbus module types
|
||||
public static final byte MODULE_TYPE_VMB8PB = 0x01;
|
||||
@@ -135,6 +137,7 @@ public class VelbusBindingConstants {
|
||||
public static final byte MODULE_TYPE_VMBRFR8S = 0x30;
|
||||
public static final byte MODULE_TYPE_VMBMETEO = 0x31;
|
||||
public static final byte MODULE_TYPE_VMB4AN = 0x32;
|
||||
public static final byte MODULE_TYPE_VMBVP1 = 0x33;
|
||||
public static final byte MODULE_TYPE_VMBEL1 = 0x34;
|
||||
public static final byte MODULE_TYPE_VMBEL2 = 0x35;
|
||||
public static final byte MODULE_TYPE_VMBEL4 = 0x36;
|
||||
|
||||
@@ -304,6 +304,10 @@ public class VelbusThingDiscoveryService extends AbstractDiscoveryService
|
||||
velbusModule = new VelbusModule(new VelbusModuleAddress(address, 0), moduleType, highByteOfSerialNumber,
|
||||
lowByteOfSerialNumber, memoryMapVersion, buildYear, buildWeek, THING_TYPE_VMBRFR8S, 8);
|
||||
break;
|
||||
case MODULE_TYPE_VMBVP1:
|
||||
velbusModule = new VelbusModule(new VelbusModuleAddress(address, 0), moduleType, highByteOfSerialNumber,
|
||||
lowByteOfSerialNumber, memoryMapVersion, buildYear, buildWeek, THING_TYPE_VMBVP1, 8);
|
||||
break;
|
||||
}
|
||||
|
||||
if (velbusModule != null) {
|
||||
|
||||
@@ -43,8 +43,9 @@ import org.openhab.core.types.RefreshType;
|
||||
*/
|
||||
@NonNullByDefault
|
||||
public class VelbusSensorWithAlarmClockHandler extends VelbusSensorHandler {
|
||||
public static final Set<ThingTypeUID> SUPPORTED_THING_TYPES = new HashSet<>(Arrays.asList(THING_TYPE_VMB2PBN,
|
||||
THING_TYPE_VMB6PBN, THING_TYPE_VMB8PBU, THING_TYPE_VMBPIRC, THING_TYPE_VMBPIRM, THING_TYPE_VMBRFR8S));
|
||||
public static final Set<ThingTypeUID> SUPPORTED_THING_TYPES = new HashSet<>(
|
||||
Arrays.asList(THING_TYPE_VMB2PBN, THING_TYPE_VMB6PBN, THING_TYPE_VMB8PBU, THING_TYPE_VMBPIRC,
|
||||
THING_TYPE_VMBPIRM, THING_TYPE_VMBRFR8S, THING_TYPE_VMBVP1));
|
||||
private static final HashMap<ThingTypeUID, Integer> ALARM_CONFIGURATION_MEMORY_ADDRESSES = new HashMap<ThingTypeUID, Integer>();
|
||||
|
||||
static {
|
||||
@@ -73,6 +74,7 @@ public class VelbusSensorWithAlarmClockHandler extends VelbusSensorHandler {
|
||||
ALARM_CONFIGURATION_MEMORY_ADDRESSES.put(THING_TYPE_VMBGPOD, 0x0284);
|
||||
ALARM_CONFIGURATION_MEMORY_ADDRESSES.put(THING_TYPE_VMBGPOD_2, 0x0284);
|
||||
ALARM_CONFIGURATION_MEMORY_ADDRESSES.put(THING_TYPE_VMBRFR8S, 0x0093);
|
||||
ALARM_CONFIGURATION_MEMORY_ADDRESSES.put(THING_TYPE_VMBVP1, 0x002B);
|
||||
}
|
||||
|
||||
private static final byte ALARM_CONFIGURATION_MEMORY_SIZE = 0x09;
|
||||
|
||||
@@ -268,4 +268,9 @@ public class VelbusVMB4ANHandler extends VelbusSensorWithAlarmClockHandler {
|
||||
protected byte convertAnalogOutputChannelUIDToChannelByte(ChannelUID channelUID) {
|
||||
return Byte.parseByte(channelUID.getIdWithoutGroup());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getClockAlarmAndProgramSelectionIndexInModuleStatus() {
|
||||
return 8;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -801,6 +801,23 @@
|
||||
<config-description-ref uri="thing-type:velbus:8channelDevice"/>
|
||||
</thing-type>
|
||||
|
||||
<thing-type id="vmbvp1">
|
||||
<supported-bridge-type-refs>
|
||||
<bridge-type-ref id="bridge"/>
|
||||
<bridge-type-ref id="networkbridge"/>
|
||||
</supported-bridge-type-refs>
|
||||
|
||||
<label>VMPVP1</label>
|
||||
<description>Doorbird interface module</description>
|
||||
<channel-groups>
|
||||
<channel-group id="input" typeId="8channelInputModule"/>
|
||||
<channel-group id="feedback" typeId="8channelFeedbackModule"/>
|
||||
<channel-group id="clockAlarm" typeId="clockAlarm"/>
|
||||
</channel-groups>
|
||||
|
||||
<config-description-ref uri="thing-type:velbus:8channelDevice"/>
|
||||
</thing-type>
|
||||
|
||||
<channel-type id="heatingOperatingMode">
|
||||
<item-type>String</item-type>
|
||||
<label>Operating Mode</label>
|
||||
|
||||
Reference in New Issue
Block a user