Zigbee - Add "status" to Read Attributes Resposne

@mike.maxwell

I'm trying to write some "generic" libraries for use with Zigbee. As part of this, there's the possibility I send a query to a device for attribute information and request an attribute that isn't supported.

As I understand the zigbee spec (Section 2.5.2), if I query for an unsupported attribute, the response will return the attribute and a value, but also a "status" indicating UNSUPPORTED_ATTRIBUTE (or, if it is supported, a code indicating that)

At present, the "status" seems to be missing from the Map that includes the response information (it seems to be missing both for the primary attribute, and for any attributes in the "additionalAttrs" field.

Can the status information be added to these reports?

Status is there, if its not supported you will not receive a value.

Thank you for the quick reply (and I appreciate you taking the time to reply over a holiday weekend!).

Just to be sure I understand, here's what's happening.

I'm sending a command to read multiple attribute statuses of the on/off Cluster 0x0006.

	cmds += zigbee.readAttribute(0x0006, [0x0000, 0x4000, 0x4001, 0x4002, 0x4003], [:])

When I get back the report, I parse it to a map log it which gives me

[raw:68860100063600001001004000100101400021000002400021000003400030FF, dni:6886, endpoint:01, cluster:0006, size:36, attrId:0000, encoding:10, command:01, value:01, clusterInt:6, attrInt:0, additionalAttrs:[[value:01, encoding:10, attrId:4000, consumedBytes:4, attrInt:16384], [value:0000, encoding:21, attrId:4001, consumedBytes:5, attrInt:16385], [value:0000, encoding:21, attrId:4002, consumedBytes:5, attrInt:16386], [value:FF, encoding:30, attrId:4003, consumedBytes:4, attrInt:16387]]]

Where I was confused is there is no "status" field shown for any of the attributes. I would have expected a status code there as section 2.5.2.1 of the Zigbee cluster spec shows a status code:

So is the "success" status implied - that is, if there is a value, it means that the code came back as "success" and you just don't populate the map with the explicit "success" indicator?

Similarly, if there was a failure, then I assume either there is no "value" key (or is there a status key instead?).

Thanks again.

correct...

yes

1 Like