-
Notifications
You must be signed in to change notification settings - Fork 118
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
Sixth added accessory to a bridge does not work?! #61
Comments
Does the problem disappear after a restart of HAP-python? |
no :/ |
Let me try to reproduce and I will get back to you soon. |
I know this will sound crazy but here it is: for x in range(0, 13):
bridge.add_accessory(LightBulb("l%d" % x)) The above adds all accessories and everything works fine. Except the sixth lightbulb with name l5. So I split the above for loop and skipped number 5 (because why not). This time l6 does not work. So I need to investigate why this happens but I think its something silly. |
The above can be reproduced with the loop running in (0, 6). |
I found a workaround:
The code in I really have no idea why this happens. At first I thought that maybe AIDs should not be the same as IIDs of services (in this case IID=7 is the iid of the lightbulb service), but this is not true since I tried to reproduce the problem with different combination of IID and AID. In those other cases, even if the service IID is the same as the AID, the Acc is supported and works. I will make a change that just assigns AIDs from some higher number, at least until we find why this happens. |
For some reason, this AID results in "Not supported" in the Home app. This happense when you add 6 accessories. Various attempts to reproduce this issue with other AIDs - using more services, etc., whitout success.
Quoting from the official spec: Accessory instance IDs, "aid", are assigned from the same number pool that is global across entire HAP Accessory Server. For example, if the first Accessory object has an instance ID of "1" then no other Accessory object can have an instance ID of "1" within the Accessory Server. What we give to the Home app when it says unsupported:
Submitted a fix that basically does not assign 7 as an AID... |
i have 10 lightbulbs devices but for some reason one or two of them randomly gets not supported.
The text was updated successfully, but these errors were encountered: