dkerr64 / homebridge-yolink

Apache License 2.0
12 stars 2 forks source link

YoLink integration with HomeBridge working, but devices don't show up in HomeKit #101

Closed ericfitz closed 1 month ago

ericfitz commented 1 month ago

Describe Your Problem: YoLink devices are not showing up in HomeKit. They were in the past, but no longer.

YoLink hub and devices are all working if I use the YoLink app.

YoLink integration with HomeBridge appears to be working; I see all my YoLink devices and accurate status.

Every other HomeBridge integration and accessory (besides YoLink) appears in HomeKit and is working normally.

I do not know how to diagnose.

Troubleshooting steps I've tried:

  1. I restarted the plugin child bridge.
  2. I restarted HomeBridge
  3. I restarted restarted the Raspberry Pi running HomeBridge.
  4. I cleared cached devices from HomeBridge.
  5. I attempted to re-add HomeBridge to HomeKit using the QR code (it was already added so this was a NOP).
  6. I stopped running the plugin as a child bridge, and restarted HomeBridge.
  7. I checked to ensure that I was running latest version of HomeBridge and the plugin
  8. I tried forcing upgrade to node.js 22.5.1 but reverted after I got a message that the yolink plugin doesn't support it.

Logs:

attached

Plugin Config:

attached

Screenshots:

Environment:

homebridge-config.json homebridge.log.txt

dkerr64 commented 1 month ago

I'm not sure what to tell you. The logs show everything working as expected and as you note, the devices are appearing in Homebridge but for some reason not in HomeKit. So the problem is somewhere in that link.

The brute force approach may be to remove the accessories from HomeKit and then re-pair them. This is nasty because if you have any automations built around any of the devices then they will need to be redone. If there are other non-YoLink devices part of the automation, then the automation will remain but the YoLink devices removed. If only YoLink devices were part of the automation then the automation itself will be removed. As I said, nasty.

If you go this path, then I would also recommend deleting the accessories from the cache in Homebridge. I would start in Apple Home and remove each of the YoLink accessories and the YoLink bridge. Then disable the YoLink plugin in Homebridge and make sure it shuts down (or restart Homebridge) then go to Homebridge settings and look for "Manage Cached Accessories" select "Remove Single Cached Accessory" and then delete each of the YoLink accessories. DO NOT select option to remove all cached accessories as that will really mess up your HomeKit automations. Now re-enable the YoLink bridge and once it is fully initialized go through the steps to add each accessory back to Apple Home.

If you have automations for your YoLink devices this is all pretty ugly as you then have to recreate them.

ericfitz commented 1 month ago

Cool, thank you for your advice. My intuition is that there is some state messed up in HomeKit but I don't have any way to verify.

Here's something related that might or might not have contributed: I turned off the HomeBridge YoLink plugin and enabled a YoLink plugin for HomeAssistant (which is also bridged to HomeKit) and perhaps HomeKit got confused. That never worked so I turned it off and re-enabled this HomeBridge plugin. But HomeKit might be remembering something and getting confused.

dkerr64 commented 1 month ago

Cool, thank you for your advice. My intuition is that there is some state messed up in HomeKit but I don't have any way to verify.

Here's something related that might or might not have contributed: I turned off the HomeBridge YoLink plugin and enabled a YoLink plugin for HomeAssistant (which is also bridged to HomeKit) and perhaps HomeKit got confused. That never worked so I turned it off and re-enabled this HomeBridge plugin. But HomeKit might be remembering something and getting confused.

I definitely recommend removing the accessories from HomeKit, removing from Homebridge cache and starting from scratch. I don't know anything about Home Assistant, but suggest you look also at it and make sure that none of the YoLink devices are cached there (if they have caching).

ericfitz commented 1 month ago

Just one follow up comment in case it helps you in the future.

I had the yolink plugin configured as a child bridge in both HomeBridge and HomeAssistant. I didn't have both enabled at the same time, but HomeKit was getting confused since it saw two bridges.

I removed one of the bridges from HomeKit and everything started working immediately.

Thank you for your help and for a great plugin. Eric

dkerr64 commented 1 month ago

Thanks.