dresden-elektronik / deconz-rest-plugin

deCONZ REST-API plugin to control ZigBee devices
BSD 3-Clause "New" or "Revised" License
1.89k stars 498 forks source link

DDF hot reload doesn't re-evaluate match conditions #7929

Open ebaauw opened 3 days ago

ebaauw commented 3 days ago

Does the issue really belong here?

Is there already an existing issue for this?

Describe the bug

Got some new LTA009 Hue lights with ancient firmware, not yet exposing the Hue Effects (0xFC03) cluster. After firmware upgrade, and reload of the Simple Descriptor, the GUI would show the cluster. However, Hot Reload doesn't link the DDF to the device. The DDF would only be matched after deCONZ restart. Note that the DDF has a filter on the existence of the cluster: "matchexpr": "R.hasCluster(0x0b,0xfc03)"

Steps to reproduce the behavior

  1. Pair LTA009 with old firmware and check that it doesn't expose the Hue Effects cluster;
  2. Update the firmware through the OTAU plugin, re-read the Simple Descriptor and notice that the light now exposes Hue Effects;
  3. Try Hot Reload (on another LTA009 that was already exposed through the DDF), and notice the new LTA009 remains unmatched;
  4. Try to select the DDF manually on the new LTA009 and Hot Reload, and notice the new LTA009 remains unmatched;
  5. Restart deCONZ and notice the new LTA009 is matched to the DDF.

Expected behavior

Not sure, but I would expect the DDF to be (re-) assigned after updating the device firmware.

Screenshots

No response

Environment

deCONZ Logs

No response

Additional context

No response

SwoopX commented 3 days ago

Interestingly, I had a rather similar experience yesterday while trying to add support for the frient pet aware motion sensor. DDF was there and correctly using name and ID but reading those attributes did not trigger the DDF association mechanism 🤔 Had to delete it in deconz and reset'n're-pair to make it work.