I would like to set the TV volume to 50% how do I achieve this with the cec-client command or other. I am aware of the [volup] [voldown] but that must be a dumb API comparable to walking blind-folded.
Thanks for providing your insights and hopefully a solution.
I tried the following command but the post never explained what it meant nor can I intrepet the output :(
pi@raspberrypi:~ $ echo "tx 20:71" | cec-client RPI -s -d 4
opening a connection to the CEC adapter...
NOTICE: [ 3] connection opened
NOTICE: [ 268] registering new CEC client - v4.0.4
NOTICE: [ 960] CEC client registered: libCEC version = 4.0.4, client version = 4.0.4, firmware version = 1, logical address(es) = Recorder 1 (1) , physical address: 4.0.0.0, compiled on Linux-4.15.0-48-generic ... , features: P8_USB, DRM, P8_detect, randr, RPi, Exynos, AOCEC
NOTICE: [ 3535] unregistering client: libCEC version = 4.0.4, client version = 4.0.4, firmware version = 1, logical address(es) = Recorder 1 (1) , physical address: 4.0.0.0, compiled on Linux-4.15.0-48-generic ... , features: P8_USB, DRM, P8_detect, randr, RPi, Exynos, AOCEC
pi@raspberrypi:~ $ cec-client -h
Once I figure out this my next step would be how to issue these commands from a TypeScript(JS) web app running inside the Chromium browser on the Pi4 of course.
echo volup | cec-client -s -d 1orecho voldown | cec-client -s -d 1X times neccessary starting with known sound level value. For web application you can makeAJAXrequest to web server runningPHP(python, perl or another langage) and use system() (or other related function) orCGIfor running your cec-client command. – Ephemeral May 20 '20 at 11:00Are you confirming there is no command for a direct valueno sorry I don't know for that.7Fseem's to be hex. If cec-client still does not respond to the remote control, type "as" directly in the output of cec-client to switch the television to active source. – Ephemeral May 20 '20 at 11:31-d 1not-d 4) – Ephemeral May 20 '20 at 11:39unfortunately almost no TVs support volume control via CEC, you can also read here – Ephemeral May 20 '20 at 11:49cec-clientbut if cec-client still does not respond to the remote control, typeasdirectly in the output of cec-client to switch the television to active source. But ifvolupcommand not work , it's a bad starting point. – Ephemeral May 20 '20 at 11:57