Xinyuan-LilyGO / T-ZigBee

Zigbee Ultra Low Power IOT Development Board
GNU Affero General Public License v3.0
72 stars 18 forks source link

Example of sending an IAS zone alarm #39

Closed jrossouw closed 3 months ago

jrossouw commented 3 months ago

Hi,

Can anyone provide me with an example of sending an IAS alarm - in particular I want to send a water overflow indication.

I know the cluster ID is 0x0500, and i have to send the zone status (attribute ID 2), but that is of type map16 - and I cannot figure out how to set that up. I again assume map16 is equivalent to data type ZCL_DATA_TYPE_BITMAP16. Is that just a 16 bit bitfield, e.g.:

`#define ZB_ZCL_CLUSTER_ID_IAS_ZONE 0x0500U

uint16_t buffer = 1;

zbhci_ZclSendReportCmd(0x02, sDstAddr, 1, 1, 0, 1, ZB_ZCL_CLUSTER_ID_IAS_ZONE, 0x0002, ZCL_DATA_TYPE_BITMAP16, 2, (uint8_t *) &buffer);`

That does not seem to work.

jrossouw commented 3 months ago

No longer required