Zigbee configure() Not Doing Anything?

Based on ZigbeeDevice Class — SmartThings Edge Device Drivers documentation I would expect hitting the configure() command from the advanced web ui to send configuration to the device based on any attributes set up during the init lifecycle event.

The driver in question has capabilities.refresh and capabilities.configuration:

This does not appear to be working for me:

2024-04-24T13:51:26.326618927Z INFO MY ZIGBEE DIMMER DRIVER  <ZigbeeDevice: 8a518c5a-f9e9-4444-8262-e464837b16a3 [0xB53D] (Zigbee Dimmer Module)> received command: {"args":{},"capability":"configuration","command":"configure","component":"main","positional_args":{}}
2024-04-24T13:51:26.338237343Z TRACE MY ZIGBEE DIMMER DRIVER  can_handle_zigbee_dimmer_module called
2024-04-24T13:51:26.343103218Z TRACE MY ZIGBEE DIMMER DRIVER  can_handle_zigbee_dimmer_module_with_metering called
2024-04-24T13:51:26.358288468Z TRACE MY ZIGBEE DIMMER DRIVER  matched device, returning true
2024-04-24T13:51:26.364774718Z DEBUG MY ZIGBEE DIMMER DRIVER  Zigbee Dimmer Module device thread event handled

Nothing is output in the logs and nothing is sent to the device.

On the other hand, when hitting refresh() from the advanced web ui, I see the expected behaviour:

2024-04-24T13:36:03.598380844Z INFO MY ZIGBEE DIMMER DRIVER  <ZigbeeDevice: 8a518c5a-f9e9-4444-8262-e464837b16a3 [0xB53D] (Zigbee Dimmer Module)> received command: {"args":{},"capability":"refresh","command":"refresh","component":"main","positional_args":{}}
2024-04-24T13:36:03.606326011Z TRACE MY ZIGBEE DIMMER DRIVER  can_handle_zigbee_dimmer_module called
2024-04-24T13:36:03.661330011Z TRACE MY ZIGBEE DIMMER DRIVER  can_handle_zigbee_dimmer_module_with_metering called
2024-04-24T13:36:03.689744719Z TRACE MY ZIGBEE DIMMER DRIVER  matched device, returning true  
2024-04-24T13:36:03.788561469Z TRACE MY ZIGBEE DIMMER DRIVER  can_handle_zigbee_dimmer_module called
2024-04-24T13:36:03.857835052Z TRACE MY ZIGBEE DIMMER DRIVER  can_handle_zigbee_dimmer_module_with_metering called
2024-04-24T13:36:03.879617552Z TRACE MY ZIGBEE DIMMER DRIVER  matched device, returning true  
2024-04-24T13:36:03.974079927Z TRACE MY ZIGBEE DIMMER DRIVER  Found CapabilityCommandDispatcher handler in zigbee_dimmer_modules
2024-04-24T13:36:04.034603802Z INFO MY ZIGBEE DIMMER DRIVER  <ZigbeeDevice: 8a518c5a-f9e9-4444-8262-e464837b16a3 [0xB53D] (Zigbee Dimmer Module)> sending Zigbee message: < ZigbeeMessageTx || Uint16: 0x0000, < AddressHeader || src_addr: 0x0000, src_endpoint: 0x01, dest_addr: 0xB53D, dest_endpoint: 0x01, profile: 0x0104, cluster: Level >, < ZCLMessageBody || < ZCLHeader || frame_ctrl: 0x00, seqno: 0x00, ZCLCommandId: 0x00 >, < ReadAttribute || AttributeId: 0x0000 > > >
2024-04-24T13:36:04.089564552Z INFO MY ZIGBEE DIMMER DRIVER  <ZigbeeDevice: 8a518c5a-f9e9-4444-8262-e464837b16a3 [0xB53D] (Zigbee Dimmer Module)> sending Zigbee message: < ZigbeeMessageTx || Uint16: 0x0000, < AddressHeader || src_addr: 0x0000, src_endpoint: 0x01, dest_addr: 0xB53D, dest_endpoint: 0x01, profile: 0x0104, cluster: ElectricalMeasurement >, < ZCLMessageBody || < ZCLHeader || frame_ctrl: 0x00, seqno: 0x00, ZCLCommandId: 0x00 >, < ReadAttribute || AttributeId: 0x0508 > > >
2024-04-24T13:36:04.180353802Z INFO MY ZIGBEE DIMMER DRIVER  <ZigbeeDevice: 8a518c5a-f9e9-4444-8262-e464837b16a3 [0xB53D] (Zigbee Dimmer Module)> sending Zigbee message: < ZigbeeMessageTx || Uint16: 0x0000, < AddressHeader || src_addr: 0x0000, src_endpoint: 0x01, dest_addr: 0xB53D, dest_endpoint: 0x01, profile: 0x0104, cluster: ElectricalMeasurement >, < ZCLMessageBody || < ZCLHeader || frame_ctrl: 0x00, seqno: 0x00, ZCLCommandId: 0x00 >, < ReadAttribute || AttributeId: 0x0505 > > >
2024-04-24T13:36:04.299465136Z INFO MY ZIGBEE DIMMER DRIVER  <ZigbeeDevice: 8a518c5a-f9e9-4444-8262-e464837b16a3 [0xB53D] (Zigbee Dimmer Module)> sending Zigbee message: < ZigbeeMessageTx || Uint16: 0x0000, < AddressHeader || src_addr: 0x0000, src_endpoint: 0x01, dest_addr: 0xB53D, dest_endpoint: 0x01, profile: 0x0104, cluster: ElectricalMeasurement >, < ZCLMessageBody || < ZCLHeader || frame_ctrl: 0x00, seqno: 0x00, ZCLCommandId: 0x00 >, < ReadAttribute || AttributeId: 0x050B > > >
2024-04-24T13:36:04.368348969Z INFO MY ZIGBEE DIMMER DRIVER  <ZigbeeDevice: 8a518c5a-f9e9-4444-8262-e464837b16a3 [0xB53D] (Zigbee Dimmer Module)> sending Zigbee message: < ZigbeeMessageTx || Uint16: 0x0000, < AddressHeader || src_addr: 0x0000, src_endpoint: 0x01, dest_addr: 0xB53D, dest_endpoint: 0x01, profile: 0x0104, cluster: OnOff >, < ZCLMessageBody || < ZCLHeader || frame_ctrl: 0x00, seqno: 0x00, ZCLCommandId: 0x00 >, < ReadAttribute || AttributeId: 0x0000 > > >
2024-04-24T13:36:04.388391719Z INFO MY ZIGBEE DIMMER DRIVER  <ZigbeeDevice: 8a518c5a-f9e9-4444-8262-e464837b16a3 [0xB53D] (Zigbee Dimmer Module)> sending Zigbee message: < ZigbeeMessageTx || Uint16: 0x0000, < AddressHeader || src_addr: 0x0000, src_endpoint: 0x01, dest_addr: 0xB53D, dest_endpoint: 0x01, profile: 0x0104, cluster: SimpleMetering >, < ZCLMessageBody || < ZCLHeader || frame_ctrl: 0x00, seqno: 0x00, ZCLCommandId: 0x00 >, < ReadAttribute || AttributeId: 0x0000 > > >
2024-04-24T13:36:04.418588969Z INFO MY ZIGBEE DIMMER DRIVER  <ZigbeeDevice: 8a518c5a-f9e9-4444-8262-e464837b16a3 [0xB53D] (Zigbee Dimmer Module)> sending Zigbee message: < ZigbeeMessageTx || Uint16: 0x0000, < AddressHeader || src_addr: 0x0000, src_endpoint: 0x01, dest_addr: 0xB53D, dest_endpoint: 0x01, profile: 0x0104, cluster: SimpleMetering >, < ZCLMessageBody || < ZCLHeader || frame_ctrl: 0x00, seqno: 0x00, ZCLCommandId: 0x00 >, < ReadAttribute || AttributeId: 0x0400 > > >

Comparing the two log traces the only difference I see is:

Found CapabilityCommandDispatcher handler in zigbee_dimmer_modules

…for the refresh() command.

I don’t see that for the configure() command.

Configuration seems to run fine from the doConfigure lifecycle event when device:configure() is called:

image

I get correct logging from there:

2024-04-24T14:33:33.050873186Z TRACE MY ZIGBEE DIMMER DRIVER  do_configure called
2024-04-24T14:33:33.112594281Z INFO MY ZIGBEE DIMMER DRIVER  <ZigbeeDevice: 8a518c5a-f9e9-4444-8262-e464837b16a3 [0xB53D] (Zigbee Dimmer Module)> sending Zigbee message: < ZigbeeMessageTx || Uint16: 0x0000, < AddressHeader || src_addr: 0x0000, src_endpoint: 0x01, dest_addr: 0xB53D, dest_endpoint: 0x01, profile: 0x0104, cluster: ElectricalMeasurement >, < ZCLMessageBody || < ZCLHeader || frame_ctrl: 0x00, seqno: 0x00, ZCLCommandId: 0x00 >, < ReadAttribute || AttributeId: 0x0508 > > >
2024-04-24T14:33:33.161461327Z INFO MY ZIGBEE DIMMER DRIVER  <ZigbeeDevice: 8a518c5a-f9e9-4444-8262-e464837b16a3 [0xB53D] (Zigbee Dimmer Module)> sending Zigbee message: < ZigbeeMessageTx || Uint16: 0x0000, < AddressHeader || src_addr: 0x0000, src_endpoint: 0x01, dest_addr: 0xB53D, dest_endpoint: 0x01, profile: 0x0104, cluster: ElectricalMeasurement >, < ZCLMessageBody || < ZCLHeader || frame_ctrl: 0x00, seqno: 0x00, ZCLCommandId: 0x00 >, < ReadAttribute || AttributeId: 0x0505 > > >
2024-04-24T14:33:33.262263412Z INFO MY ZIGBEE DIMMER DRIVER  <ZigbeeDevice: 8a518c5a-f9e9-4444-8262-e464837b16a3 [0xB53D] (Zigbee Dimmer Module)> sending Zigbee message: < ZigbeeMessageTx || Uint16: 0x0000, < AddressHeader || src_addr: 0x0000, src_endpoint: 0x01, dest_addr: 0xB53D, dest_endpoint: 0x01, profile: 0x0104, cluster: ElectricalMeasurement >, < ZCLMessageBody || < ZCLHeader || frame_ctrl: 0x00, seqno: 0x00, ZCLCommandId: 0x00 >, < ReadAttribute || AttributeId: 0x050B > > >
2024-04-24T14:33:33.317943488Z INFO MY ZIGBEE DIMMER DRIVER  <ZigbeeDevice: 8a518c5a-f9e9-4444-8262-e464837b16a3 [0xB53D] (Zigbee Dimmer Module)> sending Zigbee message: < ZigbeeMessageTx || Uint16: 0x0000, < AddressHeader || src_addr: 0x0000, src_endpoint: 0x01, dest_addr: 0xB53D, dest_endpoint: 0x01, profile: 0x0104, cluster: OnOff >, < ZCLMessageBody || < ZCLHeader || frame_ctrl: 0x00, seqno: 0x00, ZCLCommandId: 0x00 >, < ReadAttribute || AttributeId: 0x0000 > > >
2024-04-24T14:33:33.377498667Z INFO MY ZIGBEE DIMMER DRIVER  <ZigbeeDevice: 8a518c5a-f9e9-4444-8262-e464837b16a3 [0xB53D] (Zigbee Dimmer Module)> sending Zigbee message: < ZigbeeMessageTx || Uint16: 0x0000, < AddressHeader || src_addr: 0x0000, src_endpoint: 0x01, dest_addr: 0xB53D, dest_endpoint: 0x01, profile: 0x0104, cluster: SimpleMetering >, < ZCLMessageBody || < ZCLHeader || frame_ctrl: 0x00, seqno: 0x00, ZCLCommandId: 0x00 >, < ReadAttribute || AttributeId: 0x0400 > > >
2024-04-24T14:33:33.436366253Z INFO MY ZIGBEE DIMMER DRIVER  <ZigbeeDevice: 8a518c5a-f9e9-4444-8262-e464837b16a3 [0xB53D] (Zigbee Dimmer Module)> sending Zigbee message: < ZigbeeMessageTx || Uint16: 0x0000, < AddressHeader || src_addr: 0x0000, src_endpoint: 0x01, dest_addr: 0xB53D, dest_endpoint: 0x01, profile: 0x0104, cluster: SimpleMetering >, < ZCLMessageBody || < ZCLHeader || frame_ctrl: 0x00, seqno: 0x00, ZCLCommandId: 0x00 >, < ReadAttribute || AttributeId: 0x0000 > > >
2024-04-24T14:33:33.660748805Z INFO MY ZIGBEE DIMMER DRIVER  <ZigbeeDevice: 8a518c5a-f9e9-4444-8262-e464837b16a3 [0xB53D] (Zigbee Dimmer Module)> sending Zigbee message: < ZigbeeMessageTx || Uint16: 0x0000, < AddressHeader || src_addr: 0x0000, src_endpoint: 0x01, dest_addr: 0xB53D, dest_endpoint: 0x01, profile: 0x0104, cluster: Level >, < ZCLMessageBody || < ZCLHeader || frame_ctrl: 0x00, seqno: 0x00, ZCLCommandId: 0x00 >, < ReadAttribute || AttributeId: 0x0000 > > >
2024-04-24T14:33:33.742819028Z INFO MY ZIGBEE DIMMER DRIVER  <ZigbeeDevice: 8a518c5a-f9e9-4444-8262-e464837b16a3 [0xB53D] (Zigbee Dimmer Module)> sending Zigbee message: < ZigbeeMessageTx || Uint16: 0x0000, < AddressHeader || src_addr: 0x0000, src_endpoint: 0x01, dest_addr: 0xB53D, dest_endpoint: 0x01, profile: 0x0000, cluster: 0x0021 >, < ZDOMessageBody || < ZDOHeader || seqno: 0x00 >, < BindRequest || src_address: DC8E95FFFEC22424, src_endpoint: 0x01, cluster: ElectricalMeasurement, dest_addr_mode: 0x03, dest_address: 286D97000207DA58, dest_endpoint: 0x01 > > >
2024-04-24T14:33:33.955339818Z INFO MY ZIGBEE DIMMER DRIVER  <ZigbeeDevice: 8a518c5a-f9e9-4444-8262-e464837b16a3 [0xB53D] (Zigbee Dimmer Module)> sending Zigbee message: < ZigbeeMessageTx || Uint16: 0x0000, < AddressHeader || src_addr: 0x0000, src_endpoint: 0x01, dest_addr: 0xB53D, dest_endpoint: 0x01, profile: 0x0104, cluster: ElectricalMeasurement >, < ZCLMessageBody || < ZCLHeader || frame_ctrl: 0x00, seqno: 0x00, ZCLCommandId: 0x06 >, < ConfigureReporting || < AttributeReportingConfiguration || direction: 0x00, attr_id: 0x0508, DataType: Uint16, minimum_reporting_interval: 0x0005, maximum_reporting_interval: 0x0384, reportable_change: 0x03E8 > > > >
2024-04-24T14:33:34.058662787Z INFO MY ZIGBEE DIMMER DRIVER  <ZigbeeDevice: 8a518c5a-f9e9-4444-8262-e464837b16a3 [0xB53D] (Zigbee Dimmer Module)> sending Zigbee message: < ZigbeeMessageTx || Uint16: 0x0000, < AddressHeader || src_addr: 0x0000, src_endpoint: 0x01, dest_addr: 0xB53D, dest_endpoint: 0x01, profile: 0x0104, cluster: ElectricalMeasurement >, < ZCLMessageBody || < ZCLHeader || frame_ctrl: 0x00, seqno: 0x00, ZCLCommandId: 0x06 >, < ConfigureReporting || < AttributeReportingConfiguration || direction: 0x00, attr_id: 0x0505, DataType: Uint16, minimum_reporting_interval: 0x0005, maximum_reporting_interval: 0x0258, reportable_change: 0x000A > > > >
2024-04-24T14:33:34.219090670Z INFO MY ZIGBEE DIMMER DRIVER  <ZigbeeDevice: 8a518c5a-f9e9-4444-8262-e464837b16a3 [0xB53D] (Zigbee Dimmer Module)> sending Zigbee message: < ZigbeeMessageTx || Uint16: 0x0000, < AddressHeader || src_addr: 0x0000, src_endpoint: 0x01, dest_addr: 0xB53D, dest_endpoint: 0x01, profile: 0x0104, cluster: ElectricalMeasurement >, < ZCLMessageBody || < ZCLHeader || frame_ctrl: 0x00, seqno: 0x00, ZCLCommandId: 0x06 >, < ConfigureReporting || < AttributeReportingConfiguration || direction: 0x00, attr_id: 0x050B, DataType: Int16, minimum_reporting_interval: 0x0005, maximum_reporting_interval: 0x012C, reportable_change: 50 > > > >
2024-04-24T14:33:34.317792788Z INFO MY ZIGBEE DIMMER DRIVER  <ZigbeeDevice: 8a518c5a-f9e9-4444-8262-e464837b16a3 [0xB53D] (Zigbee Dimmer Module)> sending Zigbee message: < ZigbeeMessageTx || Uint16: 0x0000, < AddressHeader || src_addr: 0x0000, src_endpoint: 0x01, dest_addr: 0xB53D, dest_endpoint: 0x01, profile: 0x0000, cluster: 0x0021 >, < ZDOMessageBody || < ZDOHeader || seqno: 0x00 >, < BindRequest || src_address: DC8E95FFFEC22424, src_endpoint: 0x01, cluster: OnOff, dest_addr_mode: 0x03, dest_address: 286D97000207DA58, dest_endpoint: 0x01 > > >
2024-04-24T14:33:34.339811667Z INFO MY ZIGBEE DIMMER DRIVER  <ZigbeeDevice: 8a518c5a-f9e9-4444-8262-e464837b16a3 [0xB53D] (Zigbee Dimmer Module)> sending Zigbee message: < ZigbeeMessageTx || Uint16: 0x0000, < AddressHeader || src_addr: 0x0000, src_endpoint: 0x01, dest_addr: 0xB53D, dest_endpoint: 0x01, profile: 0x0104, cluster: OnOff >, < ZCLMessageBody || < ZCLHeader || frame_ctrl: 0x00, seqno: 0x00, ZCLCommandId: 0x06 >, < ConfigureReporting || < AttributeReportingConfiguration || direction: 0x00, attr_id: 0x0000, DataType: Boolean, minimum_reporting_interval: 0x0000, maximum_reporting_interval: 0x0E10 > > > >
2024-04-24T14:33:34.380028473Z INFO MY ZIGBEE DIMMER DRIVER  <ZigbeeDevice: 8a518c5a-f9e9-4444-8262-e464837b16a3 [0xB53D] (Zigbee Dimmer Module)> sending Zigbee message: < ZigbeeMessageTx || Uint16: 0x0000, < AddressHeader || src_addr: 0x0000, src_endpoint: 0x01, dest_addr: 0xB53D, dest_endpoint: 0x01, profile: 0x0000, cluster: 0x0021 >, < ZDOMessageBody || < ZDOHeader || seqno: 0x00 >, < BindRequest || src_address: DC8E95FFFEC22424, src_endpoint: 0x01, cluster: SimpleMetering, dest_addr_mode: 0x03, dest_address: 286D97000207DA58, dest_endpoint: 0x01 > > >
2024-04-24T14:33:34.398933838Z INFO MY ZIGBEE DIMMER DRIVER  <ZigbeeDevice: 8a518c5a-f9e9-4444-8262-e464837b16a3 [0xB53D] (Zigbee Dimmer Module)> sending Zigbee message: < ZigbeeMessageTx || Uint16: 0x0000, < AddressHeader || src_addr: 0x0000, src_endpoint: 0x01, dest_addr: 0xB53D, dest_endpoint: 0x01, profile: 0x0104, cluster: SimpleMetering >, < ZCLMessageBody || < ZCLHeader || frame_ctrl: 0x00, seqno: 0x00, ZCLCommandId: 0x06 >, < ConfigureReporting || < AttributeReportingConfiguration || direction: 0x00, attr_id: 0x0400, DataType: Int24, minimum_reporting_interval: 0x0001, maximum_reporting_interval: 0x0E10, reportable_change: 5 > > > >
2024-04-24T14:33:34.443333985Z INFO MY ZIGBEE DIMMER DRIVER  <ZigbeeDevice: 8a518c5a-f9e9-4444-8262-e464837b16a3 [0xB53D] (Zigbee Dimmer Module)> sending Zigbee message: < ZigbeeMessageTx || Uint16: 0x0000, < AddressHeader || src_addr: 0x0000, src_endpoint: 0x01, dest_addr: 0xB53D, dest_endpoint: 0x01, profile: 0x0104, cluster: SimpleMetering >, < ZCLMessageBody || < ZCLHeader || frame_ctrl: 0x00, seqno: 0x00, ZCLCommandId: 0x06 >, < ConfigureReporting || < AttributeReportingConfiguration || direction: 0x00, attr_id: 0x0000, DataType: Uint48, minimum_reporting_interval: 0x0005, maximum_reporting_interval: 0x0E10, reportable_change: 0x00000036EE80 > > > >
2024-04-24T14:33:34.507994049Z INFO MY ZIGBEE DIMMER DRIVER  <ZigbeeDevice: 8a518c5a-f9e9-4444-8262-e464837b16a3 [0xB53D] (Zigbee Dimmer Module)> sending Zigbee message: < ZigbeeMessageTx || Uint16: 0x0000, < AddressHeader || src_addr: 0x0000, src_endpoint: 0x01, dest_addr: 0xB53D, dest_endpoint: 0x01, profile: 0x0000, cluster: 0x0021 >, < ZDOMessageBody || < ZDOHeader || seqno: 0x00 >, < BindRequest || src_address: DC8E95FFFEC22424, src_endpoint: 0x01, cluster: Level, dest_addr_mode: 0x03, dest_address: 286D97000207DA58, dest_endpoint: 0x01 > > >
2024-04-24T14:33:34.583878472Z INFO MY ZIGBEE DIMMER DRIVER  <ZigbeeDevice: 8a518c5a-f9e9-4444-8262-e464837b16a3 [0xB53D] (Zigbee Dimmer Module)> sending Zigbee message: < ZigbeeMessageTx || Uint16: 0x0000, < AddressHeader || src_addr: 0x0000, src_endpoint: 0x01, dest_addr: 0xB53D, dest_endpoint: 0x01, profile: 0x0104, cluster: Level >, < ZCLMessageBody || < ZCLHeader || frame_ctrl: 0x00, seqno: 0x00, ZCLCommandId: 0x06 >, < ConfigureReporting || < AttributeReportingConfiguration || direction: 0x00, attr_id: 0x0000, DataType: Uint8, minimum_reporting_interval: 0x0001, maximum_reporting_interval: 0x0E10, reportable_change: 0x01 > > > >
2024-04-24T14:33:35.322654259Z INFO MY ZIGBEE DIMMER DRIVER  <ZigbeeDevice: 8a518c5a-f9e9-4444-8262-e464837b16a3 [0xB53D] (Zigbee Dimmer Module)> sending Zigbee message: < ZigbeeMessageTx || Uint16: 0x0000, < AddressHeader || src_addr: 0x0000, src_endpoint: 0x01, dest_addr: 0xB53D, dest_endpoint: 0x01, profile: 0x0104, cluster: ElectricalMeasurement >, < ZCLMessageBody || < ZCLHeader || frame_ctrl: 0x00, seqno: 0x00, ZCLCommandId: 0x00 >, < ReadAttribute || AttributeId: 0x0605 > > >
2024-04-24T14:33:35.841394125Z INFO MY ZIGBEE DIMMER DRIVER  <ZigbeeDevice: 8a518c5a-f9e9-4444-8262-e464837b16a3 [0xB53D] (Zigbee Dimmer Module)> sending Zigbee message: < ZigbeeMessageTx || Uint16: 0x0000, < AddressHeader || src_addr: 0x0000, src_endpoint: 0x01, dest_addr: 0xB53D, dest_endpoint: 0x01, profile: 0x0104, cluster: ElectricalMeasurement >, < ZCLMessageBody || < ZCLHeader || frame_ctrl: 0x00, seqno: 0x00, ZCLCommandId: 0x00 >, < ReadAttribute || AttributeId: 0x0604 > > >
2024-04-24T14:33:36.026996504Z INFO MY ZIGBEE DIMMER DRIVER  <ZigbeeDevice: 8a518c5a-f9e9-4444-8262-e464837b16a3 [0xB53D] (Zigbee Dimmer Module)> sending Zigbee message: < ZigbeeMessageTx || Uint16: 0x0000, < AddressHeader || src_addr: 0x0000, src_endpoint: 0x01, dest_addr: 0xB53D, dest_endpoint: 0x01, profile: 0x0104, cluster: ElectricalMeasurement >, < ZCLMessageBody || < ZCLHeader || frame_ctrl: 0x00, seqno: 0x00, ZCLCommandId: 0x00 >, < ReadAttribute || AttributeId: 0x0603 > > >
2024-04-24T14:33:36.206975074Z INFO MY ZIGBEE DIMMER DRIVER  <ZigbeeDevice: 8a518c5a-f9e9-4444-8262-e464837b16a3 [0xB53D] (Zigbee Dimmer Module)> sending Zigbee message: < ZigbeeMessageTx || Uint16: 0x0000, < AddressHeader || src_addr: 0x0000, src_endpoint: 0x01, dest_addr: 0xB53D, dest_endpoint: 0x01, profile: 0x0104, cluster: ElectricalMeasurement >, < ZCLMessageBody || < ZCLHeader || frame_ctrl: 0x00, seqno: 0x00, ZCLCommandId: 0x00 >, < ReadAttribute || AttributeId: 0x0602 > > >
2024-04-24T14:33:36.326953199Z INFO MY ZIGBEE DIMMER DRIVER  <ZigbeeDevice: 8a518c5a-f9e9-4444-8262-e464837b16a3 [0xB53D] (Zigbee Dimmer Module)> sending Zigbee message: < ZigbeeMessageTx || Uint16: 0x0000, < AddressHeader || src_addr: 0x0000, src_endpoint: 0x01, dest_addr: 0xB53D, dest_endpoint: 0x01, profile: 0x0104, cluster: ElectricalMeasurement >, < ZCLMessageBody || < ZCLHeader || frame_ctrl: 0x00, seqno: 0x00, ZCLCommandId: 0x00 >, < ReadAttribute || AttributeId: 0x0601 > > >
2024-04-24T14:33:36.557080539Z INFO MY ZIGBEE DIMMER DRIVER  <ZigbeeDevice: 8a518c5a-f9e9-4444-8262-e464837b16a3 [0xB53D] (Zigbee Dimmer Module)> sending Zigbee message: < ZigbeeMessageTx || Uint16: 0x0000, < AddressHeader || src_addr: 0x0000, src_endpoint: 0x01, dest_addr: 0xB53D, dest_endpoint: 0x01, profile: 0x0104, cluster: ElectricalMeasurement >, < ZCLMessageBody || < ZCLHeader || frame_ctrl: 0x00, seqno: 0x00, ZCLCommandId: 0x00 >, < ReadAttribute || AttributeId: 0x0600 > > >
2024-04-24T14:33:36.666947237Z INFO MY ZIGBEE DIMMER DRIVER  <ZigbeeDevice: 8a518c5a-f9e9-4444-8262-e464837b16a3 [0xB53D] (Zigbee Dimmer Module)> sending Zigbee message: < ZigbeeMessageTx || Uint16: 0x0000, < AddressHeader || src_addr: 0x0000, src_endpoint: 0x01, dest_addr: 0xB53D, dest_endpoint: 0x01, profile: 0x0104, cluster: SimpleMetering >, < ZCLMessageBody || < ZCLHeader || frame_ctrl: 0x00, seqno: 0x00, ZCLCommandId: 0x00 >, < ReadAttribute || AttributeId: 0x0302 > > >
2024-04-24T14:33:36.688378655Z INFO MY ZIGBEE DIMMER DRIVER  <ZigbeeDevice: 8a518c5a-f9e9-4444-8262-e464837b16a3 [0xB53D] (Zigbee Dimmer Module)> sending Zigbee message: < ZigbeeMessageTx || Uint16: 0x0000, < AddressHeader || src_addr: 0x0000, src_endpoint: 0x01, dest_addr: 0xB53D, dest_endpoint: 0x01, profile: 0x0104, cluster: SimpleMetering >, < ZCLMessageBody || < ZCLHeader || frame_ctrl: 0x00, seqno: 0x00, ZCLCommandId: 0x00 >, < ReadAttribute || AttributeId: 0x0301 > > >
2024-04-24T14:33:36.718373770Z DEBUG MY ZIGBEE DIMMER DRIVER  Zigbee Dimmer Module device thread event handled
2024-04-24T14:33:36.738388523Z DEBUG MY ZIGBEE DIMMER DRIVER  <ZigbeeDevice: 8a518c5a-f9e9-4444-8262-e464837b16a3 [0xB53D] (Zigbee Dimmer Module)> doConfigure callback did not fail, transitioning device to "PROVISIONED"

