The 2 actions you are mentioning (GetAVRVolume , SetAVRVolume) are not in the plugin. So I am not entirely sure you are using this plugin. There are 2 other plugins that have been made. one has been made by the folks over at Pulse Eight and the other by a user of EventGhost. Both of those plugins were created some time ago. I created this plugin to provide a complete feature set.
If you are in fact using this plugin (still not sure where those actions are coming from) I am going to need some clarity on this issue.
answer all questions with a yes or a no, no other information is needed.
1: You have an AVR and a TV. in the TV setup menu you have it set so that the AVR is the "audio device" on the CEC network. Do you have this setting turned on?
If yes was the answer to question 1:
2: When you press the volume button on the remote for the TV the volume should change on the AVR and not the TV.. Does it do this?
3: When you change the volume with the remote for the TV do you see events generated in EG for the volume changing?
4: If you press the volume up button a single time on the TV remote does the volume move a single value on your AVR??
if no was answer to question 1:
can you make that setting change on the TV and see if the problem resolves it's self.
5:
when you initially set up the plugin there was a configuration dialog that appeared. in that config dialog there are some settings relating to using the AVR as the network audio device. Do you have this setting checked off?
if question 5 was yes:
have you tried unchecking it?
if question 5 is no:
have you tried checking it off?
The plugin is designed to automatically adjust which ever volume need to be adjusted based on that checkbox in the config for the plugin.
These are the actions that are available for volume
GetVolume
SetVolume
VolumeUp
VolumeDown
GetMute
ToggleMute
MuteOn
MuteOff
These items are going to send the commands directly to the CEC network. and howevr you have the CEC network setup whether it is control from the TV or control from the AVR this is the mechanism it is going to use.
The SetVolume allows you to specify a volume digit to change the volume to. This is not a native ability to CEC. how the plugni is able to do this is it loops like so.
Code: Select all
volume = get_volume ()
while volume < new_volume:
volume_up()
volume = get_volume()
Now if you are running into a problem with the volume racing up past where it is set to be only when using this single action that I need to adjust the delay time between volume changes.
The way your description of the problem reads is that you are having a problem with the volume going up if you press the button on the remote it's self. and this would not be an issue with the plugin the plugin is not what makes the changes to the volume on the AVR if you press the button on the remote. This is the TV sending that command directly to the AVR.
Unless there is some kind of an issue in the pulse eight piece or in their code for libcec causing this issue. I would state that it is your AVR that is having a problem. which can happen. let me explain why this can happen, if you have an AVR that when you move the volume knob directly on the front of it or you adjust the volume using the remote for the AVR and the volume changes by fractions of a percent or it changes in dB this can cause an issue.
CEC only knowns up down and get volume. and the get volume is a value between 0 and 100 so when the TV says Volume Up the AVR can do one of 2 things. if your AVR has 0.5% increments the AVR can move the volume up by a single step. or 0.5%. when the TV does a GetVolume afterwards the returned value will be exactly the same as it was before or it could be a whole point higher even tho the volume only moved 0.5%. This can cause all kinds of problems.
Now the other type is volume being processed by way of dB. and this is a whole separate nightmare.
code like this is used by all AVR's that support CEC. doesn't matter if it is % based or if it is db based. Almost all current AVR will have varying max volume levels depending on the DSP mode you are in. because of this the 0-100 may not mean 0-100 it could mean 0-90. the code below remaps the numbers.
Code: Select all
def remap(x, old_min, old_max, new_min, new_max):
return (x - old_min) * (new_max- new_min) / (old_max- old_min) + new_min
cec only knowns 0 - 100
your AVR adjusts volume in db with a range of -80 to 0
this will tell you what % -20dB is
Code: Select all
def remap(x, old_min, old_max, new_min, new_max):
return (x - old_min) * (new_max- new_min) / (old_max- old_min) + new_min
print remap(-20, -80, 0, 0, 100)
so now in reverse when CEC tells the AVR to go up one.
Code: Select all
def remap(x, old_min, old_max, new_min, new_max):
return (x - old_min) * (new_max- new_min) / (old_max- old_min) + new_min
old_volume = remap(-20, -80, 0, 0, 100)
print remap(old_volume + 1, 0, 100, -80, 0)
There is an issue here because the values do not map 1 to 1. You end up with things crossing and returning values that do not map properly.
Now because CEC is an unregulated protocol. meaning there is no CEC certification required in order to put the CEC logo and stamp on the device the implementation of the protocol by a manufacturer is never checked. so the manufacturers have run amuck putting in pieces they want and modifying the original protocol to only work with their devices but sell the device as being CEC compatible. which it ends up causing more problems then it's worth.
Because of the large number of variations for the scale that is used with AVR volumes. the mechanics of CEC and volume changes needs to be done by the AVR manufacturer. and unfortunately what most of them do it simply tie CEC to their IP control or to their Serial control and leave it at that.
CEC is actually a horrid protocol and their "specification" has been tossed out the window my the manufacturers. they butcher it or do not put a correct implementation of it on their devices and will not fix it either. they did it only to be able to put the little logo on the box.They do not care if it works properly. they already have your money!
You can try this as a work around and remove your TV from the loops as far as volume changes go.
if you turn off the volume control thing in the TV for the AVR and turn on the one in the plugin you may end up with something that works properly. when you press the volume up and down on the TV remote it should produce events in EG. for that button being pressed. you will need to marry that button to the volume up or volume down actions this will cause the volume changes on the AVR to take place