homebridge-yeelight-wifi icon indicating copy to clipboard operation
homebridge-yeelight-wifi copied to clipboard

Delete old bulb

Open straubus opened this issue 4 years ago • 2 comments

Hi, One of my bulbs broke, so I disconnected it from power and deleted from yeelight account. Now I am trying to also delete it from Homekit, but homebridge still finds that old device, even when I uninstall Your plugin. How to clear the catche from old/broken devices?

straubus avatar Apr 21 '20 14:04 straubus

@straubus Delete the plugin and config.json, then delete the persist and accessories directories inside the homebridge folder, and restart homebridge to clear all previous devices.

RealDyllon avatar Apr 28 '20 03:04 RealDyllon

Little overkill with the deletion? Maybe a little more delicate deletion process would be possible?

reyo avatar Jun 02 '21 08:06 reyo

Hello, this is something related to homebridge itself. As far as I know the easiest way is to use something like homebridge-config-ui-x which will offer an option to Remove Single Cached Accessory.

It can also be done manually directly on the filesystem but will take some care. The files that you should look into are: accessories/cachedAccessories and persist/{AccessoryInfo.*.json, IdentifierCache.*.json}. Delete only the blocks related to the device you are removing.

vieira avatar Aug 20 '23 14:08 vieira

As of 2.4.0 you can remove a light by blacklisting it in config.json. It will be removed from HomeKit. Note: If the device is no longer on your network, after it's removed you can revert the config.json to whatever it was before. No need to keep the blacklist setting forever.

{
  "bridge": {
    "name": "Raspberry Pi"
  },
  "accessories": [{}],
  "platforms": [
    {
      "platform": "yeelight",
      "name": "Yeelight",
      "defaultValue": {
        "aed78s": {
          "blacklist": true
        }
      }
    }
  ]
}

vieira avatar Aug 22 '23 21:08 vieira