[enocean] Fix discovery of D2-50 devices (#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 <david@dev-core.org>
This commit is contained in:
David 2021-05-01 10:24:23 +02:00 committed by GitHub
parent e6d8dfb7e1
commit 2bb7c62dec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -44,6 +44,7 @@ public class D2_50 extends _VLDMessage {
protected static final byte MT_CONTROL = 0x20; protected static final byte MT_CONTROL = 0x20;
protected static final byte MT_BASIC_STATUS = 0x40; protected static final byte MT_BASIC_STATUS = 0x40;
protected static final byte MT_EXTENDED_STATUS = 0x60; // not yet implemented protected static final byte MT_EXTENDED_STATUS = 0x60; // not yet implemented
protected static final byte MT_UNKNOWN_STATUS = (byte) 0x80; // Sent by some systems during teach in
protected static final byte rmtMask = (byte) 0x0f; protected static final byte rmtMask = (byte) 0x0f;
protected static final byte RMT_BASIC_STATUS = 0x00; protected static final byte RMT_BASIC_STATUS = 0x00;
@ -177,7 +178,10 @@ public class D2_50 extends _VLDMessage {
return bytes.length == 14; return bytes.length == 14;
case MT_EXTENDED_STATUS: // MT_EXTENDED_STATUS is not yet supported, however return true to avoid Exceptions case MT_EXTENDED_STATUS: // MT_EXTENDED_STATUS is not yet supported, however return true to avoid Exceptions
return true; return true;
case MT_UNKNOWN_STATUS:
return true;
default: default:
logger.error("Invalid data, unknown message type: {} ({})", getMessageType(bytes[0]), bytes);
return false; return false;
} }
} }