Battery Reporting Using zigbee.configureReporting()

So I am just finishing up my first ZigBee driver. Everything seems to be working fine, except for the battery reporting part. Querying the battery using he rattr works find, but the zigbee.configureReporting() doesn't seem to work. I have tried the following:

zigbee.configureReporting(zigbee.POWER_CONFIGURATION_CLUSTER, 0x0020, DataType.UINT8, 0, reportInterval, 1, [:], 200)

zigbee.configureReporting(0x001, 0x0020, DataType.UINT8, 0, reportInterval, 1, [:], 200)

zigbee.configureReporting(0x0020, 0x0000, DataType.UINT8, 0, reportInterval, 1, [:], 200)

Where reportInterval = 1, so I would expect to get flooded with reports. So before I code a workaround need to make sure I didn't screw up somewhere and check the community to see what others are doing. Any help would be greatly appreciated .

Are you actually sending the commands that zigbee.configureReporting() is creating?

These two are equivalent and will create the commands to set up reporting on 0x0001/0x0020, battery voltage. Not all devices support reporting on voltage and its not required. If a device doesn't support reporting on attribute 0x0020, it will return an error. Your driver should be logging these errors and could parse them if needed for more assistance.

If a device doesn't support battery voltage (attribute 0x0020) reporting, it may support battery percentage (attribute 0x0021) reporting. Most Zigbee devices tend to support battery percentage over voltage if they only support one.

This is creating the commands to for reporting configuration on the poll control cluster (0x0020) and the Check-In Interval attribute (0x0000). This is not likely what you're looking for.

It may help if you share which device you're writing a driver for.

Sorry for the delayed response on this. Yesterday was Patch Tuesday and that is one of my busy days.

I am creating the driver for the Xfinity Contact Sensor, so it's a very basic driver and it definitely supports 0x0020, not 0x021. So when I checked my logs this morning it automagically started working. Had to make a few tweaks in the code, but it looks good now. I will do some more testing then I will release the driver for anyone who needs it.

Thank you for your response