Skip to content

Commit c9e063d

Browse files
committed
merge master
2 parents 6931d02 + 694e0cd commit c9e063d

28 files changed

+1524
-668
lines changed

.github/workflows/chef.yaml

+22
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,28 @@ jobs:
5151
run: |
5252
./scripts/run_in_build_env.sh "./examples/chef/chef.py --ci -t linux"
5353
54+
chef_linux_all_devices:
55+
name: Chef - Linux CI Examples (All chef devices)
56+
timeout-minutes: 60
57+
runs-on: ubuntu-latest
58+
if: github.actor != 'restyled-io[bot]'
59+
60+
container:
61+
image: ghcr.io/project-chip/chip-build:119
62+
options: --user root
63+
64+
steps:
65+
- name: Checkout
66+
uses: actions/checkout@v4
67+
- name: Checkout submodules & Bootstrap
68+
uses: ./.github/actions/checkout-submodules-and-bootstrap
69+
with:
70+
platform: linux
71+
- name: CI Examples Linux
72+
shell: bash
73+
run: |
74+
./scripts/run_in_build_env.sh "./examples/chef/chef.py --ci_linux"
75+
5476
chef_esp32:
5577
name: Chef - ESP32 CI Examples
5678
runs-on: ubuntu-latest

.github/workflows/darwin.yaml

+1-2
Original file line numberDiff line numberDiff line change
@@ -116,11 +116,10 @@ jobs:
116116
117117
export TEST_RUNNER_ASAN_OPTIONS=__CURRENT_VALUE__:detect_stack_use_after_return=1
118118
119-
# Disable BLE (CHIP_IS_BLE=NO) because the app does not have the permission to use it and that may crash the CI.
120119
xcodebuild test -target "Matter" -scheme "Matter Framework Tests" \
121120
-resultBundlePath /tmp/darwin/framework-tests/TestResults.xcresult \
122121
-sdk macosx ${{ matrix.options.arguments }} \
123-
CHIP_IS_BLE=NO GCC_PREPROCESSOR_DEFINITIONS='${inherited} ${{ matrix.options.defines }}' \
122+
GCC_PREPROCESSOR_DEFINITIONS='${inherited} ${{ matrix.options.defines }}' \
124123
> >(tee /tmp/darwin/framework-tests/darwin-tests.log) 2> >(tee /tmp/darwin/framework-tests/darwin-tests-err.log >&2)
125124
- name: Generate Summary
126125
if: always()

examples/camera-controller/commands/interactive/InteractiveCommands.cpp

-38
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,6 @@
2929
#include <thread>
3030
#include <vector>
3131

32-
#if defined(PW_RPC_ENABLED)
33-
#include <rpc/RpcClient.h>
34-
#include <rpc/RpcServer.h>
35-
#endif
36-
3732
using namespace chip;
3833

3934
namespace {
@@ -42,10 +37,6 @@ constexpr char kInteractiveModePrompt[] = ">>> ";
4237
constexpr char kInteractiveModeHistoryFileName[] = "chip_tool_history";
4338
constexpr char kInteractiveModeStopCommand[] = "quit()";
4439

45-
#if defined(PW_RPC_ENABLED)
46-
constexpr uint16_t kRetryIntervalS = 3;
47-
#endif
48-
4940
// File pointer for the log file
5041
FILE * sLogFile = nullptr;
5142

@@ -114,28 +105,6 @@ void ENFORCE_FORMAT(3, 0) LoggingCallback(const char * module, uint8_t category,
114105
funlockfile(sLogFile);
115106
}
116107

117-
#if defined(PW_RPC_ENABLED)
118-
void AttemptRpcClientConnect(System::Layer * systemLayer, void * appState)
119-
{
120-
if (admin::StartRpcClient() == CHIP_NO_ERROR)
121-
{
122-
// print to console
123-
fprintf(stderr, "Connected to Fabric-Bridge\n");
124-
}
125-
else
126-
{
127-
// print to console
128-
fprintf(stderr, "Failed to connect to Fabric-Bridge, retry in %d seconds....\n", kRetryIntervalS);
129-
systemLayer->StartTimer(System::Clock::Seconds16(kRetryIntervalS), AttemptRpcClientConnect, nullptr);
130-
}
131-
}
132-
133-
void ExecuteDeferredConnect(intptr_t ignored)
134-
{
135-
AttemptRpcClientConnect(&DeviceLayer::SystemLayer(), nullptr);
136-
}
137-
#endif
138-
139108
} // namespace
140109

