Are you lucky enough to have more than one computer? I have a desktop workstation and a laptop. Recently, I came up with a small trick that I think you could find useful aka ‘Active PC -Tasker profile’. The profile is rather simple, and it has found a home in my ‘operations’ folder. This is a folder for all the profiles, that don’t really do anything on their own. They are there to make other profiles more awesome.
Active PC – Tasker profile
We are going to use AutoRemote and EventGhost for this. Note that EventGhost has to be installed on each computer you want to use. The theory is rather simple. Notify the phone/tablet each time you change the workstation. Once the variable is set, you can use it for all sorts of projects.
If you are using a work machine with admin restrictions you could use a WIFI condition (if available) or a geofence (or cell near) to achieve a similar effect. Note that these methods won’t work if both computers happen to be in the same location/connected to the same WIFI.
If you are interested in issuing voice commands from different computers, expecting results to be delivered to the same machine, take a look at the AutoVoice – Your PC name field. This option will pass the device name to Tasker as %avsource.
I’m using the global variable which stores the most recently used computer. This variable can be used later for other Tasker actions: ie as IF condition.
You can set the variable %ActivePC to anything you want, but for the best effect, keep the names in line with the Join names for your devices. I will show you why in the next tutorial.
The AutoRemote Event uses activePC as the filter, %arcomm contains the name of the computer. More on that below. This is pretty much all you need to complete the Active PC -Tasker profile.
I hope you have used the EventGhost and AutoRemote before (otherwise click here). I need three profiles to get this profile sorted. The system goes to ‘idle’ after a minute of not receiving any user input. If you change the PC’s more often than this, the profile won’t work until the first idle time. This can be bypassed, but you will end up spamming the AutoRemote messages. The same EventGhost config has to be saved to every computer. Note, that you have to change the device names in the AR messages to suit your set up. I have two computers a laptop (C@Laptop) and desktop PC (C@Home).
This is the core profile. The trigger responds to ‘System.Unidle‘ and deactivates this trigger instantly. We don’t need AutoRemote to keep sending the messages if we have not changed the machine.
Two AutoRemote messages are sent, one to your mobile and one to the other PC. The mobile message has activePC=:=<name> format. This will help to filter the command in Tasker. AutoRemote message to another machine sends the monitorenabled message.
I want to enable the ‘System.Unidle‘ trigger when I start to use another machine. So I linked that action with the trigger ‘AutoRemote.Message.monitorenabled‘. This way, as soon as another computer is set active, this machine will be ready to take over once user input is detected.
Lastly, I have replicated the Set Active config to work on boot (with a delay). This should keep me covered in the situations when the computer was powered off and unable to receive the activating message from the Enable Monitor. The triggers cover the sleep/boot/restart scenarios, and the AutoRemote messages are the same as in Set Active.
You can find the profile file in the .zip file below. The folder contains the text file for the EventGhost tree as well. Just copy the text from the file and paste it to the opened window. Once this is done – authorize the AutoRemote and set the correct target devices. You can continue to the Fetch Pictures tutorial that expands on this one.
Download project files here. Bear in mind that Patreon supporters have early access to project files and videos.