[Question] Writing Zigbee attribute value in Octet format (0x41)?

Heya all,

According to the documentation, zigbee.writeAttribute() doesn’t support octet format (0x41),

How does the SmartThings “st wattr” command expect the octet? with commas? a list? separated by commas? just the octet with spaces?

“st wattr 0x${device.deviceNetworkId} 1 0 0xFFF0 0x41 {octect_payload}”

where octect_payload might be:

  • 0xaa, 0x10, 0x05, 0x41, 0x47, 0x01, 0x01, 0x10, 0x01
  • [0xaa, 0x10, 0x05, 0x41, 0x47, 0x01, 0x01, 0x10, 0x01]
  • 0xaa 0x10 0x05 0x41 0x47 0x01 0x01 0x10 0x01
  • [0xaa 0x10 0x05 0x41 0x47 0x01 0x01 0x10 0x01]


There is a some older documentation at https://stdavedemo.readthedocs.io/en/latest/device-type-developers-guide/building-zigbee-device-handlers.html if that helps.

Hey Graham,

Thanks for that one, I do have it on my favorites as a good old source of info :stuck_out_tongue:

I can’t seem to find just one zigbee attribute in my devices with an octet value to see how it comes in the catchall. And I don’t wanna spend more money in either a CC2231 with Zigbee2Mqtt or the ConBee with DeConz just to see what’s there and find a octet value field :frowning: (Might be a good investment though if I’m gonna keep going the zigbee train :stuck_out_tongue: )

Maybe @nayelyz would know how the format is expected :slight_smile: ?

Hi, there! I’ve talked with our engineering team about your question, the suggestion is using zigbee.writeAttribute with DataType.pack. It would be something similar to:

zigbee.writeAttribute(cluster_id, attr_id, DataType.UINT16, DataType.pack(0xDEAD, DataType.UINT16))

0xDEAD would be the hole payload you receive in hex.


Thanks @nayelyz! will give it a try :slight_smile: