Coder Social home page Coder Social logo

yacubane / esp32-arduino-matter Goto Github PK

View Code? Open in Web Editor NEW
273.0 15.0 24.0 392.99 MB

Matter IoT protocol library for ESP32 working on Arduino framework

License: Apache License 2.0

arduino connectedhomeip esp32 esp32-arduino matter esp32-arduino-matter iot protocol

esp32-arduino-matter's People

Contributors

pastudan avatar yacubane avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

esp32-arduino-matter's Issues

Support OTA by default / add switch

As noted here the Espressif's Matter SDK supports ota requestor out of the box. However, after announcing the provider via chip tool to the ESP32 running the light app code based on this library, an unsupported cluster error emerges:

>>> otasoftwareupdaterequestor announce-ota-provider 12345 0 0 0 0x7283 0
[1682327383.313946][3064:3069] CHIP:TOO: Sending command to node 0x7283
[1682327383.314487][3064:3069] CHIP:CSM: FindOrEstablishSession: PeerId = [1:0000000000007283]
[1682327383.314543][3064:3069] CHIP:CSM: FindOrEstablishSession: No existing OperationalSessionSetup instance found
[1682327383.314592][3064:3069] CHIP:CTL: Found an existing secure session to [1:0000000000007283]!
[1682327383.314640][3064:3069] CHIP:CTL: OperationalSessionSetup[1:0000000000007283]: State change 1 --> 5
[1682327383.314688][3064:3069] CHIP:TOO: Sending cluster (0x0000002A) command (0x00000000) on endpoint 0
[1682327383.314748][3064:3069] CHIP:DMG: ICR moving to [AddingComm]
[1682327383.314797][3064:3069] CHIP:DMG: ICR moving to [AddedComma]
[1682327383.314958][3064:3069] CHIP:EM: <<< [E:53616i M:146168965] (S) Msg TX to 1:0000000000007283 [015A] --- Type 0001:08 (IM:InvokeCommandRequest)
[1682327383.315024][3064:3069] CHIP:IN: (S) Sending msg 146168965 on secure session with LSID: 40899
[1682327383.315324][3064:3069] CHIP:DMG: ICR moving to [CommandSen]
[1682327383.507389][3064:3069] CHIP:EM: >>> [E:53616i M:122838963 (Ack:146168965)] (S) Msg RX from 1:0000000000007283 [015A] --- Type 0001:09 (IM:InvokeCommandResponse)
[1682327383.507464][3064:3069] CHIP:EM: Found matching exchange: 53616i, Delegate: 0x7fa0031d18
[1682327383.507516][3064:3069] CHIP:EM: Rxd Ack; Removing MessageCounter:146168965 from Retrans Table on exchange 53616i
[1682327383.507568][3064:3069] CHIP:DMG: ICR moving to [ResponseRe]
[1682327383.507631][3064:3069] CHIP:DMG: InvokeResponseMessage =
[1682327383.507676][3064:3069] CHIP:DMG: {
[1682327383.507721][3064:3069] CHIP:DMG:        suppressResponse = false,
[1682327383.507774][3064:3069] CHIP:DMG:        InvokeResponseIBs =
[1682327383.507830][3064:3069] CHIP:DMG:        [
[1682327383.507881][3064:3069] CHIP:DMG:                InvokeResponseIB =
[1682327383.507946][3064:3069] CHIP:DMG:                {
[1682327383.508007][3064:3069] CHIP:DMG:                        CommandStatusIB =
[1682327383.508077][3064:3069] CHIP:DMG:                        {
[1682327383.508146][3064:3069] CHIP:DMG:                                CommandPathIB =
[1682327383.508224][3064:3069] CHIP:DMG:                                {
[1682327383.508304][3064:3069] CHIP:DMG:                                        EndpointId = 0x0,
[1682327383.508392][3064:3069] CHIP:DMG:                                        ClusterId = 0x2a,
[1682327383.508480][3064:3069] CHIP:DMG:                                        CommandId = 0x0,
[1682327383.508566][3064:3069] CHIP:DMG:                                },
[1682327383.508647][3064:3069] CHIP:DMG:
[1682327383.508724][3064:3069] CHIP:DMG:                                StatusIB =
[1682327383.508805][3064:3069] CHIP:DMG:                                {
[1682327383.508886][3064:3069] CHIP:DMG:                                        status = 0xc3 (UNSUPPORTED_CLUSTER),
[1682327383.508972][3064:3069] CHIP:DMG:                                },
[1682327383.509051][3064:3069] CHIP:DMG:
[1682327383.509187][3064:3069] CHIP:DMG:                        },
[1682327383.509262][3064:3069] CHIP:DMG:
[1682327383.509330][3064:3069] CHIP:DMG:                },
[1682327383.509392][3064:3069] CHIP:DMG:
[1682327383.509451][3064:3069] CHIP:DMG:        ],
[1682327383.509508][3064:3069] CHIP:DMG:
[1682327383.509560][3064:3069] CHIP:DMG:        InteractionModelRevision = 1
[1682327383.509611][3064:3069] CHIP:DMG: },
[1682327383.509674][3064:3069] CHIP:DMG: Received Command Response Status for Endpoint=0 Cluster=0x0000_002A Command=0x0000_0000 Status=0xc3
[1682327383.509731][3064:3069] CHIP:TOO: Error: IM Error 0x000005C3: General error: 0xc3 (UNSUPPORTED_CLUSTER)
[1682327383.509784][3064:3069] CHIP:DMG: ICR moving to [AwaitingDe]
[1682327383.509898][3064:3069] CHIP:EM: <<< [E:53616i M:146168966 (Ack:122838963)] (S) Msg TX to 1:0000000000007283 [015A] --- Type 0000:10 (SecureChannel:StandaloneAck)
[1682327383.509973][3064:3069] CHIP:IN: (S) Sending msg 146168966 on secure session with LSID: 40899
[1682327383.510054][3064:3064] CHIP:TOO: Run command failure: IM Error 0x000005C3: General error: 0xc3 (UNSUPPORTED_C

My partitions.csv:

# Name,   Type, SubType, Offset,   Size
# Note: if you have increased the bootloader size, make sure to update the offsets to avoid overlap
nvs,      data, nvs,     ,         20K
otadata,  data, ota,     ,         8K
ota_0,    0,    ota_0,   ,         1792K
ota_1,    0,    ota_1,   ,         1792K
spiffs,   data, spiffs,  ,         384K
coredump, data, coredump,,         64K

Commands prior to the announcement:

chip-tool interactive start
pairing ble-wifi 0x7283 WIFI_SSID WIFI_PSK 20202021 3840
onoff toggle 0x7283 0x1

--- In a new ssh terminal at the same device: chip-ota-provider-app -f update.bin

pairing onnetwork 12345 20202021
accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, {"fabricIndex": 1, "privilege": 3, "authMode": 2, "subjects": null, "targets": [{"cluster": 41, "endpoint": null, "deviceType": null}]}]' 12345 0
otasoftwareupdaterequestor announce-ota-provider 12345 0 0 0 0x7283 0

Decommissioning

I've been digging through this project, and the ESP/Connectedhomeip libraries, but I can't for the life of me figure out how to decommission my ESP32-C3. Well I can, I just have to upload the firmware again and that's not a great solution.
Is there a function somewhere that I'm missing in this esp32-arduino-matter library that forces the ESP32 to either decommission or recommission?
Example: I have my prototype connected into CHIP, but I want to test it in Smartthings - I'd like to implement something like holding down a button while applying power to clear out the current pairing.

Or another use case is if Commissioning only works half way, the ESP32 thinks it is happy but the App cannot see it.

Connection with SmartThings Hub V3

Thanks for this great work! I have been successful in commissioning the ESP32 switch with SmartThings, using an iPhone. It wasn't smooth and took many attempts, each time covering a few more steps before I got it connected. One major holdup was when it tried to write to iCloud and failed. I attributed it to my iCloud being full. But, then it went through. Stayed connected for two days.
Now the sad part, it has been offline since last 10 hours and I have tried power cycling the device. Not sure where to start investigating.
When it completed commissioning, Alexa (connected to SmartThings) picked it up immediately and Google Home, a few minutes later. Could control the switch using voice and app. Couldn't share with HA Matter server...couldn't figure out how.

Matter Thermometer Example

Hey Guys!!
It's my first time using this library! (Btw, awesome library, and very helpful).

I need help with two things:
First is, I'm developing a device capable of reading temperature from a sensor and somehow I wanna make that data available so I can see it in my Google Home App. I saw some examples for button events etc but how can I "send" that data so it can be acessed?
Second is, how do I get the QR code to make the connection?

Sorry if some of this questions are kinda weird. It's my first time seeing this and I'm starting to explore and I'm kinda lost with all this information.

Device shows as offline in Google Home

Hello, I got the example led working and added to my Google Home with adding testing vendor and product ID. 0xfff1 and 0x8000.

Using esp32 dev board.

I'm also able to fetch technical information from esp in the home app, so communication seems to be established. I'm just not able to activate/deactivate led button.

Arduino IDE Update broke the library?

Everything was working on Tuesday (09-April), but this morning (12-APR) there were some updates from the ardiuno IDE, so I installed those (one was a board definition update, not sure on the other one), now I am getting a bunch of compile issues that seem to come back to this (first line I can see in the output terminal).

....libraries\ESP32_Arduino_Matter\src/platform/ConfigurationManager.h:205:16: note: suggested alternative: '__underlying_type'
location = to_underlying(chip::app::Clusters::GeneralCommissioning::RegulatoryLocationType::kIndoor);
^~~~~~~~~~~~~
__underlying_type

potentially this one that was updated yesterday
https://github.com/espressif/arduino-esp32/releases/tag/2.0.15
Reverting back to 2.0.11 didnt fix the issue so not likely the cause

How to obtain pin and discriminator / full device boot log?

Sorry for having such a trivial question but I'm unable to obtain these values. When I used Espressif sdk in the past, I could see all device information at boot, including the pin and discriminator. How do I enable this in the code, so I can see the same log once the platformio flashes the buit firmware and esp boots up?

publish to platformio registry

there are a few projects, such as esphome and wled which have a need for a library like this one, but they are unlikely to incorporate them until there is a public release on the registry.

is this already planned? is it blocked on some other elements of the roadmap?

WindowCovering Example

Hi there, has anyone experience how to setup a window covering device.
I tried to modify the LightOnOff Example, but the window covering device always shows as "Not responding". Maybe my initial config is invalid or the update process has to be done differently.
I also could not find any example online.

Default examples not working

When attempting to run the default examples, they all fail to compile. I get this error with the light example.
(this is only the last part of the error, as it is too big so i didnt paste it here)

