You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Okay, so they probably do work... But I'm not sure how. They aren't part of the device class, so I'm not 100% sure what they do. I can't run, for example tv.volume_up(), and running cec.volume_up() just returns true.
Should these be able to send volume up and down commands to the TV?
cec.volume_up() and cec.volume_down() are wrappers around the volume up and down functions that are part of the libcec API. I think the underlying libcec functions are sending volume up and down to the cec AV device with address 5. (Usually a receiver).
I don't currently have an API for sending user controls, button presses or raw commands to a specific device. That would probably be a good addition to the API.
I don't have time to write that API at the moment, but I will gladly accept a pull request.
@RSully Did you need to do anything else to get the volume working? I've tried running list_devices() first and the volume controls are still not doing anything.
I suspect this is a bug/feature in the underlying libcec API. It probably needs to detect which devices are present before it knows which address to send volume messages to.
Activity
trainman419 commentedon Nov 11, 2014
cec.volume_up()andcec.volume_down()are wrappers around the volume up and down functions that are part of the libcec API. I think the underlying libcec functions are sending volume up and down to the cec AV device with address 5. (Usually a receiver).I don't currently have an API for sending user controls, button presses or raw commands to a specific device. That would probably be a good addition to the API.
I don't have time to write that API at the moment, but I will gladly accept a pull request.
RSully commentedon Jan 4, 2015
Just thought I'd add my 👍 to this.
Edit:
vol_up()does actually work for me, I had a configuration problem.Edit: found a weird quirk (read: bug). The volume functions only work after I call
list_devices().brad999 commentedon Apr 7, 2015
@RSully Did you need to do anything else to get the volume working? I've tried running list_devices() first and the volume controls are still not doing anything.
RSully commentedon Apr 7, 2015
@brad999 I actually switched to using the C++ API directly. My limited implementation is here.
askvictor commentedon Sep 27, 2015
@RSully I found the same - vol doesn't work after cec.init(), but does work after cec.list_devices()
trainman419 commentedon Sep 27, 2015
I suspect this is a bug/feature in the underlying libcec API. It probably needs to detect which devices are present before it knows which address to send volume messages to.