From 684e0dc53d419e232b564955612798af0aced426 Mon Sep 17 00:00:00 2001 From: Michael Zanetti Date: Fri, 2 Dec 2022 11:29:34 +0100 Subject: [PATCH] Electrical measurement: Fix data parsing Read individual entries instead of a whole list from the input stream --- .../zcl/measurement/zigbeeclusterelectricalmeasurement.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libnymea-zigbee/zcl/measurement/zigbeeclusterelectricalmeasurement.cpp b/libnymea-zigbee/zcl/measurement/zigbeeclusterelectricalmeasurement.cpp index 34eca00..3a79cc1 100644 --- a/libnymea-zigbee/zcl/measurement/zigbeeclusterelectricalmeasurement.cpp +++ b/libnymea-zigbee/zcl/measurement/zigbeeclusterelectricalmeasurement.cpp @@ -60,7 +60,9 @@ void ZigbeeClusterElectricalMeasurement::processDataIndication(ZigbeeClusterLibr QList values; stream >> startTime >> status >> profileIntervalPeriod >> numberOfIntevalsDelivered >> attributeId; while (!stream.atEnd()) { - stream >> values; + quint16 value; + stream >> value; + values.append(value); } qCDebug(dcZigbeeCluster()) << "ElectricalMeasurement: GetMeasurementProfileInfoResponse:" << QDateTime::fromMSecsSinceEpoch((qulonglong)startTime * 1000) << static_cast(status) << static_cast(profileIntervalPeriod) << numberOfIntevalsDelivered << attributeId << values; emit getMeasurementProfileInfoResponse(QDateTime::fromMSecsSinceEpoch((qulonglong)startTime * 1000), static_cast(status), static_cast(profileIntervalPeriod), numberOfIntevalsDelivered, attributeId, values);