/Users/zhekch/Documents/Arduino/libraries/ESP32_Arduino_Matter/src/esp_matter_attribute_utils.h: In instantiation of 'nullable<T>::nullable(T) [with T = unsigned char]':
/Users/zhekch/Documents/Arduino/libraries/ESP32_Arduino_Matter/src/esp_matter_feature.h:100:88:   required from here
/Users/zhekch/Documents/Arduino/libraries/ESP32_Arduino_Matter/src/esp_matter_attribute_utils.h:184:62: error: 'IsNullValue' is not a member of 'chip::app::NumericAttributeTraits<unsigned char, false>'
/Users/zhekch/Documents/Arduino/libraries/ESP32_Arduino_Matter/src/esp_matter_attribute_utils.h: In instantiation of 'nullable<T>::nullable(T) [with T = short int]':
/Users/zhekch/Documents/Arduino/libraries/ESP32_Arduino_Matter/src/esp_matter_cluster.h:385:106:   required from here
/Users/zhekch/Documents/Arduino/libraries/ESP32_Arduino_Matter/src/esp_matter_attribute_utils.h:184:62: error: 'IsNullValue' is not a member of 'chip::app::NumericAttributeTraits<short int, false>'
/Users/zhekch/Documents/Arduino/libraries/ESP32_Arduino_Matter/src/esp_matter_attribute_utils.h: In instantiation of 'void nullable<T>::operator=(T) [with T = unsigned char]':
/Users/zhekch/Documents/Arduino/libraries/ESP32_Arduino_Matter/examples/Light/Light.ino:73:50:   required from here
/Users/zhekch/Documents/Arduino/libraries/ESP32_Arduino_Matter/src/esp_matter_attribute_utils.h:218:62: error: 'IsNullValue' is not a member of 'chip::app::NumericAttributeTraits<unsigned char, false>'
         if (chip::app::NumericAttributeTraits<T>::IsNullValue(value)) {
             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~

exit status 1

Compilation error: exit status 1

Sleep Mode Compatibility

Just wondering if the Matter protocol can be used on a ESP32 that uses deep sleep mode with timer-based periodic wake-up. I have created a temperature sensor device and successfully connected it to my SmartThings hub, but if I try having the ESP32 sleep for 10 minutes between updates, it does not update properly in the SmartThings app.

Example usage

Hi, i am a student who wants to try to connect matter with esp32 to control leds, but I saw that your sample program cannot be connected. I would like to ask if there is a backup.

The example uses 128% of the program memory

Hello, I am trying to use the light example on the WEMOS D1 MINI ESP32 board, but I receive an error (the code occupies 128% of the program memory)

`Library ESP32 Arduino Matter has been declared precompiled:
Using precompiled library in c:\Storage\02_File\00_Windows\02_Documentos\Arduino\libraries\ESP32_Arduino_Matter\src\esp32
Sketch uses 1677981 bytes (128%) of program storage space. Maximum is 1310720 bytes.
Global variables use 97388 bytes (29%) of dynamic memory, leaving 230292 bytes for local variables. Maximum is 327680 bytes.
Sketch too big; see https://support.arduino.cc/hc/en-us/articles/360013825179 for tips on reducing it.
text section exceeds available space in board

Compilation error: text section exceeds available space in board`

It doesn't seem logical to me that an unmodified example code for this MCU exceeds memory in such a way.
Is it an error in the example?
Am I wrong about something?

Disabling CHIPoBLE service due to error: Error ESP32:0x05B00103

The Light example was all working a couple weeks ago and I was able to add the device to SmartThings OK. I re-uploaded the image again today and now I cannot get the Device to provision. Is the following error about not being able to start BLE a red herring?:
I (4061) chip[DL]: NVS set: chip-counters/total-hours = 0 (0x0)
I (4062) chip[DL]: NVS set: chip-config/unique-id = "B659D4A2066D2F82"
I (4064) chip[DL]: Changing ESP WiFi mode: AP -> STA+AP
I (4070) chip[DL]: Changing ESP WiFi mode: STA+AP -> STA
I (4076) chip[DL]: Real time clock set to 946684800 (0100/00/01 00:00:00 UTC)
D (8501) chip[DL]: CHIP task running
E (8505) chip[DL]: Disabling CHIPoBLE service due to error: Error ESP32:0x05B00103
I (8512) chip[DL]: Starting ESP WiFi layer
I (8666) chip[DL]: Done driving station state, nothing else to do...
E (8666) chip[DL]: Long dispatch time: 154 ms, for event type 3
I (8667) chip[DL]: Done driving station state, nothing else to do...
I (8673) chip[SVR]: Server initializing...
D (8676) chip[FP]: Initializing FabricTable from persistent storage

The ESP get all the way to awaiting pairing but never responds to a pairing request:
I (9012) chip[DL]: WIFI_EVENT_STA_START
E (9009) esp_matter_core: Failed to open the node nvs_namespace
I (9016) chip[DL]: Done driving station state, nothing else to do...
I (9026) chip[SVR]: SetupQRCode: [MT:Y.K9042C00KA0648G00]
I (9033) chip[SVR]: Copy/paste the below URL in a browser to see the QR Code:
I (9039) chip[SVR]: https://project-chip.github.io/connectedhomeip/qrcode.html?data=MT%3AY.K9042C00KA0648G00
I (9049) chip[SVR]: Manual pairing code: [34970112332]

I've made sure the Flash is erased on upload but this has not had any noticeable effect.
I'm wondering if something in my Dev Environment has changed? I've tried a clean rebuild.

[Error] Matter and WiFi connectivity

I'm currently trying to send data from my ESP32 to Google Home using the Matter Protocol.
I managed to get it on my Google Home app but it appears as offline, so I tried to connect the device using the WiFi library so it can send data do the endpoint (Don't know if that helps, I was hoping to get some insight about that too).

However, this error message appears on my serial monitor log when I run the code.
I've been trying to fix this for days. Is the WiFi loop interfering with the creation of the endpoint somehow?
I'm sending my code below. I would be glad if someone could help me. Thank you in advance.

Sensor.zip

ERROR MESSAGE:

WiFi connected
E (3140) esp_matter_core: Error create default event loop

abort() was called at PC 0x4015674d on core 1

Backtrace: 0x40083769:0x3ffd7320 0x40093e19:0x3ffd7340 0x40099919:0x3ffd7360 0x4015674d:0x3ffd73e0 0x40156246:0x3ffd7400 0x401565f9:0x3ffd7430 0x400d255c:0x3ffd7460 0x400d25eb:0x3ffd74e0 0x400d546e:0x3ffd7510

ELF file SHA256: c5681ca225aa6b52

Rebooting...
ets Jul 29 2019 12:21:46

rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0030,len:1344
load:0x40078000,len:13924
ho 0 tail 12 room 4
load:0x40080400,len:3600
entry 0x400805f0```

How to generate device-specific settings

Hello,
I have created a WindowCovering device, the device works so far.
Unfortunately, I don't know how to generate device-specific settings in the submenu of the app (e.g. Apple Home).
Actually, Matter already gives the possibility for different modes in the attributes, here my hope was that these are automatically displayed in the submenu of the device, unfortunately this is not the case.

// Bitmap for Mode
enum class Mode : uint8_t
{
    kMotorDirectionReversed = 0x1,
    kCalibrationMode = 0x2,
    kMaintenanceMode = 0x4,
    kLedFeedback = 0x8,
};

Here is an example of what device-specific menu I mean in Apple Home:
ios-16-iphone-14-pro-home-accessory-assign-room-on-tap

Apple-Home-Smart-Wall-Switch-527x1024

Maybe one of you has already solved this and can give me a hint or a solution.

It would be great if I could control the motor direction and, above all, the calibration of the roller shutter via the submenu.

Help with thermostat type devices, alexa disabling use outside 35-95F

The issues I am running into at the moment is that the thermostat device is severely crippled by Alexa with limits imposed of 36F to 95F. These appear to be hard coded in the alexa side as I can set the heat point to 212F on the code side, but the user can't adjust anything except turning down the temp until its below 95F.

Hoping we can add more of the newer device types to the models available that I can try to use such as the temperature cabinet, or many of the kitchen appliances (not sure if matter supports these yet or not). I tried using the temperature cabinet model that I found somewhere (cant find it now), but that device type was not found in this library.

I am working on a water kettle (boiler type device) where I need to be able to set and take actions within Alexa up to around 220F. Seems there are many new types of alexa devices that are well suited to my upcoming needs, just not sure how to get them to be usable thru the matter protocols.

` //create thermostat sensor endpoint
endpoint_t *therm_endpoint;
cluster_t *therm_cluster;
thermostat::config_t therm_config;
therm_config.thermostat.local_temperature = 2400;

therm_endpoint = thermostat::create(node, &therm_config, ENDPOINT_FLAG_NONE, NULL);
print_endpoint_info("thermostat", therm_endpoint);

uint16_t therm_endpoint_id = endpoint::get_id(therm_endpoint);
print_endpoint_info("Thermostat_endpoint", therm_endpoint);
// Add additional feature
therm_cluster = cluster::get(therm_endpoint, Thermostat::Id);
cluster::thermostat::feature::heating::config_t heating_config;

//units of temperature are in 0.01 Celsius for matter interactions
heating_config.abs_max_heat_setpoint_limit = 10500;
heating_config.abs_min_heat_setpoint_limit = 1500;
heating_config.max_heat_setpoint_limit = 10500;
heating_config.min_heat_setpoint_limit = 1500;
heating_config.pi_heating_demand = 0;
heating_config.occupied_heating_setpoint = 10500;
cluster::thermostat::feature::heating::add(therm_cluster, &heating_config);

//set heating step size
matterValue = esp_matter_int16(5); //5C
attribute::update(thermostat_endpoint_id, CLUSTER_ID_THERM, Thermostat::Attributes::SetpointChangeAmount::Id, &matterValue);

// set operating mode to heating (default to "auto", trying to override that)
matterValue = esp_matter_int16(4);
attribute::update(thermostat_endpoint_id, CLUSTER_ID_THERM, Thermostat::Attributes::ThermostatRunningMode::Id, &matterValue);
attribute::update(thermostat_endpoint_id, CLUSTER_ID_THERM, Thermostat::Attributes::SystemMode::Id, &matterValue);
//set heating occupied setpoint temp (units of degrees C)
matterValue = esp_matter_int16(HeatingTemp);
attribute::update(thermostat_endpoint_id, CLUSTER_ID_THERM, Thermostat::Attributes::OccupiedHeatingSetpoint::Id, &matterValue);
// set maximum set point
matterValue = esp_matter_int16(HeatingTemp+5);
attribute::update(thermostat_endpoint_id, CLUSTER_ID_THERM, Thermostat::Attributes::AbsMaxHeatSetpointLimit::Id, &matterValue);
attribute::update(thermostat_endpoint_id, CLUSTER_ID_THERM, Thermostat::Attributes::MaxHeatSetpointLimit::Id, &matterValue);

// Setup DAC (this is good place to also set custom commission data, passcodes etc.)
esp_matter::set_custom_dac_provider(chip::Credentials::Examples::GetExampleDACProvider());`

Provisioning Time Out?

ESP32-C3
I'm trying to figure out how to stop the ESP32-C3 from trying to provision after a set time.

While provisioning the ESP32 is drawing around 90mA which heats up my vreg quite quickly. I could switch to a switching regulator but I'd also like to know how to stop the attempt.

Example - a freshly set up ESP32-C3 starts, tries to provision for 10 minutes, then gives up. The ESP32-C3 continues to operate with the io devices I have connected to it. I cycle power (or press a button or whatever) and it starts over trying to provision.

Is this implemented in your project or do I need to go to the more granular level / connectedhomeip ?

Turning off Log messages

Any way to turn off the constant stream of log messages? I have used

esp_log_level_set("*", ESP_LOG_NONE);

but that only gets me to:

`D (57850985) chip[DMG]:

D (57850985) chip[DMG]:

I (57850995) chip[EM]:

D (57850995) chip[EM]:

D (57850996) chip[EM]:

D (57850997) chip[DMG]:

D (57850997) chip[DMG]:

D (57850998) chip[DMG]:`

I am trying to debug using some Serial.print statements and they just get lost in the constant serial output from the logging.

Can I implement to my own iot system

Hello , I build an iot system for my products . I have my own application that uses Bluetooth for setup Wi-Fi credentials on esp32 and after that all the communication are over my server .

I want to implement matter to my product . But also I want to keep using my mobile application.

I want my users to setup their Wi-Fi credentials over my mobile application.

I just want to open matter function over my mobile applications . Can I make something like that ? How can I ?

Generic Switch States

Hello :)
I would like to create my own first matter firmware for the the Sonoff M5 which has 1 to 3 push buttons. To my understanding, the generic switch should be the right device type. However, I can't figure out which button states are allowed. My old wall switches supported single click, double click and long click which was also supported by Apple HomeKit.

Best

Jan

Matter.h: No such file or directory

Hi,
I am getting the following error when trying to build. I feel like I am missing something obvious, but unfortunately I could not figure it out yet.
image
This is my project structure, I copied the Light.ino in the main.cpp, the library got cloned from git correctly
image
platformio.ini:

[env:nodemcu-32s]
platform = espressif32
board = esp32dev
framework = espidf
build_unflags=-std=gnu++11
build_flags=-std=gnu++17
lib_deps = https://github.com/jakubdybczak/esp32-arduino-matter.git
board_build.partitions = partitions_singleapp_large.csv

Unable to connect?

Thanks for developing this library! I'm looking forward to learning about Matter.

I am running the light example on an ESP-WROOM-32.
And, I'm running the beta Matter server on Home Assistant (2023.1.0b5).

After attempting to commission the device, the ESP32 says:

I (1579) chip[SVR]: SetupQRCode: [MT:Y.K9042C00KA0648G00]
I (1589) chip[SVR]: Copy/paste the below URL in a browser to see the QR Code:
I (1586) chip[DL]: Done driving station state, nothing else to do...
I (1596) chip[SVR]: https://project-chip.github.io/connectedhomeip/qrcode.html?data=MT%3AY.K9042C00KA0648G00
I (1606) chip[DL]: Configuring CHIPoBLE advertising (interval 25 ms, connectable)
I (1612) chip[SVR]: Manual pairing code: [34970112332]
I (1619) chip[DL]: Device already advertising, stop active advertisement and restart
I (31367) chip[DL]: Configuring CHIPoBLE advertising (interval 500 ms, connectable)
I (31367) chip[DL]: Device already advertising, stop active advertisement and restart

The Home Assistant Matter server says:

`2023-01-03 00:02:39 core-matter-server matter_server.server.client_handler[124] DEBUG [547545197632] Received CommandMessage(message_id='930a6dacd7ea4924aab6c249597b70fa', command='commission_with_code', args={'code': 'MT:Y.K9042C00KA0648G00'})
2023-01-03 00:02:39 core-matter-server matter_server.server.client_handler[124] DEBUG [547545197632] Handling command commission_with_code
2023-01-03 10:25:25 core-matter-server matter_server.server.client_handler[124] DEBUG [547545197632] Received: {
  "message_id": "e62d08a632d74ea1b8e1a2e78493763d",
  "command": "commission_with_code",
  "args": {
    "code": "MT:Y.K9042C00KA0648G00"
  },
  "_type": "matter_server.common.models.message.CommandMessage"
}
2023-01-03 10:25:25 core-matter-server matter_server.server.client_handler[124] DEBUG [547545197632] Received CommandMessage(message_id='e62d08a632d74ea1b8e1a2e78493763d', command='commission_with_code', args={'code': 'MT:Y.K9042C00KA0648G00'})
2023-01-03 10:25:25 core-matter-server matter_server.server.client_handler[124] DEBUG [547545197632] Handling command commission_with_code`

I'm not seeing a new device in Home Assistant.

Perhaps someone can provide some troubleshooting advice?

On the Home Assistant Raspberry Pi, bluetoothctl scan shows Bluetooth devices with addresses.
Not sure what the address is of the ESP32. Maybe there's an easy way to add that to the light example sketch?

Thanks!
Wayne

Door lock help

I am using your library to write a simple Matter server that will set a door lock's state when changed inside of HomeKit. I have the ESP32 device working and I can add it to Home App. I then try to lock the physical lock from Home App, but I have no idea where in the code I should be intercepting this action. It seems to me that the on_device_event callback function would be a logical place, but I am not getting anything on that function when I try to change the lock state on HomeKit.

Could you maybe point me in the right direction if this is completely wrong?

I did notice that when I try to lock it on Home app I get:
I (659314) esp_matter_command: Received command 0x00000000 for endpoint 0x0001's cluster 0x00000101
I (659322) chip[ZCL]: Received command: LockDoor
I (659326) esp_matter_attribute: ********** R : Endpoint 0x0001's Cluster 0x00000101's Attribute 0x00000025 is 0 **********
I (659338) esp_matter_attribute: ********** R : Endpoint 0x0001's Cluster 0x00000101's Attribute 0x0000FFFC is 0 **********

Thank you.

How to add custom data on endpoint

Hi. I need to make an Matter network C02/temperature/humidity sensor on ESP32-C3 and I don't know how to add a custom data from my SCD40 sensor. Would anyone help me ?

How to connect to Alexa

Thanks for this library! I managed to pair the light example with Alexa using iOS. For anyone reading this, here is what I did. Maybe someone will find it useful

  1. In the Platformio example, I needed to add #include "arduino.h" for it to compile. Upload the code.
  2. In the serial monitor, look for a line that has an html link to git-hub. Copy the link into your browser and you should see a QR code.
  3. Open the Alexa app.
  4. Open Devices.
  5. Select the plus icon.
  6. Select Add Device.
  7. Select Other from the bottom of the list.
  8. Select Matter.
  9. Confirm that you have a Matter device, select Yes.
  10. Scan your Matter QR Code on your browser in step 2.

Light name

@jakubdybczak

Can I set a default name to the light when for example I pair it with the apple home app

Generating a QR code string

First of all, thank you for your work!

I am working on a device that has a touchscreen and want to generate a QR code myself to display (allowing the user to merely scan that to provision it).

I understand calling PrintOnboardingCodes() will show the text of the QR code, but I want to retrieve the data string, generate the QR code and display it. When I call chip::GetQRCode() with a std::string as the first arg, I am met with an incompatible type:

lib/esp32-arduino-matter/src/app/server/OnboardingCodesUtil.h:33:12: note: candidate: 'CHIP_ERROR GetQRCode(chip::MutableCharSpan&, chip::RendezvousInformationFlags)'
 CHIP_ERROR GetQRCode(chip::MutableCharSpan & aQRCode, chip::RendezvousInformationFlags aRendezvousFlags);
            ^~~~~~~~~
lib/esp32-arduino-matter/src/app/server/OnboardingCodesUtil.h:33:12: note:   no known conversion for argument 1 from 'std::__cxx11::string' {aka 'std::__cxx11::basic_string<char>'} to 'chip::MutableCharSpan&' {aka 'chip::Span<char>&'}
lib/esp32-arduino-matter/src/app/server/OnboardingCodesUtil.h:40:12: note: candidate: 'CHIP_ERROR GetQRCode(chip::MutableCharSpan&, const chip::PayloadContents&)'
 CHIP_ERROR GetQRCode(chip::MutableCharSpan & aQRCode, const chip::PayloadContents & payload);
            ^~~~~~~~~
lib/esp32-arduino-matter/src/app/server/OnboardingCodesUtil.h:40:12: note:   no known conversion for argument 1 from 'std::__cxx11::string' {aka 'std::__cxx11::basic_string<char>'} to 'chip::MutableCharSpan&' {aka 'chip::Span<char>&'}

The code snippet is:

#include "Matter.h"
#include <app/server/OnboardingCodesUtil.h>
#include <credentials/examples/DeviceAttestationCredsExample.h>

using namespace chip;
using namespace chip::app::Clusters;
using namespace esp_matter;
using namespace esp_matter::endpoint;

...

**[In Matter init func]**

// Start Matter device
  esp_matter::start(on_device_event);

  // Get QR Code 
  std::string QRCode;
  
  ESP_LOGE(TAG, "Calling PrintOnboardingCodes()\n");
  // Print codes needed to setup Matter device
  #if 0
    PrintOnboardingCodes(RendezvousInformationFlags(RendezvousInformationFlag::kOnNetwork));
  #else
    if (GetQRCode(QRCode, RendezvousInformationFlag::kOnNetwork) == CHIP_NO_ERROR)
    {
      strcpy (OperatingParameters.MatterQR, QRCode.c_str());
      ESP_LOGE(TAG, "QR Pairing Code: '%s'\n", OperatingParameters.MatterQR);
    } else {
      ESP_LOGE(TAG, "Failed to GetQRCode()!!\n");
    }
  #endif

What is the right way to fetch the QR code string?

Bridge Example with basic Bridged Nodes

Thank you so much for this incredible work! I was just wondering if anyone has been able to create a simple Matter Bridge example with some basic bridged nodes according to the following diagram:

image

If so, could you please include it in the examples ? I am completely lost as to how to setup the bridge/bridged nodes hierarchy.

Not a Matter-certified device

Anyone having a problem with Google failing to setup the device with the error "Not a Matter-certified device"

I have a fresh install of the library as of today and am using the latest ESP32 board as required in the readme.

compilation error

Dear all, i try to compile the "light" example .

plateformio.ini is :

[env:adafruit_qtpy_esp32c3]
platform = [email protected]
board = adafruit_qtpy_esp32c3
framework = arduino
build_unflags = -std=gnu++11
build_flags = -std=gnu++17
board_build.partitions = min_spiffs.csv
imported lib matter in the directory lib/matter
compilation is working but not linking :

c:/users/phil/.platformio/packages/[email protected]+2021r2-patch5/bin/../lib/gcc/riscv32-esp-elf/8.4.0/../../../../riscv32-esp-elf/bin/ld.exe: D:\WIFIPOWER\Matter\Matter/src/main.cpp:93: undefined reference to esp_matter::attribute::get_val(unsigned int*, esp_matter_attr_val_t*)' c:/users/phil/.platformio/packages/[email protected]+2021r2-patch5/bin/../lib/gcc/riscv32-esp-elf/8.4.0/../../../../riscv32-esp-elf/bin/ld.exe: .pio\build\adafruit_qtpy_esp32c3\src\main.cpp.o: in function set_onoff_attribute_value(esp_matter_attr_val_t*)':
D:\WIFIPOWER\Matter\Matter/src/main.cpp:99: undefined reference to `esp_matter::attribute::update(unsigned short, unsigned long, unsigned long, esp_matter_attr_val_t*)'
collect2.exe: error: ld returned 1 exit status
[.pio\build\adafruit_qtpy_esp32c3\firmware.elf] Error 1

any advice please ?
thanks

pairing code

To Commission the device using manual pairing code 34970112332
?

Testing discussion

Hey, thanks for this project! I could successfully build the firmware also with PlatformIO.

Updating to the latest CHIP seems to have fixed the interaction with HomeKit, now I may try to create some other examples (however, it's strange for now. E.g. switch device doesn't seem to be supported by HomeKit yet or I am doing something wrong).

I have ESP32-C3 and S2 boards and could test with them. I guess S2 isn't officially supported, but I wanted to let you know.

Explain how to configure PlatformIO in more detail

Supporting PlatformIO is great, but the current instructions aren't super clear on what you're supposed to do. In general a full example project would be super helpful, and/or a platformio.ini example.

Some specifics:

  1. Use espressif32 platform at version v6.1.0
    • would be great to show how to pin that
  2. Turn on C++17 support, by setting build_unflags=-std=gnu++11 and build_flags=-std=gnu++17
    • relatively straightforward
  3. Download and put library into lib folder of project (โš ๏ธ you cannot use lib_deps in platformio.ini, because this repository does not contain binaries due to too big size)
    • it's not clear what you're supposed to put in the lib folder. Eg do you put the entire contents of the folder, or just the src folder, or ...
    • I'm 90% sure it's the entire folder
  4. Choose larger partition scheme, for example board_build.partitions=min_spiffs.csv
    • would be helpful to know what that config does, and where someone finds various csv options, and if that file is actually needed to exist on the filesystem or if it's a magic string
  5. Run example sketch
    • straightforward

I'll volunteer to document that once I figure it out, but I'm currently not super clear what the steps are supposed to be, and I'm not clear if my setup is causing #29 or if I'm setting it up properly.

Arduino IDE update 2.2.1 breaks esp-arduino-matter

A recent update to the Arduino Ice (2.2.1) seems to have broken this library. Compile of any sample gives an extensive list of errors. e.g. A simple compile of the Light sample gives the following errors:

chip::BitMask state = static_cast<chip::BitMask>(0);
^~~~~~~~
/Users/feldy/Documents/Arduino/libraries/ESP32_Arduino_Matter/src/app-common/zap-generated/cluster-objects.h:16691:66: error: template argument 2 is invalid
chip::BitMask mask = static_cast<chip::BitMask>(0);
^~~~~~~~
/Users/feldy/Documents/Arduino/libraries/ESP32_Arduino_Matter/src/app-common/zap-generated/cluster-objects.h:18181:30: error: template argument 2 is invalid
chip::BitMask daysMask = static_cast<chip::BitMask>(0);
^
/Users/feldy/Documents/Arduino/libraries/ESP32_Arduino_Matter/src/app-common/zap-generated/cluster-objects.h:18181:69: error: template argument 2 is invalid
chip::BitMask daysMask = static_cast<chip::BitMask>(0);
^~~~~~~~~~~
/Users/feldy/Documents/Arduino/libraries/ESP32_Arduino_Matter/src/app-common/zap-generated/cluster-objects.h:18202:30: error: template argument 2 is invalid
chip::BitMask daysMask = static_cast<chip::BitMask>(0);
^
/Users/feldy/Documents/Arduino/libraries/ESP32_Arduino_Matter/src/app-common/zap-generated/cluster-objects.h:18202:69: error: template argument 2 is invalid
chip::BitMask daysMask = static_cast<chip::BitMask>(0);
^~~~~~~~~~~
/Users/feldy/Documents/Arduino/libraries/ESP32_Arduino_Matter/src/app-common/zap-generated/cluster-objects.h:18268:28: error: template argument 2 is invalid
Optional<chip::BitMask> daysMask;
^~~~~~~~~~~
/Users/feldy/Documents/Arduino/libraries/ESP32_Arduino_Matter/src/app-common/zap-generated/cluster-objects.h:18268:39: error: template argument 1 is invalid
Optional<chip::BitMask> daysMask;
^~
/Users/feldy/Documents/Arduino/libraries/ESP32_Arduino_Matter/src/app-common/zap-generated/cluster-objects.h:18290:28: error: template argument 2 is invalid
Optional<chip::BitMask> daysMask;
^~~~~~~~~~~
/Users/feldy/Documents/Arduino/libraries/ESP32_Arduino_Matter/src/app-common/zap-generated/cluster-objects.h:18290:39: error: template argument 1 is invalid
Optional<chip::BitMask> daysMask;
^~
/Users/feldy/Documents/Arduino/libraries/ESP32_Arduino_Matter/src/app-common/zap-generated/cluster-objects.h:19246:95: error: template argument 2 is invalid
using Type = chip::BitMaskchip::app::Clusters::DoorLock::DlCredentialRuleMask;
^
/Users/feldy/Documents/Arduino/libraries/ESP32_Arduino_Matter/src/app-common/zap-generated/cluster-objects.h:19247:95: error: template argument 2 is invalid
using DecodableType = chip::BitMaskchip::app::Clusters::DoorLock::DlCredentialRuleMask;
^
/Users/feldy/Documents/Arduino/libraries/ESP32_Arduino_Matter/src/app-common/zap-generated/cluster-objects.h:19248:95: error: template argument 2 is invalid
using DecodableArgType = chip::BitMaskchip::app::Clusters::DoorLock::DlCredentialRuleMask;
^
/Users/feldy/Documents/Arduino/libraries/ESP32_Arduino_Matter/src/app-common/zap-generated/cluster-objects.h:19331:100: error: template argument 2 is invalid
using Type = chip::BitMaskchip::app::Clusters::DoorLock::DlSupportedOperatingModes;
^
/Users/feldy/Documents/Arduino/libraries/ESP32_Arduino_Matter/src/app-common/zap-generated/cluster-objects.h:19332:100: error: template argument 2 is invalid
using DecodableType = chip::BitMaskchip::app::Clusters::DoorLock::DlSupportedOperatingModes;
^
/Users/feldy/Documents/Arduino/libraries/ESP32_Arduino_Matter/src/app-common/zap-generated/cluster-objects.h:19333:100: error: template argument 2 is invalid
using DecodableArgType = chip::BitMaskchip::app::Clusters::DoorLock::DlSupportedOperatingModes;
^
/Users/feldy/Documents/Arduino/libraries/ESP32_Arduino_Matter/src/app-common/zap-generated/cluster-objects.h:19343:105: error: template argument 2 is invalid
using Type = chip::BitMaskchip::app::Clusters::DoorLock::DlDefaultConfigurationRegister;
^
/Users/feldy/Documents/Arduino/libraries/ESP32_Arduino_Matter/src/app-common/zap-generated/cluster-objects.h:19344:105: error: template argument 2 is invalid
using DecodableType = chip::BitMaskchip::app::Clusters::DoorLock::DlDefaultConfigurationRegister;
^
/Users/feldy/Documents/Arduino/libraries/ESP32_Arduino_Matter/src/app-common/zap-generated/cluster-objects.h:19345:105: error: template argument 2 is invalid
using DecodableArgType = chip::BitMaskchip::app::Clusters::DoorLock::DlDefaultConfigurationRegister;
^
/Users/feldy/Documents/Arduino/libraries/ESP32_Arduino_Matter/src/app-common/zap-generated/cluster-objects.h:19403:101: error: template argument 2 is invalid
using Type = chip::BitMaskchip::app::Clusters::DoorLock::DlLocalProgrammingFeatures;
^
/Users/feldy/Documents/Arduino/libraries/ESP32_Arduino_Matter/src/app-common/zap-generated/cluster-objects.h:19404:101: error: template argument 2 is invalid
using DecodableType = chip::BitMaskchip::app::Clusters::DoorLock::DlLocalProgrammingFeatures;
^
/Users/feldy/Documents/Arduino/libraries/ESP32_Arduino_Matter/src/app-common/zap-generated/cluster-objects.h:19405:101: error: template argument 2 is invalid
using DecodableArgType = chip::BitMaskchip::app::Clusters::DoorLock::DlLocalProgrammingFeatures;
^
/Users/feldy/Documents/Arduino/libraries/ESP32_Arduino_Matter/src/app-common/zap-generated/cluster-objects.h:19537:55: error: 'DecodableType' in 'struct chip::app::Clusters::DoorLock::Attributes::CredentialRulesSupport::TypeInfo' does not name a type
Attributes::CredentialRulesSupport::TypeInfo::DecodableType credentialRulesSupport =
^~~~~~~~~~~~~
/Users/feldy/Documents/Arduino/libraries/ESP32_Arduino_Matter/src/app-common/zap-generated/cluster-objects.h:19547:56: error: 'DecodableType' in 'struct chip::app::Clusters::DoorLock::Attributes::SupportedOperatingModes::TypeInfo' does not name a type
Attributes::SupportedOperatingModes::TypeInfo::DecodableType supportedOperatingModes =
^~~~~~~~~~~~~
/Users/feldy/Documents/Arduino/libraries/ESP32_Arduino_Matter/src/app-common/zap-generated/cluster-objects.h:19549:61: error: 'DecodableType' in 'struct chip::app::Clusters::DoorLock::Attributes::DefaultConfigurationRegister::TypeInfo' does not name a type
Attributes::DefaultConfigurationRegister::TypeInfo::DecodableType defaultConfigurationRegister =
^~~~~~~~~~~~~
/Users/feldy/Documents/Arduino/libraries/ESP32_Arduino_Matter/src/app-common/zap-generated/cluster-objects.h:19555:57: error: 'DecodableType' in 'struct chip::app::Clusters::DoorLock::Attributes::LocalProgrammingFeatures::TypeInfo' does not name a type
Attributes::LocalProgrammingFeatures::TypeInfo::DecodableType localProgrammingFeatures =
^~~~~~~~~~~~~
/Users/feldy/Documents/Arduino/libraries/ESP32_Arduino_Matter/src/app-common/zap-generated/cluster-objects.h:20136:93: error: template argument 2 is invalid
using Type = chip::BitMaskchip::app::Clusters::WindowCovering::ConfigStatus;
^
/Users/feldy/Documents/Arduino/libraries/ESP32_Arduino_Matter/src/app-common/zap-generated/cluster-objects.h:20137:93: error: template argument 2 is invalid
using DecodableType = chip::BitMaskchip::app::Clusters::WindowCovering::ConfigStatus;
^
/Users/feldy/Documents/Arduino/libraries/ESP32_Arduino_Matter/src/app-common/zap-generated/cluster-objects.h:20138:93: error: template argument 2 is invalid
using DecodableArgType = chip::BitMaskchip::app::Clusters::WindowCovering::ConfigStatus;
^
/Users/feldy/Documents/Arduino/libraries/ESP32_Arduino_Matter/src/app-common/zap-generated/cluster-objects.h:20172:98: error: template argument 2 is invalid
using Type = chip::BitMaskchip::app::Clusters::WindowCovering::OperationalStatus;
^
/Users/feldy/Documents/Arduino/libraries/ESP32_Arduino_Matter/src/app-common/zap-generated/cluster-objects.h:20173:98: error: template argument 2 is invalid
using DecodableType = chip::BitMaskchip::app::Clusters::WindowCovering::OperationalStatus;
^
/Users/feldy/Documents/Arduino/libraries/ESP32_Arduino_Matter/src/app-common/zap-generated/cluster-objects.h:20174:98: error: template argument 2 is invalid
using DecodableArgType = chip::BitMaskchip::app::Clusters::WindowCovering::OperationalStatus;
^
/Users/feldy/Documents/Arduino/libraries/ESP32_Arduino_Matter/src/app-common/zap-generated/cluster-objects.h:20292:85: error: template argument 2 is invalid
using Type = chip::BitMaskchip::app::Clusters::WindowCovering::Mode;
^
/Users/feldy/Documents/Arduino/libraries/ESP32_Arduino_Matter/src/app-common/zap-generated/cluster-objects.h:20293:85: error: template argument 2 is invalid
using DecodableType = chip::BitMaskchip::app::Clusters::WindowCovering::Mode;
^
/Users/feldy/Documents/Arduino/libraries/ESP32_Arduino_Matter/src/app-common/zap-generated/cluster-objects.h:20294:85: error: template argument 2 is invalid
using DecodableArgType = chip::BitMaskchip::app::Clusters::WindowCovering::Mode;
^
/Users/feldy/Documents/Arduino/libraries/ESP32_Arduino_Matter/src/app-common/zap-generated/cluster-objects.h:20304:93: error: template argument 2 is invalid
using Type = chip::BitMaskchip::app::Clusters::WindowCovering::SafetyStatus;
^
/Users/feldy/Documents/Arduino/libraries/ESP32_Arduino_Matter/src/app-common/zap-generated/cluster-objects.h:20305:93: error: template argument 2 is invalid
using DecodableType = chip::BitMaskchip::app::Clusters::WindowCovering::SafetyStatus;
^
/Users/feldy/Documents/Arduino/libraries/ESP32_Arduino_Matter/src/app-common/zap-generated/cluster-objects.h:20306:93: error: template argument 2 is invalid
using DecodableArgType = chip::BitMaskchip::app::Clusters::WindowCovering::SafetyStatus;
^
/Users/feldy/Documents/Arduino/libraries/ESP32_Arduino_Matter/src/app-common/zap-generated/cluster-objects.h:20365:45: error: 'DecodableType' in 'struct chip::app::Clusters::WindowCovering::Attributes::ConfigStatus::TypeInfo' does not name a type
Attributes::ConfigStatus::TypeInfo::DecodableType configStatus =
^~~~~~~~~~~~~
/Users/feldy/Documents/Arduino/libraries/ESP32_Arduino_Matter/src/app-common/zap-generated/cluster-objects.h:20369:50: error: 'DecodableType' in 'struct chip::app::Clusters::WindowCovering::Attributes::OperationalStatus::TypeInfo' does not name a type
Attributes::OperationalStatus::TypeInfo::DecodableType operationalStatus =
^~~~~~~~~~~~~
/Users/feldy/Documents/Arduino/libraries/ESP32_Arduino_Matter/src/app-common/zap-generated/cluster-objects.h:20381:37: error: 'DecodableType' in 'struct chip::app::Clusters::WindowCovering::Attributes::Mode::TypeInfo' does not name a type
Attributes::Mode::TypeInfo::DecodableType mode = static_cast<chip::BitMaskchip::app::Clusters::WindowCovering::Mode>(0);
^~~~~~~~~~~~~
/Users/feldy/Documents/Arduino/libraries/ESP32_Arduino_Matter/src/app-common/zap-generated/cluster-objects.h:20382:45: error: 'DecodableType' in 'struct chip::app::Clusters::WindowCovering::Attributes::SafetyStatus::TypeInfo' does not name a type
Attributes::SafetyStatus::TypeInfo::DecodableType safetyStatus =
^~~~~~~~~~~~~
/Users/feldy/Documents/Arduino/libraries/ESP32_Arduino_Matter/src/app-common/zap-generated/cluster-objects.h:20824:110: error: template argument 2 is invalid
using Type = chip::BitMaskchip::app::Clusters::PumpConfigurationAndControl::PumpStatusBitmap;
^
/Users/feldy/Documents/Arduino/libraries/ESP32_Arduino_Matter/src/app-common/zap-generated/cluster-objects.h:20825:110: error: template argument 2 is invalid
using DecodableType = chip::BitMaskchip::app::Clusters::PumpConfigurationAndControl::PumpStatusBitmap;
^
/Users/feldy/Documents/Arduino/libraries/ESP32_Arduino_Matter/src/app-common/zap-generated/cluster-objects.h:20826:110: error: template argument 2 is invalid
using DecodableArgType = chip::BitMaskchip::app::Clusters::PumpConfigurationAndControl::PumpStatusBitmap;
^
/Users/feldy/Documents/Arduino/libraries/ESP32_Arduino_Matter/src/app-common/zap-generated/cluster-objects.h:20999:43: error: 'DecodableType' in 'struct chip::app::Clusters::PumpConfigurationAndControl::Attributes::PumpStatus::TypeInfo' does not name a type
Attributes::PumpStatus::TypeInfo::DecodableType pumpStatus =
^~~~~~~~~~~~~
/Users/feldy/Documents/Arduino/libraries/ESP32_Arduino_Matter/src/app-common/zap-generated/cluster-objects.h:21614:28: error: template argument 2 is invalid
chip::BitMask dayOfWeekForSequence = static_cast<chip::BitMask>(0);
^
/Users/feldy/Documents/Arduino/libraries/ESP32_Arduino_Matter/src/app-common/zap-generated/cluster-objects.h:21615:34: error: template argument 2 is invalid
chip::BitMask modeForSequence = static_cast<chip::BitMask>(0);
^
/Users/feldy/Documents/Arduino/libraries/ESP32_Arduino_Matter/src/app-common/zap-generated/cluster-objects.h:21614:80: error: template argument 2 is invalid
chip::BitMask dayOfWeekForSequence = static_cast<chip::BitMask>(0);
^~~~~~~~~
/Users/feldy/Documents/Arduino/libraries/ESP32_Arduino_Matter/src/app-common/zap-generated/cluster-objects.h:21615:80: error: template argument 2 is invalid
chip::BitMask modeForSequence = static_cast<chip::BitMask>(0);
^~~~~~~~~~~~~~~
/Users/feldy/Documents/Arduino/libraries/ESP32_Arduino_Matter/src/app-common/zap-generated/cluster-objects.h:21632:28: error: template argument 2 is invalid
chip::BitMask dayOfWeekForSequence = static_cast<chip::BitMask>(0);
^
/Users/feldy/Documents/Arduino/libraries/ESP32_Arduino_Matter/src/app-common/zap-generated/cluster-objects.h:21633:34: error: template argument 2 is invalid
chip::BitMask modeForSequence = static_cast<chip::BitMask>(0);
^
/Users/feldy/Documents/Arduino/libraries/ESP32_Arduino_Matter/src/app-common/zap-generated/cluster-objects.h:21632:80: error: template argument 2 is invalid
chip::BitMask dayOfWeekForSequence = static_cast<chip::BitMask>(0);
^~~~~~~~~
/Users/feldy/Documents/Arduino/libraries/ESP32_Arduino_Matter/src/app-common/zap-generated/cluster-objects.h:21633:80: error: template argument 2 is invalid
chip::BitMask modeForSequence = static_cast<chip::BitMask>(0);
^~~~~~~~~~~~~~~
/Users/feldy/Documents/Arduino/libraries/ESP32_Arduino_Matter/src/app-common/zap-generated/cluster-objects.h:21655:28: error: template argument 2 is invalid
chip::BitMask dayOfWeekForSequence = static_cast<chip::BitMask>(0);
^
/Users/feldy/Documents/Arduino/libraries/ESP32_Arduino_Matter/src/app-common/zap-generated/cluster-objects.h:21656:34: error: template argument 2 is invalid
chip::BitMask modeForSequence = static_cast<chip::BitMask>(0);
^
/Users/feldy/Documents/Arduino/libraries/ESP32_Arduino_Matter/src/app-common/zap-generated/cluster-objects.h:21655:80: error: template argument 2 is invalid
chip::BitMask dayOfWeekForSequence = static_cast<chip::BitMask>(0);
^~~~~~~~~
/Users/feldy/Documents/Arduino/libraries/ESP32_Arduino_Matter/src/app-common/zap-generated/cluster-objects.h:21656:80: error: template argument 2 is invalid
chip::BitMask modeForSequence = static_cast<chip::BitMask>(0);
^~~~~~~~~~~~~~~
/Users/feldy/Documents/Arduino/libraries/ESP32_Arduino_Matter/src/app-common/zap-generated/cluster-objects.h:21673:28: error: template argument 2 is invalid
chip::BitMask dayOfWeekForSequence = static_cast<chip::BitMask>(0);
^
/Users/feldy/Documents/Arduino/libraries/ESP32_Arduino_Matter/src/app-common/zap-generated/cluster-objects.h:21674:34: error: template argument 2 is invalid
chip::BitMask modeForSequence = static_cast<chip::BitMask>(0);
^
/Users/feldy/Documents/Arduino/libraries/ESP32_Arduino_Matter/src/app-common/zap-generated/cluster-objects.h:21673:80: error: template argument 2 is invalid
chip::BitMask dayOfWeekForSequence = static_cast<chip::BitMask>(0);
^~~~~~~~~
/Users/feldy/Documents/Arduino/libraries/ESP32_Arduino_Matter/src/app-common/zap-generated/cluster-objects.h:21674:80: error: template argument 2 is invalid
chip::BitMask modeForSequence = static_cast<chip::BitMask>(0);
^~~~~~~~~~~~~~~
/Users/feldy/Documents/Arduino/libraries/ESP32_Arduino_Matter/src/app-common/zap-generated/cluster-objects.h:21693:28: error: template argument 2 is invalid
chip::BitMask daysToReturn = static_cast<chip::BitMask>(0);
^
/Users/feldy/Documents/Arduino/libraries/ESP32_Arduino_Matter/src/app-common/zap-generated/cluster-objects.h:21694:34: error: template argument 2 is invalid
chip::BitMask modeToReturn = static_cast<chip::BitMask>(0);
^
/Users/feldy/Documents/Arduino/libraries/ESP32_Arduino_Matter/src/app-common/zap-generated/cluster-objects.h:21693:77: error: template argument 2 is invalid
chip::BitMask daysToReturn = static_cast<chip::BitMask>(0);
^~~~~~~~~
/Users/feldy/Documents/Arduino/libraries/ESP32_Arduino_Matter/src/app-common/zap-generated/cluster-objects.h:21694:77: error: template argument 2 is invalid
chip::BitMask modeToReturn = static_cast<chip::BitMask>(0);
^~~~~~~~~~~~~~~
/Users/feldy/Documents/Arduino/libraries/ESP32_Arduino_Matter/src/app-common/zap-generated/cluster-objects.h:21709:28: error: template argument 2 is invalid
chip::BitMask daysToReturn = static_cast<chip::BitMask>(0);
^
/Users/feldy/Documents/Arduino/libraries/ESP32_Arduino_Matter/src/app-common/zap-generated/cluster-objects.h:21710:34: error: template argument 2 is invalid
chip::BitMask modeToReturn = static_cast<chip::BitMask>(0);
^
/Users/feldy/Documents/Arduino/libraries/ESP32_Arduino_Matter/src/app-common/zap-generated/cluster-objects.h:21709:77: error: template argument 2 is invalid
chip::BitMask daysToReturn = static_cast<chip::BitMask>(0);
^~~~~~~~~
/Users/feldy/Documents/Arduino/libraries/ESP32_Arduino_Matter/src/app-common/zap-generated/cluster-objects.h:21710:77: error: template argument 2 is invalid
chip::BitMask modeToReturn = static_cast<chip::BitMask>(0);
^~~~~~~~~~~~~~~
/Users/feldy/Documents/Arduino/libraries/ESP32_Arduino_Matter/src/app-common/zap-generated/cluster-objects.h:22582:87: error: template argument 2 is invalid
using Type = chip::BitMaskchip::app::Clusters::FanControl::RockBitmap;
^
/Users/feldy/Documents/Arduino/libraries/ESP32_Arduino_Matter/src/app-common/zap-generated/cluster-objects.h:22583:87: error: template argument 2 is invalid
using DecodableType = chip::BitMaskchip::app::Clusters::FanControl::RockBitmap;
^
/Users/feldy/Documents/Arduino/libraries/ESP32_Arduino_Matter/src/app-common/zap-generated/cluster-objects.h:22584:87: error: template argument 2 is invalid
using DecodableArgType = chip::BitMaskchip::app::Clusters::FanControl::RockBitmap;
^
/Users/feldy/Documents/Arduino/libraries/ESP32_Arduino_Matter/src/app-common/zap-generated/cluster-objects.h:22594:87: error: template argument 2 is invalid
using Type = chip::BitMaskchip::app::Clusters::FanControl::RockBitmap;
^
/Users/feldy/Documents/Arduino/libraries/ESP32_Arduino_Matter/src/app-common/zap-generated/cluster-objects.h:22595:87: error: template argument 2 is invalid
using DecodableType = chip::BitMaskchip::app::Clusters::FanControl::RockBitmap;
^
/Users/feldy/Documents/Arduino/libraries/ESP32_Arduino_Matter/src/app-common/zap-generated/cluster-objects.h:22596:87: error: template argument 2 is invalid
using DecodableArgType = chip::BitMaskchip::app::Clusters::FanControl::RockBitmap;
^
/Users/feldy/Documents/Arduino/libraries/ESP32_Arduino_Matter/src/app-common/zap-generated/cluster-objects.h:22606:87: error: template argument 2 is invalid
using Type = chip::BitMaskchip::app::Clusters::FanControl::WindBitmap;
^
/Users/feldy/Documents/Arduino/libraries/ESP32_Arduino_Matter/src/app-common/zap-generated/cluster-objects.h:22607:87: error: template argument 2 is invalid
using DecodableType = chip::BitMaskchip::app::Clusters::FanControl::WindBitmap;
^
/Users/feldy/Documents/Arduino/libraries/ESP32_Arduino_Matter/src/app-common/zap-generated/cluster-objects.h:22608:87: error: template argument 2 is invalid
using DecodableArgType = chip::BitMaskchip::app::Clusters::FanControl::WindBitmap;
^
/Users/feldy/Documents/Arduino/libraries/ESP32_Arduino_Matter/src/app-common/zap-generated/cluster-objects.h:22618:87: error: template argument 2 is invalid
using Type = chip::BitMaskchip::app::Clusters::FanControl::WindBitmap;
^
/Users/feldy/Documents/Arduino/libraries/ESP32_Arduino_Matter/src/app-common/zap-generated/cluster-objects.h:22619:87: error: template argument 2 is invalid
using DecodableType = chip::BitMaskchip::app::Clusters::FanControl::WindBitmap;
^
... text removed to fit body limitations

exit status 1

Compilation error: exit status 1

Cannot locate esp_netif_types.h

Hello, I'm trying to compile the Light example and it fails immediately due to the following error

C:\Users\<USER>\Documents\Arduino\libraries\esp32-arduino-matter\src/platform/ESP32/CHIPDevicePlatformEvent.h:31:29: fatal error: esp_netif_types.h: No such file or directory

From my Google searches, this appears to be an ESP-IDF file

Is anyone else having this issue?

Light.ino example is tripping watchdog timeout in ESP32

I'm trying to get the library to run on my devices. But I get watchdog errors.
For instance running the Light.ino on my M5Stack Core (ESP32) I get:

I (100) wifi:wifi driver task: 3ffdc500, prio:23, stack:6656, core=0
I (993) system_api: Base MAC address is not set
I (998) system_api: read default base MAC address from EFUSE
I (1023) wifi:wifi firmware version: 6567a16
I (1023) wifi:wifi certification version: v7.0
I (1024) wifi:config NVS flash: enabled
I (1024) wifi:config nano formating: disabled
I (1028) wifi:Init data frame dynamic rx buffer num: 32
I (1033) wifi:Init management frame dynamic rx buffer num: 32
I (1038) wifi:Init management short buffer num: 32
I (1043) wifi:Init static tx buffer num: 8
I (1047) wifi:Init static rx buffer size: 2212
I (1051) wifi:Init static rx buffer num: 8
I (1055) wifi:Init dynamic rx buffer num: 32
I (1059) wifi_init: rx ba win: 6
I (1063) wifi_init: tcpip mbox: 32
I (1067) wifi_init: udp mbox: 6
I (1071) wifi_init: tcp mbox: 6
I (1074) wifi_init: tcp tx win: 5744
I (1079) wifi_init: tcp rx win: 5744
I (1083) wifi_init: tcp mss: 1440
I (1087) wifi_init: WiFi IRAM OP enabled
I (1091) wifi_init: WiFi RX IRAM OP enabled
I (1114) chip[DL]: NVS set: chip-counters/reboot-count = 1 (0x1)
I (1125) chip[DL]: NVS set: chip-counters/total-hours = 0 (0x0)
I (1128) chip[DL]: NVS set: chip-config/unique-id = "29CC4B94C13D6C08"
I (1129) chip[DL]: Real time clock set to 946684800 (0100/00/01 00:00:00 UTC)
D (1133) chip[DL]: CHIP event task running
I (1137) chip[DL]: Starting ESP WiFi layer
I (1141) phy_init: phy_version 4670,719f9f6,Feb 18 2021,17:07:07
I (1246) wifi:mode : sta (78:21:84:93:f5:d4)
I (1247) wifi:enable tsf
W (1248) wifi:Haven't to connect to a suitable AP now!
I (1248) chip[DL]: Attempting to connect WiFi station interface
I (1254) chip[DL]: WiFi station state change: NotConnected -> Connecting
I (1259) chip[DL]: Done driving station state, nothing else to do...
I (1261) wifi:new:<8,0>, old:<1,0>, ap:<255,255>, sta:<8,0>, prof:9
I (1265) chip[SVR]: Initializing subscription resumption storage...
I (1272) wifi:state: init -> auth (b0)
I (1280) chip[SVR]: Server initializing...
D (1284) chip[FP]: Initializing FabricTable from persistent storage
I (1291) chip[TS]: Last Known Good Time: [unknown]
I (1295) chip[TS]: Setting Last Known Good Time to firmware build time 2023-05-14T19:31:49
I (1299) wifi:state: auth -> assoc (0)
I (1306) chip[DMG]: AccessControl: initializing
I (1311) chip[DMG]: Examples::AccessControlDelegate::Init
I (1316) chip[DMG]: AccessControl: setting
I (1320) chip[DMG]: DefaultAclStorage: initializing
I (1324) chip[DMG]: DefaultAclStorage: 0 entries loaded
D (1329) chip[IN]: UDP::Init bind&listen port=5540
D (1334) chip[IN]: UDP::Init bound to port=5540
D (1338) chip[IN]: UDP::Init bind&listen port=5540
D (1342) chip[IN]: UDP::Init bound to port=5540
D (1347) chip[IN]: BLEBase::Init - setting/overriding transport
I (1352) wifi:D (1352) chip[IN]: TransportMgr initialized
state: assoc -> run (10)
I (1367) chip[ZCL]: Using ZAP configuration...
I (1368) chip[DMG]: AccessControlCluster: initializing
I (1369) chip[ZCL]: 0x3f406b01ep 0 clus 0x0000_0030 attr 0x0000_0000 not supported
D (1376) chip[ZCL]: GeneralDiagnostics: OnDeviceReboot
I (1381) chip[ZCL]: Initiating Admin Commissioning cluster.
E (1386) chip[ZCL]: Duplicate attribute override registration failed
D (1394) chip[IN]: SecureSession[0x3ffc8a98]: Allocated Type:1 LSID:64648
D (1399) chip[SC]: Assigned local session key ID 64648
D (1404) chip[SC]: Waiting for PBKDF param request
I (1408) chip[SVR]: BLE networking available but BLE advertising is not supported
I (1415) chip[DIS]: Updating services using commissioning mode 1
I (1421) chip[DIS]: CHIP minimal mDNS started advertising.
D (1427) chip[DL]: Using wifi MAC for hostname
I (1431) chip[DIS]: Advertise commission parameter vendorID=65521 productID=32768 discriminator=3840/15 cm=1
D (1440) chip[DIS]: Responding with _matterc._udp.local
D (1445) chip[DIS]: Responding with E650AA6CEAD16650._matterc._udp.local
D (1451) chip[DIS]: Responding with 78218493F5D4.local
I (1452) wifi:D (1456) chip[DIS]: Responding with 78218493F5D4.local
<ba-add>idx:0 (ifx:0, 9c:3d:cf:47:22:2d), tid:0, ssn:0, winSize:64
D (1462) chip[DIS]: Responding with _V65521._sub._matterc._udp.local
D (1474) chip[DIS]: Responding with _S15._sub._matterc._udp.local
D (1480) chip[DIS]: Responding with _L3840._sub._matterc._udp.local
D (1486) chip[DIS]: Responding with _CM._sub._matterc._udp.local
D (1492) chip[DIS]: Responding with E650AA6CEAD16650._matterc._udp.local
I (1494) wifi:I (1498) chip[DIS]: CHIP minimal mDNS configured as 'Commissionable node device'; instance name: E650AA6CEAD16650.
connected with SwitTest2, aid = 7, channel 8, BW20, bssid = 9c:3d:cf:47:22:2d
I (1510) chip[DIS]: mDNS service published: _matterc._udp
I (1517) wifi:security: WPA2-PSK, phy: bgn, rssi: -70
I (1522) chip[IN]: CASE Server enabling CASE session setups
D (1532) chip[IN]: SecureSession[0x3ffc8b50]: Allocated Type:2 LSID:64649
D (1538) chip[SC]: Allocated SecureSession (0x3ffc8b50) - waiting for Sigma1 msg
I (1545) chip[SVR]: Joining Multicast groups
D (1549) chip[ZCL]: Emitting StartUp event
I (1553) chip[SVR]: Server Listening...
I (1555) wifi:pm start, type: 1
D (1558) chip[DMG]: Endpoint 0, Cluster 0x0000_001D update version to 3d2e1e4d

D (1567) chip[DMG]: Endpoint 1, Cluster 0x0000_0003 update version to 4e5479e9
D (1574) chip[DMG]: Endpoint 1, Cluster 0x0000_0004 update version to 4e13b31c
D (1580) chip[ZCL]: ERR: writing group feature map 1
D (1585) chip[DMG]: Endpoint 1, Cluster 0x0000_0005 update version to 900a79a6
I (1592) chip[ZCL]: Endpoint 1 On/off already set to new value
D (1598) chip[DMG]: Endpoint 0, Cluster 0x0000_001D update version to 3d2e1e4e
I (1599) wifi:D (1605) chip[ZCL]: Emitting StartUp event
AP's beacon interval = 204800 us, DTIM period = 2
D (1610) chip[EVL]: LogEvent event number: 0x0000000000000000 priority: 2, endpoint id:  0x0 cluster id: 0x0000_0028 event id: 0x0 Sys timestamp: 0x0000000000000145
D (1628) chip[ZCL]: GeneralDiagnostics: OnDeviceReboot
D (1633) chip[DMG]: Endpoint 0, Cluster 0x0000_0033 update version to e352330e
D (1641) chip[EVL]: LogEvent event number: 0x0000000000000001 priority: 2, endpoint id:  0x0 cluster id: 0x0000_0033 event id: 0x3 Sys timestamp: 0x0000000000000164
I (1655) chip[DL]: WIFI_EVENT_STA_START
E (1658) esp_matter_core: Failed to open the node nvs_namespace
I (1659) chip[DL]: Done driving station state, nothing else to do...
I (1670) chip[DL]: WIFI_EVENT_STA_CONNECTED
I (1674) chip[DL]: WiFi station state change: Connecting -> Connecting_Succeeded
I (1681) chip[DL]: WiFi station state change: Connecting_Succeeded -> Connected
I (1688) chip[DL]: WiFi station interface connected
I (1693) chip[ZCL]: WiFiDiagnosticsDelegate: OnConnectionStatusChanged
D (1699) chip[EVL]: LogEvent event number: 0x0000000000000002 priority: 1, endpoint id:  0x0 cluster id: 0x0000_0036 event id: 0x2 Sys timestamp: 0x000000000000019E
I (1713) chip[DL]: Done driving station state, nothing else to do...
I (1720) chip[DL]: Updating advertising data
[   862][I][main-nussbaum-prod.cpp:108] setup(): STEP 108
I (1729) chip[SVR]: SetupQRCode: [MT:Y.K9042C00KA0648G00]
I (1734) chip[SVR]: Copy/paste the below URL in a browser to see the QR Code:
I (1740) chip[SVR]: https://project-chip.github.io/connectedhomeip/qrcode.html?data=MT%3AY.K9042C00KA0648G00
I (1750) chip[SVR]: Manual pairing code: [34970112332]
[   892][I][main-nussbaum-prod.cpp:112] setup(): DONE
I (2988) chip[DL]: IP_EVENT_GOT_IP6
I (2988) chip[DL]: IPv6 addr available. Ready on WIFI_STA_DEF interface: fe80:0000:0000:0000:7a21:84ff:fe93:f5d4
I (2991) chip[DIS]: Updating services using commissioning mode 1
I (2997) chip[DIS]: CHIP minimal mDNS started advertising.
D (3008) chip[DL]: Using wifi MAC for hostname
I (3009) chip[DIS]: Advertise commission parameter vendorID=65521 productID=32768 discriminator=3840/15 cm=1
D (3015) chip[DIS]: Responding with _matterc._udp.local
D (3020) chip[DIS]: Responding with E650AA6CEAD16650._matterc._udp.local
D (3026) chip[DIS]: Responding with 78218493F5D4.local
D (3031) chip[DIS]: Responding with 78218493F5D4.local
D (3036) chip[DIS]: Responding with _V65521._sub._matterc._udp.local
D (3042) chip[DIS]: Responding with _S15._sub._matterc._udp.local
D (3048) chip[DIS]: Responding with _L3840._sub._matterc._udp.local
D (3054) chip[DIS]: Responding with _CM._sub._matterc._udp.local
D (3060) chip[DIS]: Responding with E650AA6CEAD16650._matterc._udp.local
I (3066) chip[DIS]: CHIP minimal mDNS configured as 'Commissionable node device'; instance name: E650AA6CEAD16650.
I (3080) chip[DIS]: mDNS service published: _matterc._udp
E (3081) chip[SVR]: Server initialization complete
I (3086) chip[DIS]: Updating services using commissioning mode 1
I (3092) chip[DIS]: CHIP minimal mDNS started advertising.
D (3100) chip[DIS]: Warning: Attempt to mDNS broadcast failed on st1:  Error LwIP:0x03000001
I (3105) chip[DIS]: mDNS broadcast full failed in 1 separate send attempts.
E (3112) chip[DIS]: Failed to advertise records: 3000001
D (3120) chip[DIS]: Warning: Attempt to mDNS broadcast failed on st1:  Error LwIP:0x03000001
I (3125) chip[DIS]: mDNS broadcast full failed in 1 separate send attempts.
E (3131) chip[DIS]: Failed to advertise records: 3000001
D (3137) chip[DL]: Using wifi MAC for hostname
I (3141) chip[DIS]: Advertise commission parameter vendorID=65521 productID=32768 discriminator=3840/15 cm=1
D (3150) chip[DIS]: Responding with _matterc._udp.local
D (3155) chip[DIS]: Responding with E650AA6CEAD16650._matterc._udp.local
D (3161) chip[DIS]: Responding with 78218493F5D4.local
D (3166) chip[DIS]: Responding with 78218493F5D4.local
D (3171) chip[DIS]: Responding with _V65521._sub._matterc._udp.local
D (3177) chip[DIS]: Responding with _S15._sub._matterc._udp.local
D (3183) chip[DIS]: Responding with _L3840._sub._matterc._udp.local
D (3189) chip[DIS]: Responding with _CM._sub._matterc._udp.local
D (3195) chip[DIS]: Responding with E650AA6CEAD16650._matterc._udp.local
I (3201) chip[DIS]: CHIP minimal mDNS configured as 'Commissionable node device'; instance name: E650AA6CEAD16650.
D (3215) chip[DIS]: Warning: Attempt to mDNS broadcast failed on st1:  Error LwIP:0x03000001
I (3220) chip[DIS]: mDNS broadcast full failed in 1 separate send attempts.
E (3226) chip[DIS]: Failed to advertise records: 3000001
I (3231) chip[DIS]: mDNS service published: _matterc._udp
I (3241) chip[IM]: No subscriptions to resume
I (3569) esp_netif_handlers: sta ip: 10.0.0.196, mask: 255.255.255.0, gw: 10.0.0.1
I (3570) chip[DL]: IP_EVENT_STA_GOT_IP
I (3571) chip[DL]: IPv4 address changed on WiFi station interface: 10.0.0.196/255.255.255.0 gateway 10.0.0.1
I (3580) chip[DL]: IPv4 Internet connectivity ESTABLISHED
I (3585) chip[DIS]: Updating services using commissioning mode 1
I (3592) chip[DIS]: CHIP minimal mDNS started advertising.
D (3609) chip[DIS]: Warning: Attempt to mDNS broadcast failed on st1:  Error LwIP:0x03000001
I (3610) chip[DIS]: mDNS broadcast full failed in 1 separate send attempts.
E (3614) chip[DIS]: Failed to advertise records: 3000001
D (3619) chip[DL]: Using wifi MAC for hostname
I (3623) chip[DIS]: Advertise commission parameter vendorID=65521 productID=32768 discriminator=3840/15 cm=1
D (3633) chip[DIS]: Responding with _matterc._udp.local
D (3637) chip[DIS]: Responding with E650AA6CEAD16650._matterc._udp.local
D (3644) chip[DIS]: Responding with 78218493F5D4.local
D (3649) chip[DIS]: Responding with 78218493F5D4.local
D (3653) chip[DIS]: Responding with _V65521._sub._matterc._udp.local
D (3660) chip[DIS]: Responding with _S15._sub._matterc._udp.local
D (3665) chip[DIS]: Responding with _L3840._sub._matterc._udp.local
D (3671) chip[DIS]: Responding with _CM._sub._matterc._udp.local
D (3677) chip[DIS]: Responding with E650AA6CEAD16650._matterc._udp.local
I (3683) chip[DIS]: CHIP minimal mDNS configured as 'Commissionable node device'; instance name: E650AA6CEAD16650.
D (3700) chip[DIS]: Warning: Attempt to mDNS broadcast failed on st1:  Error LwIP:0x03000001
I (3702) chip[DIS]: mDNS broadcast full failed in 1 separate send attempts.
E (3708) chip[DIS]: Failed to advertise records: 3000001
I (3713) chip[DIS]: mDNS service published: _matterc._udp
I (5238) chip[SWU]: Stopping the watchdog timer
I (5239) chip[SWU]: Starting the periodic query timer, timeout: 86400 seconds
D (5240) chip[DMG]: Endpoint 0, Cluster 0x0000_002A update version to 335b1238
D (5246) chip[DMG]: Endpoint 0, Cluster 0x0000_002A update version to 335b1239
E (6723) task_wdt: Task watchdog got triggered. The following tasks did not reset the watchdog in time:
E (6723) task_wdt:  - IDLE (CPU 1)
E (6723) task_wdt: Tasks currently running:
E (6723) task_wdt: CPU 0: IDLE
E (6723) task_wdt: CPU 1: loopTask
E (6723) task_wdt: Print CPU 0 (current core) backtrace


Backtrace: 0x4011D1E2:0x3FFBF880 0x4008384D:0x3FFBF8A0 0x401D9AA3:0x3FFBC600 0x4011DA2E:0x3FFBC620 0x400935AD:0x3FFBC640 0x400952B9:0x3FFBC660

  #0  0x4011D1E2:0x3FFBF880 in task_wdt_isr at C:\Users\fda\.platformio\packages\framework-espidf\components\esp_system/task_wdt.c:183 (discriminator 3)
  #1  0x4008384D:0x3FFBF8A0 in _xt_lowint1 at C:\Users\fda\.platformio\packages\framework-espidf\components\freertos\port\xtensa/xtensa_vectors.S:1114
  #2  0x401D9AA3:0x3FFBC600 in cpu_ll_waiti at C:\Users\fda\.platformio\packages\framework-espidf\components\hal\esp32\include/hal/cpu_ll.h:183
      (inlined by) esp_pm_impl_waiti at C:\Users\fda\.platformio\packages\framework-espidf\components\esp_pm/pm_impl.c:837
  #3  0x4011DA2E:0x3FFBC620 in esp_vApplicationIdleHook at C:\Users\fda\.platformio\packages\framework-espidf\components\esp_system/freertos_hooks.c:63
  #4  0x400935AD:0x3FFBC640 in prvIdleTask at C:\Users\fda\.platformio\packages\framework-espidf\components\freertos/tasks.c:3987 (discriminator 1)
  #5  0x400952B9:0x3FFBC660 in vPortTaskWrapper at C:\Users\fda\.platformio\packages\framework-espidf\components\freertos\port\xtensa/port.c:142

E (6723) task_wdt: Print CPU 1 backtrace


Backtrace: 0x40082C6D:0x3FFBFE80 0x4008384D:0x3FFBFEA0 0x4000BFED:0x3FFD6090 0x40094419:0x3FFD60A0 0x40092DB1:0x3FFD60C0 0x40113508:0x3FFD6100 0x40113C25:0x3FFD6130 0x40113CD1:0x3FFD6150 0x401143B2:0x3FFD6170 0x400952B9:0x3FFD6190

  #0  0x40082C6D:0x3FFBFE80 in esp_crosscore_isr at C:\Users\fda\.platformio\packages\framework-espidf\components\esp_system/crosscore_int.c:92
  #1  0x4008384D:0x3FFBFEA0 in _xt_lowint1 at C:\Users\fda\.platformio\packages\framework-espidf\components\freertos\port\xtensa/xtensa_vectors.S:1114
  #2  0x4000BFED:0x3FFD6090 in ?? ??:0
  #3  0x40094419:0x3FFD60A0 in vPortClearInterruptMaskFromISR at C:\Users\fda\.platformio\packages\framework-espidf\components\freertos\port\xtensa\include/freertos/portmacro.h:571
      (inlined by) xTaskGetSchedulerState at C:\Users\fda\.platformio\packages\framework-espidf\components\freertos/tasks.c:4699
  #4  0x40092DB1:0x3FFD60C0 in xQueueSemaphoreTake at C:\Users\fda\.platformio\packages\framework-espidf\components\freertos/queue.c:1554
  #5  0x40113508:0x3FFD6100 in uartAvailable at C:/Users/fda/.platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal-uart.c:317 (discriminator 1)
  #6  0x40113C25:0x3FFD6130 in HardwareSerial::available() at C:/Users/fda/.platformio/packages/framework-arduinoespressif32/cores/esp32/HardwareSerial.cpp:476
  #7  0x40113CD1:0x3FFD6150 in serialEventRun() at C:/Users/fda/.platformio/packages/framework-arduinoespressif32/cores/esp32/HardwareSerial.cpp:116
  #8  0x401143B2:0x3FFD6170 in loopTask(void*) at C:/Users/fda/.platformio/packages/framework-arduinoespressif32/cores/esp32/main.cpp:51 (discriminator 1)
  #9  0x400952B9:0x3FFD6190 in vPortTaskWrapper at C:\Users\fda\.platformio\packages\framework-espidf\components\freertos\port\xtensa/port.c:142

E (11723) task_wdt: Task watchdog got triggered. The following tasks did not reset the watchdog in time:
E (11723) task_wdt:  - IDLE (CPU 1)
E (11723) task_wdt: Tasks currently running:
E (11723) task_wdt: CPU 0: IDLE
E (11723) task_wdt: CPU 1: loopTask
E (11723) task_wdt: Print CPU 0 (current core) backtrace

If I globally disable the watchdogs using esp_task_wdt_init(-1, false) the device keeps running and I'm able to commission the light successfully and control it. Of course I cannot do this in production. I'm using PlatformIO and believe that I have fulfilled all requirements mentioned in the readme.md

Switch Example

Super grateful for the work you've done so far on this!

I have lights up and running with HomeKit based on your example, though the connection process feels pretty slow and unreliable. I'm trying to get a simple switch working with zero luck and I wondered if you might have some insight.

I've tried something like this with both an on/off switch and a generic switch. At best the accessory will show up in HomeKit with the message "This accessory is not curerretly supported by the Home app".

  {
    generic_switch::config_t switch_config_a;
    switch_config_a.switch_cluster.current_position=0;
    switch_config_a.switch_cluster.number_of_positions=2;
    endpoint_t *switch_endpoint_a = generic_switch::create(node, &switch_config_a, ENDPOINT_FLAG_NONE, NULL);

    switch_endpoint_id_a = endpoint::get_id(switch_endpoint_a);     
  }

Any ideas? It feels like I'm missing some obvious step.

Disable chip logging?

Since upgrading to 1.0.0-beta6, I've started getting a lot of chip logging polluting my serial port, eg.:

09:06:12.025 -> I (13992) chip[IM]: 
09:06:12.025 -> D (13994) chip[DMG]: 
09:06:12.025 -> D (13996) chip[DMG]: 
09:06:12.025 -> I (13998) chip[EM]: 
09:06:12.025 -> I (14000) chip[IN]: 
09:06:12.025 -> D (14002) chip[EM]: 
09:06:15.471 -> I (17456) chip[EM]: 
09:06:15.471 -> D (17456) chip[EM]: 
09:06:15.471 -> I (17457) chip[IN]:  
09:06:12.025 -> D (13996) chip[DMG]: 
09:06:12.025 -> I (13998) chip[EM]: 
09:06:12.025 -> I (14000) chip[IN]: 
09:06:12.025 -> D (14002) chip[EM]: 
09:06:15.471 -> I (17456) chip[EM]: 
09:06:15.471 -> D (17456) chip[EM]: 
09:06:15.471 -> I (17457) chip[IN]: 
09:06:15.471 -> I (17457) chip[EM]: 
09:06:15.471 -> I (17458) chip[IN]: 
09:06:15.471 -> D (17459) chip[EM]: 
09:06:15.503 -> I (17459) chip[SC]: 
09:06:15.503 -> D (17460) chip[SC]: 
09:06:15.503 -> E (17465) chip[SC]: CASE failed to match destination ID with local fabrics
09:06:15.503 -> E (17482) chip[IN]: CASE Session establishment failed: 10
09:06:15.503 -> D (17486) chip[IN]: 
09:06:15.503 -> D (17488) chip[IN]: 
09:06:15.503 -> D (17489) chip[SC]: 
09:06:15.534 -> E (17491) chip[EM]: OnMessageReceived failed, err = 10
09:06:15.534 -> I (17529) chip[EM]: 
09:06:15.534 -> D (17529) chip[EM]: 
09:06:15.534 -> D (17530) chip[EM]: 
09:06:17.859 -> E (19844) chip[IN]: Data received on an unknown session (LSID=35276). Dropping it!

Is it possible to turn these logs off or are they just built into the binary now? I tried using esp_log_level_set("*", ESP_LOG_ERROR) but the logs keep coming

BLE GAP connection terminated (con 0 reason 0x213)

Sorry I have some issue can anyone help me?

mac intel
Arduin ide 1.8.13
ESP32 Board Support 2.0.6

already turn on c++17 support and setup, the Light.ino can compile and write firmware

but when i commissioning always fail:
BLE GAP connection terminated (con 0 reason 0x213)

image

image

or I need something like this? Enable Host Flow control => disable? but it's should be pre compiled?
project-chip/connectedhomeip#6839

ESP32-S3 Boot Loop

This is my first attempt at using Matter.
I have an ESP32-S3-DevkitC-1, with the ESP32-S3-WROOM-2 D3N32R8V.
Also tested on a newer ESP32-S3-WROOM-1 M0N8R8
I'm getting this stack trace:

Rebooting...
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0xc (RTC_SW_CPU_RST),boot:0x18 (SPI_FAST_FLASH_BOOT)
Saved PC:0x420cf5be
=> 0x420cf5be: esp_pm_impl_waiti at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp_pm/pm_impl.c:839
SPIWP:0xee
Octal Flash Mode Enabled
For OPI Flash, Use Default Flash Boot Mode
mode:SLOW_RD, clock div:1
load:0x3fce3808,len:0x128
load:0x403c9700,len:0xb9c
=> 0x403c9700: ?? ??:0
load:0x403cc700,len:0x27e0
=> 0x403cc700: ?? ??:0
entry 0x403c98bc
=> 0x403c98bc: ?? ??:0
E (9) esp_matter_core: Failed to initialize CHIP stack
E (10) esp_matter_core: Error initializing matter

abort() was called at PC 0x42002f39 on core 1
=> 0x42002f39: chip::DeviceLayer::GetCommissionableDataProvider() at /Users/jdybczak/Developer/Me/esp32-arduino-matter-builder/stub_project/build/esp-idf/chip/../../../../tools/esp-matter/connectedhomeip/connectedhomeip/config/esp32/third_party/connectedhomeip/src/lib/support/CodeUtils.h:508
      (inlined by) chip::DeviceLayer::GetCommissionableDataProvider() at /Users/jdybczak/Developer/Me/esp32-arduino-matter-builder/stub_project/build/esp-idf/chip/../../../../tools/esp-matter/connectedhomeip/connectedhomeip/config/esp32/third_party/connectedhomeip/src/platform/CommissionableDataProvider.cpp:32


Backtrace: 0x40376bfa:0x3fceb980 0x4037e4b5:0x3fceb9a0 0x40383afd:0x3fceb9c0 0x42002f39:0x3fceba40 0x42002a9e:0x3fceba60 0x42002df5:0x3fceba90 0x420029c8:0x3fcebac0 0x4202619a:0x3fcebb60
=> 0x40376bfa: panic_abort at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp_system/panic.c:408
=> 0x4037e4b5: esp_system_abort at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp_system/esp_system.c:128
=> 0x40383afd: abort at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/newlib/abort.c:46
=> 0x42002f39: chip::DeviceLayer::GetCommissionableDataProvider() at /Users/jdybczak/Developer/Me/esp32-arduino-matter-builder/stub_project/build/esp-idf/chip/../../../../tools/esp-matter/connectedhomeip/connectedhomeip/config/esp32/third_party/connectedhomeip/src/lib/support/CodeUtils.h:508
      (inlined by) chip::DeviceLayer::GetCommissionableDataProvider() at /Users/jdybczak/Developer/Me/esp32-arduino-matter-builder/stub_project/build/esp-idf/chip/../../../../tools/esp-matter/connectedhomeip/connectedhomeip/config/esp32/third_party/connectedhomeip/src/platform/CommissionableDataProvider.cpp:32
=> 0x42002a9e: GetPayloadContents(chip::PayloadContents&, chip::BitFlags<chip::RendezvousInformationFlag, unsigned char>) at /Users/jdybczak/Developer/Me/esp32-arduino-matter-builder/stub_project/build/esp-idf/chip/../../../../tools/esp-matter/connectedhomeip/connectedhomeip/config/esp32/third_party/connectedhomeip/src/app/server/OnboardingCodesUtil.cpp:110
=> 0x42002df5: PrintOnboardingCodes(chip::BitFlags<chip::RendezvousInformationFlag, unsigned char>) at /Users/jdybczak/Developer/Me/esp32-arduino-matter-builder/stub_project/build/esp-idf/chip/../../../../tools/esp-matter/connectedhomeip/connectedhomeip/config/esp32/third_party/connectedhomeip/src/app/server/OnboardingCodesUtil.cpp:43
=> 0x420029c8: setup() at src/main.cpp:106
=> 0x4202619a: loopTask(void*) at /home/michalk/.platformio/packages/framework-arduinoespressif32@src-c5617ffb38d464a65e6f38c65a85c9f4/cores/esp32/main.cpp:42

Opening & Closing commissioning window

I have been looking into a problem for days, looking thru the CHIP code and the ESP-matter code and cannot come up with a solution.

Problem: I am working on a device with a touch screen, so I can show a QR code for commissioning. This device (thermostat) also needs to;
a) set hostname
b) provide a web port
c) be able to change ssid & psk
d) retrieve wifi stats (ip addr, rssi, hostname, (dis)connected status)

