Skip to content
This repository was archived by the owner on Jan 31, 2025. It is now read-only.

Commit 3a3eb8a

Browse files
committed
Update to new esp-matter
1 parent 83e31d5 commit 3a3eb8a

12 files changed

+31
-31
lines changed

Diff for: Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM --platform=linux/amd64 ubuntu:22.04
1+
FROM ubuntu:22.04
22

33
WORKDIR "/root"
44

Diff for: lib_files/README.md

+2-6
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ This projects aims at possibility to easily launch Matter internet-of-things pro
1010
6. Run example sketch.
1111

1212
## Installing on PlatformIO
13-
1. Use espressif32 platform at version **{{ PLATFORMIO_ESPRESSIF_VERSION }}**, by setting `platform = espressif32@{{ PLATFORMIO_ESPRESSIF_VERSION }}` in `platformio.ini`. **This is crucial**, because this library contains pre-compiled files.
13+
1. Use espressif32 platform at version compatible with **{{ ARDUINO_ESP32_VERSION }}** `arduino-esp32` core version (you can determine it by looking at changelog [here](https://github.com/platformio/platform-espressif32/releases)). Other versions might work, but there is no guarantee - this library contains precompiled libraries and binaries might or might not be compatible. Set that version by adding: `platform = [email protected]` in `platformio.ini`.
1414
2. Turn on C++17 support, by setting `build_unflags=-std=gnu++11` and `build_flags=-std=gnu++17` in `platformio.ini`.
1515
3. [Download](https://github.com/Yacubane/esp32-arduino-matter/releases) and put library into `lib` folder of project (:warning: you cannot use `lib_deps` in `platformio.ini`, because this repository does not contain binaries due to too big size). The desired structure is as follows:
1616
```
@@ -28,14 +28,10 @@ This projects aims at possibility to easily launch Matter internet-of-things pro
2828
In `examples` folder there are some sketches that demonstrates usage of Matter. `Light` example is tested every release. Example sketches are in [release](https://github.com/Yacubane/esp32-arduino-matter/releases) created from [esp32-arduino-matter-builder repository](https://github.com/Yacubane/esp32-arduino-matter-builder/tree/master/lib_files/examples).
2929

3030
## Compatibility
31-
This project contains precompiled libraries based on specific version of ESP32 SDK and this library does not guarantee support for other versions. Current build is based on `esp-idf` at version {{ ESP_IDF_VERSION }} and will work with:
32-
* Arduino IDE with [ESP32 board](https://github.com/espressif/arduino-esp32) at version {{ ARDUINO_ESP32_VERSION }}
33-
* PlatformIO with [PlatformIO espressif32 platform](https://github.com/platformio/platform-espressif32) at version {{ PLATFORMIO_ESPRESSIF_VERSION }}
31+
This project contains precompiled libraries based on specific version of ESP32 SDK and this library does not guarantee support for other versions. Current build is based on `esp-idf` at version {{ ESP_IDF_VERSION }} and will work with Arduino IDE on [ESP32 board](https://github.com/espressif/arduino-esp32) at version {{ ARDUINO_ESP32_VERSION }}
3432

3533
## Limitations
3634
* Library only works on ESP32 (ESP32-C3 and ESP32-S3 might work as well, but aren't tested).
37-
* There is no possibility to change vendor/product ID as this value is pre-compiled.
38-
* There is no known possibility to change setup PIN.
3935
* This library comes with precompiled NimBLE, because default Bluedroid shipped with arduino-esp32 takes too much RAM memory.
4036
* Matter Controllers such as Apple Home, Google Home, SmartThings and others might not have full support of all device types.
4137
* This repository does not contain source code of this library, because binaries were too big and exceeded Github limits. Please look at Github [releases](https://github.com/Yacubane/esp32-arduino-matter/releases) to download whole package. All library files without binaries are stored [here](https://github.com/Yacubane/esp32-arduino-matter-builder).

Diff for: lib_files/examples/Light/Light.ino

-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ static esp_err_t on_attribute_update(attribute::callback_type_t type, uint16_t e
5555
return ESP_OK;
5656
}
5757

58-
5958
void setup() {
6059
Serial.begin(115200);
6160
pinMode(LED_PIN, OUTPUT);

Diff for: scripts/build/copy_static_libs.sh

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ mkdir $workdir/$target
99
#cp -r exported_artifacts/static_non_arduino_libs/* $workdir/$target
1010
cp -r exported_artifacts/static_non_arduino_libs/libCHIP.a $workdir/$target/libCHIP.a
1111
cp exported_artifacts/static_non_arduino_libs/libesp_matter* $workdir/$target
12-
cp -r exported_artifacts/static_non_arduino_libs/libesp32_mbedtls.a $workdir/$target/libesp32_mbedtls.a
1312

1413
# copy all bluetooth-related libs (to support NimBLE)
1514
# also there is need to change name in order to Arduino IDE take this into account when linking

Diff for: scripts/build/fill_readme.sh

-3
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,8 @@ ESP_MATTER_VERSION=$(get_tag_or_commit_hash "tools/esp-matter")
1919
MATTER_VERSION=$(get_tag_or_commit_hash "tools/esp-matter/connectedhomeip/connectedhomeip")
2020
ARDUINO_ESP32_VERSION=$(get_tag_or_commit_hash "tools/arduino-esp32")
2121

22-
PLATFORMIO_ESPRESSIF_VERSION="v6.1.0"
23-
2422
perl -i -pe "s/\Q{{ ESP32_ARDUINO_MATTER_BUILDER_VERSION }}/$ESP32_ARDUINO_MATTER_BUILDER_VERSION/" $README_PATH
2523
perl -i -pe "s/\Q{{ ESP_IDF_VERSION }}/$ESP_IDF_VERSION/" $README_PATH
2624
perl -i -pe "s/\Q{{ ESP_MATTER_VERSION }}/$ESP_MATTER_VERSION/" $README_PATH
2725
perl -i -pe "s/\Q{{ MATTER_VERSION }}/$MATTER_VERSION/" $README_PATH
2826
perl -i -pe "s/\Q{{ ARDUINO_ESP32_VERSION }}/$ARDUINO_ESP32_VERSION/" $README_PATH
29-
perl -i -pe "s/\Q{{ PLATFORMIO_ESPRESSIF_VERSION }}/$PLATFORMIO_ESPRESSIF_VERSION/" $README_PATH

Diff for: scripts/build_locally.sh

-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
#!/usr/bin/env bash
22

3-
ESP32_ARDUINO_MATTER_VERSION="1.0.0-beta.2"
4-
53
. ./scripts/build/setup_env.sh
64

75
target="esp32"

Diff for: scripts/download.sh

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
#!/usr/bin/env bash
22
cd tools
33

4-
ESP_IDF_VERSION="7641c8e" #4.4.4 with patch
5-
MATTER_VERSION="v1.1.0.1"
6-
ESP_MATTER_VERSION="4707b88"
7-
ARDUINO_ESP32_VERSION="2.0.9"
4+
ESP_IDF_VERSION="v4.4.5"
5+
MATTER_VERSION="08b1366"
6+
ESP_MATTER_VERSION="603296a"
7+
ARDUINO_ESP32_VERSION="2.0.11"
88

99
git clone --recursive https://github.com/espressif/esp-idf
1010
git -C esp-idf checkout $ESP_IDF_VERSION

Diff for: scripts/fill_version_info.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env bash
22

3-
ESP32_ARDUINO_MATTER_VERSION="1.0.0-beta.4"
3+
ESP32_ARDUINO_MATTER_VERSION="1.0.0-beta.6"
44

55
./scripts/build/fill_readme.sh
66
./scripts/build/fill_library_properties.sh $ESP32_ARDUINO_MATTER_VERSION

Diff for: stub_project/main/app_main.cpp

+8
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,17 @@ static esp_err_t on_attribute_update(attribute::callback_type_t type, uint16_t e
6868
return ESP_OK;
6969
}
7070

71+
void fix_project_build() {
72+
// For some reason linker will throw errors like "undefined reference to `esp_err_to_name'"
73+
// when this method is not used
74+
esp_err_t err = NULL;
75+
esp_err_to_name(err);
76+
}
7177

7278
extern "C" void app_main()
7379
{
80+
fix_project_build();
81+
7482
// Enable debug logging
7583
esp_log_level_set("*", ESP_LOG_DEBUG);
7684

Diff for: stub_project/sdkconfig.defaults.esp32

+5-4
Original file line numberDiff line numberDiff line change
@@ -1116,18 +1116,18 @@ CONFIG_HEAP_TRACING_OFF=y
11161116
# Log output
11171117
#
11181118
# CONFIG_LOG_DEFAULT_LEVEL_NONE is not set
1119-
CONFIG_LOG_DEFAULT_LEVEL_ERROR=y
1119+
# CONFIG_LOG_DEFAULT_LEVEL_ERROR is not set
11201120
# CONFIG_LOG_DEFAULT_LEVEL_WARN is not set
11211121
# CONFIG_LOG_DEFAULT_LEVEL_INFO is not set
11221122
# CONFIG_LOG_DEFAULT_LEVEL_DEBUG is not set
1123-
# CONFIG_LOG_DEFAULT_LEVEL_VERBOSE is not set
1124-
CONFIG_LOG_DEFAULT_LEVEL=1
1123+
CONFIG_LOG_DEFAULT_LEVEL_VERBOSE=y
1124+
CONFIG_LOG_DEFAULT_LEVEL=5
11251125
CONFIG_LOG_MAXIMUM_EQUALS_DEFAULT=y
11261126
# CONFIG_LOG_MAXIMUM_LEVEL_WARN is not set
11271127
# CONFIG_LOG_MAXIMUM_LEVEL_INFO is not set
11281128
# CONFIG_LOG_MAXIMUM_LEVEL_DEBUG is not set
11291129
# CONFIG_LOG_MAXIMUM_LEVEL_VERBOSE is not set
1130-
CONFIG_LOG_MAXIMUM_LEVEL=1
1130+
CONFIG_LOG_MAXIMUM_LEVEL=5
11311131
# CONFIG_LOG_COLORS is not set
11321132
CONFIG_LOG_TIMESTAMP_SOURCE_RTOS=y
11331133
# CONFIG_LOG_TIMESTAMP_SOURCE_SYSTEM is not set
@@ -2015,6 +2015,7 @@ CONFIG_SEMIHOSTFS_MAX_MOUNT_POINTS=1
20152015
# End of deprecated options
20162016

20172017
# Matter and esp-matter settings
2018+
CONFIG_MBEDTLS_HKDF_C=y
20182019
CONFIG_ENABLE_CHIP_SHELL=y
20192020

20202021
CONFIG_ENABLE_OTA_REQUESTOR=y

Diff for: stub_project/sdkconfig.defaults.esp32c3

+5-4
Original file line numberDiff line numberDiff line change
@@ -1161,18 +1161,18 @@ CONFIG_HEAP_TRACING_OFF=y
11611161
# Log output
11621162
#
11631163
# CONFIG_LOG_DEFAULT_LEVEL_NONE is not set
1164-
CONFIG_LOG_DEFAULT_LEVEL_ERROR=y
1164+
# CONFIG_LOG_DEFAULT_LEVEL_ERROR is not set
11651165
# CONFIG_LOG_DEFAULT_LEVEL_WARN is not set
11661166
# CONFIG_LOG_DEFAULT_LEVEL_INFO is not set
11671167
# CONFIG_LOG_DEFAULT_LEVEL_DEBUG is not set
1168-
# CONFIG_LOG_DEFAULT_LEVEL_VERBOSE is not set
1169-
CONFIG_LOG_DEFAULT_LEVEL=1
1168+
CONFIG_LOG_DEFAULT_LEVEL_VERBOSE=y
1169+
CONFIG_LOG_DEFAULT_LEVEL=5
11701170
CONFIG_LOG_MAXIMUM_EQUALS_DEFAULT=y
11711171
# CONFIG_LOG_MAXIMUM_LEVEL_WARN is not set
11721172
# CONFIG_LOG_MAXIMUM_LEVEL_INFO is not set
11731173
# CONFIG_LOG_MAXIMUM_LEVEL_DEBUG is not set
11741174
# CONFIG_LOG_MAXIMUM_LEVEL_VERBOSE is not set
1175-
CONFIG_LOG_MAXIMUM_LEVEL=1
1175+
CONFIG_LOG_MAXIMUM_LEVEL=5
11761176
# CONFIG_LOG_COLORS is not set
11771177
CONFIG_LOG_TIMESTAMP_SOURCE_RTOS=y
11781178
# CONFIG_LOG_TIMESTAMP_SOURCE_SYSTEM is not set
@@ -2156,6 +2156,7 @@ CONFIG_SEMIHOSTFS_MAX_MOUNT_POINTS=1
21562156
# End of deprecated options
21572157

21582158
# Matter and esp-matter settings
2159+
CONFIG_MBEDTLS_HKDF_C=y
21592160
CONFIG_ENABLE_CHIP_SHELL=y
21602161

21612162
CONFIG_ENABLE_OTA_REQUESTOR=y

Diff for: stub_project/sdkconfig.defaults.esp32s3

+5-4
Original file line numberDiff line numberDiff line change
@@ -1732,18 +1732,18 @@ CONFIG_HEAP_TRACING_OFF=y
17321732
# Log output
17331733
#
17341734
# CONFIG_LOG_DEFAULT_LEVEL_NONE is not set
1735-
CONFIG_LOG_DEFAULT_LEVEL_ERROR=y
1735+
# CONFIG_LOG_DEFAULT_LEVEL_ERROR is not set
17361736
# CONFIG_LOG_DEFAULT_LEVEL_WARN is not set
17371737
# CONFIG_LOG_DEFAULT_LEVEL_INFO is not set
17381738
# CONFIG_LOG_DEFAULT_LEVEL_DEBUG is not set
1739-
# CONFIG_LOG_DEFAULT_LEVEL_VERBOSE is not set
1740-
CONFIG_LOG_DEFAULT_LEVEL=1
1739+
CONFIG_LOG_DEFAULT_LEVEL_VERBOSE=y
1740+
CONFIG_LOG_DEFAULT_LEVEL=5
17411741
CONFIG_LOG_MAXIMUM_EQUALS_DEFAULT=y
17421742
# CONFIG_LOG_MAXIMUM_LEVEL_WARN is not set
17431743
# CONFIG_LOG_MAXIMUM_LEVEL_INFO is not set
17441744
# CONFIG_LOG_MAXIMUM_LEVEL_DEBUG is not set
17451745
# CONFIG_LOG_MAXIMUM_LEVEL_VERBOSE is not set
1746-
CONFIG_LOG_MAXIMUM_LEVEL=1
1746+
CONFIG_LOG_MAXIMUM_LEVEL=5
17471747
# CONFIG_LOG_COLORS is not set
17481748
CONFIG_LOG_TIMESTAMP_SOURCE_RTOS=y
17491749
# CONFIG_LOG_TIMESTAMP_SOURCE_SYSTEM is not set
@@ -2779,6 +2779,7 @@ CONFIG_SEMIHOSTFS_MAX_MOUNT_POINTS=1
27792779
# End of deprecated options
27802780

27812781
# Matter and esp-matter settings
2782+
CONFIG_MBEDTLS_HKDF_C=y
27822783
CONFIG_ENABLE_CHIP_SHELL=y
27832784

27842785
CONFIG_ENABLE_OTA_REQUESTOR=y

0 commit comments

Comments
 (0)