141110
char * InteractiveStartCommand::GetCommand(char * command)
@@ -198,13 +167,6 @@ CHIP_ERROR InteractiveStartCommand::RunCommand()
198167
Logging::SetLogRedirectCallback(LoggingCallback);
199168
}
200169

201-
#if defined(PW_RPC_ENABLED)
202-
admin::SetRpcRemoteServerPort(mFabricBridgeServerPort.Value());
203-
admin::InitRpcServer(mLocalServerPort.Value());
204-
ChipLogProgress(NotSpecified, "PW_RPC initialized.");
205-
DeviceLayer::PlatformMgr().ScheduleWork(ExecuteDeferredConnect, 0);
206-
#endif
207-
208170
std::thread readCommands(ReadCommandThread);
209171
readCommands.detach();
210172

examples/chef/chef.py

+23
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@
4040
for file in os.listdir(_DEVICE_FOLDER) if file.endswith(".zap") and file != 'template.zap']
4141
_CICD_CONFIG_FILE_NAME = os.path.join(_CHEF_SCRIPT_PATH, "cicd_config.json")
4242
_CD_STAGING_DIR = os.path.join(_CHEF_SCRIPT_PATH, "staging")
43+
_EXCLUDE_DEVICE_FROM_LINUX_CI = [ # These do not compile / deprecated.
44+
"noip_rootnode_dimmablelight_bCwGYSDpoe",
45+
"rootnode_refrigerator_temperaturecontrolledcabinet_temperaturecontrolledcabinet_ffdb696680",
46+
]
4347

4448
gen_dir = "" # Filled in after sample app type is read from args.
4549

@@ -382,6 +386,10 @@ def main() -> int:
382386
help=("Builds Chef examples defined in cicd_config. "
383387
"Uses specified target from -t. Chef exits after completion."),
384388
dest="ci", action="store_true")
389+
parser.add_option("", "--ci_linux",
390+
help=("Builds Chef Examples defined in cicd_config under ci_allow_list_linux. "
391+
"Devices are built without -c for faster compilation."),
392+
dest="ci_linux", action="store_true")
385393
parser.add_option(
386394
"", "--enable_ipv4", help="Enable IPv4 mDNS. Only applicable to platforms that can support IPV4 (e.g, Linux, ESP32)",
387395
action="store_true", default=False)
@@ -409,6 +417,21 @@ def main() -> int:
409417
bundle(options.build_target, device_name)
410418
exit(0)
411419

420+
#
421+
# CI Linux
422+
#
423+
424+
if options.ci_linux:
425+
for device_name in _DEVICE_LIST:
426+
if device_name in _EXCLUDE_DEVICE_FROM_LINUX_CI:
427+
continue
428+
shell.run_cmd(f"cd {_CHEF_SCRIPT_PATH}")
429+
command = f"./chef.py -br -d {device_name} -t linux"
430+
flush_print(f"Building {command}", with_border=True)
431+
shell.run_cmd(command)
432+
bundle("linux", device_name)
433+
exit(0)
434+
412435
#
413436
# CD
414437
#

src/app/zap-templates/zcl/data-model/chip/occupancy-sensing-cluster.xml

