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

Volume (Fan speed vs. real volume) #48

Closed Hadea4711 closed 3 years ago

Hadea4711 commented 3 years ago

Hi everybody,

short question: Why is there a difference between the volume via app (fan speed) vs. real one on the AVR display.

For example: Display: 32.5 (Homebridge: -48) App: 31%

Display: 21.5 (Homebridge: -59) App: 10%

Display: 18.5 (Homebridge: -62) App: 5%

Okay... percentage vs. "I don't know".

KR, Hadea

NorthernMan54 commented 3 years ago

The mapping between the Fan speed and the one on the AVR display is some code from the original Yamaha plugin I used as the base for this years ago. As it just worked, and I never really look at the display on mine, it never really came up as discussion.

The math behind it is here

https://github.com/NorthernMan54/homebridge-yamaha-home/blob/f0ba52091a186ec9d37c3dd6fee61d273eb016c1/index.js#L682

And the rational why it is like this is that the Home App Fan is 0 to 100 and the AVR is - something to + something ( Sorry don't recall what the AVR range actually is ).

Hadea4711 commented 3 years ago

Ok... wow... thanks for the prompt answer!

You are right: it works well and that is all it is.