pylips icon indicating copy to clipboard operation
pylips copied to clipboard

[FEAT] control volume via HDMI / CEC

Open zozzi opened this issue 3 years ago • 3 comments

Hello Gene, Thanks for a huge effort and great piece of code. Just one question regarding controlling the volume over HDMI through CEC. I have an optical audio out to receiver + audio return channel switch on @HDMI1. It would be great to be able to control the volume this way. Is this somehow possible? PZ

zozzi avatar Feb 06 '21 13:02 zozzi

huh why do you have both ARC and optical? That is pretty redundant. So this is really up to the tv implementation. This system can ask the TV to change the volume. It may forward that request over CEC to the receiver when using HDMI ARC (optical is unlikely i think). My 2020 TV does forward, while ny 2010: ish did not.

However my 2020 it utterly looses track of current volume. Seem to only be sending a relative value over CEC.

elupus avatar Feb 09 '21 19:02 elupus

Well, I have a satellite settopbox connected via HDMI1. So ARC won't work this way as receiver is 3rd device. I have optical out from TV to receiver because of Netflix, Plex and other apps.
But this is quite ok. Problem is that with TV remote I can fully manage settopbox but sound. Sound buttons are always tied to TV - no matter of sound output settings :( My idea was to allow volume settings by voice command (Google assistant) hacked via your API:)

zozzi avatar Feb 10 '21 07:02 zozzi

Hi @zozzi,

As @elupus mentioned, this likely depends on the TV itself. I don't remember seeing any specific methods in the API to control CEC or optical volume.

Two things you can try:

  1. Connecting a raspberry pi to your TV or receiver will allow to use it to send CEC commands. Depending on your particular setup, this might help you.
  2. Rethink your connection scheme. I have multiple devices, including an audio receiver and I had to spent quite a lot of time arranging this zoo to work properly. This will ultimately depend on the specific devices that you are using (and the functionality they support), but for me the solution was to plug most of the devices into the receiver and connect its hdmi out to the TV (one extra device is plugged into the TV itself). This way the TV will always control the receiver's volume regardless of the input source. Could you maybe share a diagram of your devices and describe the desired endstate in more detail? It's not completely clear to me what's your current setup and what you want to control.

I'll leave this issue open for others to share their advice, but I don't think there is anything I can do in terms of supporting this in Pylips...

eslavnov avatar Feb 14 '21 10:02 eslavnov