+49-79
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0"?>
22
<!--
3-
Copyright (c) 2023 Project CHIP Authors
3+
Copyright (c) 2023-2025 Project CHIP Authors
44
55
Licensed under the Apache License, Version 2.0 (the "License");
66
you may not use this file except in compliance with the License.
@@ -14,9 +14,14 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1414
See the License for the specific language governing permissions and
1515
limitations under the License.
1616
-->
17-
<configurator>
17+
<!--
18+
XML generated by Alchemy; DO NOT EDIT.
19+
Source: src/app_clusters/OccupancySensing.adoc
20+
Parameters: in-progress
21+
Git:
22+
-->
23+
<configurator xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../zcl.xsd">
1824
<domain name="Measurement &amp; Sensing"/>
19-
2025
<bitmap name="OccupancyBitmap" type="bitmap8">
2126
<cluster code="0x0406"/>
2227
<field name="Occupied" mask="0x1"/>
@@ -38,10 +43,11 @@ limitations under the License.
3843
</bitmap>
3944

4045
<struct apiMaturity="provisional" name="HoldTimeLimitsStruct">
41-
<cluster code="0x0406"/> <!-- Occupancy Sensing Cluster -->
42-
<item name="HoldTimeMin" fieldId="0" type="int16u" optional="false"/>
43-
<item name="HoldTimeMax" fieldId="1" type="int16u" optional="false"/>
44-
<item name="HoldTimeDefault" fieldId="2" type="int16u" optional="false"/>
46+
<cluster code="0x0406"/>
47+
<!-- Occupancy Sensing Cluster -->
48+
<item fieldId="0" name="HoldTimeMin" type="int16u" min="1"/>
49+
<item fieldId="1" name="HoldTimeMax" type="int16u" min="1" max="1"/>
50+
<item fieldId="2" name="HoldTimeDefault" type="int16u" min="1" max="1"/>
4551
</struct>
4652

4753
<cluster>
@@ -50,68 +56,48 @@ limitations under the License.
5056
<description>The server cluster provides an interface to occupancy sensing functionality based on one or more sensing modalities, including configuration and provision of notifications of occupancy status.</description>
5157
<code>0x0406</code>
5258
<define>OCCUPANCY_SENSING_CLUSTER</define>
53-
5459
<features>
55-
<feature apiMaturity="provisional" bit="0" code="OTHER" name="Other" summary="Supports sensing using a modality not listed in the other bits">
56-
<optionalConform choice="a" more="true"/>
57-
</feature>
58-
<feature apiMaturity="provisional" bit="1" code="PIR" name="PassiveInfrared" summary="Supports sensing using PIR (Passive InfraRed)">
59-
<optionalConform choice="a" more="true"/>
60-
</feature>
61-
<feature apiMaturity="provisional" bit="2" code="US" name="Ultrasonic" summary="Supports sensing using UltraSound">
62-
<optionalConform choice="a" more="true"/>
63-
</feature>
64-
<feature apiMaturity="provisional" bit="3" code="PHY" name="PhysicalContact" summary="Supports sensing using a physical contact">
65-
<optionalConform choice="a" more="true"/>
66-
</feature>
67-
<feature apiMaturity="provisional" bit="4" code="AIR" name="ActiveInfrared" summary="Supports sensing using Active InfraRed measurement (e.g. time-of-flight or transflective/reflective IR sensing)">
68-
<optionalConform choice="a" more="true"/>
69-
</feature>
70-
<feature apiMaturity="provisional" bit="5" code="RAD" name="Radar" summary="Supports sensing using radar waves (microwave)">
71-
<optionalConform choice="a" more="true"/>
72-
</feature>
73-
<feature apiMaturity="provisional" bit="6" code="RFS" name="RFSensing" summary="Supports sensing based on RF signal analysis">
74-
<optionalConform choice="a" more="true"/>
75-
</feature>
76-
<feature apiMaturity="provisional" bit="7" code="VIS" name="Vision" summary="Supports sensing based on analyzing images">
77-
<optionalConform choice="a" more="true"/>
78-
</feature>
60+
<feature bit="0" code="OTHER" name="Other" summary="Supports sensing using a modality not listed in the other bits">
61+
<optionalConform choice="a" more="true" min="1"/>
62+
</feature>
63+
<feature bit="1" code="PIR" name="PassiveInfrared" summary="Supports sensing using PIR (Passive InfraRed)">
64+
<optionalConform choice="a" more="true" min="1"/>
65+
</feature>
66+
<feature bit="2" code="US" name="Ultrasonic" summary="Supports sensing using UltraSound">
67+
<optionalConform choice="a" more="true" min="1"/>
68+
</feature>
69+
<feature bit="3" code="PHY" name="PhysicalContact" summary="Supports sensing using a physical contact">
70+
<optionalConform choice="a" more="true" min="1"/>
71+
</feature>
72+
<feature bit="4" code="AIR" name="ActiveInfrared" summary="Supports sensing using Active InfraRed measurement (e.g. time-of-flight or transflective/reflective IR sensing)">
73+
<optionalConform choice="a" more="true" min="1"/>
74+
</feature>
75+
<feature bit="5" code="RAD" name="Radar" summary="Supports sensing using radar waves (microwave)">
76+
<optionalConform choice="a" more="true" min="1"/>
77+
</feature>
78+
<feature bit="6" code="RFS" name="RFSensing" summary="Supports sensing based on RF signal analysis">
79+
<optionalConform choice="a" more="true" min="1"/>
80+
</feature>
81+
<feature bit="7" code="VIS" name="Vision" summary="Supports sensing based on analyzing images">
82+
<optionalConform choice="a" more="true" min="1"/>
83+
</feature>
7984
</features>
80-
8185
<client tick="false" init="false">true</client>
8286
<server tick="false" tickFrequency="half" init="false">true</server>
83-
8487
<globalAttribute side="either" code="0xFFFD" value="5"/>
85-
86-
<attribute side="server" code="0x0000" name="Occupancy" define="OCCUPANCY" type="OccupancyBitmap" min="0x00" max="0x01" reportable="true">
87-
<mandatoryConform/>
88-
</attribute>
89-
<attribute side="server" code="0x0001" name="OccupancySensorType" define="OCCUPANCY_SENSOR_TYPE" type="OccupancySensorTypeEnum" min="0x00" max="0xFE">
90-
<otherwiseConform>
91-
<mandatoryConform/>
92-
<deprecateConform/>
93-
</otherwiseConform>
94-
</attribute>
95-
<attribute side="server" code="0x0002" name="OccupancySensorTypeBitmap" define="OCCUPANCY_SENSOR_TYPE_BITMAP" type="OccupancySensorTypeBitmap" min="0x00" max="0x07">
96-
<otherwiseConform>
97-
<mandatoryConform/>
98-
<deprecateConform/>
99-
</otherwiseConform>
100-
</attribute>
101-
102-
<attribute side="server" code="0x0003" name="HoldTime" define="HOLD_TIME" type="int16u" writable="true" optional="true">
88+
<attribute side="server" code="0x0000" name="Occupancy" define="OCCUPANCY" type="OccupancyBitmap" min="0x00" max="0x01"/>
89+
<attribute side="server" code="0x0001" name="OccupancySensorType" define="OCCUPANCY_SENSOR_TYPE" type="OccupancySensorTypeEnum" min="0x00" max="0x03"/>
90+
<attribute side="server" code="0x0002" name="OccupancySensorTypeBitmap" define="OCCUPANCY_SENSOR_TYPE_BITMAP" type="OccupancySensorTypeBitmap" min="0x00" max="0x07"/>
91+
<attribute side="server" code="0x0003" name="HoldTime" define="HOLD_TIME" type="int16u" writable="true" optional="true" min="0" max="65535">
10392
<access op="write" privilege="manage"/>
10493
<optionalConform/>
10594
</attribute>
106-
10795
<attribute side="server" code="0x0004" name="HoldTimeLimits" define="HOLD_TIME_LIMITS" type="HoldTimeLimitsStruct" optional="true">
10896
<mandatoryConform>
10997
<attribute name="HoldTime"/>
11098
</mandatoryConform>
11199
</attribute>
112-
113-
<attribute side="server" code="0x0010" name="PIROccupiedToUnoccupiedDelay" define="PIR_OCCUPIED_TO_UNOCCUPIED_DELAY" type="int16u" writable="true" default="0x0000" optional="true">
114-
<access op="read" role="view"/>
100+
<attribute side="server" code="0x0010" name="PIROccupiedToUnoccupiedDelay" define="PIR_OCCUPIED_TO_UNOCCUPIED_DELAY" type="int16u" writable="true" default="0x0000" optional="true" min="0" max="65535">
115101
<access op="write" role="manage"/>
116102
<otherwiseConform>
117103
<optionalConform>
@@ -136,9 +122,7 @@ limitations under the License.
136122
<deprecateConform/>
137123
</otherwiseConform>
138124
</attribute>
139-
140-
<attribute side="server" code="0x0011" name="PIRUnoccupiedToOccupiedDelay" define="PIR_UNOCCUPIED_TO_OCCUPIED_DELAY" type="int16u" writable="true" default="0x0000" optional="true">
141-
<access op="read" role="view"/>
125+
<attribute side="server" code="0x0011" name="PIRUnoccupiedToOccupiedDelay" define="PIR_UNOCCUPIED_TO_OCCUPIED_DELAY" type="int16u" writable="true" default="0x0000" optional="true" min="0" max="65535">
142126
<access op="write" role="manage"/>
143127
<otherwiseConform>
144128
<mandatoryConform>
@@ -185,9 +169,7 @@ limitations under the License.
185169
<deprecateConform/>
186170
</otherwiseConform>
187171
</attribute>
188-
189172
<attribute side="server" code="0x0012" name="PIRUnoccupiedToOccupiedThreshold" define="PIR_UNOCCUPIED_TO_OCCUPIED_THRESHOLD" type="int8u" min="0x01" max="0xFE" writable="true" default="0x01" optional="true">
190-
<access op="read" role="view"/>
191173
<access op="write" role="manage"/>
192174
<otherwiseConform>
193175
<mandatoryConform>
@@ -234,9 +216,7 @@ limitations under the License.
234216
<deprecateConform/>
235217
</otherwiseConform>
236218
</attribute>
237-
238-
<attribute side="server" code="0x0020" name="UltrasonicOccupiedToUnoccupiedDelay" define="ULTRASONIC_OCCUPIED_TO_UNOCCUPIED_DELAY" type="int16u" writable="true" default="0x0000" optional="true">
239-
<access op="read" role="view"/>
219+
<attribute side="server" code="0x0020" name="UltrasonicOccupiedToUnoccupiedDelay" define="ULTRASONIC_OCCUPIED_TO_UNOCCUPIED_DELAY" type="int16u" writable="true" default="0x0000" optional="true" min="0" max="65535">
240220
<access op="write" role="manage"/>
241221
<otherwiseConform>
242222
<optionalConform>
@@ -248,9 +228,7 @@ limitations under the License.
248228
<deprecateConform/>
249229
</otherwiseConform>
250230
</attribute>
251-
252-
<attribute side="server" code="0x0021" name="UltrasonicUnoccupiedToOccupiedDelay" define="ULTRASONIC_UNOCCUPIED_TO_OCCUPIED_DELAY" type="int16u" writable="true" default="0x0000" optional="true">
253-
<access op="read" role="view"/>
231+
<attribute side="server" code="0x0021" name="UltrasonicUnoccupiedToOccupiedDelay" define="ULTRASONIC_UNOCCUPIED_TO_OCCUPIED_DELAY" type="int16u" writable="true" default="0x0000" optional="true" min="0" max="65535">
254232
<access op="write" role="manage"/>
255233
<otherwiseConform>
256234
<mandatoryConform>
@@ -269,9 +247,7 @@ limitations under the License.
269247
<deprecateConform/>
270248
</otherwiseConform>
271249
</attribute>
272-
273250
<attribute side="server" code="0x0022" name="UltrasonicUnoccupiedToOccupiedThreshold" define="ULTRASONIC_UNOCCUPIED_TO_OCCUPIED_THRESHOLD" type="int8u" min="0x01" max="0xFE" writable="true" default="0x01" optional="true">
274-
<access op="read" role="view"/>
275251
<access op="write" role="manage"/>
276252
<otherwiseConform>
277253
<mandatoryConform>
@@ -290,9 +266,7 @@ limitations under the License.
290266
<deprecateConform/>
291267
</otherwiseConform>
292268
</attribute>
293-
294-
<attribute side="server" code="0x0030" name="PhysicalContactOccupiedToUnoccupiedDelay" define="PHYSICAL_CONTACT_OCCUPIED_TO_UNOCCUPIED_DELAY" type="int16u" writable="true" default="0x0000" optional="true">
295-
<access op="read" role="view"/>
269+
<attribute side="server" code="0x0030" name="PhysicalContactOccupiedToUnoccupiedDelay" define="PHYSICAL_CONTACT_OCCUPIED_TO_UNOCCUPIED_DELAY" type="int16u" writable="true" default="0x0000" optional="true" min="0" max="65535">
296270
<access op="write" role="manage"/>
297271
<otherwiseConform>
298272
<optionalConform>
@@ -304,9 +278,7 @@ limitations under the License.
304278
<deprecateConform/>
305279
</otherwiseConform>
306280
</attribute>
307-
308-
<attribute side="server" code="0x0031" name="PhysicalContactUnoccupiedToOccupiedDelay" define="PHYSICAL_CONTACT_UNOCCUPIED_TO_OCCUPIED_DELAY" type="int16u" writable="true" default="0x0000" optional="true">
309-
<access op="read" role="view"/>
281+
<attribute side="server" code="0x0031" name="PhysicalContactUnoccupiedToOccupiedDelay" define="PHYSICAL_CONTACT_UNOCCUPIED_TO_OCCUPIED_DELAY" type="int16u" writable="true" default="0x0000" optional="true" min="0" max="65535">
310282
<access op="write" role="manage"/>
311283
<otherwiseConform>
312284
<mandatoryConform>
@@ -325,9 +297,7 @@ limitations under the License.
325297
<deprecateConform/>
326298
</otherwiseConform>
327299
</attribute>
328-
329300
<attribute side="server" code="0x0032" name="PhysicalContactUnoccupiedToOccupiedThreshold" define="PHYSICAL_CONTACT_UNOCCUPIED_TO_OCCUPIED_THRESHOLD" type="int8u" min="0x01" max="0xFE" writable="true" default="0x01" optional="true">
330-
<access op="read" role="view"/>
331301
<access op="write" role="manage"/>
332302
<otherwiseConform>
333303
<mandatoryConform>
@@ -346,11 +316,11 @@ limitations under the License.
346316
<deprecateConform/>
347317
</otherwiseConform>
348318
</attribute>
349-
350319
<event side="server" code="0x00" priority="info" name="OccupancyChanged" optional="true">
351320
<description>If this event is supported, it SHALL be generated when the Occupancy attribute changes.</description>
352-
<field id="0" name="Occupancy" type="OccupancyBitmap"/>
321+
<field id="0" name="Occupancy" type="OccupancyBitmap" min="0x00" max="0x01"/>
353322
<optionalConform/>
354323
</event>
324+
355325
</cluster>
356326
</configurator>

0 commit comments

Comments
 (0)