-
Notifications
You must be signed in to change notification settings - Fork 107
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
Anyone tried multiple devices/switches in Homekit example (MEGH-2692) #59
Comments
@adukale , you can check the bridge example to understand how to add multiple accessories under the same node. However, if the multiple accessories (switches in your case) are co-located i.e. part of a single physical device, you just need to add multiple switch services into the same accessory. You can either have independent callbacks for each or add some private data to each switch service (some identifier or GPIO number) and have a common callback. This line shows how to add private data and that same is used here in the callback. |
@shahpiyushv Thank you for quick response. I can see 6 switches in Home app in ios/HomeKit. But turning on/off anyone of them results in rebooting esp32 and it goes into bootloop sometimes. Also, the connected gpios/relayes does not change the state. Thanks in advance. |
@shahpiyushv I resolved the error. The issue was in callback functions for homekit service. Have seperated out each callbacks for services. |
I want to integrate multiple devices/switches in Homekit example code. The homekit initialization is clear to me but I am getting confused while registering devices ans setting callbacks, so wondering if anyone has already tried this.
Thanks in advance.
Any help is appreciated.
The text was updated successfully, but these errors were encountered: