Lifecycle "generating doConfigure event for nil provisioning state"

Hi @nayelyz

This behavior must be linked to a problem that is happening when a driver change is made.

  • Until now, when a driver change was made, the lifecycles were executed and in this order:
    -init
    -added
    -driverSwitched

  • Now I am seeing that in some cases they only execute lifecycles added and driverSwitched and this causes drivers that need to execute a code in this init lifecycle, when a driver change is made sometimes the device does not work correctly.

To try to understand what is happening I have created an identical copy of the Zigbee Light Multifunction Mc driver called Zigbee Light Multifunction Mc-COPY

  • the Provisioning State PROVISIONED in the device in the original Zigbee Light Multifunction Mc driver
  • I make a driver change to the Zigbee Light Multifunction Mc-COPY driver
    • “nil provisioning state” is detected on the device and the lifecycles are executed: init, doConfigure, added and driverSwitched.
    • Provisioning State PROVISIONED is in the new driver
    • The device works correctly.
2023-08-13T13:09:20.608542733+00:00 TRACE Zigbee Light Multifunction Mc-COPY  Zigbee Device: 84944c69-fa8e-417e-bb62-92b7d5087d63
Manufacturer: OSRAM Model: Classic A60 W clear - LIGHTIFY
        [3]: server: TouchlinkCommissioning, Basic, Identify, Groups, Scenes, OnOff, Level, 0xFC0F | client: OTAUpgrade
2023-08-13T13:09:20.610144534+00:00 TRACE Zigbee Light Multifunction Mc-COPY  Received event with handler _resync
2023-08-13T13:09:20.611598260+00:00 TRACE Zigbee Light Multifunction Mc-COPY  Received event with handler environment_info
2023-08-13T13:09:20.612939931+00:00 DEBUG Zigbee Light Multifunction Mc-COPY  Z-Wave hub node ID environment changed.
2023-08-13T13:09:20.614278600+00:00 DEBUG Zigbee Light Multifunction Mc-COPY  driver device thread event handled
2023-08-13T13:09:20.625768342+00:00 TRACE Zigbee Light Multifunction Mc-COPY  Received event with handler environment_info
2023-08-13T13:09:20.635287099+00:00 INFO Zigbee Light Multifunction Mc-COPY  <ZigbeeDevice: 84944c69-fa8e-417e-bb62-92b7d5087d63 [0xC0CD] (Luz Mesita)> generating doConfigure event for nil provisioning state
2023-08-13T13:09:20.645007957+00:00 TRACE Zigbee Light Multifunction Mc-COPY  Found DeviceLifecycleDispatcher handler in zigbee_light_multifunctions
2023-08-13T13:09:20.646496034+00:00 PRINT Zigbee Light Multifunction Mc-COPY  <<<<< Device Init >>>>>>
.
.
2023-08-13T13:09:20.836437290+00:00 TRACE Zigbee Light Multifunction Mc-COPY  Received event with handler device_lifecycle
2023-08-13T13:09:20.837835656+00:00 INFO Zigbee Light Multifunction Mc-COPY  <ZigbeeDevice: 84944c69-fa8e-417e-bb62-92b7d5087d63 [0xC0CD] (Luz Mesita)> received lifecycle event: added
2023-08-13T13:09:20.886865158+00:00 TRACE Zigbee Light Multifunction Mc-COPY  Found DeviceLifecycleDispatcher handler in zigbee_light_multifunctions
.
.
2023-08-13T13:09:21.252272771+00:00 DEBUG Zigbee Light Multifunction Mc-COPY  <ZigbeeDevice: 84944c69-fa8e-417e-bb62-92b7d5087d63 [0xC0CD] (Luz Mesita)> doConfigure callback did not fail, transitioning device to "PROVISIONED"
2023-08-13T13:09:21.253581758+00:00 TRACE Zigbee Light Multifunction Mc-COPY  Received event with handler device_lifecycle
2023-08-13T13:09:21.265241919+00:00 INFO Zigbee Light Multifunction Mc-COPY  <ZigbeeDevice: 84944c69-fa8e-417e-bb62-92b7d5087d63 [0xC0CD] (Luz Mesita)> received lifecycle event: driverSwitched
2023-08-13T13:09:21.304740992+00:00 TRACE Zigbee Light Multifunction Mc-COPY  Found DeviceLifecycleDispatcher handler in zigbee_light_multifunctions

  • I change the driver to the original Zigbee Light Multifunction Mc driver
    • “nil provisioning state” is not detected on the device and only the lifecycles: added and driverSwitched are executed.
    • Provisioning State DRIVER_SWITCH is in the driver
    • The device does NOT work correctly since it did not perform the lifecycle init.
2023-08-13T13:15:16.116533424+00:00 TRACE Zigbee Light Multifunction Mc  Zigbee Device: 84944c69-fa8e-417e-bb62-92b7d5087d63
Manufacturer: OSRAM Model: Classic A60 W clear - LIGHTIFY
        [3]: server: TouchlinkCommissioning, Basic, Identify, Groups, Scenes, OnOff, Level, 0xFC0F | client: OTAUpgrade
2023-08-13T13:15:16.117673757+00:00 INFO Zigbee Light Multifunction Mc  <ZigbeeDevice: 84944c69-fa8e-417e-bb62-92b7d5087d63 [0xC0CD] (Luz Mesita)> received lifecycle event: added
2023-08-13T13:15:16.126451424+00:00 TRACE Zigbee Light Multifunction Mc  Received event with handler device_lifecycle
2023-08-13T13:15:16.127391757+00:00 INFO Zigbee Light Multifunction Mc  <ZigbeeDevice: 84944c69-fa8e-417e-bb62-92b7d5087d63 [0xC0CD] (Luz Mesita)> received lifecycle event: driverSwitched
2023-08-13T13:15:16.237164757+00:00 TRACE Zigbee Light Multifunction Mc  Found DeviceLifecycleDispatcher handler in zigbee_light_multifunctions
2023-08-13T13:15:16.238275757+00:00 PRINT Zigbee Light Multifunction Mc  Remove Groups >>>>>>>>>>>>>>>>>

  • I make a new driver change to the Zigbee Light Multifunction Mc-COPY driver

    • “nil provisioning state” is detected on the device and the lifecycles are executed: init, doConfigure, added and driverSwitched.
    • Provisioning State PROVISIONED is in the new driver
    • The device works correctly.
  • I return to the original Zigbee Light Multifunction Mc driver

    • “nil provisioning state” is not detected on the device and only the lifecycles: added and driverSwitched are executed.
    • Provisioning State DRIVER_SWITCH is in the driver
    • The device does NOT work correctly since it did not perform the lifecycle init.

The only way to get the device working fine again with its original driver is to reinstall the driver with the CLI and then run the init lifecycle.

I have already seen users who may have been having problems with this behavior.

Should the init life cycle always be executed as before or are we going to have to call it directly when it is necessary for it to be executed for the proper functioning of the device?

This is crazy!!!

1 Like