Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESP32 Arduino v3.1.x #10202

Merged
merged 238 commits into from
Dec 18, 2024
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
238 commits
Select commit Hold shift + click to select a range
e1673e4
fix(build): IDF release/v5.3 466a392a and initial changes
me-no-dev Aug 19, 2024
f77ce04
fix(build): Fix many warnings
me-no-dev Aug 19, 2024
54f1c22
fix(build): Fix warning in FFat
me-no-dev Aug 19, 2024
c7e01e7
add(build): Add initial ESP32-P4 skeleton
me-no-dev Aug 20, 2024
7fe4aa6
Merge branch 'master' into release/v3.1.x
me-no-dev Aug 21, 2024
0a8888d
Merge branch 'master' into release/v3.1.x
me-no-dev Aug 22, 2024
4c4906f
fix(uart): sleep retention (#10248)
SuGlider Aug 28, 2024
fa67115
Merge branch 'master' into release/v3.1.x
me-no-dev Aug 28, 2024
75b29fd
Merge branch 'master' into release/v3.1.x
me-no-dev Aug 28, 2024
0b84244
Update core version to 3.1.0
me-no-dev Aug 28, 2024
e6dc9db
Merge branch 'master' into release/v3.1.x
me-no-dev Aug 28, 2024
57518b8
ci(pre-commit): Apply automatic fixes
pre-commit-ci-lite[bot] Aug 28, 2024
8352caf
Merge branch 'master' into release/v3.1.x
me-no-dev Aug 28, 2024
a8677a0
Merge branch 'master' into release/v3.1.x
me-no-dev Aug 28, 2024
564612d
IDF release/v5.3 0bbd7281 (#10258)
me-no-dev Aug 28, 2024
22fb402
Merge branch 'master' into release/v3.1.x
me-no-dev Aug 28, 2024
855da42
Merge branch 'master' into release/v3.1.x
me-no-dev Sep 11, 2024
e68b1cc
Merge branch 'master' into release/v3.1.x
me-no-dev Sep 18, 2024
6768208
IDF release/v5.3 (#10272)
me-no-dev Sep 18, 2024
a4c33e3
feat(esp32p4): Add initial ESP32-P4 support (#10358)
lucasssvaz Sep 24, 2024
87c0e77
change(tools): Push generated binaries to PR
github-actions[bot] Sep 24, 2024
9398d52
Update package_esp32_index.template.json
me-no-dev Sep 24, 2024
4bb287e
fix(esp32p4): Fix compilation errors (#10371)
lucasssvaz Sep 25, 2024
7a01384
Merge branch 'master' into release/v3.1.x
me-no-dev Sep 25, 2024
6935131
Merge branch 'master' into release/v3.1.x
lucasssvaz Sep 30, 2024
8422b74
Fix touch examples JSON for P4
lucasssvaz Sep 30, 2024
a76b228
Fix ethernet examples JSON for P4
lucasssvaz Sep 30, 2024
a5a5809
Merge branch 'master' into release/v3.1.x
me-no-dev Oct 1, 2024
c980fdc
Update early system init function declaration
me-no-dev Oct 1, 2024
482c0a3
fix(psram): Do not abort if PSRAM is not found
me-no-dev Oct 1, 2024
753e203
fix(psram): ESP32-S2 does not like to early debug log
me-no-dev Oct 1, 2024
0db5bef
Merge branch 'master' into release/v3.1.x
me-no-dev Oct 1, 2024
e3499bc
Merge branch 'master' into release/v3.1.x
me-no-dev Oct 2, 2024
8af91fb
Fix build of camera web server
me-no-dev Oct 1, 2024
58c0bbc
fix(usb): Add support for ESP32-P4 to esp32-hal-tinyusb
me-no-dev Oct 2, 2024
264c858
Merge branch 'master' into release/v3.1.x
me-no-dev Oct 2, 2024
b067cd6
fix(example): Skip zigbee build for P4
P-R-O-C-H-Y Oct 2, 2024
c504728
fix(example): Use requires instead of target in ci.json
P-R-O-C-H-Y Oct 2, 2024
c3aa74f
fix(spiram): Fix OPI PSRAM init
me-no-dev Oct 2, 2024
01b256c
fix(usb): Enable TinyUSB mode for ESP32-P4
me-no-dev Oct 2, 2024
6c99740
Merge branch 'master' into release/v3.1.x
me-no-dev Oct 2, 2024
157b4c8
IDF release/v5.3 (#10403)
me-no-dev Oct 2, 2024
341dc18
fix(usb): Add support for HighSpeed USB
me-no-dev Oct 3, 2024
6d6a8f8
IDF release/v5.3 707d097b (#10416)
me-no-dev Oct 3, 2024
e12e33c
Merge branch 'master' into release/v3.1.x
lucasssvaz Oct 4, 2024
7651733
Add P4 to chip info
lucasssvaz Oct 4, 2024
4d1c9bc
Fix partitions for examples
lucasssvaz Oct 7, 2024
ba9a3a1
fix(arduino): adds ESP32-P4 to the package description (#10426)
SuGlider Oct 7, 2024
af40992
IDF release/v5.3 (#10444)
me-no-dev Oct 10, 2024
774f275
Merge branch 'master' into release/v3.1.x
me-no-dev Oct 10, 2024
81d2cbc
fix(uart): Add missing HP UARTs for ESP32-P4 (#10447)
lucasssvaz Oct 10, 2024
3733c87
replace outdated wrong `SOC_I2C_NUM` and use `SOC_HP_I2C_NUM` (#10452)
Jason2866 Oct 11, 2024
3edf518
Add support for WiFi to ESP32-P4 (#10463)
me-no-dev Oct 15, 2024
c6bf1b4
Update esp-insights version (#10456)
Asc91 Oct 15, 2024
a3f2568
IDF release/v5.3 (#10465)
me-no-dev Oct 15, 2024
592c994
Merge branch 'master' into release/v3.1.x
me-no-dev Oct 15, 2024
f706c27
Update TinyUSB init method
me-no-dev Oct 15, 2024
c676ce7
fix(p4): Move ESP-HOSTED init to WiFiGeneric
me-no-dev Oct 15, 2024
9dea05b
IDF release/v5.3 707d097b (#10473)
me-no-dev Oct 16, 2024
612fc4c
fix(pins): Adjust P4 SPI pins to ones that are available
me-no-dev Oct 17, 2024
ee1bc6b
Add RMII Ethernet support for ESP32-P4 (#10479)
me-no-dev Oct 17, 2024
9e48d9f
fix(spi): Fix P4 SPI Pin definitions
me-no-dev Oct 17, 2024
8570b3d
Fix formatting in ETH and USB
lucasssvaz Oct 17, 2024
edb4ee1
IDF release/v5.3 707d097b (#10480)
me-no-dev Oct 17, 2024
59ca4e2
Merge branch 'master' into release/v3.1.x
me-no-dev Oct 18, 2024
7cfe470
feat(touch): Support NG touch driver for P4 (#10448)
P-R-O-C-H-Y Oct 21, 2024
83d3568
feat(sdmmc): Add SDMMC support for P4 + remove BUILTIN LED (#10460)
P-R-O-C-H-Y Oct 21, 2024
03bfa52
Merge branch 'master' into release/v3.1.x
lucasssvaz Oct 21, 2024
f668557
Enable tests for ESP32P4
lucasssvaz Oct 21, 2024
c40444a
feat(matter): initial commit with arduino matter lib (#10467)
SuGlider Oct 21, 2024
f1f0e4d
Update MatterOnOffLight.ino
SuGlider Oct 21, 2024
0045cfa
fix(matter): change place of wifi credentials in code
SuGlider Oct 21, 2024
7a33a9e
fix(matter): change the place of wifi credentials in the code
SuGlider Oct 21, 2024
8ac076c
fix(matter): empty line removing - style
SuGlider Oct 21, 2024
20a28b5
fix(net): Do not use netif_index_to_name
me-no-dev Oct 22, 2024
774201a
fix(build): Require main component to include all components
me-no-dev Oct 22, 2024
1631466
fix(build): Update required components and menu
me-no-dev Oct 22, 2024
aefe8a5
IDF release/v5.3 59550599 (#10498)
me-no-dev Oct 22, 2024
0eee5c4
fix(arduino): Move extra_flags to flags (#10493)
me-no-dev Oct 22, 2024
dc1a49e
IDF release/v5.3 (#10503)
me-no-dev Oct 22, 2024
6e88445
fix(i2s): Use separate variables when reading and writing (#10509)
me-no-dev Oct 23, 2024
3554927
Merge branch 'master' into release/v3.1.x
me-no-dev Oct 23, 2024
6dfd958
fix(eth): Set default clock in pin value to zero (#10513)
me-no-dev Oct 23, 2024
9fd1bf3
Merge branch 'master' into release/v3.1.x
me-no-dev Oct 24, 2024
a3ee376
Update readme
lucasssvaz Oct 24, 2024
9ac705e
IDF release/v5.3 a0f798cf (#10522)
me-no-dev Oct 25, 2024
38a4c29
feature(rtos): Add Tasks status print function (#10515)
me-no-dev Oct 25, 2024
9aeb1ba
ESP32-P4 UART Pin Definitions (#10521)
SuGlider Oct 25, 2024
a805e06
feat(esptool): Update esptool to v4.8.1 (#10524)
lucasssvaz Oct 25, 2024
804ee12
Merge branch 'master' into release/v3.1.x
me-no-dev Oct 25, 2024
87ad78d
fix(bm): Board Manager install will fail on Windows (#10533)
me-no-dev Oct 29, 2024
f1e1f5a
Merge branch 'master' into release/v3.1.x
lucasssvaz Nov 4, 2024
de93e6e
change(tools): Push generated binaries to PR
github-actions[bot] Nov 4, 2024
a80b03e
fix(IPaddress): IPv6 restore zone id (#10546)
s-hadinger Nov 5, 2024
69825a9
feat(Matter): New Matter Endpoint - Dimmable Light (#10543)
SuGlider Nov 5, 2024
501f8a9
fix(esptool): Bump esptool version to 4.9.dev1 on 3.1.x (#10570)
lucasssvaz Nov 5, 2024
3dad918
Merge branch 'master' into release/v3.1.x
me-no-dev Nov 5, 2024
adcbc2a
Merge branch 'master' into release/v3.1.x
me-no-dev Nov 6, 2024
61d5c49
Merge branch 'master' into release/v3.1.x
lucasssvaz Nov 6, 2024
c009220
fix(wifi): Fix WiFiMulti on ESP32-P4
me-no-dev Nov 6, 2024
32e2230
fix(wifi): Fix requirements and guards for hosted Wi-Fi (#10579)
lucasssvaz Nov 6, 2024
1ecbbae
fix(wifi): Guard missing sketches for hosted Wi-Fi
lucasssvaz Nov 7, 2024
d561685
Merge branch 'master' into release/v3.1.x
me-no-dev Nov 12, 2024
f8d9ffb
fix(net): Allow to compile without IPv6 enabled (#10582)
me-no-dev Nov 12, 2024
cc40718
fix(build): Allow Arduino to compile in IDF without components (#10597)
me-no-dev Nov 12, 2024
3822a68
IDF release/v5.3 (#10599)
me-no-dev Nov 13, 2024
e9b3f26
ci(pytest): Bump pytest-embedded to 1.12.0 for P4 fixes
lucasssvaz Nov 14, 2024
3a5dbf2
Merge branch 'master' into release/v3.1.x
me-no-dev Nov 19, 2024
4a8ba42
fix weird formatting, no code change (#10617)
Jason2866 Nov 19, 2024
fe0f016
Matter example patch (#10618)
SuGlider Nov 19, 2024
2b6b5c7
feat(uart): adds Serial4 as a keyword - used by ESP32-P4 (#10619)
SuGlider Nov 19, 2024
f5ce3f7
Guard ethernet parts to make it possible to use without (#10609)
Jason2866 Nov 19, 2024
d7b5bb1
Guard WPA Enterprise support (#10616)
Jason2866 Nov 20, 2024
442679d
fix(Zigbee): Add missing direction to report commands (#10623)
P-R-O-C-H-Y Nov 20, 2024
268b31c
feat(zigbee): Add setLight APIs to manually operate lights (#10626)
P-R-O-C-H-Y Nov 20, 2024
66f7c93
Merge branch 'master' into release/v3.1.x
me-no-dev Nov 20, 2024
ff613b3
ci(uart): Disable UART test for P4 until it is fixed in Wokwi
lucasssvaz Nov 20, 2024
6bc3ce6
feat(matter): New Matter Endpoint (#10628)
SuGlider Nov 20, 2024
962ab3a
Adds a Minimum Code Matter Example (#10639)
SuGlider Nov 24, 2024
6e57662
fix compile of P4 caused from missing ")" in debug macro (#10638)
Jason2866 Nov 25, 2024
9417a84
feat(uart): [IDF 5.3] fixes HardwareSerial::updateBaudRate() using a …
SuGlider Nov 25, 2024
1730e4e
fix(zigbee): Add connected(), minor fixes, example update (#10636)
P-R-O-C-H-Y Nov 25, 2024
eb1933f
Guard crypto parts in "Update" to save resources (#10630)
Jason2866 Nov 25, 2024
0bcdd2c
Merge branch 'master' into release/v3.1.x
SuGlider Nov 25, 2024
0f3191e
fix(zigbee): Increase timeout, commision again on failure + setScanDu…
P-R-O-C-H-Y Nov 25, 2024
414e4f3
feat(Matter): add new MatterColorLight endpoint (#10654)
SuGlider Nov 26, 2024
9f5f95e
Merge branch 'master' into release/v3.1.x
me-no-dev Nov 28, 2024
c2ce738
feat(matter): New example => Wifi Prov within Matter as alternative f…
SuGlider Dec 2, 2024
9d8df8b
feat(matter): Adds Matter Enhanced Color Light Endpoint (CW/WW/RGB) (…
SuGlider Dec 2, 2024
af84da6
feat(matter): Adds a new Matter Endpoint: Generic Switch (smart butto…
SuGlider Dec 3, 2024
4eeff9b
fix: Split provisioning into two parts for better synchronization
kvp1703 Dec 3, 2024
e159bf6
refactor(uart): Refactor UART test to work with any number of UARTs (…
lucasssvaz Dec 9, 2024
92dd841
feat(Zigbee): Recall bounded devices after reboot + IEEE address opti…
P-R-O-C-H-Y Dec 9, 2024
76d1f9e
ci(pre-commit): Bump hooks versions and fix leftover files (#10680)
lucasssvaz Dec 9, 2024
7a82b8b
feat(Matter): Creates New Matter Fan Controller Endpoint (#10691)
SuGlider Dec 9, 2024
7a0775d
change(tools): Push generated binaries to PR
github-actions[bot] Dec 9, 2024
cd772f1
ci(pre-commit): Add bash script formatter and linter (#10681)
lucasssvaz Dec 9, 2024
2028ba4
fix(push): Re-comment unused code
lucasssvaz Dec 9, 2024
538efe3
feat(matter): adds new Temperature Sensor Matter Endpoint (#10698)
SuGlider Dec 9, 2024
9660e66
feat(chip): Add definition for BOOT_PIN for all chips (#10700)
me-no-dev Dec 9, 2024
8c3efc2
fix(zigbee): set rx on idle and alloc address
P-R-O-C-H-Y Dec 10, 2024
be95fc5
fix(zigbee): Set scan to 3 and remove duplicate
P-R-O-C-H-Y Dec 10, 2024
87d988f
fix(zigbee): Add getter for RxOnWhenIdle
P-R-O-C-H-Y Dec 10, 2024
a281b26
fix(zigbee): Move button and led pins from defines
P-R-O-C-H-Y Dec 10, 2024
d7492b1
fix(example): Lower the delay for sleepy device
P-R-O-C-H-Y Dec 10, 2024
3d8014b
Merge branch 'master' into release/v3.1.x
lucasssvaz Dec 10, 2024
45d8630
ci(tests): Remove 3rd party tests
lucasssvaz Dec 10, 2024
5a8cba8
feat(Matter): Adds New Matter Humidity Sensor Endpoint (#10703)
SuGlider Dec 10, 2024
de4824f
feat(matter_examples): apply boot button change to all examples (#10702)
SuGlider Dec 10, 2024
178af05
feat(matter): adds a new matter endpoint for pressure sensor
SuGlider Dec 10, 2024
59bc22a
IDF release/v5.3 9a6aba74
me-no-dev Dec 11, 2024
9c38368
feat(matter): creates a matter contact sensor endpoint
SuGlider Dec 11, 2024
1f9eb74
fix(matter): fix a bad error message - left over
SuGlider Dec 11, 2024
07a3e62
fix(example): Remove wait on Serial after begin
P-R-O-C-H-Y Dec 11, 2024
7c95911
fix(SDMMC): Remove need for BOARD_HAS_SDMMC for esp32
P-R-O-C-H-Y Dec 11, 2024
bfc45db
ci(tests): Re-enable UART test for P4
lucasssvaz Dec 11, 2024
56a9b1d
ci(pre-commit): Apply automatic fixes
pre-commit-ci-lite[bot] Dec 11, 2024
dfa7324
IDF release/v5.3 083aad99
me-no-dev Dec 11, 2024
8cbc395
ci(pre-commit): Apply automatic fixes
pre-commit-ci-lite[bot] Dec 11, 2024
3a8d4c5
fix(example): Use Serial in printBoundDevices()
P-R-O-C-H-Y Dec 11, 2024
7e908be
Merge pull request #10708 from espressif/ci/remove_pio_tests
me-no-dev Dec 11, 2024
626a09f
Merge pull request #10711 from espressif/idf-release/v5.3
me-no-dev Dec 11, 2024
639a08e
Merge pull request #10710 from SuGlider/matter_pressure_sensor
me-no-dev Dec 11, 2024
2bd1ec4
Merge branch 'release/v3.1.x' into matter_contact_sensor
me-no-dev Dec 11, 2024
c3ddcd7
Merge pull request #10713 from P-R-O-C-H-Y/fix/sdmmc-esp32-define
me-no-dev Dec 11, 2024
83165f3
Merge pull request #10704 from P-R-O-C-H-Y/fix/zigbee-rejoin-battery-…
me-no-dev Dec 11, 2024
4ecfd35
ci(pre-commit): Apply automatic fixes
pre-commit-ci-lite[bot] Dec 11, 2024
d55160c
Merge pull request #10712 from SuGlider/matter_contact_sensor
me-no-dev Dec 11, 2024
59d51de
Merge pull request #10677 from kvp1703/fix/wifi_provision
me-no-dev Dec 11, 2024
a1f58ad
Merge branch 'master' into release/v3.1.x
me-no-dev Dec 11, 2024
e17900b
feat(matter): adds matter occupancy sensor endpoint
SuGlider Dec 11, 2024
d072cdd
change(esptool): Bump to version 4.9.dev3
lucasssvaz Dec 11, 2024
b9a0122
fix(get): Fix deprecation warning
lucasssvaz Dec 11, 2024
c8f23ec
change(tools): Push generated binaries to PR
github-actions[bot] Dec 11, 2024
217eec6
IDF release/v5.3 083aad99
me-no-dev Dec 12, 2024
3bf8f23
fix(matter): removed commentary that has no code related
SuGlider Dec 12, 2024
a4f96e9
Merge pull request #10719 from espressif/idf-release/v5.3
me-no-dev Dec 12, 2024
4cf0f20
ci(pre-commit): Apply automatic fixes
pre-commit-ci-lite[bot] Dec 12, 2024
77df256
feat(zigbee): Add pressure, flow and occupancy sensor
P-R-O-C-H-Y Dec 12, 2024
aef691e
fix(example): use correct print format
P-R-O-C-H-Y Dec 12, 2024
b4d7227
fix(zigbee): Fix functions comment
P-R-O-C-H-Y Dec 12, 2024
5e7139b
fix(cmake): Update CMakeLists.txt
P-R-O-C-H-Y Dec 12, 2024
b64b850
feat(zigbee): Fill the keywords.txt
P-R-O-C-H-Y Dec 12, 2024
e060b02
feat(matter): adds new Matter Occupancy Sensor endpoint (#10717)
SuGlider Dec 12, 2024
c310c1a
feat(matter): adds matter on off plugin endpoint
SuGlider Dec 12, 2024
c126f01
Merge branch 'release/v3.1.x' into matter_plugin
SuGlider Dec 12, 2024
8f0f46f
ci(pre-commit): Apply automatic fixes
pre-commit-ci-lite[bot] Dec 12, 2024
c6ec112
change(tools): Push generated binaries to PR
github-actions[bot] Dec 12, 2024
7205ee8
Merge pull request #10718 from espressif/change/esptool
me-no-dev Dec 12, 2024
7dc1c92
change(tools): Push generated binaries to PR
github-actions[bot] Dec 12, 2024
ce9a34d
fix(zigbee): Update example + pressure unit
P-R-O-C-H-Y Dec 13, 2024
44e1559
feat(zigbee): Add carbon dioxide sensor ed
P-R-O-C-H-Y Dec 13, 2024
b72e866
fix(zigbee): mention Carbon dioxide delta reporting is not supported
P-R-O-C-H-Y Dec 13, 2024
57339ba
feat(zigbee): Update keywords.txt with co2 sensor
P-R-O-C-H-Y Dec 13, 2024
faed832
ci(pre-commit): Apply automatic fixes
pre-commit-ci-lite[bot] Dec 13, 2024
a7e2e64
Apply suggestions from code review
P-R-O-C-H-Y Dec 13, 2024
6bc971c
fix(zigbee): fix formatting of defines
P-R-O-C-H-Y Dec 13, 2024
a44e457
feat(Zigbee): Add Zigbee Dimmable light endpoint class
FaBjE Dec 13, 2024
aa0c3da
feat(Zigbee): Add Zigbee Dimmable light example
FaBjE Dec 13, 2024
538c57a
feat(Zigbee): Update Zigbee Dimmable light example to 3.1.x features
FaBjE Dec 13, 2024
a0d57bb
feat(Zigbee): Update Zigbee Dimmable light example config/define names
FaBjE Dec 13, 2024
b6d0553
ci(pre-commit): Apply automatic fixes
pre-commit-ci-lite[bot] Dec 13, 2024
af541a5
feat(Zigbee): Add Zigbee Dimmable light to CMakeLists.txt
FaBjE Dec 14, 2024
42f9cfc
feat(Zigbee): Add additional zigbee enabled check
FaBjE Dec 14, 2024
417c7ee
Merge pull request #10720 from P-R-O-C-H-Y/feat/zigbee-multi-sensor
me-no-dev Dec 14, 2024
8e59a1b
Merge pull request #10722 from SuGlider/matter_plugin
me-no-dev Dec 14, 2024
3c3ff48
Merge branch 'master' into release/v3.1.x
me-no-dev Dec 14, 2024
ff7e504
feat(Zigbee): Applied formatter + add formatter protection
FaBjE Dec 14, 2024
ae274ee
feat(Zigbee): Adjusted example author comment
FaBjE Dec 14, 2024
ddf8c42
ci(pre-commit): Apply automatic fixes
pre-commit-ci-lite[bot] Dec 16, 2024
4f863d5
fix(zigbee): Rename method to avoid future conflict
P-R-O-C-H-Y Dec 16, 2024
926c043
Merge pull request #10727 from FaBjE/feature/zigbeeDimmableLight
me-no-dev Dec 16, 2024
a207d58
Merge branch 'master' into release/v3.1.x
me-no-dev Dec 16, 2024
31dc520
feat(matter): removed while(serial) and ipv6 enabling, which is a def…
SuGlider Dec 16, 2024
7d465f3
feat(matter): fix commentaries related to feature changes and log mes…
SuGlider Dec 16, 2024
1ef1e7d
fix(version): Update Zigbee Library version
me-no-dev Dec 16, 2024
1dff8bc
feat(matter) adds Identification callback to all matter endpoints
SuGlider Dec 16, 2024
c688f30
fix(clk_src): Fix error as APLL is not yet supported for P4
lucasssvaz Dec 16, 2024
0e22bb4
feat(matter): moved all identify callback to endpoint.h
SuGlider Dec 16, 2024
3f7c597
feat(matter):replacing code in examples and header files
SuGlider Dec 16, 2024
43c419e
ci(pre-commit): Apply automatic fixes
pre-commit-ci-lite[bot] Dec 16, 2024
cd7a775
fix(matter): missing logged message type value
SuGlider Dec 16, 2024
30e55fc
Merge pull request #10732 from SuGlider/matter_while_serial
me-no-dev Dec 16, 2024
eb72580
Merge pull request #10735 from lucasssvaz/fix/p4_apll
me-no-dev Dec 16, 2024
6a6edcb
Merge branch 'master' into release/v3.1.x
me-no-dev Dec 16, 2024
ba8d04e
Merge branch 'release/v3.1.x' into matter_identify_callback
SuGlider Dec 16, 2024
6f79e03
fix(matter): fixes identify and double begin() call
SuGlider Dec 16, 2024
7302be9
fix(matter): log_i() leftover
SuGlider Dec 16, 2024
1ef603a
ci(pre-commit): Apply automatic fixes
pre-commit-ci-lite[bot] Dec 16, 2024
017f2df
fix(matter): ci codespell
SuGlider Dec 16, 2024
bce0108
ci(pre-commit): Apply automatic fixes
pre-commit-ci-lite[bot] Dec 16, 2024
e2dc5b6
fix(matter): stashing merge error
SuGlider Dec 16, 2024
71e57ea
ci(pre-commit): Apply automatic fixes
pre-commit-ci-lite[bot] Dec 16, 2024
6bf6df2
Merge pull request #10734 from SuGlider/matter_identify_callback
me-no-dev Dec 16, 2024
2fc6791
ci(debug): Compile once a week with verbose log level
lucasssvaz Dec 17, 2024
238c384
fix(readme): Update readme and fix badges
lucasssvaz Dec 17, 2024
3ffee27
Merge pull request #10745 from lucasssvaz/fix/update_readme
me-no-dev Dec 18, 2024
4fdf9ef
Merge pull request #10740 from lucasssvaz/ci/sched_debug
me-no-dev Dec 18, 2024
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
164 changes: 164 additions & 0 deletions libraries/Matter/examples/MatterOnIdentify/MatterOnIdentify.ino
Original file line number Diff line number Diff line change
@@ -0,0 +1,164 @@
// Copyright 2024 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at

// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

/*
* This example is the smallest code that will create a Matter Device which can be
* commissioned and controlled from a Matter Environment APP.
* It controls a GPIO that could be attached to a LED for visualization.
* Additionally the ESP32 will send debug messages indicating the Matter activity.
* Turning DEBUG Level ON may be useful to following Matter Accessory and Controller messages.
*
* This example is a simple Matter On/Off Light that can be controlled by a Matter Controller.
* It demonstrates how to use On Identify callback when the Identify Cluster is called.
* The Matter user APP can be used to request the device to identify itself by blinking the LED.
*/

// Matter Manager
#include <Matter.h>
#include <WiFi.h>

// List of Matter Endpoints for this Node
// Single On/Off Light Endpoint - at least one per node
MatterOnOffLight OnOffLight;

// WiFi is manually set and started
const char *ssid = "your-ssid"; // Change this to your WiFi SSID
const char *password = "your-password"; // Change this to your WiFi password

// Light GPIO that can be controlled by Matter APP
#ifdef LED_BUILTIN
const uint8_t ledPin = LED_BUILTIN;
#else
const uint8_t ledPin = 2; // Set your pin here if your board has not defined LED_BUILTIN
#endif

// set your board USER BUTTON pin here - decommissioning button
const uint8_t buttonPin = BOOT_PIN; // Set your pin here. Using BOOT Button.

// Button control - decommision the Matter Node
uint32_t button_time_stamp = 0; // debouncing control
bool button_state = false; // false = released | true = pressed
const uint32_t decommissioningTimeout = 5000; // keep the button pressed for 5s, or longer, to decommission

// Identify Flag and blink time - Blink the LED
const uint8_t identifyLedPin = ledPin; // uses the same LED as the Light - change if needed
volatile bool identifyFlag = false; // Flag to start the Blink when in Identify state
bool identifyBlink = false; // Blink state when in Identify state

// Matter Protocol Endpoint (On/OFF Light) Callback
bool onOffLightCallback(bool state) {
digitalWrite(ledPin, state ? HIGH : LOW);
// This callback must return the success state to Matter core
return true;
}

// Identification shall be done by Blink in Red or just the GPIO when no LED_BUILTIN is not defined
bool onIdentifyLightCallback(bool identifyIsActive) {
Serial.printf("Identify Cluster is %s\r\n", identifyIsActive ? "Active" : "Inactive");
if (identifyIsActive) {
// Start Blinking the light in loop()
identifyFlag = true;
identifyBlink = !OnOffLight; // Start with the inverted light state
} else {
// Stop Blinking and restore the light to the its last state
identifyFlag = false;
// force returning to the original state by toggling the light twice
OnOffLight.toggle();
OnOffLight.toggle();
}
return true;
}

void setup() {
// Initialize the USER BUTTON (Boot button) that will be used to decommission the Matter Node
pinMode(buttonPin, INPUT_PULLUP);
// Initialize the LED GPIO
pinMode(ledPin, OUTPUT);

Serial.begin(115200);

// Manually connect to WiFi
WiFi.begin(ssid, password);
// Wait for connection
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
}
Serial.println();

// Initialize at least one Matter EndPoint
OnOffLight.begin();

// On Identify Callback - Blink the LED
OnOffLight.onIdentify(onIdentifyLightCallback);

// Associate a callback to the Matter Controller
OnOffLight.onChange(onOffLightCallback);

// Matter beginning - Last step, after all EndPoints are initialized
Matter.begin();

// Check Matter Accessory Commissioning state, which may change during execution of loop()
if (!Matter.isDeviceCommissioned()) {
Serial.println("");
Serial.println("Matter Node is not commissioned yet.");
Serial.println("Initiate the device discovery in your Matter environment.");
Serial.println("Commission it to your Matter hub with the manual pairing code or QR code");
Serial.printf("Manual pairing code: %s\r\n", Matter.getManualPairingCode().c_str());
Serial.printf("QR code URL: %s\r\n", Matter.getOnboardingQRCodeUrl().c_str());
// waits for Matter Occupancy Sensor Commissioning.
uint32_t timeCount = 0;
while (!Matter.isDeviceCommissioned()) {
delay(100);
if ((timeCount++ % 50) == 0) { // 50*100ms = 5 sec
Serial.println("Matter Node not commissioned yet. Waiting for commissioning.");
}
}
Serial.println("Matter Node is commissioned and connected to Wi-Fi. Ready for use.");
}
}

void loop() {
// check if the Light is in identify state and blink it every 500ms (delay loop time)
if (identifyFlag) {
#ifdef LED_BUILTIN
uint8_t brightness = 32 * identifyBlink;
rgbLedWrite(identifyLedPin, brightness, 0, 0);
#else
digitalWrite(identifyLedPin, identifyBlink ? HIGH : LOW);
#endif
identifyBlink = !identifyBlink;
}

// Check if the button has been pressed
if (digitalRead(buttonPin) == LOW && !button_state) {
// deals with button debouncing
button_time_stamp = millis(); // record the time while the button is pressed.
button_state = true; // pressed.
}

if (digitalRead(buttonPin) == HIGH && button_state) {
button_state = false; // released
}

// Onboard User Button is kept pressed for longer than 5 seconds in order to decommission matter node
uint32_t time_diff = millis() - button_time_stamp;
if (button_state && time_diff > decommissioningTimeout) {
Serial.println("Decommissioning the Light Matter Accessory. It shall be commissioned again.");
Matter.decommission();
button_time_stamp = millis(); // avoid running decommissining again, reboot takes a second or so
}

delay(500); // works as a debounce for the button and also for the LED blink
}
7 changes: 7 additions & 0 deletions libraries/Matter/examples/MatterOnIdentify/ci.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"fqbn_append": "PartitionScheme=huge_app",
"requires": [
"CONFIG_SOC_WIFI_SUPPORTED=y",
"CONFIG_ESP_MATTER_ENABLE_DATA_MODEL=y"
]
}
28 changes: 21 additions & 7 deletions libraries/Matter/src/Matter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
using namespace esp_matter;
using namespace esp_matter::attribute;
using namespace esp_matter::endpoint;
using namespace esp_matter::identification;
using namespace chip::app::Clusters;

constexpr auto k_timeout_seconds = 300;
Expand All @@ -29,11 +30,6 @@ static bool _matter_has_started = false;
static node::config_t node_config;
static node_t *deviceNode = NULL;

typedef void *app_driver_handle_t;
esp_err_t matter_light_attribute_update(
app_driver_handle_t driver_handle, uint16_t endpoint_id, uint32_t cluster_id, uint32_t attribute_id, esp_matter_attr_val_t *val
);

// This callback is called for every attribute update. The callback implementation shall
// handle the desired attributes and return an appropriate error code. If the attribute
// is not of your interest, please do not return an error code and strictly return ESP_OK.
Expand Down Expand Up @@ -67,8 +63,26 @@ static esp_err_t app_attribute_update_cb(
// This callback is invoked when clients interact with the Identify Cluster.
// In the callback implementation, an endpoint can identify itself. (e.g., by flashing an LED or light).
static esp_err_t app_identification_cb(identification::callback_type_t type, uint16_t endpoint_id, uint8_t effect_id, uint8_t effect_variant, void *priv_data) {
log_i("Identification callback: type: %u, effect: %u, variant: %u", type, effect_id, effect_variant);
return ESP_OK;
log_d("Identification callback to endpoint %d: type: %u, effect: %u, variant: %u", endpoint_id, type, effect_id, effect_variant);
esp_err_t err = ESP_OK;
MatterEndPoint *ep = (MatterEndPoint *)priv_data; // endpoint pointer to base class
// Identify the endpoint sending a counter to the application
bool identifyIsActive = false;

if (type == identification::callback_type_t::START) {
log_v("Identification callback: START");
identifyIsActive = true;
} else if (type == identification::callback_type_t::EFFECT) {
log_v("Identification callback: EFFECT");
} else if (type == identification::callback_type_t::STOP) {
identifyIsActive = false;
log_v("Identification callback: STOP");
}
if (ep != NULL) {
err = ep->endpointIdentifyCB(endpoint_id, identifyIsActive) ? ESP_OK : ESP_FAIL;
}

return err;
}

// This callback is invoked for all Matter events. The application can handle the events as required.
Expand Down
14 changes: 14 additions & 0 deletions libraries/Matter/src/MatterEndPoint.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,21 @@ class MatterEndPoint {
// this function is called by Matter internal event processor. It could be overwritten by the application, if necessary.
virtual bool attributeChangeCB(uint16_t endpoint_id, uint32_t cluster_id, uint32_t attribute_id, esp_matter_attr_val_t *val) = 0;

// This callback is invoked when clients interact with the Identify Cluster of an specific endpoint.
bool endpointIdentifyCB(uint16_t endpoint_id, bool identifyIsEnabled) {
if (_onEndPointIdentifyCB) {
return _onEndPointIdentifyCB(identifyIsEnabled);
}
return true;
}
// User callaback for the Identify Cluster functionality
using EndPointIdentifyCB = std::function<bool(bool)>;
void onIdentify(EndPointIdentifyCB onEndPointIdentifyCB) {
_onEndPointIdentifyCB = onEndPointIdentifyCB;
}

protected:
uint16_t endpoint_id = 0;
EndPointIdentifyCB _onEndPointIdentifyCB = NULL;
};
#endif /* CONFIG_ESP_MATTER_ENABLE_DATA_MODEL */
7 changes: 6 additions & 1 deletion libraries/Matter/src/MatterEndpoints/MatterColorLight.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,13 @@ MatterColorLight::~MatterColorLight() {

bool MatterColorLight::begin(bool initialState, espHsvColor_t _colorHSV) {
ArduinoMatter::_init();
rgb_color_light::config_t light_config;

if (getEndPointId() != 0) {
log_e("Matter RGB Color Light with Endpoint Id %d device has already been created.", getEndPointId());
return false;
}

rgb_color_light::config_t light_config;
light_config.on_off.on_off = initialState;
light_config.on_off.lighting.start_up_on_off = nullptr;
onOffState = initialState;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,17 @@ using namespace chip::app::Clusters;
bool MatterColorTemperatureLight::attributeChangeCB(uint16_t endpoint_id, uint32_t cluster_id, uint32_t attribute_id, esp_matter_attr_val_t *val) {
bool ret = true;
if (!started) {
log_e("Matter CW_WW Light device has not begun.");
log_e("Matter Temperature Light device has not begun.");
return false;
}

log_d("CW_WW Attr update callback: endpoint: %u, cluster: %u, attribute: %u, val: %u", endpoint_id, cluster_id, attribute_id, val->val.u32);
log_d("Temperature Attr update callback: endpoint: %u, cluster: %u, attribute: %u, val: %u", endpoint_id, cluster_id, attribute_id, val->val.u32);

if (endpoint_id == getEndPointId()) {
switch (cluster_id) {
case OnOff::Id:
if (attribute_id == OnOff::Attributes::OnOff::Id) {
log_d("CW_WW Light On/Off State changed to %d", val->val.b);
log_d("Temperature Light On/Off State changed to %d", val->val.b);
if (_onChangeOnOffCB != NULL) {
ret &= _onChangeOnOffCB(val->val.b);
}
Expand All @@ -50,7 +50,7 @@ bool MatterColorTemperatureLight::attributeChangeCB(uint16_t endpoint_id, uint32
break;
case LevelControl::Id:
if (attribute_id == LevelControl::Attributes::CurrentLevel::Id) {
log_d("CW_WW Light Brightness changed to %d", val->val.u8);
log_d("Temperature Light Brightness changed to %d", val->val.u8);
if (_onChangeBrightnessCB != NULL) {
ret &= _onChangeBrightnessCB(val->val.u8);
}
Expand All @@ -64,7 +64,7 @@ bool MatterColorTemperatureLight::attributeChangeCB(uint16_t endpoint_id, uint32
break;
case ColorControl::Id:
if (attribute_id == ColorControl::Attributes::ColorTemperatureMireds::Id) {
log_d("CW_WW Light Temperature changed to %d", val->val.u16);
log_d("Temperature Light Temperature changed to %d", val->val.u16);
if (_onChangeTemperatureCB != NULL) {
ret &= _onChangeTemperatureCB(val->val.u16);
}
Expand All @@ -89,8 +89,13 @@ MatterColorTemperatureLight::~MatterColorTemperatureLight() {

bool MatterColorTemperatureLight::begin(bool initialState, uint8_t brightness, uint16_t ColorTemperature) {
ArduinoMatter::_init();
color_temperature_light::config_t light_config;

if (getEndPointId() != 0) {
log_e("Matter Temperature Light with Endpoint Id %d device has already been created.", getEndPointId());
return false;
}

color_temperature_light::config_t light_config;
light_config.on_off.on_off = initialState;
light_config.on_off.lighting.start_up_on_off = nullptr;
onOffState = initialState;
Expand All @@ -108,12 +113,12 @@ bool MatterColorTemperatureLight::begin(bool initialState, uint8_t brightness, u
// endpoint handles can be used to add/modify clusters.
endpoint_t *endpoint = color_temperature_light::create(node::get(), &light_config, ENDPOINT_FLAG_NONE, (void *)this);
if (endpoint == nullptr) {
log_e("Failed to create CW_WW light endpoint");
log_e("Failed to create Temperature Light endpoint");
return false;
}

setEndPointId(endpoint::get_id(endpoint));
log_i("CW_WW Light created with endpoint_id %d", getEndPointId());
log_i("Temperature Light created with endpoint_id %d", getEndPointId());

/* Mark deferred persistence for some attributes that might be changed rapidly */
cluster_t *level_control_cluster = cluster::get(endpoint, LevelControl::Id);
Expand All @@ -134,7 +139,7 @@ void MatterColorTemperatureLight::end() {

bool MatterColorTemperatureLight::setOnOff(bool newState) {
if (!started) {
log_e("Matter CW_WW Light device has not begun.");
log_e("Matter Temperature Light device has not begun.");
return false;
}

Expand Down Expand Up @@ -175,7 +180,7 @@ bool MatterColorTemperatureLight::toggle() {

bool MatterColorTemperatureLight::setBrightness(uint8_t newBrightness) {
if (!started) {
log_w("Matter CW_WW Light device has not begun.");
log_w("Matter Temperature Light device has not begun.");
return false;
}

Expand Down Expand Up @@ -206,7 +211,7 @@ uint8_t MatterColorTemperatureLight::getBrightness() {

bool MatterColorTemperatureLight::setColorTemperature(uint16_t newTemperature) {
if (!started) {
log_w("Matter CW_WW Light device has not begun.");
log_w("Matter Temperature Light device has not begun.");
return false;
}

Expand Down
5 changes: 5 additions & 0 deletions libraries/Matter/src/MatterEndpoints/MatterContactSensor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ MatterContactSensor::~MatterContactSensor() {
bool MatterContactSensor::begin(bool _contactState) {
ArduinoMatter::_init();

if (getEndPointId() != 0) {
log_e("Matter Contact Sensor with Endpoint Id %d device has already been created.", getEndPointId());
return false;
}

contact_sensor::config_t contact_sensor_config;
contact_sensor_config.boolean_state.state_value = _contactState;

Expand Down
6 changes: 5 additions & 1 deletion libraries/Matter/src/MatterEndpoints/MatterDimmableLight.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,12 @@ MatterDimmableLight::~MatterDimmableLight() {

bool MatterDimmableLight::begin(bool initialState, uint8_t brightness) {
ArduinoMatter::_init();
dimmable_light::config_t light_config;
if (getEndPointId() != 0) {
log_e("Matter Dimmable Light with Endpoint Id %d device has already been created.", getEndPointId());
return false;
}

dimmable_light::config_t light_config;
light_config.on_off.on_off = initialState;
light_config.on_off.lighting.start_up_on_off = nullptr;
onOffState = initialState;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,13 @@ MatterEnhancedColorLight::~MatterEnhancedColorLight() {

bool MatterEnhancedColorLight::begin(bool initialState, espHsvColor_t _colorHSV, uint8_t brightness, uint16_t ColorTemperature) {
ArduinoMatter::_init();
enhanced_color_light::config_t light_config;

if (getEndPointId() != 0) {
log_e("Matter Enhanced ColorLight with Endpoint Id %d device has already been created.", getEndPointId());
return false;
}

enhanced_color_light::config_t light_config;
light_config.on_off.on_off = initialState;
light_config.on_off.lighting.start_up_on_off = nullptr;
onOffState = initialState;
Expand Down
Loading
Loading