Tasker PC control – tutorial #2 (Volume Control)

If you missed the part one, I strongly recommend you to check it out. It tells you all about the framework used, and you will find yourself lost without that. Without the further introduction, let’s talk about the Tasker PC control  – Volume Menu.


We are going to start with setting up the new folder for the volume controls in the EventGhost. These work in a similar way to what we have done with the power menu. An AutoRemote message is received by EventGhost, a reply is sent back and the volume is set to the desired value. Feel free to modify the steps and values. Each message sent to the mobile starts with pc=:= so it could be intercepted by the previously created AutoRemote profile. Values are entered after v, simply because I’m lazy. Feel free to split the variable to get the correct the format for the volume. (more on that in the Tasker part)Untitled 1 - for some reason we don't have an alt tag here

The only unique task in EventGhost is intercepting the volume change. Use system volume trigger and this will store the message inside the {eg.eventpayload}. Then send this message to Tasker via AutoRemote with the pc=:=v prefix (p=:=v{eg.event.payload})

Tasker PC control Volume Menu

Screenshot 20170303 164856 1 - for some reason we don't have an alt tag hereThe idea is rather simple. I’m creating a notification that will allow me to set a predefined system volume, or mute the sounds all together. I was thinking at first about unmute option but setting the volume again will other values does the same thing. Limitations:

  • Slider would be nice, but due to how EventGhost handles things, it’s more trouble than it should be

If you followed the previous tutorial, you will see that this step is fairly easy. And the good news  – other power menus will be easy to add as well. This is the main benefit of going through the framework set up. Once you know where things should be added it becomes really fast.

You can still use the same template notification to add new Sub-Menu, just modify it.  The default notification that we always retreat to will be the one from the previous tutorial as well.

Open Sub-Menu Profile/ SubMenu Open

Screenshot 20170316 095700 - for some reason we don't have an alt tag hereCreate a new notification and link it to the IF %ancomm ~ openvolume. If the volume icon from the first row is pressed  – this action will be called.

Notification is configured as follows:

  • Buttons – as per your liking, make sure the first row is consistent.
  • Actions: the first row starts with open (see template) but the volume menu icon should have openclose action assigned instead. The second row has actions ending with ‘‘…pc”. I used mutepc,lowvpc,medvpc,highvpc.
  • Color, only a second color should be different.
  • Prefix for actions: buttontwo

Submenu Actions/Send AR

Since the framework is already done, we don’t need to add anything else. All that hard work from the part one finally paid off.

PC Feedback/Notification

Screenshot 20170316 095716 - for some reason we don't have an alt tag hereThe EventGhost will issue a reply when the volume is changed from the PC or through our volume menu. The to simplify the process (you can go nuts) the AutoRemote message is sent in this form pc=:=v(value). This means that we have to intercept all the messages starting with (regex)v.*

In a similar way to power menu, I’m creating a variable %PcVolume and simply setting the value of it to the %arcomm. The value will get assigned to the default notification. At this stage go and update the default notifications (the ones that have only 4 icons) with this variable. Each notification should have %PcPowerontime,%PcVolume in the text field.

In the next tutorial, we will focus on bookmark/app menu.

Pocketables does not accept targeted advertising, phony guest posts, paid reviews, etc. Help us keep this way with support on Patreon!
Become a patron at Patreon!

Mat Zolnierczyk

I am passionate about technology, cycling, and art. This would explain why my bike has more computing power than your average office. I own notenoughtech.com and I write for xda-developers.com and pocketables.com NotEnoughTECH | Facebook | Twitter |YouTube |Instagram | Google+ |Donate |Patreon

Avatar of Mat Zolnierczyk