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: Ignore disabled zones #488

Closed tbaur closed 1 year ago

tbaur commented 1 year ago

Problem

No response

Solution

Do not enable zones that are disabled in the controller

Alternatives

No response

Additional context

No response

tbaur commented 1 year ago

[5/22/2023, 7:19:40 PM] [RainBird] Model: ESP-ME3, [Version: 2.12, Serial Number: XXX, Zones: [1,2,3,4,5,6,7,8,9,10]]

In my controller, I have zones 9 and 10 disabled aka "Not wired" -- in the wifi app under zones, it shows a toggle for "Not wired / Wired", but the plugin still loads them.

If possible, within the plugin, if it can ignore those disabled or not wired zones, that would be great.

mantorok1 commented 1 year ago

Hi @tbaur, I'm not sure if anyone has discovered the zone enabled/disabled status in the RainBird API responses. I'll have to look into it. You can however manually do it in the iOS Home app. Zones can be set to disabled within the Irrigation System accessory's config. You only need to set it once so it matches your "Not wired" zones

donavanbecker commented 1 year ago

I know that in HomeKit enabled controllers, even disabled zones show. Could be that they choose to do though.

donavanbecker commented 1 year ago

image

tbaur commented 1 year ago

Yeah, the home app has enable/disabled, but it still shows. Have to catch it at the plugin and just not even create the accessory to begin with. It's kind of ok if you disable "show zones as valve accessories", still shows below the switches, but yes not as a switch. If you enable it, it's right there as an accessory and switch no matter. Could connect this with my other feature request around custom labelling ...the plugin UI configuration could have an enable/disable switch next to the custom label field. An idea anyway!

mantorok1 commented 1 year ago

@donavanbecker, when I disable a sprinkler zone on my Home app the status of the zone says "Off" (not "Idle") and the switch disappears (i.e. the one inside the Irrigation System accessory)

@tbaur, the "show zones as valve accessories" option was added to overcome a bug introduced in an earlier version of iOS which intermittently hide the switches within the Irrigation system accessory. It creates valve accessories (outside of the Irrigation System) in the Home app. I was thinking of removing it now that Apple has fixed the bug. Do you still use it?

tbaur commented 1 year ago

It's still going to be valuable if you want to select a particular zone in an automation. Otherwise all you could select is a program. Same for a scene. I'd suggest transitioning the language from a bug workaround, to a normal feature and keep it.

mantorok1 commented 1 year ago

@tbaur, are you able to check that disabling a zone in the Irrigation System accessory will hide the zone. It definitely works for me. As for the valve accessories that are created when "show zones as valve accessories" is enabled, I can't find any "known" API requests that will return whether a zone is "Wired" or "Not Wired". So to remove any valve accessories for zones that are "Not Wired" we could create a new setting that will allow you to specify which zones you want valve accessories for. Would that solve the problem?

tbaur commented 1 year ago

Think I was mistaken about it showing not wired zones as accessories. You're right and I retested.

But glad all this came up and you mentioned removing "show zones as valve accessories". I'd want to ask to keep it as a go forward feature, and the extra suggest could be valuable in cases.

What I think I’m going to do -- show specific zones that I want to add automation for, or I can show them all (as I can right now).

Then move all the program config into HomeKit automation ...and I wouldn't be limited to only 3 programs. I can create as many options as I want. Oh the added benefit, I could change the zone run order! I've never liked that I have to run the zones in numbered order in a program and can not sort them in the order I want.

So then the delay days feature also helps not needing to go back to the rainbird app for regular tasks.

mantorok1 commented 1 year ago

I wasn't sure if anyone was using the "show zones as valve accessories" anymore but I'm happy to retain it if you find it useful. To allow you to specify which zones you want to create as valve accessories I was thinking a new textbox were you provide a comma separated list of the zone numbers. If you want all zones then you can leave it blank. e.g. If you just want zones 1, 4, 5 & 6 then you'd enter 1,4,5,6

tbaur commented 1 year ago

Yep that works.

mantorok1 commented 1 year ago

Hi @tbaur, there is a new beta (version 11) which should add this new setting. Please try it out and let us know if it solves your problem

tbaur commented 1 year ago

Looks good to me! thumbs up

tbaur commented 1 year ago

we're good, can release

donavanbecker commented 1 year ago

v1.10.0 has been released.