Hello everybody,
i am currently working on my bachelor thesis and could need some guidance.
I have the NRF52840 Development Kit and i am trying to develop a matter device, that can be integrated into Home Assistant.
I started with the "nrf/samples/matter/template" example and enhanced it to a generic light switch with help of this this guide: (4) Developing Matter 1.0 products with nRF Connect SDK - YouTube
I have a HomeAssistant installation running, that contains a OpenThreadBorderRouter on a Raspberry PI. These things are all working.
Also commissioning the device into HomeAssistant works.
For HomeAssistant to be abe to communicate with the matter device, i added another endpoint to the template.zap with the Device ID 0x0100, that is HomeAssistant specific (HA On(Off Light).
The On/Off switch is successfully showing in the HomeAssistant web interface.
When pressed, the matter message reaches the NRF device.
My problem now is that i cant seem to find the possibility in the code to process this message.
I am stuck on trying to handle the message.
One approach is to implement a function "MatterPostAttributeChangeCallback(const chip::app::ConcreteAttributePath & attributePath, uint8_t mask, uint8_t type,
uint16_t size, uint8_t * value)" in the zcl_callbacks.cpp (allthough i dont think the file name matters) as seen in this guide:
Creating Matter accessory device — nRF Connect SDK 1.9.2-dev1 documentation (nordicsemi.com)
In my other approach i had a look at the working ESP32 matter lighting example and implemented the callback simultaneous:
In the class "AppDeviceCallBacks" that is extending the "CommonDeviceCallbacks.h" (from the connectedhomeip CHIP repo) i implemented a function "virtual void PostAttributeChangeCallback(chip::EndpointId endpointId, chip::ClusterId clusterId, chip::AttributeId attributeId, uint8_t type, uint16_t size, uint8_t * value)"
All of these new files are of course added to the CMakeLists.txt in target_sources section, so they will be included / compiled.
Compiling and flashing works, but HA On/Off message arent triggering my functions.
Can anybody please help me "connectring" the incomming call to my code?
I am not completely sure, if its the right place to post this problem here, but i dont know, where else to go.
If you need more information, i will gladly provide it .
Thanks
Marvin