HomeTaskerTasker Variable, that you may not care for

Tasker Variable, that you may not care for

The bursts of brilliance often come from stupid mistakes!

Today, I made a silly mistake. I posted a video revealing URL to my NodeRED server. Thankfully, Parth messaged me straight away and I removed the URL and deactivated my DNS before things went from bad to worse. (un)Fortunately, only 22 people got to see the URL according to the YouTube stats, so there are some benefits to not being famous! Before I tell you how my mistake can help you with TASKER, I’d like to thank Parth. Go and check his Instagram, he has some cool automation stuff on there too!

The mysterious Tasker variable and on boot profile

You might be thinking what is that variable I’m on about, and why should you care?  For some time now I have been doing a right thing for wrong reasons and until the DNS change, it didn’t really occur to me how helpful this change is.

When I share the Tasker profiles, I often replace the personal details with a custom (and fairly descriptive) variable. If the field holds my IP information, I would use something like %EnterYourIPHere before sharing the file with you. The initial reason was to not to share my personal data with you.

The correct use for that Tasker variable (something that I actually do correctly in my scripts) is to be able to change the personal details across all profiles at once, rather than checking every single task manually. I guess you can see where this is going.  By using variables instead of your API keys, usernames, IPs, and DNS details – you can quickly share the profiles without getting it all exposed and modify the access details with a single task.

To get this automated I opted out for “on boot” event. I never had a chance to use it, and I feel that making sure all the crucial variables are set on boot is a good way to look after your variables!  The profile is super simple:

TASKER PROFILE: Set on Boot
Profile: On Boot 
	Event: Device Boot
Enter: Set Data 	
	A1: Variable Set [ Name:%NodeRedServer 
               To:enter the ip here Recurse Variables:Off Do Maths:Off Append:Off ] 	
	A2: Variable Set [ Name:%Username 
               To:enter your username here  Recurse Variables:Off Do Maths:Off Append:Off ] 	
	A3: Variable Set [ Name:%GoogleMAPI 
               To:enter the api key Recurse Variables:Off Do Maths:Off Append:Off ] 

You might be tempted to hardcode all that information in actions. Please don’t! It takes very little effort to do this properly and you will thank me one day!

Conclusion

The moral of the story is – don’t be me. Be better than me, let me make all the mistakes for you. This way you get all the joys of doing something right the first time around! And if my silly mistakes and semi-decent solutions caused you to feel sorry for me! You can buy me a coffee to cheer me up!

Project Download

Download project files here. Bear in mind that Patreon supporters have early access to project files and videos.

PayPal

Nothing says "Thank you" better than keeping my coffee jar topped up!

Patreon

Support me on Patreon and get an early access to tutorial files and videos.

image/svg+xml

Bitcoin (BTC)

Use this QR to keep me caffeinated with BTC: 1FwFqqh71mUTENcRe9q4s9AWFgoc8BA9ZU

New to Tasker?

Tasker Quick Start – Getting started with Tasker

0
From newb to not so newbie in 10 min

Best Tasker Projects

How to use Raspberry PI as WOL (wake on lan) server

0
While you could wake up your PC from a mobile directly, having a dedicated server capable of doing so is the best solution. The reason is simple. You can hook up as many devices as you wish with a single endpoint. This is why Raspberry Pi is perfect for this.

How to wake on LAN computers and put it to sleep with Power Menu,...

0
How to Wake on LAN properly via Android, Alexa, Google Assistant and Web

7 awesome Bluetooth keyboard shortcuts for Android

0
7 unique Android shortcuts that you can add to any Bluetooth keyboard.

Smart overnight charging with Tasker

0
Still keeping your phone plugged in overnight? Try smarter overnight charging with this profile

One thing that Join app can’t do and how to fix it with Tasker

0
It's not possible to share the clipboard automatically between join accounts registered to 2 different emails. But you can fix this with tasker.

Essential Guides

Tasker: Seconds into DD:HH:MM:SS (dynamic)

0
It's time to.... ok it's a pun, but I will show you how to master time and convert seconds to DD:HH:MM:SS dynamically

4 ways to organise Tasker projects

0
Keep your Tasker tidy!

A better way to store Tasker credentials

0
The more clever way of managing credentials

Annoyed with dozens of AutoApps populating your app drawer? Here is a fix!

0
Clear your app drawer from the clutter in seconds

Putting AutoTools pie chart to a good use – SSID logger

0
Who wants a piece of the pie (chart)?