Fix device id decoding

This commit is contained in:
Anton Tananaev 2024-12-26 15:01:50 -08:00
parent a7c744c8c6
commit 54eb4b0188

View File

@ -645,7 +645,8 @@ public class SuntechProtocolDecoder extends BaseProtocolDecoder {
return null;
}
DeviceSession deviceSession = getDeviceSession(channel, remoteAddress, ByteBufUtil.hexDump(buf.readSlice(5)));
DeviceSession deviceSession = getDeviceSession(
channel, remoteAddress, ByteBufUtil.hexDump(buf.readSlice(5)).substring(0, 9));
if (deviceSession == null) {
return null;
}