With the above requirements, I cannot use the Arduino Wifi library AND the Matter code at the same time as they both try to initialize and start wifi. So I asked over on the esp-matter issues forum (espressif/esp-matter#551) and the suggestion was to start Matter, close the commissioning window, cal Arduino Wifi.begin() and then reopen the comm window.

So, how do I open/close the commissioning window using esp-arduino-matter??

...or; How can I use esp-arduino-matter and provide the functionality in the list above?

Crash after wifi init attempt

I'm getting the following error when attempting to run the two endpoints example. I am using an ESP32 (WROOM) under platformio. I downloaded v1.0.0-beta.3, unzipped it, and copied all of src into lib/esp32-arduino-matter.

I then put all the code from that example into main-matter.cpp and disabled my existing main.cpp. There should be no other code really getting built.

Any pointers on if this an issue on my end would be appreciated. I'm also rebuilding the library myself in case there's any config settings I need to tune.

Error

ets Jul 29 2019 12:21:46

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:1184
load:0x40078000,len:13104
load:0x40080400,len:3036
entry 0x400805e4
E (98) wifi:invalid magic number 7, call WIFI_INIT_CONFIG_DEFAULT to init config
E (99) esp_matter_core: Error initializing Wi-Fi stack

abort() was called at PC 0x400d32ec on core 1


Backtrace: 0x40083b89:0x3ffd8470 0x40093ced:0x3ffd8490 0x400994dd:0x3ffd84b0 0x400d32ec:0x3ffd8530 0x400d2df6:0x3ffd8550 0x400d31a1:0x3ffd8580 0x400d2d19:0x3ffd85b0 0x400f9e36:0x3ffd8650




ELF file SHA256: 12f6421243296673

Rebooting...

Platformio.ini

[env]
lib_deps =

build_unflags =
    '-std=gnu++11'

build_flags =
    '-std=gnu++17'


[env:esp32dev]
platform = espressif32
board = esp32dev
framework = arduino

monitor_speed = 115200

board_build.partitions=min_spiffs.csv # I'm not really sure if this is a file I was supposed to create or copy-down or if it's just a magic file name

lib_deps =
    ${env.lib_deps}

build_unflags =
    ${env.build_unflags}

build_flags =
    ${env.build_flags}

esptool.py output

--> esptool.py  --chip esp32 flash_id
esptool.py v4.3
Found 4 serial ports
Serial port /dev/cu.usbserial-0001
Connecting......................
Chip is ESP32-D0WD-V3 (revision v3.0)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: cc:db:a7:16:18:14
Uploading stub...
Running stub...
Stub running...
Manufacturer: 5e
Device: 4016
Detected flash size: 4MB
Hard resetting via RTS pin...

Linking problem in platformio

Hi, I'm having a strange problem and i don't know what to try.
It seems like there's some symbols being redeclared somewhere, but i can't seem to get a hold of the problem.

If i include the Matter.h header file from main.cpp it works perfectly fine but as soon as i include in from any other header file in the project i get the following errors at linking time:
/Users/matteomoneta/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: .pio/build/az-delivery-devkit-v4/src/me_core/me_component/me_component_on_off.cpp.o: in function emberAfLevelControlClusterMoveToClosestFrequencyCallback(chip::app::CommandHandler*, chip::app::ConcreteCommandPath const&, chip::app::Clusters::LevelControl::Commands::MoveToClosestFrequency::DecodableType const&)':
/Users/matteomoneta/Documents/ME/me01-esp-fw/.pio/libdeps/az-delivery-devkit-v4/ESP32 Arduino Matter/src/esp32-arduino-matter_patches_matter.h:12: multiple definition of emberAfLevelControlClusterMoveToClosestFrequencyCallback(chip::app::CommandHandler*, chip::app::ConcreteCommandPath const&, chip::app::Clusters::LevelControl::Commands::MoveToClosestFrequency::DecodableType const&)'; .pio/build/az-delivery-devkit-v4/src/me_core/me_component/me_component.cpp.o:/Users/matteomoneta/Documents/ME/me01-esp-fw/.pio/libdeps/az-delivery-devkit-v4/ESP32 Arduino Matter/src/esp32-arduino-matter_patches_matter.h:12: first defined here /Users/matteomoneta/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: .pio/build/az-delivery-devkit-v4/src/me_core/me_component/me_component_on_off.cpp.o:(.bss._ZN12MatterUnused1_E+0x0): multiple definition of MatterUnused::_'; .pio/build/az-delivery-devkit-v4/src/me_core/me_component/me_component.cpp.o:(.bss._ZN12MatterUnused1_E+0x0): first defined here
/Users/matteomoneta/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: .pio/build/az-delivery-devkit-v4/src/me_core/me_controller/me_controller.cpp.o: in function emberAfLevelControlClusterMoveToClosestFrequencyCallback(chip::app::CommandHandler*, chip::app::ConcreteCommandPath const&, chip::app::Clusters::LevelControl::Commands::MoveToClosestFrequency::DecodableType const&)': /Users/matteomoneta/Documents/ME/me01-esp-fw/.pio/libdeps/az-delivery-devkit-v4/ESP32 Arduino Matter/src/esp32-arduino-matter_patches_matter.h:12: multiple definition of emberAfLevelControlClusterMoveToClosestFrequencyCallback(chip::app::CommandHandler*, chip::app::ConcreteCommandPath const&, chip::app::Clusters::LevelControl::Commands::MoveToClosestFrequency::DecodableType const&)'; .pio/build/az-delivery-devkit-v4/src/me_core/me_component/me_component.cpp.o:/Users/matteomoneta/Documents/ME/me01-esp-fw/.pio/libdeps/az-delivery-devkit-v4/ESP32 Arduino Matter/src/esp32-arduino-matter_patches_matter.h:12: first defined here
/Users/matteomoneta/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: .pio/build/az-delivery-devkit-v4/src/me_core/me_controller/me_controller.cpp.o:(.bss._ZN12MatterUnused1_E+0x0): multiple definition of MatterUnused::_'; .pio/build/az-delivery-devkit-v4/src/me_core/me_component/me_component.cpp.o:(.bss._ZN12MatterUnused1_E+0x0): first defined here collect2: error: ld returned 1 exit status *** [.pio/build/az-delivery-devkit-v4/firmware.elf] Error 1

I've tried to exclude it from every file and as soon as I do that, it links perfectly fine.
Thank's in advance.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.