Skip to content
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

Delete old bulb #72

Closed
straubus opened this issue Apr 21, 2020 · 4 comments
Closed

Delete old bulb #72

straubus opened this issue Apr 21, 2020 · 4 comments
Labels

Comments

@straubus
Copy link

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?

@RealDyllon
Copy link

@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.

@reyo
Copy link

reyo commented Jun 2, 2021

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

@vieira
Copy link
Owner

vieira commented Aug 20, 2023

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 vieira closed this as completed Aug 20, 2023
vieira added a commit that referenced this issue Aug 22, 2023
Allow setting `"blacklist": true` in `config.json` to not expose a
discovered device to HomeKit (see #86).

This can also be used to make homebridge forget a device that you have
removed without having to manually edit `cachedAccessories` (see #72).

Example Usage:
```
{
  "bridge": {
    "name": "Raspberry Pi"
  },
  "accessories": [{}],
  "platforms": [
    {
      "platform": "yeelight",
      "name": "Yeelight",
      "defaultValue": {
        "aed78s": {
          "blacklist": true
        }
      }
    }
  ]
}
```
@vieira
Copy link
Owner

vieira commented Aug 22, 2023

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
        }
      }
    }
  ]
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants