-
Notifications
You must be signed in to change notification settings - Fork 516
Matter Electrical Sensor: Support Power Topology Cluster #2444
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: update-metadata-switch
Are you sure you want to change the base?
Conversation
|
Invitation URL: |
Test Results 71 files ± 0 460 suites +1 0s ⏱️ ±0s Results for commit c818081. ± Comparison against base commit fb3f845. This pull request removes 2 and adds 2 tests. Note that renamed tests count towards both.♻️ This comment has been updated with latest results. |
|
Minimum allowed coverage is Generated by 🐒 cobertura-action against c818081 |
3105c81 to
428476c
Compare
aee0647 to
c818081
Compare
|
Duplicate profile check: Passed - no duplicate profiles detected. |
| clusters.ElectricalEnergyMeasurement.ID = 0x0091 | ||
| clusters.ElectricalPowerMeasurement.ID = 0x0090 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aren't these ID's already present in the embedded clusters? Or is it just that the IDs are the only thing needed in this module?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah I could have just included the whole thing there, but since only the IDs are being used in this file I just specified the IDs.
| function AttributeHandlers.active_power_handler(driver, device, ib, response) | ||
| if ib.data.value then | ||
| local watt_value = ib.data.value / fields.CONVERSION_CONST_MILLIWATT_TO_WATT | ||
| if ib.endpoint_id ~= 0 then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this logic not needed anymore? I'm a bit confused
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see this PR: #2436
specifically here: #2436 (comment)
fb3f845 to
73aa8dc
Compare
Description of Change
Multi-switch plugs that support Electrical Sensor on multiple endpoints are not currently handled correctly in the driver, as the electrical handling is silently dropped when creating a profile for all child devices. This PR aims to fix that by adding handling of the PowerTopology cluster, a required cluster for the Electrical Sensor device type.
This cluster primarily indicates how Electrical Sensors are organized on the device through its feature map, and this PR handles 2 of the permutations, namely SET and NODE. For now, all other permutations (primarily TREE) will be silently dropped if it is supported, though we know of no real devices using this topology.
In the spec, a NODE topology indicates that there is only one source of electrical readings for the entire device, the "node". A SET topology indicates that the electrical sensor supports readings for some subset of the devices, and therefore there are likely >1 of these sensors, each with a SET topology and each supporting readings of different endpoints. These endpoints are specified through the AvailableEndpoints attribute, which we read on an initial join.
Summary of Completed Tests