Matter Camera: Fix bugs related to profile matching and re-init of capabilites#2887
Matter Camera: Fix bugs related to profile matching and re-init of capabilites#2887samadDotDev merged 5 commits intomainfrom
Conversation
|
Channel deleted. |
|
Minimum allowed coverage is Generated by 🐒 cobertura-action against ff3cdb0 |
…les keyed by strings Co-authored-by: Harrison Carter <harrison.carter@smartthings.com>
ctowns
left a comment
There was a problem hiding this comment.
LGTM! Excellent unit tests, and thank you for including all the real device test cases in the top comment!
Co-authored-by: Nick DeBoom <nickolas.deboom@gmail.com>
|
Please squash commits in the future. Now we have to cherry pick 5 commits instead of 1 to beta this week and prod next week. |
My bad, I have been getting used to of leaving the logical changes with other contributors in separate commits in hub-core, but definitely something I'll keep in mind for this repo since we seem to be cherry-picking instead of pulling the branch here. |
|
No worries, typically I am heavily in favor more commits for independent changes, but this repo is an exception atm |
Type of Change
Checklist
Description of Change
I started with a fix to feature-map change, which if occurred on a SW update and didn't result in a profile change won't re-init or update any capability attributes (such as
supportedFeatures) that should be updated on such changes.In a specific example, I observed one of the cameras getting updated for its watermark/OSD bits in feature map of AVSM cluster, and despite the SW update (which triggered the
infoChangedhandler with SW version diff), thevideoStreamSettings::supportedFeatureswasn't updated to reflect the changes in watermark/OSD support.While addressing this issue I noticed that this was applicable to other capabilities and features as well, so I refactored that a bit. There were a few more issues that I addressed as part of this PR since they were tightly linked with the new changes to observe these diffs:
ConfigurationVersionfrom spec) then we still reflect those changes in profile and/or relevant supported features of capabilities.AttributesList, I believe we aren't tracking FeatureMap global attribute for clusters in the Lua libs, so this is defined as a const until then. This was also surfaced in the recent interest of Door Lock TF in subscribing to feature map changes.supportedFeatureof a capability, disabling it in profile, re-enabling it - we'd want to re-upsert thesupportedFeatureeven if there is no diff in that case)vision.clipAnalysis- it will result in aninfoChangedwith profile diff that'd previously call the re-init of all capabilities.AttributesListhandler. This was handled previously too, but wasn't tracked, so there was a bug where this could be reset (removing the status led components from profile) if you receive theAttributesListfirst and then another event occurred which would re-match the profile from various paths (as that re-match was defaulting tofalsefor all spots outside ofAttributesListhandler). We can't rely (yet) on the attributes list within device's object (unlike feature map) due to this being potentially empty, hence it is tracked based on last report received for this attribute, and then used in any future re-matches from any path.Summary of Completed Tests
infoChanged) of existing camera