Last Updated on : 2024-06-25 03:31:50download
This topic describes how to build a Matter project using the product development kit in Tuya Wind IDE.
tftpd64.exe
.Log in to Tuya Wind IDE with your Tuya Developer Platform account.
Set the project parameters as shown below and then click Finish.
Click Create Framework and complete the required parameters. If you cannot select an item, check if the currently logged-in account has been added to the allowlist.
Wait for the project to finish downloading.
Download the product development kit.
Choose Tuya Home > Dev Framework > Product Dev Kit and then click Download. After the download is finished, refresh Visual Studio Code Explorer. tuyaos_matter_bridge-ide_ssd20x_matter_bridge
should appear in TuyaOS/apps
.
The directory of the development kit:
Right-click the product development kit directory and choose Build Project.
Enter a version number.
The initial compilation is usually slow due to toolchain download and board support package (BSP) compilation. It takes about 10 minutes to finish the build process, depending on the internet speed and the host performance.
Printing will stop when the build is finished.
The build output is stored in the folder indicated below.
Download the executable.
Place the tool tftp64.exe
and the executable tyZ3Gw
in the same folder. Double-click to open the tftp64.exe
in Windows.
The gateway, computer, and mobile phone are all on the same LAN, as shown below.
Download the firmware to the gateway board. Log in to the gateway board with the username and password provided by Tuya.
Run the following command in the SSH terminal to download the executable.
cd /tmp/tuya/tuya_user1/;
tftp -b20480 -r tuyaos_matter_bridge-ide_ssd20x_matter_bridge_fw_UG_1.0.0.bin \
-g xxx.xxx.xxx.xxx// The IP address of tftp64
Write the firmware to the gateway board.
unpack -f tuyaos_matter_bridge-ide_ssd20x_matter_bridge_fw_UG_1.0.0.bin -m
Reboot the gateway board.
reboot
Press the button on the gateway to activate Zigbee pairing and put the Zigbee device in pairing mode. Observe the behavior of the Zigbee device to verify if it has been added to the gateway.
Open the Apple Home app and add the Matter gateway by scanning its QR code.
Considerations:
After the device is added to the Apple Home app, it can be controlled with this app.
The operation of the SDK relies on a JSON configuration file that contains configurable parameters such as storage path, service enablement, and serial port number. The configuration file is as follows:
{
"storage_path": "./",
"cache_path":"/tmp/",
"bin_path":"/tmp/",
"backup_path":"/tmp/",
"log_path": "./",
"sw_ver": "1.0.0",
"sync_systime":0,
"log_level": 4,
"tuya":{
"zigbee":{
"dev_name":"/dev/ttyZigbeeNCP",
"cts":1,
"thread_mode":1,
"rcp":{
"enable": 1,
"dev_name": "/dev/ttyS2"
}
},
"matter":{},
"dp_engine":{
"storage_path":"/tuya/data/user_data/",
"file_max_count":1,
"pidTable_max_count":1,
"enable_zigbee_trans":1,
"enable_matter_trans":1
}
}
}
Field description
Field | Required | Description |
---|---|---|
log_level | No | The log level, defaulting to the debug level. |
storage_path | Yes | The storage path that must be readable and ended with / . |
matter | Yes | The flag for initializing Matter service. |
dp_engine | Yes | The DP engine. This field is mandatory if you implement connectivity to Tuya-enabled devices. |
To add a new feature to your bridge product, simply include a JSON configuration file.
Before you start adding new features, it is recommended to:
For more information, see the following.
Is this page helpful?
YesFeedbackIs this page helpful?
YesFeedback