NorthernMan54 / homebridge-yamaha-home

Homebridge plugin for my Yamaha Receiver optimized for use with the Home App and Alexa
26 stars 9 forks source link

Add zone control only if zones > 1 #16

Closed piotrtobolski closed 6 years ago

piotrtobolski commented 6 years ago

My AVR (RX-V475) has only one zone but I have always one redundant zone zone control for "Main" zone. I assumed this is a typo and this if statement should actually check if there is more than one zone before adding zone specific controls.

NorthernMan54 commented 6 years ago

Looks great, tks

jczwo commented 6 years ago

Great. This removes the unwanted zones switches for me too. But now I realized that the main power switch isn't working on my RX-V475. It will not power on and off. It just sets the default volume when pressed. This problem already exists in previous versions, but I didn't realize because I always used the zone switches. Furthermore the zone volume control was much more precise than the main one I have now. Are there any differences in implementation?

NorthernMan54 commented 6 years ago

Should we roll this change back?

piotrtobolski commented 6 years ago

I don't think this change is the cause of those issues. I had similar erratic behavior before I made this PR. Volume control is useless as it sends too many changes at once and processing them all takes a lot of time. Also, inputs don't update their state to off after change. I assumed those problems are caused by the dependencies. Main power switch works fine for me.

jczwo commented 6 years ago

No rollback. Theres nothing wrong with this commit. It seems that this problem with my AVR has always been there. I went back to a very old version (v0.0.4) today and saw to power switch and volume control is not working there either. As I said zone power switches and zone volume controls are working fine with my AVR. Any ideas?

jczwo commented 6 years ago

What if we remove the standard main power and volume controls completely and reset the zone logic to "if (zones.length > 0)". Every AVR with no Zone support should get 1 set of working zone controls. What do you think?

jczwo commented 6 years ago

Watch my pull request. Perfekt solution for me and my AVR, but give it a try on yours.