hjdhjd / homebridge-ratgdo

🚗 non-myQ Liftmaster, Chamberlain, and Ratgdo Plugin for Homebridge
Other
100 stars 2 forks source link

Accessory names are reset on plugin reload #20

Closed chazwarp923 closed 3 months ago

chazwarp923 commented 3 months ago

Homebridge Ratgdo

2.3.1

Homebridge Platform and OS

Fedora 40 (Docker)

Homebridge Version

1.8.3

Node Version

20.15.0

Ratgdo ESPHome Firmware Version

2024.7.1

Describe the problem

Related to https://github.com/hjdhjd/homebridge-ratgdo/issues/15 Upon restarting Homebridge or the child bridge, any configured names in the home app beyond the main accessory/service for the Garage Door Opener itself are reset. From looking at the code it looks like you only set the names based off the main accessory which I think perhaps assumes people only keep it as one tile or that nobody would individually rename the accessories. I also noticed that the way in which you set the name per service appears to use one of two different methods depending on the service, if you set the name for the service at all. I'm not sure which one is the correct way of doing it, or if it doesn't matter which is used, but at the least it is inconsistent if a specific method is not strictly required, but I don't know anything about the requirements of a Homebridge plugin.

Homebridge HBR JSON configuration

{
    "name": "Ratgdo",
    "options": [
        "Enable.Opener.Switch.E8DB84E82EA4",
        "Disable.Motion.E8DB84E82EA4",
        "Enable.Opener.Dimmer.E8DB84E82EA4"
    ],
    "_bridge": {
        "username": "0E:B5:3E:2C:C9:7B",
        "port": 55622
    },
    "platform": "Ratgdo"
}

Relevant log output

N/A

Acknowledgment that you are only running non-beta firmware releases from Apple, ESPHome, or Ratgdo

hjdhjd commented 3 months ago

This isn’t a bug, it’s an intentional design decision. Thanks!

One more edit: yes, the ways in which naming of individual services are done are in fact correct. Quite a bit has evolved in recent versions of iOS. Different services have different requirements related to naming - it’s a bit of a mess in HomeKit in that regard.

I have no intention of allowing end users to rename subsidiary services beyond the main opener service. There are reasons for that, including ensuring there’s consistency as additional services are added in the future that may overlap in service type or capability which will create inevitable confusion for end users.

github-actions[bot] commented 3 months ago

This issue is locked to prevent necroposting on closed issues. Please create a new issue for related support requests, bug reports, or feature suggestions.