System.Volume Up and Down macro for controlling AVR

Do you have questions about writing plugins or scripts in Python? Meet the coders here.
Post Reply
chipd33
Posts: 8
Joined: Fri Oct 16, 2020 10:04 pm

System.Volume Up and Down macro for controlling AVR

Post by chipd33 » Tue Oct 20, 2020 10:48 am

When using bit streaming for surround sound windows volume control is bypassed.
A python macro comparing payload or system.volume changes and outputting Volume Up or Down events every say 100ms could be used to control the AVR volume via IR with windows volume control !
I tried to write some code myself but didn't get the correct volume changes I needed in the time I had to try it.
If i get it working I will publish it here but if anybody has already worked it out or can share an example python macro I would really appreciate it.

Edit: In my case it would go EventGhost>AutoRemote plugin > Tasker >Logitech Harmony Hub plugin .

User avatar
Sem;colon
Plugin Developer
Posts: 753
Joined: Sat Feb 18, 2012 10:51 am
Location: Germany

Re: System.Volume Up and Down macro for controlling AVR

Post by Sem;colon » Tue Oct 20, 2020 12:54 pm

You actually just need to store the volume level in a variable and when an volume event comes in, you compare the new level with the old level.
Based on if it's higher or lower, you trigger the appropriate up or down events which you can then use to forward to tasker.
However, there's one issue I see: when your system volume is 0% you wouldn't be able to make your AVR more quiet, as the AVR is not necessarily on 0% as well. Same applies for 100% and louder
If you like my work, Image me a drink :wink:

chipd33
Posts: 8
Joined: Fri Oct 16, 2020 10:04 pm

Re: System.Volume Up and Down macro for controlling AVR

Post by chipd33 » Thu Oct 22, 2020 7:55 pm

Hi, yes, when I get time I will work on it. There is latency as well when passing values to tasker via autoremote and i think it cannot handle the large number of system.volume events generated.
I had to put in a 1 second timer to filter out the system.volume events to get accurate values in Tasker, so some tinkering needs to be done to get it to work in practice.
One idea I had is to start by setting the avr volume to zero using vol down events from Tasker and then raise it to the value given from EG.
Just have a lot of rl things i need to get done before i can spend time on this but I will try it when I get the chance.

Post Reply