hoobs-org / HOOBS

Build your Smart Home with HOOBS. Connect over 2,000 Accessories to your favorite Ecosystem.
https://hoobs.org
GNU General Public License v3.0
551 stars 51 forks source link

Doorbell accessory not being recognized in Home app #1861

Closed wo-d closed 1 year ago

wo-d commented 1 year ago

Description I've been working on restoring homekit support to Arlo and started with doorbells. I've just been trying to get the doorbell alert working, however it seems in HOOBS that the accessory does not register properly. When I view the accessory in the Home app it shows greyed out and mentions that it's unsupported. Would love some eyes on this.

Additionally, I've tested locally with homebridge@1.6.0 and homebridge-config-ui-x@4.50.2 and it appears to be working there.

Plugin name homebridge-arlo-v2

Please report the issue to the plugin developer I am the developer

Version Please include the version of HOOBS you are using. image

Did you upgrade Please let us know if you upgraded from a previous version.

Pervious version If you upgraded, please let us know your previous version.

Did you orginally upgrade to HOOBS 3 from HOOBS 2.1.1? Did you perform an upgrade from HOOBS 2.1.1? Some things are different.

What device are you using? Please let us know the device you are running HOOBS on.

Additional context It registers the accessory, however it dosen't look like it's being recognized as a doorbell. Arlo sends the doorbell event through their basestation (aka hub), which is why the name is what it is. Otherwise the accessory has been configured as a Doorbell. image

Here's the accessory configuration. I've masked any uuids.

{
    "uuid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
    "accessory_identifier": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
    "bridge_identifier": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
    "bridge": "apt-c",
    "plugin": "homebridge-arlo-v2",
    "room": "default",
    "category": 1,
    "name": "Base Station-basestation-5K330C79A1895",
    "sequence": 0,
    "hidden": false,
    "type": "doorbell",
    "identify": false,
    "manufacturer": "Arlo",
    "model": "VMB4500",
    "serial_number": "xxxxxxxx",
    "firmware_revision": "2.1.9",
    "characteristics": [
        {
            "uuid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
            "type": "programmable_switch_event",
            "service": {
                "uuid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
                "type": "doorbell"
            },
            "description": "Programmable Switch Event",
            "value": 0,
            "format": "uint8",
            "max_value": 2,
            "min_value": 0,
            "min_step": 1,
            "valid_values": [
                0,
                1,
                2
            ],
            "read": true,
            "write": false
        }
    ]
}

And the accessory code for homebridge registration.

constructor(platform: ArloPlatform, accessory: PlatformAccessory) {
    this.arlo = platform.arlo
    this.log = platform.log;
    this.platform = platform;
    this.accessory = accessory;

    this.device = this.accessory.context.device as DEVICE_RESPONSE;

    this.accessory.getService(this.platform.Service.AccessoryInformation)!
      .setCharacteristic(this.platform.Characteristic.Manufacturer, "Arlo")
      .setCharacteristic(this.platform.Characteristic.Model, this.device.properties.modelId)
      .setCharacteristic(this.platform.Characteristic.SerialNumber, this.device.deviceId);

    // Get the Doorbell service if it exists, otherwise create a new service.
    // Multiple services can be created for each accessory.
    this.service =
      this.accessory.getService(this.platform.Service.Doorbell) ||
      this.accessory.addService(this.platform.Service.Doorbell);

    // Sets the service name, this is what is displayed as the default name on the Home app.
    this.service.setCharacteristic(this.platform.Characteristic.Name, DisplayName(this.device));

    // Each service must implement at-minimum the "required characteristics" for the given service type
    // see https://developers.homebridge.io/#/service/Doorbell

    // add characteristic ProgrammableSwitchEvent
    this.service
      .getCharacteristic(this.platform.Characteristic.ProgrammableSwitchEvent)
      .onGet(() => null);

    this.service.setPrimaryService(true);
}
wo-d commented 1 year ago

I can reproduce this without hoobs