Problem with parsing more than 1 attribute at a time


(J-F) #1

Hello guys, @dckirker,

I’m having an issue with the parse function.
From time to time, my device is sending two write attribute messages that are packaged together in the same message frame.

This creates an issue in my device handler where the parse function see more bytes than usual and the parsing does not work.

Let’s have an example:

Desc Map: [raw:FCFC190201101C0030041C403006, dni:FCFC,
endpoint:19, cluster:0201, size:10, attrId:001c, encoding:30,
value:0630401c04]

Parse description read attr - raw:
FCFC190201101C0030041C403006, dni: FCFC, endpoint: 19, cluster: 0201,
size: 10, attrId: 001c, encoding: 30, value: 0630401c04

In this log, the value 063401c04 is actually the value 04 (for the first attribute 001c) with another message (Attribute 401c, encoding 30 and value 06)

In my device handler, the parse function does not know how to handle the extra bytes from the first write attribute message.

Any idea?


(Donald Kirker) #2

Hi J-F,

We had a similar issue with the x,y,z values from the multisensor. We solved it by manually breaking down the raw data when we were expecting 3 values (0x0012, 0x0013, 0x0014): https://github.com/SmartThingsCommunity/SmartThingsPublic/blob/master/devicetypes/smartthings/smartsense-multi-sensor.src/smartsense-multi-sensor.groovy#L200

I had heard some time back we would handle multiple messages, but I am not sure where that functionality stands in terms of priority. I’ll ping our protocols folks.

-Donald


(Gabor Szabados) #4

Hi,

This issue seems to be still not resolved more than 2 years later. Do you have any timeline for automatic breakdown?

Thanks,

Gábor