-
-
Notifications
You must be signed in to change notification settings - Fork 28.4k
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
Cant find Homekit device in Home App #17372
Comments
Try stopping HA, delete the |
Still same problem |
Can you add |
Ive tried it on 3 different ios devices but none found it.
|
One other thing i noticed is, that homeassistant always found my panasonic tv and denon avr, but they dont show up in the ui anymore. |
Hm, since you mentioned an issue with discovery as well. What did change is the version of one dependency that Could you try something?
|
after running pip list | grep 'zeroconf' |
Are you sure? That would explain, why you can't find the Home Assistant Bridge if it's never made accessible to the network.. I would suggest uninstalling and installing
|
pip uninstall HAP-python |
Then you've not activated the correct virtual env. Without |
Im not using a virtual env. Just running homeassistant in the freenas jail |
Sorry, this could have been my mistake all along. I might have assumed something which isn't the case for you. If you run just |
root@homeassistant:~ # pip list aiohttp 3.4.4 |
|
Now theres HAP-python and zeroconf in the list, but it still doesnt work |
Does the log show something new? You could try downgrading the |
Its very weired. Today i got a Mi TV Box and it shows up in Homeassistant by it self. |
Now ive restarted homeassistant and it does not show up anymore |
I don't really know how to help you with this issue, to be honest. Did you change something in your network configuration (especially with your router) between working and not working? I have seen the router settings being an issue: https://community.home-assistant.io/t/another-post-about-pairing-with-homekit/68255/27?u=cdce8p My last attempt would be to see if downgrading |
Downgraded to 0.77.3 but hass is now crashing with this error: |
This error is unrelated to HomeKit. Could you try temporarily disabling all components that have errors (as it seems MQTT ones)? |
Any updates? |
Still not working |
Try reading this section: Maybe I've already sumed up a solution there but haven't mentioned it yet. |
@jigfox what device are you using to run homeassistant on? |
If you delete the |
@MrJoki007 I use the same like you: Freenas IOCage @cdce8p I deleted the bridge from my home, I also tried to create a complete new home with no devices, both ways I got the endless loading |
Seems like locking |
HA: v0.84.6 |
Same problem here. Would be nice with a real solution to this. |
Downgrading python-zeroconf doesn't seem to work for me though. |
@postlund what version are you using? Because over the weekend I upgraded (along with all other requirements) to version 0.86.4 and manually downgraded zeroconf to 0.20.0 and it's still working. Did you add the argument --skip-pip otherwise it will re-upgrade automatically to 0.20.1. |
@MATH609 I might have spoken to quickly, I think I have some issue with duplicate entity names. I'll have a look again when I'm home (I've verified that the versions are correct). |
I have done some investigation and the problem seems to be that the HomeKit bridge never starts because a duplicate entry is found, but the exception is not propagated back to the log for some reason so it is not very clear that this happens. Continuing the investigation, I have come to the conclusion that it is a hash collision: two different entities generate the same AID, so HomeKit never starts. Quite fascinating really:
So |
@postlund it works with zeroconf 0.20 or 0.21? |
@MATH609 Latest, 0.21.3 (plain HASS 0.86.4). |
How do you change that to get it running? |
@postlund We knew that there could be hash collisions, but we certainly didn't expected them for that combination 😄 At the moment I can't really do much about it, since fixing it is a longer endeavor. As you already know HomeKit doesn't like it if the same AID belongs to two different accessories. |
@cdce8p Yeah, very unfortunate that a collision happened for such at simple case like this 😄 But the adler32 hashing algorithm is known to have a lot of collisions, any particular reasons why it was used instead of like CRC32 or so? The best case scenario as I see would be if the entity registry could manage the IDs, that would make most sense. Changing the hashing would of course be a breaking change, but it seems to be necessary to fix the problem. |
Somebody suggested it to me when I started with the HomeKit component. However, since I'm pretty busy with university at the moment, there hasen't been much progress on that front. Maybe towards the end of march, but I can't promiss anything. |
Right, I guessed that it was something like that 😄 Adler32 is pretty fast, but not very good when it comes to collisions. Anyway, using the entity registry should be the way to go, but since AIDs are 64 bits something will have to be added as I believe pretty much any identifier can be used in the core registry. @balloob Sorry to tag you, but I believe you have the best knowledge of the entity registry. We have hash collision issues in the homekit component ( |
@postlund I haven't looked at the EntityRegistry yet, but I think one way forward could be as follows: As backgrund, we would create a json file with the unique_id to aid mappings.
We would also need to make sure to update the entity_id mapping to the unique_id if an entiy starts supporting the entity_registry. What do you think? |
I think what @cdce8p proposes is a good idea, as it avoids most breaking changes. However, it is still going to be difficult to do this for all entities, as apparently it's very easy to collide. FYI, only if an entity is in the registry entry can it be expected to be the same entity across reboots. So use entity registry entry ID as your primary key. So when you generate an aid for an entity that is in the registry, persist it and don't allow changing it anymore. When hashing the entities without unique ID, keep track of existing AIDs from the registry and prevent collision (add a 1 etc). Also keep track of generated AIDs, but don't persist to disk. You can do |
@balloob I would still prefer to write and later read the AIDs to a file though. As you said it's going to be pretty difficult to avoid any name collisions with hashing and preventive methods (adding a 1) don't solve that either. Say we needed to add 1 to one hash due to a collision and later the first entity is removed (through the filter), now the second entity won't work either since it would have the AID of the first one. Since we only would need to do this on startup of the HomeKit component, it would be limited to one read and one write operation. I would also add a big warning not to touch/change anything in it 😉 |
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. |
Anything new? |
I was also bitten by this problem as well (see issue #27954) and I think I have a solid fix to offer with PR #27955 |
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. |
Just upgraded to python3.7 and now discovery and homekit works again |
Home Assistant release with the issue: 0.80.0
Last working Home Assistant release (if known): 0.77.?
Operating environment (Hass.io/Docker/Windows/etc.): Freenas IOCage
Component/platform: Homekit
Description of problem:
I upgraded my HomeAssistant Server from version 0.77.? to 0.79.3.
After the upgrade, the devices in the apple home app were no longer responding.
Then i deleted the bridge in the home app and wanted to add it again. But it doesnt find it anymore.
Problem-relevant
configuration.yaml
entries and (fill out even if it seems unimportant):Traceback (if applicable):
Additional information:
The text was updated successfully, but these errors were encountered: