diff --git a/docs/guides/python_chip_controller_building.md b/docs/guides/python_chip_controller_building.md index 143bbdaf2a52b4..8a7acc884ab2fa 100644 --- a/docs/guides/python_chip_controller_building.md +++ b/docs/guides/python_chip_controller_building.md @@ -13,7 +13,7 @@ command line. - [Building Python CHIP Controller](#building-and-installing) - [Running the CHIP REPL](#running-the-chip-repl) - [Using Python CHIP Controller REPL for Matter accessory testing](#using-python-chip-controller-repl-for-matter-accessory-testing) -- [List of commands](#list-of-commands) +- [Example usage of the Python CHIP Controller REPL](#example-usage-of-the-python-chip-controller-repl) - [Explore Clusters, Attributes and Commands](#explore-clusters-attributes-and-commands)
@@ -212,8 +212,6 @@ with the following assumptions for the Matter accessory device: - The setup pin code of the device is _20202021_ - The temporary Node ID is _1234_ -devCtrl.CommissionWithCode("MT:-24J0AFN00KA0648G00", 10) - ``` devCtrl.ConnectBLE(3840, 20202021, 1234) ``` @@ -296,7 +294,14 @@ await devCtrl.ReadAttribute(1234, attributes)
-## List of commands +## Example usage of the Python CHIP Controller REPL + +These section covers a few useful commands of the Python CHIP Controller along +with examples demonstrating how they can be called from the REPL. + +The +[CHIP Device Controller API documentation offer](https://project-chip.github.io/connectedhomeip-doc/testing/ChipDeviceCtrlAPI.html#chip-chipdevicectrl) +the full list of available commands. ### `SetThreadOperationalDataset()` @@ -317,55 +322,16 @@ device commissioning procedure to configure the device with a Wi-Fi interface. devCtrl.SetWiFiCredentials('TESTSSID', 'P455W4RD') ``` -### `ConnectBLE(: int, : int, : int)` +### `CommissionWithCode(: str, : int, : DiscoveryType)` -Do key exchange and establish a secure session between controller and device -using Bluetooth LE transport. - -The Node ID will be used by controller to distinguish multiple devices. +Commission with the given nodeid from the setupPayload. setupPayload may be a QR +or the manual setup code. ``` -devCtrl.ConnectBLE(3840, 20202021, 1234) +devCtrl.CommissionWithCode("MT:-24J0AFN00KA0648G00", 1234) ``` -### `CloseSession(: int)` - -If case there exists an open session (PASE or CASE) to the device with a given -Node ID, mark it as expired. - -### `discover` - -> To be implemented in REPL - -Discover available Matter accessory devices: - -### `resolve ` - -> To be implemented in REPL - -Resolve DNS-SD name corresponding with the given Node ID and update address of -the node in the device controller: - -### `setup-payload generate [-v ] [-p ] [-cf ] [-dc ] [-dv ] [-ps ]` - -> To be implemented in REPL - -Print the generated Onboarding Payload Contents in human-readable (Manual -Pairing Code) and machine-readable (QR Code) format: - -### `setup-payload parse-manual ` - -> To be implemented in REPL - -Print the commissioning information encoded in the Manual Pairing Code: - -### `setup-payload parse-qr ` - -> To be implemented in REPL - -Print the commissioning information encoded in the QR Code payload: - -### `devCtrl.SendCommand(: int, : int, Clusters..Commands.())` +### `SendCommand(: int, : int, Clusters..Commands.())` Send a Matter command to the device. For example: