Interview issues mostly with dyi devices and generated definitions
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 15.7k
- Forks
- 2k
- Avg merge
- 18h 55m
- Merged PRs (30d)
- 35
Description
What happened?
I investigated some interview issues that I experienced when working with esphome devices. So most of them cover scenarios where the ieee address of a (re-)joining devices is already known but some parts of the definition change (could be modelID, could be endpoint/cluster/attributes or anything else.
Issues:
- On rejoin the interview is skipped completely
- Rejoin + modelID change skips the interview but still recreates the definition. This is a big issue as z2m potentially tries to read a ton of non existing attributes. (not fully confirmed)
- join reruns interview but skips recreation of definition if modelID doesn't change, also the node descriptor might be cached (need to verify) and not sure if endpoint are updated.
I would suggest:
- On join interview should always run without caching
On rejoin always read modelID, version and maybe NodeDescriptor/active endpoints. This might be an issue for sleepy devices if they rejoin regularly. If there is a change run full interview.not sure if this is possible- after interview the definition needs to be regenerated, not only when ModelID change. This could be limited to generated definitions and/or we could create a hash interview results (endpoints + basic cluster + node descriptors) and compare it.
Would appreciate some feedback. I might be missing some reasons why caching is used so heavily.
What did you expect to happen?
No response
How to reproduce it (minimal and precise)
No response
Zigbee2MQTT version
2.12.1-dev
Adapter firmware version
20211115
Adapter
cc2531 (just for testing)
Setup
pnpm, linux
Device database.db entry
No response
Debug log
No response
Notes
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the interview and definition-generation paths for rejoining devices, focusing on cached IEEE addresses, modelID, node descriptors, endpoints, and clusters. Compare the listed rejoin and join scenarios, then verify whether regenerated definitions cover changed interview results; the issue provides no reproduction, file, or test, so expected behavior needs maintainer agreement first.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- embedded-iot
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100