Skip to content

Commit 50bcad1

Browse files
Cherry-pick provisional cluster check PRs to 1.3-SVE test harness branch. (#33885)
* TC-IDM-10.2: Add test for provisional clusters (#33361) * TC-IDM-10.2: Add test for provisional clusters * Restyled by autopep8 * Un-hard-code IDs * Add content control to the init file so we can use the ID * Add some more provisional clusters * Restyled by autopep8 * Restyled by isort * Add in a couple more provisional from main spec * it's nice to add ALL the changes before uploading --------- Co-authored-by: Restyled.io <commits@restyled.io> * TC-IDM-10.2: checks for non-spec clusters (#33695) * TC-IDM-10.2: checks for non-spec clusters There are a number of clusters that appear in the spec adoc but are ifdef'd. These were not caught by the original provisional cluster checks. The following do not appear in the codegen and will therefore be caught in the IDM-10.1 test if they appear in cert (check that all clusters in the standard range have known IDs). These are therefore not included in the specific check. 0x0094 Water Heater Management 0x0095 Energy Price 0x009A Energy Calendar 0x009E Water Heater Mode 0x0450 Network Identity Management The following DOES appear in the 1.3-SVE codegen and are therefore checked explicitly: 0x0096 Demand Response and Load Control The following appears in the master codegen, but is not included in the 1.3-sve branch and will therefore fail the 10.1 test: 0x0451 WiFi Network Management There are also some completely non-spec clusters that appear in the codegen, but not in the spec at all. They appear to be zigbee only clusters. These are added to the new checks: 0x0007 On/off Switch Configuration 0x000F Binary Input (Basic) 0x0103 Barrier Control 0x0B04 Electrical Measurement In all cases, inclusion of these clusters on a device at cert SHOULD cause a failure in the PICS checker test as there is no way to specify these clusters in the PICS, but a definite check here is also beneficial. * Restyled by autopep8 * Restyled by isort * missed removing wifi in the test itself --------- Co-authored-by: Restyled.io <commits@restyled.io> --------- Co-authored-by: Restyled.io <commits@restyled.io>
1 parent fb2c0e5 commit 50bcad1

File tree

2 files changed

+38
-21
lines changed

2 files changed

+38
-21
lines changed

src/controller/python/chip/clusters/__init__.py

+20-19
Original file line numberDiff line numberDiff line change
@@ -27,32 +27,33 @@
2727
ApplicationBasic, ApplicationLauncher, AudioOutput, BallastConfiguration, BarrierControl, BasicInformation,
2828
BinaryInputBasic, Binding, BooleanState, BooleanStateConfiguration, BridgedDeviceBasicInformation,
2929
CarbonDioxideConcentrationMeasurement, CarbonMonoxideConcentrationMeasurement, Channel, ColorControl,
30-
ContentLauncher, Descriptor, DeviceEnergyManagement, DeviceEnergyManagementMode, DiagnosticLogs,
31-
DishwasherAlarm, DishwasherMode, DoorLock, ElectricalEnergyMeasurement, ElectricalMeasurement,
32-
ElectricalPowerMeasurement, EnergyEvse, EnergyEvseMode, EthernetNetworkDiagnostics, FanControl,
33-
FaultInjection, FixedLabel, FlowMeasurement, FormaldehydeConcentrationMeasurement, GeneralCommissioning,
34-
GeneralDiagnostics, GroupKeyManagement, Groups, HepaFilterMonitoring, IcdManagement, Identify,
35-
IlluminanceMeasurement, KeypadInput, LaundryDryerControls, LaundryWasherControls, LaundryWasherMode,
36-
LevelControl, LocalizationConfiguration, LowPower, MediaInput, MediaPlayback, MicrowaveOvenControl,
37-
MicrowaveOvenMode, ModeSelect, NetworkCommissioning, NitrogenDioxideConcentrationMeasurement,
38-
OccupancySensing, OnOff, OnOffSwitchConfiguration, OperationalCredentials, OperationalState,
39-
OtaSoftwareUpdateProvider, OtaSoftwareUpdateRequestor, OvenCavityOperationalState, OvenMode,
40-
OzoneConcentrationMeasurement, Pm1ConcentrationMeasurement, Pm10ConcentrationMeasurement,
41-
Pm25ConcentrationMeasurement, PowerSource, PowerSourceConfiguration, PowerTopology, PressureMeasurement,
42-
ProxyConfiguration, ProxyDiscovery, ProxyValid, PulseWidthModulation, PumpConfigurationAndControl,
43-
RadonConcentrationMeasurement, RefrigeratorAlarm, RefrigeratorAndTemperatureControlledCabinetMode,
44-
RelativeHumidityMeasurement, RvcCleanMode, RvcOperationalState, RvcRunMode, ScenesManagement, SmokeCoAlarm,
45-
SoftwareDiagnostics, Switch, TargetNavigator, TemperatureControl, TemperatureMeasurement, Thermostat,
46-
ThermostatUserInterfaceConfiguration, ThreadNetworkDiagnostics, TimeFormatLocalization, TimeSynchronization,
30+
ContentControl, ContentLauncher, DemandResponseLoadControl, Descriptor, DeviceEnergyManagement,
31+
DeviceEnergyManagementMode, DiagnosticLogs, DishwasherAlarm, DishwasherMode, DoorLock,
32+
ElectricalEnergyMeasurement, ElectricalMeasurement, ElectricalPowerMeasurement, EnergyEvse, EnergyEvseMode,
33+
EnergyPreference, EthernetNetworkDiagnostics, FanControl, FaultInjection, FixedLabel, FlowMeasurement,
34+
FormaldehydeConcentrationMeasurement, GeneralCommissioning, GeneralDiagnostics, GroupKeyManagement, Groups,
35+
HepaFilterMonitoring, IcdManagement, Identify, IlluminanceMeasurement, KeypadInput, LaundryDryerControls,
36+
LaundryWasherControls, LaundryWasherMode, LevelControl, LocalizationConfiguration, LowPower, MediaInput,
37+
MediaPlayback, MicrowaveOvenControl, MicrowaveOvenMode, ModeSelect, NetworkCommissioning,
38+
NitrogenDioxideConcentrationMeasurement, OccupancySensing, OnOff, OnOffSwitchConfiguration,
39+
OperationalCredentials, OperationalState, OtaSoftwareUpdateProvider, OtaSoftwareUpdateRequestor,
40+
OvenCavityOperationalState, OvenMode, OzoneConcentrationMeasurement, Pm1ConcentrationMeasurement,
41+
Pm10ConcentrationMeasurement, Pm25ConcentrationMeasurement, PowerSource, PowerSourceConfiguration,
42+
PowerTopology, PressureMeasurement, ProxyConfiguration, ProxyDiscovery, ProxyValid, PulseWidthModulation,
43+
PumpConfigurationAndControl, RadonConcentrationMeasurement, RefrigeratorAlarm,
44+
RefrigeratorAndTemperatureControlledCabinetMode, RelativeHumidityMeasurement, RvcCleanMode,
45+
RvcOperationalState, RvcRunMode, ScenesManagement, SmokeCoAlarm, SoftwareDiagnostics, Switch, TargetNavigator,
46+
TemperatureControl, TemperatureMeasurement, Thermostat, ThermostatUserInterfaceConfiguration,
47+
ThreadNetworkDiagnostics, TimeFormatLocalization, TimeSynchronization,
4748
TotalVolatileOrganicCompoundsConcentrationMeasurement, UnitLocalization, UnitTesting, UserLabel,
4849
ValveConfigurationAndControl, WakeOnLan, WiFiNetworkDiagnostics, WindowCovering)
4950

5051
__all__ = [Attribute, CHIPClusters, Command, AccessControl, AccountLogin, Actions, ActivatedCarbonFilterMonitoring, AdministratorCommissioning, AirQuality,
5152
ApplicationBasic, ApplicationLauncher, AudioOutput, BallastConfiguration, BarrierControl, BasicInformation,
5253
BinaryInputBasic, Binding, BooleanState, BooleanStateConfiguration, BridgedDeviceBasicInformation, CarbonDioxideConcentrationMeasurement,
5354
CarbonMonoxideConcentrationMeasurement, Channel,
54-
ColorControl, ContentLauncher, Descriptor, DeviceEnergyManagementMode, DeviceEnergyManagement, DiagnosticLogs, DishwasherAlarm, DishwasherMode,
55-
DoorLock, ElectricalEnergyMeasurement, ElectricalMeasurement, ElectricalPowerMeasurement, EnergyEvse, EnergyEvseMode,
55+
ColorControl, ContentControl, ContentLauncher, DemandResponseLoadControl, Descriptor, DeviceEnergyManagementMode, DeviceEnergyManagement, DeviceEnergyManagementMode, DiagnosticLogs, DishwasherAlarm, DishwasherMode,
56+
DoorLock, ElectricalEnergyMeasurement, ElectricalMeasurement, ElectricalPowerMeasurement, EnergyEvse, EnergyEvseMode, EnergyPreference,
5657
EthernetNetworkDiagnostics, FanControl, FaultInjection, FixedLabel, FlowMeasurement,
5758
FormaldehydeConcentrationMeasurement, GeneralCommissioning, GeneralDiagnostics, GroupKeyManagement, Groups,
5859
HepaFilterMonitoring, IcdManagement, Identify, IlluminanceMeasurement, KeypadInput, LaundryDryerControls,

src/python_testing/TC_DeviceConformance.py

+18-2
Original file line numberDiff line numberDiff line change
@@ -76,15 +76,31 @@ def record_warning(location, problem):
7676

7777
success = True
7878
allow_provisional = self.user_params.get("allow_provisional", False)
79+
# TODO: automate this once https://github.com/csa-data-model/projects/issues/454 is done.
80+
provisional_cluster_ids = [Clusters.ContentControl.id, Clusters.ScenesManagement.id, Clusters.BallastConfiguration.id,
81+
Clusters.EnergyPreference.id, Clusters.DeviceEnergyManagement.id, Clusters.DeviceEnergyManagementMode.id, Clusters.PulseWidthModulation.id,
82+
Clusters.ProxyConfiguration.id, Clusters.ProxyDiscovery.id, Clusters.ProxyValid.id]
83+
# TODO: Remove this once the latest 1.3 lands with the clusters removed from the DM XML and change the warning below about missing DM XMLs into a proper error
84+
# These are clusters that weren't part of the 1.3 spec that landed in the SDK before the branch cut
85+
provisional_cluster_ids.extend([Clusters.DemandResponseLoadControl.id])
86+
# These clusters are zigbee only. I don't even know why they're part of the codegen, but we should get rid of them.
87+
provisional_cluster_ids.extend([Clusters.BarrierControl.id, Clusters.OnOffSwitchConfiguration.id,
88+
Clusters.BinaryInputBasic.id, Clusters.ElectricalMeasurement.id])
7989
for endpoint_id, endpoint in self.endpoints_tlv.items():
8090
for cluster_id, cluster in endpoint.items():
91+
cluster_location = ClusterPathLocation(endpoint_id=endpoint_id, cluster_id=cluster_id)
92+
93+
if not allow_provisional and cluster_id in provisional_cluster_ids:
94+
record_error(location=cluster_location, problem='Provisional cluster found on device')
95+
continue
96+
8197
if cluster_id not in self.xml_clusters.keys():
8298
if (cluster_id & 0xFFFF_0000) != 0:
8399
# manufacturer cluster
84100
continue
85-
location = ClusterPathLocation(endpoint_id=endpoint_id, cluster_id=cluster_id)
86101
# TODO: update this from a warning once we have all the data
87-
record_warning(location=location, problem='Standard cluster found on device, but is not present in spec data')
102+
record_warning(location=cluster_location,
103+
problem='Standard cluster found on device, but is not present in spec data')
88104
continue
89105

90106
feature_map = cluster[GlobalAttributeIds.FEATURE_MAP_ID]

0 commit comments

Comments
 (0)