22
votes
Automation for android, preferably FOSS
I'm wanting to automate a thing on my android phone.
I would like to activate and deactivate alarms based on calendar events (by keywords in their name or description).
I'm wanting to automate a thing on my android phone.
I would like to activate and deactivate alarms based on calendar events (by keywords in their name or description).
I think the go-to for android automation is Tasker.
I haven't used it in a long time, but setting actions to be triggered by an event and modifying phone settings were the core functionality, so I think it should do what you mentioned.
I was coming in to say the same, but it's been years since I used Android, let alone Tasker. I remember creating some tasks that are technically impossible now due to the OS getting further locked down.
An example, not required reading
Within a certain time window, I would activate a geofence. Geofences killed battery, hence the window. Once I was in the fence, the automation would send a message via Hangouts. But because this kind of automation framework is not native, it's not like Hangouts offered an easy hook. So I bought a Tasker extension that could simulate taps and paste text and whatnot. So usually, as I was pulling into a parking lot, a message would get sent that I had arrived as I was parking, and it made my daily pick-up go smoother.The tasks being descraibed sound like they'll be workable.
My first thought, too, was Tasker- I've not used it myself but it is the standard for automation on Android. I had not realised until now, though, that it is a paid app, and not FOSS. This is a big shame- are there any reasonable (if less capable) alternatives that are active? Easer looks somewhat functional, but inactive.
I don't use anything myself, though I did recently set up KWGT to make a custom random slideshow widget. Pretty neat, but I don't think it's what OP would want for their use case.
Fwiw I think Tasker is in the camp of "good closed source things that don't try to take too much". When I looked for my original comment, I think the app cost $3.85. And I know it's been around since at least the late 2000's.
That's fair enough, and it looks a reasonable price- but unless there's some way to buy it outside of the Play Store, I cannot :]
I refuse to have a Google account.
Edit: It looks like it is possible to purchase Tasker licenses outside of the Play Store if you subscribe to the developer's Patreon- for every month you're subscribed, you get a license key.
Great extra info about the Patreon way to get a key!
For anyone else wondering KWGT is short for Kustom Widget Maker.
And, yeah, probably not suitable but might look into it.
I've looked into Easer previously, but the fact that it is discontinued and iirc I couldn't find any documentation took it off my list.
Might revisit it though, since there doesn't seem to be any easy solutions anyway :)
Thanks!
Yeah, in my previous old searches I always end up at Tasker too.
I guess I'll try the other things mentioned here first and then resign to use Tasker anyway 😅
It would be nice to know if it can do what I want before going through the trouble to set up another google account with funds on it.
Not FOSS, but if you happen to have a Samsung device you already will have automation available to you. It's called "routines" afaik. I don't have extensive experience with it either, just figured I'd mention it in case it is useful to you or someone passing by.
Unfortunately (for this case) I don't use a Samsung device, thanks anyway :)
I haven't used an android device since 2022 so I don't know all the latest stuff but I remember these being the only FOSS automation apps that people mentioned. All are on f-droid.
Tasker is probably the best bet though and even then, I don't know if you can really connect things like calendar events and alarms together in flexible ways. Everything is getting so locked down.
Not FOSS but might still work for you.
AMdroid
My work schedule syncs with Google calendar, which I sync with the app to create alarms, since I work shifts with different start times. Might work for you?
This looks great, I just seem to have some technical debt wrt to how I've set up my calendar that I have to solve first.
The benefit of this solution is that it would keep my regular clock uncluttered by all the automated alarms, which is something I didn't even think about :)
Great, seems like there are a ton of decent options in this thread so I hope you find the one that works best for your needs!
Activating or deactivating alarms will probably require UI interaction. However, if you just need the alarms to sound, then you could have the automation look up the times in a table, and from there set new non-repeating alarms in the clock app. Both of these should be possible with the non-FOSS app Automate. There are already some community made flows which create alarms based on calendar events, so you could modify one of them to suit your use case.
Edit: Found this thread on the SleepAsAndroid forum. It looks like the app supports intents to enable and disable alarms with specific labels. Also conveniently shows how Automate has to be configured to send them.
Excellent find, thank you!
Will look into it once I figure out what's going on with my calendar, bbl :)
Home Assistant is definitely way more than what you're asking for, but if you happen to already have a setup or are considering one, I do think it can hook into Android alarms via the companion app.
I know for sure it has read access to alarms, DnD status, etc, and I'm pretty sure it can make modifications to them.
I do have HA for some lamps with the intention of combining them with alarms (I had forgotten about this!).
I have some technical debt here too as I have it set up to only allow connection from LAN but I need to wake up when I'm in WAN too :)
You could always use a VPN! I have one set up from my phone to my home network. I've used both Tailscale and raw WireGuard for this and both are (types of) FOSS, too!
Yes!
But that's not a 1 click process for me, in time!!