@@ -13,7 +13,7 @@ command line.
13
13
- [ Building Python CHIP Controller] ( #building-and-installing )
14
14
- [ Running the CHIP REPL] ( #running-the-chip-repl )
15
15
- [ Using Python CHIP Controller REPL for Matter accessory testing] ( #using-python-chip-controller-repl-for-matter-accessory-testing )
16
- - [ List of commands ] ( #list- of-commands )
16
+ - [ Example usage of the Python CHIP Controller REPL ] ( #example-usage- of-the-python-chip-controller-repl )
17
17
- [ Explore Clusters, Attributes and Commands] ( #explore-clusters-attributes-and-commands )
18
18
19
19
<hr >
@@ -212,8 +212,6 @@ with the following assumptions for the Matter accessory device:
212
212
- The setup pin code of the device is _20202021_
213
213
- The temporary Node ID is _1234_
214
214
215
- devCtrl.CommissionWithCode("MT:-24J0AFN00KA0648G00", 10)
216
-
217
215
```
218
216
devCtrl.ConnectBLE(3840, 20202021, 1234)
219
217
```
@@ -296,7 +294,14 @@ await devCtrl.ReadAttribute(1234, attributes)
296
294
297
295
<hr>
298
296
299
- ## List of commands
297
+ ## Example usage of the Python CHIP Controller REPL
298
+
299
+ These section covers a few useful commands of the Python CHIP Controller along
300
+ with examples demonstrating how they can be called from the REPL.
301
+
302
+ The
303
+ [CHIP Device Controller API documentation offer](https://project-chip.github.io/connectedhomeip-doc/testing/ChipDeviceCtrlAPI.html#chip-chipdevicectrl)
304
+ the full list of available commands.
300
305
301
306
### `SetThreadOperationalDataset(<thread-dataset>)`
302
307
@@ -317,55 +322,16 @@ device commissioning procedure to configure the device with a Wi-Fi interface.
317
322
devCtrl.SetWiFiCredentials('TESTSSID', 'P455W4RD')
318
323
```
319
324
320
- ### `ConnectBLE(<discriminator >: int , <setup pin code >: int, <nodeid >: int )`
325
+ ### `CommissionWithCode(<setupPayload >: str , <nodeid >: int, <discoveryType >: DiscoveryType )`
321
326
322
- Do key exchange and establish a secure session between controller and device
323
- using Bluetooth LE transport.
324
-
325
- The Node ID will be used by controller to distinguish multiple devices.
327
+ Commission with the given nodeid from the setupPayload. setupPayload may be a QR
328
+ or the manual setup code.
326
329
327
330
```
328
- devCtrl.ConnectBLE(3840, 20202021 , 1234)
331
+ devCtrl.CommissionWithCode("MT:-24J0AFN00KA0648G00" , 1234)
329
332
```
330
333
331
- ### `CloseSession(<nodeid>: int)`
332
-
333
- If case there exists an open session (PASE or CASE) to the device with a given
334
- Node ID, mark it as expired.
335
-
336
- ### `discover`
337
-
338
- > To be implemented in REPL
339
-
340
- Discover available Matter accessory devices:
341
-
342
- ### `resolve <node_id>`
343
-
344
- > To be implemented in REPL
345
-
346
- Resolve DNS-SD name corresponding with the given Node ID and update address of
347
- the node in the device controller:
348
-
349
- ### `setup-payload generate [-v <Vendor ID>] [-p <Product ID>] [-cf <Custom Flow>] [-dc <Discovery Capabilities>] [-dv <Discriminator Value>] [-ps <Passcode>]`
350
-
351
- > To be implemented in REPL
352
-
353
- Print the generated Onboarding Payload Contents in human-readable (Manual
354
- Pairing Code) and machine-readable (QR Code) format:
355
-
356
- ### `setup-payload parse-manual <manual-pairing-code>`
357
-
358
- > To be implemented in REPL
359
-
360
- Print the commissioning information encoded in the Manual Pairing Code:
361
-
362
- ### `setup-payload parse-qr <qr-code>`
363
-
364
- > To be implemented in REPL
365
-
366
- Print the commissioning information encoded in the QR Code payload:
367
-
368
- ### `devCtrl.SendCommand(<nodeid>: int, <endpoint>: int, Clusters.<cluster>.Commands.<command>(<arguments>))`
334
+ ### `SendCommand(<nodeid>: int, <endpoint>: int, Clusters.<cluster>.Commands.<command>(<arguments>))`
369
335
370
336
Send a Matter command to the device. For example:
371
337
0 commit comments