Yacubane / esp32-arduino-matter

Matter IoT protocol library for ESP32 working on Arduino framework
Apache License 2.0
298 stars 29 forks source link

Door lock help #38

Open frios opened 10 months ago

frios commented 10 months ago

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.