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 Matter Door Lock Example in connectedhomeip (CON-947) #784

Closed
bilalahmaddev opened this issue Dec 31, 2023 · 20 comments
Closed

ESP32 Matter Door Lock Example in connectedhomeip (CON-947) #784

bilalahmaddev opened this issue Dec 31, 2023 · 20 comments

Comments

@bilalahmaddev
Copy link

Is it possible to modify the ESP32 Matter Door Lock Example, available in connectedhomeip, to accommodate up to 10 door lock endpoints? If so, what is the recommended approach for implementing this?

We have a specific requirement wherein we intend to utilize the ESP32 Matter Door Lock Example as a hub for an additional 10 door locks. The communication between the hub and the other locks will be facilitated over RF. The Matter door lock hub is expected to interact with the Matter app on behalf of these 10 door locks. What would be the best strategy to proceed with this customization?

@github-actions github-actions bot changed the title ESP32 Matter Door Lock Example in connectedhomeip ESP32 Matter Door Lock Example in connectedhomeip (CON-947) Dec 31, 2023
@jadhavrohit924
Copy link
Contributor

@bilalmalik76 It is possible to have 10 door lock endpoints in the examples available in connectedhomeip, to have to endpoints you will have to edit the .zap of the door-lock app using the zap-tool available in scripts/tools/zap/run_zaptool.sh.

I would like to suggest a briged, an examples in esp-matter for bridge, the bridge will communicate with the matter app on behalf of the door locks. Just that we don't have any which communicates using RF so you will have to build that one.

@bilalahmaddev
Copy link
Author

@jadhavrohit924 Thansk I wil try to modify .zap file and one more thing with matter bridge, all 10 devices will appear on any ecosystem of an app as door locks?

@bilalahmaddev
Copy link
Author

@jadhavrohit924 which door-lock.zap file I need to mofiy and how to generate door-lock.zap file with 10 end points?

@jadhavrohit924
Copy link
Contributor

@jadhavrohit924 which door-lock.zap file I need to mofiy and how to generate door-lock.zap file with 10 end points?

Yes use the script scripts/tools/zap/run_zaptool.sh run
scripts/tools/zap/run_zaptool.sh examples/lock-app/lock-common/lock-app.zap and add the endpoints that you need.

@jadhavrohit924 Thansk I wil try to modify .zap file and one more thing with matter bridge, all 10 devices will appear on any ecosystem of an app as door locks?

Yes

@bilalahmaddev
Copy link
Author

@jadhavrohit924 How can I add endpoints to lock-app.zap file, it looks like a generated file with some tool.

@bilalahmaddev
Copy link
Author

@jadhavrohit924 is this a right way to add end points:

{ "endpointTypeName": "MA-doorlock", "endpointTypeIndex": 1, "profileId": 259, "endpointId": 1, "networkId": 0 } { "endpointTypeName": "MA-doorlock", "endpointTypeIndex": 1, "profileId": 259, "endpointId": 2, "networkId": 0 } { "endpointTypeName": "MA-doorlock", "endpointTypeIndex": 1, "profileId": 259, "endpointId": 3, "networkId": 0 } { "endpointTypeName": "MA-doorlock", "endpointTypeIndex": 1, "profileId": 259, "endpointId": 4, "networkId": 0 } { "endpointTypeName": "MA-doorlock", "endpointTypeIndex": 1, "profileId": 259, "endpointId": 5, "networkId": 0 } { "endpointTypeName": "MA-doorlock", "endpointTypeIndex": 1, "profileId": 259, "endpointId": 6, "networkId": 0 } { "endpointTypeName": "MA-doorlock", "endpointTypeIndex": 1, "profileId": 259, "endpointId": 7, "networkId": 0 } { "endpointTypeName": "MA-doorlock", "endpointTypeIndex": 1, "profileId": 259, "endpointId": 8, "networkId": 0 } { "endpointTypeName": "MA-doorlock", "endpointTypeIndex": 1, "profileId": 259, "endpointId": 9, "networkId": 0 } { "endpointTypeName": "MA-doorlock", "endpointTypeIndex": 1, "profileId": 259, "endpointId": 10, "networkId": 0 }

@bilalahmaddev
Copy link
Author

@jadhavrohit924 I am getting this error:
image

@bilalahmaddev
Copy link
Author

@jadhavrohit924 I have added end points and build flash code to ESP32. But only one door lock is showing on home app after commissioing. Do I need to do anything else after adding end points?

@bilalahmaddev
Copy link
Author

@jadhavrohit924 If I generate a code for 10 endpoints door locks with zap-tool, is it possible to enable or disable door lock endpoints from code without modifying .zap file for door lock again? Is there any flag to endable or disable end points from code?

@jadhavrohit924
Copy link
Contributor

You can use the emberAfEndpointEnableDisable API to enable or disable endpoints from the code.

I would like to suggest briged-app, it will have the dynamic endpoints and they will be automatically enabled/disabled

@bilalahmaddev
Copy link
Author

@jadhavrohit924 if we use bridge-app, how much effort it will require to add door lock related functionality into it? We have not found any non-zap based esp matter door lock example

@jadhavrohit924
Copy link
Contributor

@bilalmalik76 esp-matter is the non-zap based data model, you just have to create appropriate device type using single API I would suggest please take a look how devices are being created in light app of esp-matter in same way you can create a door lock. Here are the all available device types

@bilalahmaddev
Copy link
Author

@jadhavrohit924 ending simply endpoint does not work for the door lock. I have already tried it.

@jadhavrohit924
Copy link
Contributor

What is the issue that you faced?

@bilalahmaddev
Copy link
Author

@jadhavrohit924 I get this error: able to commission with Apple home app but get this error when send lock and unlock command from home app and state does not change at all:
image

@jadhavrohit924
Copy link
Contributor

@bilalmalik76 Solution to this issue has been discussed here, please check

@bilalahmaddev
Copy link
Author

@jadhavrohit924 and that solution does not work at all.

@jadhavrohit924
Copy link
Contributor

Can you please share the patch that you have added? I'll take a look and check what is missing.

@dhrishi
Copy link
Collaborator

dhrishi commented Jan 31, 2024

@bilalmalik76 With the same setup as mentioned here, I am able to commission the door lock to Apple Home and then control the same using the lock and unlock commands

@dhrishi
Copy link
Collaborator

dhrishi commented Mar 12, 2024

Closing this issue now, as per the comment above.

@dhrishi dhrishi closed this as completed Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants