Skip to content

Commit 2bb7c62

Browse files
[enocean] Fix discovery of D2-50 devices (openhab#10577)
This change accepts a new message type which is sent by some air ventilation devices durin teach in. This is required for the search feature to detect these devices correctly. Signed-off-by: David Schumann <[email protected]>
1 parent e6d8dfb commit 2bb7c62

File tree

1 file changed

+4
-0
lines changed
  • bundles/org.openhab.binding.enocean/src/main/java/org/openhab/binding/enocean/internal/eep/D2_50

1 file changed

+4
-0
lines changed

bundles/org.openhab.binding.enocean/src/main/java/org/openhab/binding/enocean/internal/eep/D2_50/D2_50.java

+4
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ public class D2_50 extends _VLDMessage {
4444
protected static final byte MT_CONTROL = 0x20;
4545
protected static final byte MT_BASIC_STATUS = 0x40;
4646
protected static final byte MT_EXTENDED_STATUS = 0x60; // not yet implemented
47+
protected static final byte MT_UNKNOWN_STATUS = (byte) 0x80; // Sent by some systems during teach in
4748

4849
protected static final byte rmtMask = (byte) 0x0f;
4950
protected static final byte RMT_BASIC_STATUS = 0x00;
@@ -177,7 +178,10 @@ protected boolean validateData(byte[] bytes) {
177178
return bytes.length == 14;
178179
case MT_EXTENDED_STATUS: // MT_EXTENDED_STATUS is not yet supported, however return true to avoid Exceptions
179180
return true;
181+
case MT_UNKNOWN_STATUS:
182+
return true;
180183
default:
184+
logger.error("Invalid data, unknown message type: {} ({})", getMessageType(bytes[0]), bytes);
181185
return false;
182186
}
183187
}

0 commit comments

Comments
 (0)