Skip to content

Commit

Permalink
Merge branch 'project-chip:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
nekleo authored Mar 23, 2023
2 parents e07529b + a4a407b commit ba31e34
Show file tree
Hide file tree
Showing 71 changed files with 13,373 additions and 1,899 deletions.
72 changes: 72 additions & 0 deletions .github/workflows/smoketest-darwin.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# Copyright (c) 2023 Project CHIP Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: Smoke Test - Darwin

on:
push:
pull_request:
merge_group:
workflow_dispatch:

concurrency:
group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }}
cancel-in-progress: true

jobs:
darwin:
name: Smoke Run - Darwin
timeout-minutes: 60

if: github.actor != 'restyled-io[bot]'
runs-on: macos-latest

steps:
- uses: Wandalen/[email protected]
name: Checkout
with:
action: actions/checkout@v3
with: |
token: ${{ github.token }}
attempt_limit: 3
attempt_delay: 2000
- name: Checkout submodules
run: scripts/checkout_submodules.py --shallow --platform darwin
- name: Setup Environment
run: brew install [email protected]

- name: Bootstrap cache
uses: actions/cache@v3
timeout-minutes: 10
with:
key: ${{ runner.os }}-env-${{ hashFiles('scripts/setup/*', 'third_party/pigweed/**') }}
path: |
.environment
build_overrides/pigweed_environment.gni
- name: Bootstrap
timeout-minutes: 25
run: scripts/build/gn_bootstrap.sh
- name: Uploading bootstrap logs
uses: actions/upload-artifact@v3
if: ${{ always() && !env.ACT }}
with:
name: bootstrap-logs
path: |
.environment/gn_out/.ninja_log
.environment/pigweed-venv/*.log
- name: Build Matter TV Casting Bridge
timeout-minutes: 20
run: |
xcodebuild -target "MatterTvCastingBridge" -sdk iphoneos
working-directory: examples/tv-casting-app/darwin/MatterTvCastingBridge
17 changes: 8 additions & 9 deletions config/nrfconnect/chip-module/generate_factory_data.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,19 @@ endif()

# for development purpose user can use default certs instead of generating or providing them
if(CONFIG_CHIP_FACTORY_DATA_USE_DEFAULT_CERTS)
# convert decimal VID to its hexadecimal representation to find out certification files in repository
math(EXPR LOCAL_VID "${CONFIG_CHIP_DEVICE_VENDOR_ID}" OUTPUT_FORMAT HEXADECIMAL)
string(SUBSTRING ${LOCAL_VID} 2 -1 raw_vid)
string(TOUPPER ${raw_vid} raw_vid_upper)
# convert decimal PID to its hexadecimal representation to find out certification files in repository
math(EXPR LOCAL_PID "${CONFIG_CHIP_DEVICE_PRODUCT_ID}" OUTPUT_FORMAT HEXADECIMAL)
string(SUBSTRING ${LOCAL_PID} 2 -1 raw_pid)
string(TOUPPER ${raw_pid} raw_pid_upper)
# all certs are located in ${CHIP_ROOT}/credentials/development/attestation
# it can be used during development without need to generate new certifications
string(APPEND script_args "--dac_cert \"${CHIP_ROOT}/credentials/development/attestation/Matter-Development-DAC-${raw_pid_upper}-Cert.der\"\n")
string(APPEND script_args "--dac_key \"${CHIP_ROOT}/credentials/development/attestation/Matter-Development-DAC-${raw_pid_upper}-Key.der\"\n")
string(APPEND script_args "--pai_cert \"${CHIP_ROOT}/credentials/development/attestation/Matter-Development-PAI-noPID-Cert.der\"\n")
string(APPEND script_args "--dac_cert \"${CHIP_ROOT}/credentials/development/attestation/Matter-Development-DAC-${raw_vid_upper}-${raw_pid_upper}-Cert.der\"\n")
string(APPEND script_args "--dac_key \"${CHIP_ROOT}/credentials/development/attestation/Matter-Development-DAC-${raw_vid_upper}-${raw_pid_upper}-Key.der\"\n")
string(APPEND script_args "--pai_cert \"${CHIP_ROOT}/credentials/development/attestation/Matter-Development-PAI-${raw_vid_upper}-noPID-Cert.der\"\n")
elseif(CONFIG_CHIP_FACTORY_DATA_CERT_SOURCE_USER)
string(APPEND script_args "--dac_cert \"${CONFIG_CHIP_FACTORY_DATA_USER_CERTS_DAC_CERT}\"\n")
string(APPEND script_args "--dac_key \"${CONFIG_CHIP_FACTORY_DATA_USER_CERTS_DAC_KEY}\"\n")
Expand All @@ -88,12 +92,7 @@ string(APPEND script_args "--include_passcode\n")
string(APPEND script_args "--overwrite\n")

# check if spake2 verifier should be generated using script
if(CONFIG_CHIP_FACTORY_DATA_GENERATE_SPAKE2_VERIFIER)
# request script to generate a new spake2_verifier
# by adding an argument to script_args
find_program(spake_exe NAMES spake2p REQUIRED)
string(APPEND script_args "--spake2p_path ${spake_exe}\n")
else()
if(NOT CONFIG_CHIP_FACTORY_DATA_GENERATE_SPAKE2_VERIFIER)
# Spake2 verifier should be provided using kConfig
string(APPEND script_args "--spake2_verifier \"${CONFIG_CHIP_DEVICE_SPAKE2_TEST_VERIFIER}\"\n")
endif()
Expand Down
6 changes: 3 additions & 3 deletions docs/guides/nrfconnect_factory_data_configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -304,9 +304,9 @@ $ python scripts/tools/nrfconnect/generate_nrfconnect_chip_factory_data.py \
--date "2022-02-02" \
--hw_ver 1 \
--hw_ver_str "prerelase" \
--dac_cert "credentials/development/attestation/Matter-Development-DAC-8006-Cert.der" \
--dac_key "credentials/development/attestation/Matter-Development-DAC-8006-Key.der" \
--pai_cert "credentials/development/attestation/Matter-Development-PAI-noPID-Cert.der" \
--dac_cert "credentials/development/attestation/Matter-Development-DAC-FFF1-8006-Cert.der" \
--dac_key "credentials/development/attestation/Matter-Development-DAC-FFF1-8006-Key.der" \
--pai_cert "credentials/development/attestation/Matter-Development-PAI-FFF1-noPID-Cert.der" \
--spake2_it 1000 \
--spake2_salt "U1BBS0UyUCBLZXkgU2FsdA==" \
--discriminator 0xF00 \
Expand Down
14 changes: 8 additions & 6 deletions examples/all-clusters-app/linux/AllClustersCommandDelegate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -182,14 +182,16 @@ void AllClustersAppCommandHandler::OnGeneralFaultEventHandler(uint32_t eventId)
GeneralFaults<kMaxHardwareFaults> current;

#if CHIP_CONFIG_TEST
using GeneralDiagnostics::HardwareFaultEnum;

// On Linux Simulation, set following hardware faults statically.
ReturnOnFailure(previous.add(EMBER_ZCL_HARDWARE_FAULT_ENUM_RADIO));
ReturnOnFailure(previous.add(EMBER_ZCL_HARDWARE_FAULT_ENUM_POWER_SOURCE));
ReturnOnFailure(previous.add(to_underlying(HardwareFaultEnum::kRadio)));
ReturnOnFailure(previous.add(to_underlying(HardwareFaultEnum::kPowerSource)));

ReturnOnFailure(current.add(EMBER_ZCL_HARDWARE_FAULT_ENUM_RADIO));
ReturnOnFailure(current.add(EMBER_ZCL_HARDWARE_FAULT_ENUM_SENSOR));
ReturnOnFailure(current.add(EMBER_ZCL_HARDWARE_FAULT_ENUM_POWER_SOURCE));
ReturnOnFailure(current.add(EMBER_ZCL_HARDWARE_FAULT_ENUM_USER_INTERFACE_FAULT));
ReturnOnFailure(current.add(to_underlying(HardwareFaultEnum::kRadio)));
ReturnOnFailure(current.add(to_underlying(HardwareFaultEnum::kSensor)));
ReturnOnFailure(current.add(to_underlying(HardwareFaultEnum::kPowerSource)));
ReturnOnFailure(current.add(to_underlying(HardwareFaultEnum::kUserInterfaceFault)));
#endif
Clusters::GeneralDiagnosticsServer::Instance().OnHardwareFaultsDetect(previous, current);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ class BasicClientFragment : Fragment() {
}

private suspend fun sendReadVendorIDAttribute() {
getBasicClusterForDevice().readVendorIDAttribute(object : ChipClusters.BasicInformationCluster.VendorIDAttributeCallback {
getBasicClusterForDevice().readVendorIDAttribute(object : ChipClusters.IntegerAttributeCallback {
override fun onSuccess(value: Int) {
Log.i(TAG,"[Read Success] VendorID: $value")
showMessage("[Read Success] VendorID: $value")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1398,6 +1398,15 @@ client cluster OccupancySensing = 1030 {
readonly attribute OccupancyBitmap occupancy = 0;
readonly attribute OccupancySensorTypeEnum occupancySensorType = 1;
readonly attribute OccupancySensorTypeBitmap occupancySensorTypeBitmap = 2;
attribute access(write: manage) int16u PIROccupiedToUnoccupiedDelay = 16;
attribute access(write: manage) int16u PIRUnoccupiedToOccupiedDelay = 17;
attribute access(write: manage) int8u PIRUnoccupiedToOccupiedThreshold = 18;
attribute access(write: manage) int16u ultrasonicOccupiedToUnoccupiedDelay = 32;
attribute access(write: manage) int16u ultrasonicUnoccupiedToOccupiedDelay = 33;
attribute access(write: manage) int8u ultrasonicUnoccupiedToOccupiedThreshold = 34;
attribute access(write: manage) int16u physicalContactOccupiedToUnoccupiedDelay = 48;
attribute access(write: manage) int16u physicalContactUnoccupiedToOccupiedDelay = 49;
attribute access(write: manage) int8u physicalContactUnoccupiedToOccupiedThreshold = 50;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1264,6 +1264,15 @@ client cluster OccupancySensing = 1030 {
readonly attribute OccupancyBitmap occupancy = 0;
readonly attribute OccupancySensorTypeEnum occupancySensorType = 1;
readonly attribute OccupancySensorTypeBitmap occupancySensorTypeBitmap = 2;
attribute access(write: manage) int16u PIROccupiedToUnoccupiedDelay = 16;
attribute access(write: manage) int16u PIRUnoccupiedToOccupiedDelay = 17;
attribute access(write: manage) int8u PIRUnoccupiedToOccupiedThreshold = 18;
attribute access(write: manage) int16u ultrasonicOccupiedToUnoccupiedDelay = 32;
attribute access(write: manage) int16u ultrasonicUnoccupiedToOccupiedDelay = 33;
attribute access(write: manage) int8u ultrasonicUnoccupiedToOccupiedThreshold = 34;
attribute access(write: manage) int16u physicalContactOccupiedToUnoccupiedDelay = 48;
attribute access(write: manage) int16u physicalContactUnoccupiedToOccupiedDelay = 49;
attribute access(write: manage) int8u physicalContactUnoccupiedToOccupiedThreshold = 50;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1296,10 +1296,54 @@ client cluster Thermostat = 513 {
}

readonly attribute nullable int16s localTemperature = 0;
readonly attribute nullable int16s outdoorTemperature = 1;
readonly attribute bitmap8 occupancy = 2;
readonly attribute int16s absMinHeatSetpointLimit = 3;
readonly attribute int16s absMaxHeatSetpointLimit = 4;
readonly attribute int16s absMinCoolSetpointLimit = 5;
readonly attribute int16s absMaxCoolSetpointLimit = 6;
readonly attribute int8u PICoolingDemand = 7;
readonly attribute int8u PIHeatingDemand = 8;
attribute access(write: manage) bitmap8 HVACSystemTypeConfiguration = 9;
attribute access(write: manage) int8s localTemperatureCalibration = 16;
attribute int16s occupiedCoolingSetpoint = 17;
attribute int16s occupiedHeatingSetpoint = 18;
attribute int16s unoccupiedCoolingSetpoint = 19;
attribute int16s unoccupiedHeatingSetpoint = 20;
attribute access(write: manage) int16s minHeatSetpointLimit = 21;
attribute access(write: manage) int16s maxHeatSetpointLimit = 22;
attribute access(write: manage) int16s minCoolSetpointLimit = 23;
attribute access(write: manage) int16s maxCoolSetpointLimit = 24;
attribute access(write: manage) int8s minSetpointDeadBand = 25;
attribute access(write: manage) bitmap8 remoteSensing = 26;
attribute access(write: manage) ThermostatControlSequence controlSequenceOfOperation = 27;
attribute access(write: manage) enum8 systemMode = 28;
readonly attribute enum8 thermostatRunningMode = 30;
readonly attribute enum8 startOfWeek = 32;
readonly attribute int8u numberOfWeeklyTransitions = 33;
readonly attribute int8u numberOfDailyTransitions = 34;
attribute access(write: manage) enum8 temperatureSetpointHold = 35;
attribute access(write: manage) nullable int16u temperatureSetpointHoldDuration = 36;
attribute access(write: manage) bitmap8 thermostatProgrammingOperationMode = 37;
readonly attribute bitmap16 thermostatRunningState = 41;
readonly attribute enum8 setpointChangeSource = 48;
readonly attribute nullable int16s setpointChangeAmount = 49;
readonly attribute epoch_s setpointChangeSourceTimestamp = 50;
attribute access(write: manage) nullable int8u occupiedSetback = 52;
readonly attribute nullable int8u occupiedSetbackMin = 53;
readonly attribute nullable int8u occupiedSetbackMax = 54;
attribute access(write: manage) nullable int8u unoccupiedSetback = 55;
readonly attribute nullable int8u unoccupiedSetbackMin = 56;
readonly attribute nullable int8u unoccupiedSetbackMax = 57;
attribute access(write: manage) int8u emergencyHeatDelta = 58;
attribute access(write: manage) enum8 ACType = 64;
attribute access(write: manage) int16u ACCapacity = 65;
attribute access(write: manage) enum8 ACRefrigerantType = 66;
attribute access(write: manage) enum8 ACCompressorType = 67;
attribute access(write: manage) bitmap32 ACErrorCode = 68;
attribute access(write: manage) enum8 ACLouverPosition = 69;
readonly attribute nullable int16s ACCoilTemperature = 70;
attribute access(write: manage) enum8 ACCapacityformat = 71;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,10 @@ client cluster OnOff = 6 {
}

readonly attribute boolean onOff = 0;
readonly attribute boolean globalSceneControl = 16384;
attribute int16u onTime = 16385;
attribute int16u offWaitTime = 16386;
attribute access(write: manage) nullable OnOffStartUpOnOff startUpOnOff = 16387;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
Expand Down
31 changes: 31 additions & 0 deletions examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter
Original file line number Diff line number Diff line change
Expand Up @@ -1240,6 +1240,17 @@ client cluster FanControl = 514 {
kNaturalWind = 0x2;
}

attribute FanModeType fanMode = 0;
attribute FanModeSequenceType fanModeSequence = 1;
attribute nullable int8u percentSetting = 2;
readonly attribute int8u percentCurrent = 3;
readonly attribute int8u speedMax = 4;
attribute nullable int8u speedSetting = 5;
readonly attribute int8u speedCurrent = 6;
readonly attribute bitmap8 rockSupport = 7;
attribute bitmap8 rockSetting = 8;
readonly attribute bitmap8 windSupport = 9;
attribute bitmap8 windSetting = 10;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
Expand All @@ -1260,6 +1271,10 @@ server cluster ThermostatUserInterfaceConfiguration = 516 {
}

client cluster TemperatureMeasurement = 1026 {
readonly attribute nullable int16s measuredValue = 0;
readonly attribute nullable int16s minMeasuredValue = 1;
readonly attribute nullable int16s maxMeasuredValue = 2;
readonly attribute int16u tolerance = 3;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
Expand All @@ -1269,6 +1284,10 @@ client cluster TemperatureMeasurement = 1026 {
}

client cluster RelativeHumidityMeasurement = 1029 {
readonly attribute nullable int16u measuredValue = 0;
readonly attribute nullable int16u minMeasuredValue = 1;
readonly attribute nullable int16u maxMeasuredValue = 2;
readonly attribute int16u tolerance = 3;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
Expand All @@ -1295,6 +1314,18 @@ client cluster OccupancySensing = 1030 {
kPhysicalContact = 0x4;
}

readonly attribute OccupancyBitmap occupancy = 0;
readonly attribute OccupancySensorTypeEnum occupancySensorType = 1;
readonly attribute OccupancySensorTypeBitmap occupancySensorTypeBitmap = 2;
attribute access(write: manage) int16u PIROccupiedToUnoccupiedDelay = 16;
attribute access(write: manage) int16u PIRUnoccupiedToOccupiedDelay = 17;
attribute access(write: manage) int8u PIRUnoccupiedToOccupiedThreshold = 18;
attribute access(write: manage) int16u ultrasonicOccupiedToUnoccupiedDelay = 32;
attribute access(write: manage) int16u ultrasonicUnoccupiedToOccupiedDelay = 33;
attribute access(write: manage) int8u ultrasonicUnoccupiedToOccupiedThreshold = 34;
attribute access(write: manage) int16u physicalContactOccupiedToUnoccupiedDelay = 48;
attribute access(write: manage) int16u physicalContactUnoccupiedToOccupiedDelay = 49;
attribute access(write: manage) int8u physicalContactUnoccupiedToOccupiedThreshold = 50;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ client cluster Scenes = 5 {
readonly attribute group_id currentGroup = 2;
readonly attribute boolean sceneValid = 3;
readonly attribute bitmap8 nameSupport = 4;
readonly attribute nullable node_id lastConfiguredBy = 5;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
Expand Down Expand Up @@ -1668,10 +1669,41 @@ client cluster ColorControl = 768 {
readonly attribute int16u remainingTime = 2;
readonly attribute int16u currentX = 3;
readonly attribute int16u currentY = 4;
readonly attribute enum8 driftCompensation = 5;
readonly attribute char_string<254> compensationText = 6;
readonly attribute int16u colorTemperatureMireds = 7;
readonly attribute enum8 colorMode = 8;
attribute bitmap8 options = 15;
readonly attribute nullable int8u numberOfPrimaries = 16;
readonly attribute int16u primary1X = 17;
readonly attribute int16u primary1Y = 18;
readonly attribute nullable int8u primary1Intensity = 19;
readonly attribute int16u primary2X = 21;
readonly attribute int16u primary2Y = 22;
readonly attribute nullable int8u primary2Intensity = 23;
readonly attribute int16u primary3X = 25;
readonly attribute int16u primary3Y = 26;
readonly attribute nullable int8u primary3Intensity = 27;
readonly attribute int16u primary4X = 32;
readonly attribute int16u primary4Y = 33;
readonly attribute nullable int8u primary4Intensity = 34;
readonly attribute int16u primary5X = 36;
readonly attribute int16u primary5Y = 37;
readonly attribute nullable int8u primary5Intensity = 38;
readonly attribute int16u primary6X = 40;
readonly attribute int16u primary6Y = 41;
readonly attribute nullable int8u primary6Intensity = 42;
attribute access(write: manage) int16u whitePointX = 48;
attribute access(write: manage) int16u whitePointY = 49;
attribute access(write: manage) int16u colorPointRX = 50;
attribute access(write: manage) int16u colorPointRY = 51;
attribute access(write: manage) nullable int8u colorPointRIntensity = 52;
attribute access(write: manage) int16u colorPointGX = 54;
attribute access(write: manage) int16u colorPointGY = 55;
attribute access(write: manage) nullable int8u colorPointGIntensity = 56;
attribute access(write: manage) int16u colorPointBX = 58;
attribute access(write: manage) int16u colorPointBY = 59;
attribute access(write: manage) nullable int8u colorPointBIntensity = 60;
readonly attribute int16u enhancedCurrentHue = 16384;
readonly attribute enum8 enhancedColorMode = 16385;
readonly attribute int8u colorLoopActive = 16386;
Expand Down
Loading

0 comments on commit ba31e34

Please sign in to comment.