r/tasker • Direct-Purchase User • 3d ago

Sharing two ways of using AI with Tasker

I've recently come up with two ways to use AI to get more out of Tasker, and I thought I'd share them with the community.

1. Modify or fork an open-source app and ask AI to add public intents

If you find an open-source app that you really like but wish it had more features or Tasker integration, you can ask AI to modify its source code and add public intents.

For example, I found a security camera app that was great but lacked a few features I wanted, including the ability to control it through Tasker. I asked AI to add public intents, and now I can control the app using Tasker's Send Intent action. Something that wasn't possible with the original app!

2. Create a web app to remotely trigger Tasker tasks using FCM and Cloudflare

I have a friend who lives abroad and needs access to my Tailscale VPN to use my IP address. Instead of having to ask me every time to turn Tailscale on or off, I asked AI to create a simple web app for this purpose.

Now, my friend can simply open a web link and use two buttons to remotely turn my Tailscale connection on or off.

This is actually based on a feature João introduced more than a year ago, allowing you to trigger Tasker tasks remotely:

https://www.youtube.com/watch?v=9Bh0fToZVeA

Hope these ideas help someone discover new ways to use AI with Tasker!

14 Upvotes

9 comments sorted by

2

u/mobiletechnophile 3d ago

Oh wow! This is exactly what I was looking for thank you. I've been using Join with Tasker and I find it is somewhat slow and this can potentially be a lot better.

1

u/Nirmitlamed Direct-Purchase User 3d ago

Glad it helped 👍

2

u/yosbeda 3d ago edited 2d ago

Mine is a bit different from both of yours, since it's less about one feature and more about running the whole Tasker config through AI, like a codebase. It's the same approach as my Hammerspoon setup on the Mac, and I reused that docs layout here. Each task has a short note (the small utility tasks share one), and there's a numbered list of design decisions the AI has to follow, which is what keeps new tasks consistent.

All the AI work happens on my desktop, in Claude Desktop with the Desktop Commander MCP reading and writing the files on my Mac. Nothing runs on the phone. Tasker also has its own built-in AI Helper (added around 6.5, I think), and as far as I know it can read and change your setup from inside the app with a provider you pick, but it never really interested me, since working from the desktop already does everything I need.

The Tasker-specific part is the XML. The phone stays the source of truth: one task writes a full backup to shared storage, Syncthing brings it to my Mac, and a small script splits it into one file per task (44 tasks across 6 projects), so the AI reads one task instead of a 340 KB file. For the exact format of an action I start with a baseline export: I add the action to a throwaway task in the app and back it up, so the AI reads the real XML instead of guessing. Tasker-XML-Info helps too, but the export comes first.

When I build or fix something, I have the AI add temporary probe steps that write each step's output to a text file in a data folder. I import that task, run it, then run a small Syncthing toggle task so the log reaches the Mac, and the AI reads it. If the log isn't enough I take a screenshot, run another task that moves it into shared storage, and sync again. The probes come out once it works. That's the big difference from Hammerspoon, where the AI can reload and press its own hotkeys. It can't touch the phone, so the log is how it sees what happened.

For the finished change, a new task goes in by importing its file from the Tasks tab, and so does a single changed task. Import Task replaces the task of the same name with no popup, so there's no second copy and no need to delete it first (I found that out by importing over an existing task by accident). For several tasks at once I restore instead: the AI edits a copy of the full backup, a script checks it (task count, duplicate names, If and End If balanced), and then I restore it. Restore replaces everything though, so I back up first.

1

u/Nirmitlamed Direct-Purchase User 3d ago

It's another way of interacting with AI to use Tasker. What i am interesting about is what do you do about sensitive information like a unique key/tokens?

2

u/yosbeda 3d ago

Mostly by keeping them out of everything the AI reads. Each secret sits alone in its own text file, and the tasks read that file when they run, so no task, note or log has the actual value written in it. The backup and the per-task files the AI works from only ever point at the file. I checked the backup, those task files and my notes for the real values and none of them show up.

One caveat though, the AI has file access on my desktop, so it could open those files if it wanted to. What stops it is a rule in my docs (never print or copy a secret, name the file and not the value), not anything technical. It's a personal phone and Mac that only sync with each other, no git remote and nothing public, so plain text files were an accepted tradeoff for me. If that folder ever got shared or pushed somewhere I'd have to redo the whole thing.

The temporary logs from my test runs follow the same rule and never include them either. Rotating a key is just editing its file.

1

u/Nirmitlamed Direct-Purchase User 3d ago

Nice!

Finding new ways to use AI is so satisfying.

2

u/OrganicTomato 2d ago

Huh. Didn't know about the firebase stuff in Tasker. Just set it up, and it's pretty cool! Thanks for mentioning it in your post!

0

u/Fun_Ice_4965 3d ago

我用的是np来操作它,利用rikkahub通过mcp链接np管理器,直接命令它帮我给指定apk增加intent接口,目前还不能很精细控制,但是已经非常好用了,最无奈的实际是token费用,本地模型跑不动这种命令,大模型跑这种命令费用其实是有点高的,我现在都是用魔搭每天赠送的额度在跑

0

u/karmabiteshard 1d ago

are y'all familiar with how to use tasker? so ive been trying for 2 days literally to use tasker with autonotification and autowear to mirror my blink motion notification thumbnail to my watch. i have a s24 ultra with a galaxy watch 6 classic. i have made it all the way that i got it to show on the watch, HOWEVER, it's sending the same image instead of grabbing the fresh new thumbnail every time motion is triggered. can anyone help me with this? i would be forever grateful! i purchased autowear and auto notification and have 2 days invested. i'm not stopping til it works. lol. obviously it can work, i just don't have it set up correctly to pull that new thumbnail everytime. CAN ANYONE PLEASE 🥺 PLEASE 🥺 PLEASE 🥺 HELP ME MAKE THIS WORK PROPERLY???