An example showing the use of CHIP on Linux for the Matter 1.7 electrical protection device types. The app presents an Electrical Distribution Enclosure and demonstrates the new Electrical Distribution cluster. The Electrical Circuit Breaker endpoint and the remaining electrical clusters are added by follow-up changes.
The document will describe how to build and run the CHIP Linux Electrical Protection Example on Raspberry Pi. It targets a currently supported Ubuntu for Raspberry Pi Server LTS (aarch64) release, 24.04 LTS or newer.
Electrical Distribution is provisional in Matter 1.7.
The device type also defines Power Topology as mandatory, and the Electrical Circuit Breaker endpoint it can contain is not present yet. Both arrive with the follow-up changes that add the breaker endpoint and its clusters.
Install tool chain
$ sudo apt-get install git gcc g++ pkg-config libssl-dev libdbus-1-dev libglib2.0-dev ninja-build python3-venv python3-dev unzip
Check out the repository and its submodules:
$ cd ~ $ git clone git@github.com:project-chip/connectedhomeip.git $ cd connectedhomeip $ ./scripts/checkout_submodules.py --platform linux --recursive
Alternatively you can check out all submodules and resync with:
$ git submodule sync --recursive; git submodule update --init --recursive
Activate at the top level, then build the example application:
$ cd ~/connectedhomeip $ source ./scripts/activate.sh $ cd ~/connectedhomeip/examples/electrical-protection-app/linux $ gn gen out/debug $ ninja -C out/debug
To delete generated executable, libraries and object files use:
$ cd ~/connectedhomeip/examples/electrical-protection-app/linux $ rm -rf out/
--wifi
Enables WiFi management feature. Required for WiFi commissioning.
--thread
Enables Thread management feature, requires ot-br-posix dbus daemon running. Required for Thread commissioning.
--ble-controller <selector>
Use the specific Bluetooth controller for BLE advertisement and connections. For details on controller selection refer to Linux BLE Settings.
If you want to test Echo protocol, please enable Echo handler
gn gen out/debug --args='chip_app_use_echo=true' ninja -C out/debug
Prerequisites
pi-bluetooth via APT.Building
Follow Building section of this document.
Running
[Optional] Plug USB Bluetooth dongle
Run Linux Electrical Protection Example App
$ cd ~/connectedhomeip/examples/electrical-protection-app/linux $ sudo out/debug/chip-electrical-protection-app --ble-controller [bluetooth device number] # In this example, the device we want to use is hci1 $ sudo out/debug/chip-electrical-protection-app --ble-controller 1
Test the device using ChipDeviceController on your laptop / workstation etc.