Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
57 changes: 57 additions & 0 deletions docs/platforms/silabs/silabs_matter_aws_build_guide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Build Procedure For Matter AWS

## Build command with Matter AWS

- To enable Matter AWS functionality use the `enable_matter_aws=true` flag.

````

### Here is an example to build the lighting-app with Matter AWS for the SiWx917 SoC

```shell
./scripts/examples/gn_silabs_example.sh examples/lighting-app/silabs/ out/debug BRD4338A enable_matter_aws=true chip_enable_wifi_ipv4=true
````

## Compile using new/different certificates

- Two devices should not use the same Client ID. Use a different Client ID for
your second connection.
- While using AWS, Change the following:
- Add your AWS certificates in file
`examples/platform/silabs/matter_aws/matter_aws_interface/include/MatterAwsNvmCert.h`
- Provide the AWS Root CA key
(https://www.amazontrust.com/repository/AmazonRootCA3.pem)
- provide device_certificate and device_key with your device cert and
device key. Refer
[Openssl Device Certificate Creation](#matter--aws-device-openssl-keys-generation)
- Add your AWS server and Client ID in file
`examples/platform/silabs/matter_aws/matter_aws_interface/include/MatterAwsConfig.h`
- Provide `MATTER_AWS_SERVER_HOST` with your AWS Server name
- provide `MATTER_AWS_CLIENT_ID` with your device/thing ID
- The preferred certificate type to use in the application is ECDSA.
- AWS RootCA used in this PoC is
https://www.amazontrust.com/repository/AmazonRootCA3.pem

## Matter + AWS device openssl keys generation

## Openssl Installation (In ubuntu 22.04)

1. To install openssl (v 3.0.2) - `sudo apt install openssl`

## Certificates Creation

The following commands are used to generate certificates:

1. To generate Client key:
- `openssl ecparam -name prime256v1 -genkey -noout -out device.key`
2. To generate Client certificate (ex: `device.crt` and `device.key`) using CA
certficate:
- `openssl req -new -out device.csr -key device.key`
3. While creating AWS thing , use Upload CSR option in configure device
certificate step. once uploaded the CSR generated in step 2. AWS will
generate AWS CA authenticated device.crt.
![AWS CSR Upload ](./images/matter_aws_device_csr_certificate_generation.png)

Repeat step 1 and 2 to create an additional set of certificate to use in MQTT
explorer (ex: `explorer.crt` and `explorer.key`). (Create with different name
for Identification)
120 changes: 120 additions & 0 deletions docs/platforms/silabs/silabs_matter_aws_guide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
# Matter Wi-Fi + AWS Component

- Matter+AWS is a silabs only feature to connect matter devices to proprietary
cloud solutions(AWS,GCP,APPLE ...) directly. As such, a Matter Wi-Fi device
must support connecting locally on the Matter Fabric, via IPv6, and
connecting to the Internet via IPv4.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mqtt instance will be available over IPv6 at least locally as I recollect. Do we want to mention that ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lets not mention it as its not tested

- Matter devices can be controlled by chip-tool or controller and the
respective status of the attribute modified will be published to the cloud.
- Remote user can install the cloud specific application to get the
notification on the attribute status.

## Matter + AWS Feature Diagram

1. Below diagram gives end-to-end flow about Direct Internet Connectivity.

![Silicon Labs - Matter + AWS design](./images/matter_aws_flow.png)

## Prerequisites

### Hardware Requirements

For the list of hardware requirements for Matter + AWS feature , see the
official
[Silicon Labs Matter HW requirements](https://siliconlabs.github.io/matter/latest/general/HARDWARE_REQUIREMENTS.html)
documentation.

### Software Requirements

For the list of software requirements for Matter + AWS feature , see the
official
[Silicon Labs Matter Software requirements](https://siliconlabs.github.io/matter/latest/general/SOFTWARE_REQUIREMENTS.html)
documentation.

## End-to-End Set-up bring up

## Message Queuing Telemetry Transport (MQTT)

- MQTT is an OASIS standard messaging protocol for the Internet of Things
(IoT). It is designed as an extremely lightweight publish/subscribe
messaging transport that is ideal for connecting remote devices with a small
code footprint and minimal network bandwidth. Refer https://mqtt.org/ for
more details

### Building Matter Matter + AWS Application

1. To Build Matter + AWS Application, refer
[Building of Matter + AWS](./silabs_matter_aws_build_guide.md)
2. Commission the Matter Device and confirm Matter + AWS connection is done from
Device side logs.

## End-to-End Test of Matter + AWS Application

- **Sharing status of device to cloud**

- Below diagram gives end-to-end flow for sharing status from matter
device to cloud

![Silicon Labs - Matter + AWS design](./images/matter_aws_status_flow.png)

**Note**: For reference, Lighting App commands given in the above image.
Similarly other application commands also can be passed. - End-to-end command to
be executed from chip-tool, refer
[Running the Matter Demo](RUN_DEMO.md#demo-execution---commissioning-a-wi-fi-device-using-chip-tool-for-linux) -
Below is the application specific attribute/s information or state shared to the
cloud through Direct Internet Connectivity Solution - For Lighting App, On/Off
Attributes - For Lock App, lock/unlock Attributes - For On/off Plug App, On/Off
Attributes - For Windows App, lift/tilt Attributes - For Thermostat App,
SystemMode/CurrentTemp/LocalTemperature/OccupiedCoolingSetpoint/OccupiedHeatingSetpoint
Attributes - Application status would be updated on the mqtt_explorer UI, as
shown in below image.

![Silicon Labs - Matter + AWS design](./images/matter_aws_mqtt_explorer.png)

- **Control of the device through cloud interface**
- Below diagram gives end-to-end flow for Control of the matter device
through cloud interface
![Silicon Labs - Matter + AWS design](./images/matter_aws_command_flow.png)

**Note**: For reference, Lighting App commands given in the above image.
Similarly other application commands also can be passed.

- Make sure matter device is up and commissioned successfully, refer
[Running the Matter Demo](RUN_DEMO.md#demo-execution---commissioning-a-wi-fi-device-using-chip-tool-for-linux)
- For Controlling the device, set topic name and the commands to be executed
in the mqtt_explorer for below applications.
- Lighting App
- Topic: command
- Commands:
- toggle
- on
- off
- Onoff-plug App
- Topic: command
- Commands:
- toggle
- on
- off
- Lock App
- Topic: command
- Commands:
- lock
- unlock
- Thermostat App
- Topic: command
- Commands:
- SetMode/value(value need to provide 1,2,3,4 ex:SetMode/1)
- Heating/value(value need to provide 2500,2600
ex:HeatingSetPoint/2500)
- Cooling/value(value need to provide 2500,2600
ex:CoolingSetPoint/2500)
- Window App
- Topic: command
- Commands:
- Lift/value(value need to provide in range 1000 to 10000 ex:
Lift/2500)
- Tilt/value(value need to provide in range 1000 to 10000 ex:
Tilt/2500)
- Then click `publish` button to execute the command.

![Silicon Labs - Matter + AWS design](./images/matter_aws_cloud_control_mqtt_explorer.png)
Loading