From a4873b088274ce1df8086e89298c5c30ecaba725 Mon Sep 17 00:00:00 2001 From: cecille Date: Tue, 7 May 2024 17:37:16 -0400 Subject: [PATCH 1/9] TC-IDM-10.2: Add test for provisional clusters --- src/python_testing/TC_DeviceConformance.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/python_testing/TC_DeviceConformance.py b/src/python_testing/TC_DeviceConformance.py index 18ad273a6241d6..6d9ab167c06963 100644 --- a/src/python_testing/TC_DeviceConformance.py +++ b/src/python_testing/TC_DeviceConformance.py @@ -76,17 +76,22 @@ def record_warning(location, problem): success = True allow_provisional = self.user_params.get("allow_provisional", False) + # TODO: automate this once https://github.com/csa-data-model/projects/issues/454 is done. + provisional_cluster_ids = [0x050F, 0x0062] for endpoint_id, endpoint in self.endpoints_tlv.items(): for cluster_id, cluster in endpoint.items(): + cluster_location = ClusterPathLocation(endpoint_id=endpoint_id, cluster_id=cluster_id) if cluster_id not in self.xml_clusters.keys(): if (cluster_id & 0xFFFF_0000) != 0: # manufacturer cluster continue - location = ClusterPathLocation(endpoint_id=endpoint_id, cluster_id=cluster_id) # TODO: update this from a warning once we have all the data - record_warning(location=location, problem='Standard cluster found on device, but is not present in spec data') + record_warning(location=cluster_location, problem='Standard cluster found on device, but is not present in spec data') continue + if not allow_provisional and cluster_id in provisional_cluster_ids: + record_error(location=cluster_location, problem='Provisional cluster found on device') + feature_map = cluster[GlobalAttributeIds.FEATURE_MAP_ID] attribute_list = cluster[GlobalAttributeIds.ATTRIBUTE_LIST_ID] all_command_list = cluster[GlobalAttributeIds.ACCEPTED_COMMAND_LIST_ID] + \ From e0ebd165555a08bb3f5e4c8c48b00d9d4459819c Mon Sep 17 00:00:00 2001 From: "Restyled.io" Date: Wed, 8 May 2024 13:35:39 +0000 Subject: [PATCH 2/9] Restyled by autopep8 --- src/python_testing/TC_DeviceConformance.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/python_testing/TC_DeviceConformance.py b/src/python_testing/TC_DeviceConformance.py index 6d9ab167c06963..464d836668ae4c 100644 --- a/src/python_testing/TC_DeviceConformance.py +++ b/src/python_testing/TC_DeviceConformance.py @@ -86,7 +86,8 @@ def record_warning(location, problem): # manufacturer cluster continue # TODO: update this from a warning once we have all the data - record_warning(location=cluster_location, problem='Standard cluster found on device, but is not present in spec data') + record_warning(location=cluster_location, + problem='Standard cluster found on device, but is not present in spec data') continue if not allow_provisional and cluster_id in provisional_cluster_ids: From ef448fb7d6ec9608137375b7a10abbfcd59fc08e Mon Sep 17 00:00:00 2001 From: cecille Date: Wed, 8 May 2024 10:10:30 -0400 Subject: [PATCH 3/9] Un-hard-code IDs --- src/python_testing/TC_DeviceConformance.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/python_testing/TC_DeviceConformance.py b/src/python_testing/TC_DeviceConformance.py index 464d836668ae4c..de34fb8fa41ea5 100644 --- a/src/python_testing/TC_DeviceConformance.py +++ b/src/python_testing/TC_DeviceConformance.py @@ -77,7 +77,7 @@ def record_warning(location, problem): success = True allow_provisional = self.user_params.get("allow_provisional", False) # TODO: automate this once https://github.com/csa-data-model/projects/issues/454 is done. - provisional_cluster_ids = [0x050F, 0x0062] + provisional_cluster_ids = [Clusters.ContentControl.id, Clusters.ScenesManagement.id] for endpoint_id, endpoint in self.endpoints_tlv.items(): for cluster_id, cluster in endpoint.items(): cluster_location = ClusterPathLocation(endpoint_id=endpoint_id, cluster_id=cluster_id) From abfb8f931501209534e880eaff32cf2ba4032b06 Mon Sep 17 00:00:00 2001 From: cecille Date: Wed, 8 May 2024 10:33:35 -0400 Subject: [PATCH 4/9] Add content control to the init file so we can use the ID --- src/controller/python/chip/clusters/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/controller/python/chip/clusters/__init__.py b/src/controller/python/chip/clusters/__init__.py index 85048384d8a81c..50506228dee3bd 100644 --- a/src/controller/python/chip/clusters/__init__.py +++ b/src/controller/python/chip/clusters/__init__.py @@ -26,7 +26,7 @@ from .Objects import (AccessControl, AccountLogin, Actions, ActivatedCarbonFilterMonitoring, AdministratorCommissioning, AirQuality, ApplicationBasic, ApplicationLauncher, AudioOutput, BallastConfiguration, BarrierControl, BasicInformation, BinaryInputBasic, Binding, BooleanState, BooleanStateConfiguration, BridgedDeviceBasicInformation, - CarbonDioxideConcentrationMeasurement, CarbonMonoxideConcentrationMeasurement, Channel, ColorControl, + CarbonDioxideConcentrationMeasurement, CarbonMonoxideConcentrationMeasurement, Channel, ColorControl, ContentControl, ContentLauncher, Descriptor, DeviceEnergyManagement, DeviceEnergyManagementMode, DiagnosticLogs, DishwasherAlarm, DishwasherMode, DoorLock, ElectricalEnergyMeasurement, ElectricalMeasurement, ElectricalPowerMeasurement, EnergyEvse, EnergyEvseMode, EthernetNetworkDiagnostics, FanControl, @@ -51,7 +51,7 @@ ApplicationBasic, ApplicationLauncher, AudioOutput, BallastConfiguration, BarrierControl, BasicInformation, BinaryInputBasic, Binding, BooleanState, BooleanStateConfiguration, BridgedDeviceBasicInformation, CarbonDioxideConcentrationMeasurement, CarbonMonoxideConcentrationMeasurement, Channel, - ColorControl, ContentLauncher, Descriptor, DeviceEnergyManagementMode, DeviceEnergyManagement, DiagnosticLogs, DishwasherAlarm, DishwasherMode, + ColorControl, ContentControl, ContentLauncher, Descriptor, DeviceEnergyManagementMode, DeviceEnergyManagement, DiagnosticLogs, DishwasherAlarm, DishwasherMode, DoorLock, ElectricalEnergyMeasurement, ElectricalMeasurement, ElectricalPowerMeasurement, EnergyEvse, EnergyEvseMode, EthernetNetworkDiagnostics, FanControl, FaultInjection, FixedLabel, FlowMeasurement, FormaldehydeConcentrationMeasurement, GeneralCommissioning, GeneralDiagnostics, GroupKeyManagement, Groups, From 62927b40973915bc099be681bc0386b543cd8de6 Mon Sep 17 00:00:00 2001 From: cecille Date: Wed, 8 May 2024 16:20:20 -0400 Subject: [PATCH 5/9] Add some more provisional clusters --- src/controller/python/chip/clusters/__init__.py | 6 +++--- src/python_testing/TC_DeviceConformance.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/controller/python/chip/clusters/__init__.py b/src/controller/python/chip/clusters/__init__.py index 50506228dee3bd..0acdfab125ba73 100644 --- a/src/controller/python/chip/clusters/__init__.py +++ b/src/controller/python/chip/clusters/__init__.py @@ -29,7 +29,7 @@ CarbonDioxideConcentrationMeasurement, CarbonMonoxideConcentrationMeasurement, Channel, ColorControl, ContentControl, ContentLauncher, Descriptor, DeviceEnergyManagement, DeviceEnergyManagementMode, DiagnosticLogs, DishwasherAlarm, DishwasherMode, DoorLock, ElectricalEnergyMeasurement, ElectricalMeasurement, - ElectricalPowerMeasurement, EnergyEvse, EnergyEvseMode, EthernetNetworkDiagnostics, FanControl, + ElectricalPowerMeasurement, EnergyEvse, EnergyEvseMode, EnergyPreference, EthernetNetworkDiagnostics, FanControl, FaultInjection, FixedLabel, FlowMeasurement, FormaldehydeConcentrationMeasurement, GeneralCommissioning, GeneralDiagnostics, GroupKeyManagement, Groups, HepaFilterMonitoring, IcdManagement, Identify, IlluminanceMeasurement, KeypadInput, LaundryDryerControls, LaundryWasherControls, LaundryWasherMode, @@ -51,8 +51,8 @@ ApplicationBasic, ApplicationLauncher, AudioOutput, BallastConfiguration, BarrierControl, BasicInformation, BinaryInputBasic, Binding, BooleanState, BooleanStateConfiguration, BridgedDeviceBasicInformation, CarbonDioxideConcentrationMeasurement, CarbonMonoxideConcentrationMeasurement, Channel, - ColorControl, ContentControl, ContentLauncher, Descriptor, DeviceEnergyManagementMode, DeviceEnergyManagement, DiagnosticLogs, DishwasherAlarm, DishwasherMode, - DoorLock, ElectricalEnergyMeasurement, ElectricalMeasurement, ElectricalPowerMeasurement, EnergyEvse, EnergyEvseMode, + ColorControl, ContentControl, ContentLauncher, Descriptor, DeviceEnergyManagementMode, DeviceEnergyManagement, DeviceEnergyManagementMode, DiagnosticLogs, DishwasherAlarm, DishwasherMode, + DoorLock, ElectricalEnergyMeasurement, ElectricalMeasurement, ElectricalPowerMeasurement, EnergyEvse, EnergyEvseMode, EnergyPreference, EthernetNetworkDiagnostics, FanControl, FaultInjection, FixedLabel, FlowMeasurement, FormaldehydeConcentrationMeasurement, GeneralCommissioning, GeneralDiagnostics, GroupKeyManagement, Groups, HepaFilterMonitoring, IcdManagement, Identify, IlluminanceMeasurement, KeypadInput, LaundryDryerControls, diff --git a/src/python_testing/TC_DeviceConformance.py b/src/python_testing/TC_DeviceConformance.py index de34fb8fa41ea5..29ae8a4cfcd9e8 100644 --- a/src/python_testing/TC_DeviceConformance.py +++ b/src/python_testing/TC_DeviceConformance.py @@ -77,7 +77,7 @@ def record_warning(location, problem): success = True allow_provisional = self.user_params.get("allow_provisional", False) # TODO: automate this once https://github.com/csa-data-model/projects/issues/454 is done. - provisional_cluster_ids = [Clusters.ContentControl.id, Clusters.ScenesManagement.id] + provisional_cluster_ids = [Clusters.ContentControl.id, Clusters.ScenesManagement.id, Clusters.BallastConfiguration.id, Clusters.EnergyPreference.id, Clusters.DeviceEnergyManagement.id, Clusters.DeviceEnergyManagementMode.id, Clusters.PulseWidthModulation.id] for endpoint_id, endpoint in self.endpoints_tlv.items(): for cluster_id, cluster in endpoint.items(): cluster_location = ClusterPathLocation(endpoint_id=endpoint_id, cluster_id=cluster_id) From ed0c6670504a82adbb77c4d27ce0628177092461 Mon Sep 17 00:00:00 2001 From: "Restyled.io" Date: Wed, 8 May 2024 20:38:42 +0000 Subject: [PATCH 6/9] Restyled by autopep8 --- src/python_testing/TC_DeviceConformance.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/python_testing/TC_DeviceConformance.py b/src/python_testing/TC_DeviceConformance.py index 29ae8a4cfcd9e8..6cf1437a0d6187 100644 --- a/src/python_testing/TC_DeviceConformance.py +++ b/src/python_testing/TC_DeviceConformance.py @@ -77,7 +77,8 @@ def record_warning(location, problem): success = True allow_provisional = self.user_params.get("allow_provisional", False) # TODO: automate this once https://github.com/csa-data-model/projects/issues/454 is done. - provisional_cluster_ids = [Clusters.ContentControl.id, Clusters.ScenesManagement.id, Clusters.BallastConfiguration.id, Clusters.EnergyPreference.id, Clusters.DeviceEnergyManagement.id, Clusters.DeviceEnergyManagementMode.id, Clusters.PulseWidthModulation.id] + provisional_cluster_ids = [Clusters.ContentControl.id, Clusters.ScenesManagement.id, Clusters.BallastConfiguration.id, + Clusters.EnergyPreference.id, Clusters.DeviceEnergyManagement.id, Clusters.DeviceEnergyManagementMode.id, Clusters.PulseWidthModulation.id] for endpoint_id, endpoint in self.endpoints_tlv.items(): for cluster_id, cluster in endpoint.items(): cluster_location = ClusterPathLocation(endpoint_id=endpoint_id, cluster_id=cluster_id) From 61afd50bf0862caf18275636bb88a8d0c127835b Mon Sep 17 00:00:00 2001 From: "Restyled.io" Date: Wed, 8 May 2024 20:38:43 +0000 Subject: [PATCH 7/9] Restyled by isort --- src/controller/python/chip/clusters/__init__.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/controller/python/chip/clusters/__init__.py b/src/controller/python/chip/clusters/__init__.py index 0acdfab125ba73..44d9910c670098 100644 --- a/src/controller/python/chip/clusters/__init__.py +++ b/src/controller/python/chip/clusters/__init__.py @@ -26,13 +26,13 @@ from .Objects import (AccessControl, AccountLogin, Actions, ActivatedCarbonFilterMonitoring, AdministratorCommissioning, AirQuality, ApplicationBasic, ApplicationLauncher, AudioOutput, BallastConfiguration, BarrierControl, BasicInformation, BinaryInputBasic, Binding, BooleanState, BooleanStateConfiguration, BridgedDeviceBasicInformation, - CarbonDioxideConcentrationMeasurement, CarbonMonoxideConcentrationMeasurement, Channel, ColorControl, ContentControl, - ContentLauncher, Descriptor, DeviceEnergyManagement, DeviceEnergyManagementMode, DiagnosticLogs, - DishwasherAlarm, DishwasherMode, DoorLock, ElectricalEnergyMeasurement, ElectricalMeasurement, - ElectricalPowerMeasurement, EnergyEvse, EnergyEvseMode, EnergyPreference, EthernetNetworkDiagnostics, FanControl, - FaultInjection, FixedLabel, FlowMeasurement, FormaldehydeConcentrationMeasurement, GeneralCommissioning, - GeneralDiagnostics, GroupKeyManagement, Groups, HepaFilterMonitoring, IcdManagement, Identify, - IlluminanceMeasurement, KeypadInput, LaundryDryerControls, LaundryWasherControls, LaundryWasherMode, + CarbonDioxideConcentrationMeasurement, CarbonMonoxideConcentrationMeasurement, Channel, ColorControl, + ContentControl, ContentLauncher, Descriptor, DeviceEnergyManagement, DeviceEnergyManagementMode, + DiagnosticLogs, DishwasherAlarm, DishwasherMode, DoorLock, ElectricalEnergyMeasurement, ElectricalMeasurement, + ElectricalPowerMeasurement, EnergyEvse, EnergyEvseMode, EnergyPreference, EthernetNetworkDiagnostics, + FanControl, FaultInjection, FixedLabel, FlowMeasurement, FormaldehydeConcentrationMeasurement, + GeneralCommissioning, GeneralDiagnostics, GroupKeyManagement, Groups, HepaFilterMonitoring, IcdManagement, + Identify, IlluminanceMeasurement, KeypadInput, LaundryDryerControls, LaundryWasherControls, LaundryWasherMode, LevelControl, LocalizationConfiguration, LowPower, MediaInput, MediaPlayback, MicrowaveOvenControl, MicrowaveOvenMode, ModeSelect, NetworkCommissioning, NitrogenDioxideConcentrationMeasurement, OccupancySensing, OnOff, OnOffSwitchConfiguration, OperationalCredentials, OperationalState, From ed14b0bdbfe804c4ebe8955441cf25d938ab29f4 Mon Sep 17 00:00:00 2001 From: cecille Date: Mon, 13 May 2024 17:37:36 -0400 Subject: [PATCH 8/9] Add in a couple more provisional from main spec --- src/python_testing/TC_DeviceConformance.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/python_testing/TC_DeviceConformance.py b/src/python_testing/TC_DeviceConformance.py index 6cf1437a0d6187..e56afd19b0288e 100644 --- a/src/python_testing/TC_DeviceConformance.py +++ b/src/python_testing/TC_DeviceConformance.py @@ -78,7 +78,8 @@ def record_warning(location, problem): allow_provisional = self.user_params.get("allow_provisional", False) # TODO: automate this once https://github.com/csa-data-model/projects/issues/454 is done. provisional_cluster_ids = [Clusters.ContentControl.id, Clusters.ScenesManagement.id, Clusters.BallastConfiguration.id, - Clusters.EnergyPreference.id, Clusters.DeviceEnergyManagement.id, Clusters.DeviceEnergyManagementMode.id, Clusters.PulseWidthModulation.id] + Clusters.EnergyPreference.id, Clusters.DeviceEnergyManagement.id, Clusters.DeviceEnergyManagementMode.id, Clusters.PulseWidthModulation.id + Clusters.ProxyConfiguration.id, Clusters.ProxyDiscovery.id, Clusters.ProxyValid.id] for endpoint_id, endpoint in self.endpoints_tlv.items(): for cluster_id, cluster in endpoint.items(): cluster_location = ClusterPathLocation(endpoint_id=endpoint_id, cluster_id=cluster_id) From 69ffe9fed277f52fdf419aaf6cd6428186c70419 Mon Sep 17 00:00:00 2001 From: cecille Date: Tue, 14 May 2024 10:22:09 -0400 Subject: [PATCH 9/9] it's nice to add ALL the changes before uploading --- src/python_testing/TC_DeviceConformance.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/python_testing/TC_DeviceConformance.py b/src/python_testing/TC_DeviceConformance.py index e56afd19b0288e..1db208fa39f40b 100644 --- a/src/python_testing/TC_DeviceConformance.py +++ b/src/python_testing/TC_DeviceConformance.py @@ -78,7 +78,7 @@ def record_warning(location, problem): allow_provisional = self.user_params.get("allow_provisional", False) # TODO: automate this once https://github.com/csa-data-model/projects/issues/454 is done. provisional_cluster_ids = [Clusters.ContentControl.id, Clusters.ScenesManagement.id, Clusters.BallastConfiguration.id, - Clusters.EnergyPreference.id, Clusters.DeviceEnergyManagement.id, Clusters.DeviceEnergyManagementMode.id, Clusters.PulseWidthModulation.id + Clusters.EnergyPreference.id, Clusters.DeviceEnergyManagement.id, Clusters.DeviceEnergyManagementMode.id, Clusters.PulseWidthModulation.id, Clusters.ProxyConfiguration.id, Clusters.ProxyDiscovery.id, Clusters.ProxyValid.id] for endpoint_id, endpoint in self.endpoints_tlv.items(): for cluster_id, cluster in endpoint.items():