YinHangCode / homebridge-mi-aqara

a homebridge plugin for XiaoMi Aqara plugin.
1.08k stars 154 forks source link

Do not remove devices #221

Closed permadm closed 6 years ago

permadm commented 6 years ago

Devices removed from mihub are not removed from the homekit. The instruction in config.json does not help for all devices. If several devices appear in the homekit under one serial number, they can not be removed via config.json.

This device has been removed from mihub. How do I remove it from homekit?

scr 2018-08-19 13 42 09

e47b is one device. How can I remove it? The following configuration does not work. image

lboue commented 6 years ago

+1 👍

YinHangCode commented 6 years ago
"defaultValue": {
    "158d0001000012": {
        "DuplexButton86_StatelessProgrammableSwitch_Left": {
            "name": "dining room 86 button left"
        },
        "DuplexButton86_Switch_VirtualSinglePress_Left": {
            "name": "dining room 86 button left virtual single press",
            "disable": true
        },
        "DuplexButton86_StatelessProgrammableSwitch_Right": {
            "name": "dining room 86 button right"
        },
        "DuplexButton86_Switch_VirtualSinglePress_Right": {
            "name": "dining room 86 button right virtual single press",
            "disable": true
        },
        "DuplexButton86_StatelessProgrammableSwitch_Both": {
            "name": "dining room 86 button both"
        },
        "DuplexButton86_Switch_VirtualSinglePress_Both": {
            "name": "dining room 86 button both virtual single press",
            "disable": true
        }
    }
}

For more information about config, Please refer to file sampleConfig.json.

permadm commented 6 years ago

Thanks! Its work! image

orevron commented 2 years ago

Hi I'm having the same issue: The devices was removed from mi hub and trying to remove them from homebridge Devices are: button, temperature sensor and contact sensor

@YinHangCode can you please assist?

this is my configuration:

{
  "platform": "MiAqaraPlatform",
  "autoRemoveAccessoryInterval": 100,
  "gateways": {
    "f0b429cc8504": {
      "password": "**********",
      "ip": "x.x.x.x"
    },
    "defaultValue": {
      "Global": {
        "ignoreWriteResult": false,
        "syncValue": true
      },
      "158d000588ad0d": {
        "ContactSensor_ContactSensor": { "disable": true }
      },
      "158d00042d5543": {
        "TemperatureAndHumiditySensor_TemperatureSensor": { "disable": true },
        "TemperatureAndHumiditySensor_HumiditySensor": { "disable": true }
      },
      "158d0002c48270": {
        "Button_Switch_VirtualDoublePress": { "disable": true },
        "Button_Switch_VirtualSinglePress": { "disable": true },
        "Button_StatelessProgrammableSwitch": { "disable": true }
      }
    }
  }
}

I also tried removing this accessories from the manage console but they not exist in the list os items and the Orphan Accessory list is constantly loading and no results there.

Thanks