donavanbecker / homebridge-rainbird

The Homebridge RainBird plugin allows you to access your RainBird Controller from HomeKit with Homebridge.
ISC License
20 stars 0 forks source link

Feature Request: Allow for a custom accessory name #487

Closed tbaur closed 1 year ago

tbaur commented 1 year ago

Problem

No response

Solution

Custom naming for accessories

Alternatives

No response

Additional context

No response

tbaur commented 1 year ago

In the Rainbird controller or their wifi app, you can name the controller and the zones, but there is a text field char limit, making it not that useful for some. I left them all as the default.

In HomeKit I can use longer more descriptive naming.

Instead of "Zone 1" as the Homebridge accessory name -- within the plugin, if I could map and rename the accessories specifically, then I can match them up with HomeKit or rather, not have to rename them in HomeKit.

Example Instead of Zone 2 -- Landscape Rainbird Zone 1 Garden Upper

Would just make it cleaner going between Homebridge and HomeKit.

(Also, if/when I add another controller, not sure what would happen to the default accessory names? If I left both controllers at their defaults)

=======

FROM:

[5/22/2023, 6:57:07 PM] [RainBird] Loading accessory from cache: ESP-ME3 [....] [5/22/2023, 6:57:07 PM] [RainBird] Loading accessory from cache: Zone 1 [...]

TO:

[5/22/2023, 6:57:07 PM] [RainBird] Loading accessory from cache: Landscape Rainbird Controller 1 [....] [5/22/2023, 6:57:07 PM] [RainBird] Loading accessory from cache: Landscape Rainbird Zone 1 Garden Upper [...]

mantorok1 commented 1 year ago

It should be possible to retrieve that Name characteristic from the Irrigation System and Valves but they may not be available while the plugin starts up. @donavanbecker Do you know?

tbaur commented 1 year ago

For some that could be enough That wouldn't solve what I outlined though -- re the name I'd want doesn't fit in the fixed length rainbird app field. Thats the root cause. I couldn't find other examples of this in my other plugins. They pull from the device or cloud service, where I was able to name it what I wanted (no short fixed length char, so it's named what I want it to be in HomeKit).

tbaur commented 1 year ago

I'm thinking now what I’m suggesting is a lot of work, for something not that important. I noticed a change in the beta. Instead of zones being named "Zone #", they are now named "ESP-ME3-valve-#", which removes one of the problems. Or maybe it changed awhile back re cache. From there it's a one time change in the home app to rename. I presume "ESP-ME3" is just the device type the plugin has setup. If you do what you suggest, least for the controller name, that solves the issue of having more than one controller (even if the same model). Name them different in the rainbird app, done.

donavanbecker commented 1 year ago

@mantorok1 We should be a able to do that. I do this with other plugins/APIs

mantorok1 commented 1 year ago

@tbaur, I think the naming of the Valve accessories was changed by Apple in a recent version of HomeKit. The plugin sets the Name to Zone # but then HomeKit seems to override this and sets it to ESP-ME3-valve-#. Anyway if you're happy with the way HomeKit is doing it can this issue be closed?

tbaur commented 1 year ago

Could close. Looks like I’m going to use another brand for a second controller, it's just a simple valve I need to open on a particular day, before irrigation runs. But not sure how 2 rainbird controllers would work with the plugin, problem for another day. thanks team!