I can’t see anything wrong with my code, but thought I’d check to see if anybody else sees the same behaviour?

Does manually running configure() work for you?

Hi, @MartynWendon

The capability “configuration” doesn’t trigger device:configure() by default, it requires a capability_handler that triggers the configuration desired, which would be the same as in the lifecycle_handler of doConfigure.

The capability “Refresh” is a special case because it does have the default behavior to update the capabilities’ status, thus the ReadAttribute messages are sent.

So, you need to add a capability_handler for the capability configuration’s configure() command and send the commands you want from there.
To reduce the code, you can put those commands in a separate function and call it from wherever necessary, for example:

local configureCommands = function(self, device)
   device:configure()
   --ReadAttribute commands
end

local do_configure = function(self, device)
     configureCommands(self, device) 
end

local configureCapabilityCommand = function(self, device, command)
     configureCommands(self, device)
end

local driverTemplate = Driver("driverName", {
  lifecycle_handlers = {
    ...
  },
  capability_handlers={
    ...,
    [capabilities.configuration.ID] = {
      [capabilities.configuration.commands.configure.NAME] = configureCapabilityCommand 
    }
  }
})

Please, let me know if you have any questions.

Hi @nayelyz

Thanks for the pointer!

I did wonder if that was the case, however given that the refresh capability refresh() command has a default handler to presumably call device:refresh() I think it’s reasonable to assume that the configuration capability configure() command would behave in the same way. I scoured the documentation but couldn’t see any mention either way.

It would have also been helpful to at least have had a log message saying something like “hey, we just tried to call a capability handler for the configure() command but you don’t have one specified, you might want to take a look at your code” :slight_smile:

Well, currently, it tells you if a handler for that event was found. For example, I used the switch capability to test and when you issue a command and no handler is found, you only see something like this:

2024-04-24T20:04:08.877266541Z INFO Temperature  <Device: ecacbdcd-86a8-4f9c-92e5-a5b62d24157b (bla)> received command: {"args":{},"capability":"switch","command":"off","component":"main","positional_args":{}}
2024-04-24T20:04:08.880420249Z DEBUG Temperature  bla device thread event handled

And, if a handler is found, you’ll see this:

2024-04-24T20:12:24.866303809Z INFO Temperature  <Device: ecacbdcd-86a8-4f9c-92e5-a5b62d24157b (bla)> received command: {"args":{},"capability":"switch","command":"off","component":"main","positional_args":{}}
2024-04-24T20:12:24.869756601Z TRACE Temperature  Found CapabilityCommandDispatcher handler in temperature_driver

So, when you issue a command for any capability from the API (which is what the my.smartthings.com advanced tool does) or the app, you’ll see the event that starts with received command.
If the event comes from the physical device, you’ll see the Zigbee messages first and then an event starting with emitting event to update a capability (if it has an attribute), result of the Zigbee message being processed.

Anyway, I’ll share your comments with the engineering team about this.