Skip to content

Commit 793bb97

Browse files
authored
Merge branch 'master' into bugfix/door_lock_xml_sync_with_specs
2 parents 46810a7 + 046fd51 commit 793bb97

File tree

3 files changed

+34
-25
lines changed

3 files changed

+34
-25
lines changed

scripts/tools/nrfconnect/generate_nrfconnect_chip_factory_data.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ def _generate_onboarding_data(self):
433433

434434

435435
def main():
436-
parser = argparse.ArgumentParser(description="NrfConnect Factory Data NVS generator tool")
436+
parser = argparse.ArgumentParser(description="nRF Connect Factory Data generator tool")
437437

438438
def allow_any_int(i): return int(i, 0)
439439
def base64_str(s): return base64.b64decode(s)
@@ -564,20 +564,20 @@ def base64_str(s): return base64.b64decode(s)
564564
if (exists(args.output + ".json") and not args.overwrite):
565565
log.error(("Output file: {} already exist, to create a new one add argument '--overwrite'. "
566566
"By default overwriting is disabled").format(args.output+".json"))
567-
return
567+
sys.exit(1)
568568

569569
if args.schema and no_jsonschema_module:
570570
log.error(("Requested verification of the JSON file using jsonschema, but the module is not installed. \n"
571571
"Install only the module by invoking: pip3 install jsonschema \n"
572572
"Alternatively, install it with all dependencies for Matter by invoking: pip3 install "
573573
"-r ./scripts/setup/requirements.nrfconnect.txt from the Matter root directory."))
574-
return
574+
sys.exit(1)
575575

576576
if args.generate_onboarding and no_onboarding_modules:
577577
log.error(("Requested generation of onboarding codes, but the some modules are not installed. \n"
578578
"Install all dependencies for Matter by invoking: pip3 install "
579579
"-r ./scripts/setup/requirements.nrfconnect.txt from the Matter root directory."))
580-
return
580+
sys.exit(1)
581581

582582
generator = FactoryDataGenerator(args)
583583
generator.generate_json()

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

+19-18
Original file line numberDiff line numberDiff line change
@@ -27,31 +27,32 @@
2727
ApplicationBasic, ApplicationLauncher, AudioOutput, BallastConfiguration, BarrierControl, BasicInformation,
2828
BinaryInputBasic, Binding, BooleanState, BooleanStateConfiguration, BridgedDeviceBasicInformation,
2929
CarbonDioxideConcentrationMeasurement, CarbonMonoxideConcentrationMeasurement, Channel, ColorControl,
30-
ContentControl, ContentLauncher, Descriptor, DeviceEnergyManagement, DeviceEnergyManagementMode,
31-
DiagnosticLogs, DishwasherAlarm, DishwasherMode, DoorLock, ElectricalEnergyMeasurement, ElectricalMeasurement,
32-
ElectricalPowerMeasurement, EnergyEvse, EnergyEvseMode, EnergyPreference, EthernetNetworkDiagnostics,
33-
FanControl, FaultInjection, FixedLabel, FlowMeasurement, FormaldehydeConcentrationMeasurement,
34-
GeneralCommissioning, GeneralDiagnostics, GroupKeyManagement, Groups, HepaFilterMonitoring, IcdManagement,
35-
Identify, 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, ContentControl, ContentLauncher, Descriptor, DeviceEnergyManagementMode, DeviceEnergyManagement, DeviceEnergyManagementMode, DiagnosticLogs, DishwasherAlarm, DishwasherMode,
55+
ColorControl, ContentControl, ContentLauncher, DemandResponseLoadControl, Descriptor, DeviceEnergyManagementMode, DeviceEnergyManagement, DeviceEnergyManagementMode, DiagnosticLogs, DishwasherAlarm, DishwasherMode,
5556
DoorLock, ElectricalEnergyMeasurement, ElectricalMeasurement, ElectricalPowerMeasurement, EnergyEvse, EnergyEvseMode, EnergyPreference,
5657
EthernetNetworkDiagnostics, FanControl, FaultInjection, FixedLabel, FlowMeasurement,
5758
FormaldehydeConcentrationMeasurement, GeneralCommissioning, GeneralDiagnostics, GroupKeyManagement, Groups,

src/python_testing/TC_DeviceConformance.py

+11-3
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,20 @@ def record_warning(location, problem):
8080
provisional_cluster_ids = [Clusters.ContentControl.id, Clusters.ScenesManagement.id, Clusters.BallastConfiguration.id,
8181
Clusters.EnergyPreference.id, Clusters.DeviceEnergyManagement.id, Clusters.DeviceEnergyManagementMode.id, Clusters.PulseWidthModulation.id,
8282
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])
8389
for endpoint_id, endpoint in self.endpoints_tlv.items():
8490
for cluster_id, cluster in endpoint.items():
8591
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+
8697
if cluster_id not in self.xml_clusters.keys():
8798
if (cluster_id & 0xFFFF_0000) != 0:
8899
# manufacturer cluster
@@ -92,9 +103,6 @@ def record_warning(location, problem):
92103
problem='Standard cluster found on device, but is not present in spec data')
93104
continue
94105

95-
if not allow_provisional and cluster_id in provisional_cluster_ids:
96-
record_error(location=cluster_location, problem='Provisional cluster found on device')
97-
98106
feature_map = cluster[GlobalAttributeIds.FEATURE_MAP_ID]
99107
attribute_list = cluster[GlobalAttributeIds.ATTRIBUTE_LIST_ID]
100108
all_command_list = cluster[GlobalAttributeIds.ACCEPTED_COMMAND_LIST_ID] + \

0 commit comments

Comments
 (0)