Alarm clock with tasker - Tasker Tips & Tricks

Hello everyone i have a huawei mate 20 non root with android 9 and i would like to cancel an alarm with tasker but impossible.
I can activate an alarm at a given time but in the opposite direction impossible. do you have an idea thanks again
cordially

There are several ways to do this. What have you tried that isn't working? Even better, post the profile or task that isn't doing what you want. If you post just the task to snooze/dismiss an alarm, what triggers the task to run?
Before exporting, if you have sensitive information such as logins, api keys or anything else, you might consider setting those values to a variable and use the variable in your tasks so they won't export with the task.
To export a task description for posting, press on the name to highlight the profile. Go to the 3-dot menu and select export -> Description to Clipboard.
Now you'll be able to paste it. Be aware, it easier to use something like pastebin.com / hastebin.com and link to a post here. If you paste in a post here, the forum software will convert semicolons with characters directly after, into emoticons making it very hard to read.

Hello everyone here is what I can do and what does not work.
* What works
Calendar Entry Profile -> Work
Then task -> Set ALARM AM 05 H 45
* What does not work is the reverse task if not working then disable alarm clock
Thanks

Flechg said:
Hello everyone here is what I can do and what does not work.
* What works
Calendar Entry Profile -> Work
Then task -> Set ALARM AM 05 H 45
* What does not work is the reverse task if not working then disable alarm clock
Thanks
Click to expand...
Click to collapse
Posting the profile and task (as described above) is always more illuminating. However, the inverse of that would just be not setting an alarm. If there's no calendar entry the alarm is not set. I'm still missing the problem. Is there a residual alarm that goes off without having been set through tasker?
Edit -
I've been pondering and the only thing I can come up with is that you set an alarm and then the next day you set an alarm... then end up with a clock app full of alarms. If that's the problem, and the goal is to have the alarm only go off on work days, then approaching this problem the other way might be better.
Set the alarm to go of every day at the right time in the clock app, then create a profile that checks if today it's a work day, then set a variable.
In a second profile, use the variable (not a work day) as a context plus an AutoNotification intercept, for the alarm notification. You'll be canceling the alarm on days you don't need it.
On newer Android, there is a pre-notification that shows up some period before the alarm is set to fire (an hour maybe?). That notification has a dismiss button. If you intercept that notification, then the entry task can click on the dismiss button again using an AutoNotification action.
I think the category id is "Upcoming Alarms". This field can be examined by grabbing it in the AutoNotification profile context configured to "get all fields". Then flash %ancategoryid.
There are also clock app intents that can dismiss alarms. I don't use that because it doesn't work on my device. The intent looks like the following:
Code:
Send Intent [
Action:android.intent.action.DISMISS_ALARM
Cat:Default
Mime Type:
Data:
Extra:android.intent.extra.alarm.SEARCH_MODE:android.all
Extra:
Extra:
Package:
Class:
Target:Activity
This intent should only cancel the current occurrence of a repeating alarm.
If this works for you, then you can explore the android developer documentation - alarm clock and discover a variety of intents.

For the sake of completeness, in case this thread is found by others in the future, there is an action system -> cancel alarm.
This can be used to cancel/snooze/disable an alarm. However, it's reliability is dependant on the device/OS and at least in my case doesn't work any better than the intent. Some devices will always get a pop-up menu to confirm which alarm to take action on.

Hello and thank you for your answers
i tried intent as well as other things like cancel alarm but with my huawei it does not work okay is this android 9
I give up thanks again for your help
:crying:

The autoNotification method should work. If you haven't gone through and made sure that all of Huawei's power saving "features" are disabled so the apps can wake up and do their job without being killed by the system.
Read these
https://dontkillmyapp.com/huawei
https://tasker.joaoapps.com/userguide/en/faqs/faq-problem.html#00
If you really want help, then post what isn't working. Instructions to do so were given in post 2.

Related

Wow... Alarm...

Last week, I spent the week covering a floor; waking up at 4:15AM. I set triple alarms, the phone as the last at 4:20 (set to weekdays).
I changed the alarm to 4:15PM (every day) for saturday, at which it sounded.
I shut the alarm off last night.
The alarm sounded at 4:20 this morning. The alarm is set to off, and changed to 4:15PM (every day).
Any idears?
What fun.
Thanks,
Matt
I've never liked the internal Alarm feature (too unreliable for me).
I better use Gentimer (from Rivia) that allows me to set several different alarms, set Recurrence patterns (everyday, weekdays...), volume, repetition, alarm sound...
tried to set both types of alarms: reset "everyday," reset "weekdays" to a new time.
Still signaling at 4:20
I just deleted: [HKCU\System\State\Shell\Alarms\] binary: Next
But I have a feeling that will have no affect, since it's in the system state, which I believe is read-only.
Does anyone know where the alarm info is kept in the registry?
Thanks,
Matt
How you could set three alarms with default alarm feature? It can set only one alarm at time..
If some alarm is still bugging you it's definitely written in the notification queue database. You need some app that can display it and delete appropriate record. If you won't find any, i can provide you my debug one..
saman-cz said:
How you could set three alarms with default alarm feature? It can set only one alarm at time..
If some alarm is still bugging you it's definitely written in the notification queue database. You need some app that can display it and delete appropriate record. If you won't find any, i can provide you my debug one..
Click to expand...
Click to collapse
Alright, I've obtained SKTools. There are a lot of items in my Notification Queue, some seem critical.
Can someone help me narrow down which item(s) I should delete?
Start if time changes \\.\Notifications\NamedEvents\SSTimeChange; AppRunAfterTimeChange
Start if time changes \\.\Notifications\NamedEvents\TimeWizardTimeChange; AppRunAfterTimeChange
Start if time changes \\.\Notifications\NamedEvents\TimeWizardWakeUp; AppRunAfterWakup
Start if time changes calnot.exe; AppRunAfterTimeChange
Start if time changes clocknot.exe; AppRunAfterTimeChange
Start if time changes connmgr.exe; AppRunAfterTimeChange
Start if time changes repllog.exe; AppRunAfterTimeChange
Start on timer \Windows\calupd.exe;2007/12/25 19:45; AppRunAtTime
Start on timer \windows\enrollnot.exe;2007/12/26 12:00; AppRunAtTime
Start on timer \windows\enrollnot.exe;2007/12/26 12:00; AppRunAtTime
Start on timer CALENDAR.EXE;2007/12/25 19:30;
Start on timer CALENDAR.EXE;2007/12/26 19:15;
Start on timer CALNOT.EXE;2008/01/01 00:00; AppRunAtTime
Start on timer clocknot.exe;2008/03/09 02:00; AppRunAtTime
Start on timer sqmevent.exe;2007/12/26 13:06; AppRunAtTime
Start on timer \Windows\TimeWizard.exe;2008/01/04 18:06; AppRunAtTime
Start after restore from backup calnot.exe; AppRunAfterRestore
Start after restore from backup clocknot.exe; AppRunAfterRestore
Start if RS232 connection has been detected repllog.exe; AppRunAtRs232Detect
NOTIFICATION_EVENT_RNDIS_FN_DETECTED repllog.exe; AppRunAfterRnsdisFnDetected
Entries can probably safely be narrowed down by process name?
Thanks,
Matt
None of them is alarm.. Default alarm would have record with process \Windows\clock.exe and would be scheduled to you time. You can check that by setting an alarm and reviewing the notification queue..
However, if you set the alarm using built-in settings, it shouldn't bother you anymore.
saman-cz said:
None of them is alarm.. Default alarm would have record with process \Windows\clock.exe and would be scheduled to you time. You can check that by setting an alarm and reviewing the notification queue..
However, if you set the alarm using built-in settings, it shouldn't bother you anymore.
Click to expand...
Click to collapse
You are correct, sir.
No longer sounding at 4:20. I slept through the night. Amazing.
Anyway... I'm not sure what I did to solve it.
Just to summerize: you're saying tha tnay entry with \Windows\clock.exe and a time is an alarm entry. So if there are artifact alarms, deleting these entries from the Notification Queue (which you can do with free SKToolslite {link above}) delete the alarms; because these Notification Queue entries are the alarms.
Thanks!
Matt

How can I set alarm clock few minutes after profile active?

I set in profile task what At a specific time enable wifi and internet radio - that should wake me up.
But if radio don't wake me up I want that few minutes later set/on oryginal alarm clock (where i can set my ring tone or ex. set snooze for 5min/10min or off alarm if I wake up).
I randomly wake up so when i whant that radio wake me up i set time to ON only on tasker profile.
How i can add/what task add to this if I want Get the effect when radio will ON , 5min later clock alarm will ON
try this:
- in profile task, do math on current time, plus x min times 60,
- than convert the result back to normal time format
- do a variable split, splitter empty, to split it by space, to get time only
- you will have to trim possible preceding zero in hour
- than set alarm with the result time
Sorry but You write too complicated for me :|
Can You write this same but maybe on the example and write step by step what to do
Thank so much
Yeah that's far too complicated. Try this.
In your first profile, that turns on your alarm, set a variable %ALARMTIMERCOUNTDOWN =%TIMES+120 (%TIMES is the current time in seconds, and + 120 is two minutes after the current time
Then create a time context profile and click the little tag you change it from time, to variable, and enter %ALARMTIMERCOUNTDOWN as the time.
Then, when the current time=ALARMTIMERCOUNTDOWN the profile will trigger.
Now remember to clear the variable in both exit tasks so if you wake up, the variable will be empty and thus will never trigger
Can You write this step by step. Like this: Go to your profile that turns on your alarm -> in task what enable radio add new variable -> action ("+") -> variables -> add variable - here in "........." write "....... " -> then go to action variable and "set variable" -> ........
In profile I can add new time context and to start time set %ALARMTIMERCOUNTDOWN but i bust add task to this context - what task i should add?
"Now remember to clear the variable in both exit tasks" - I had add variable only on one task "In your first profile, that turns on your alarm, set a variable.... "
someone can help?
gonzolex said:
someone can help?
Click to expand...
Click to collapse
ok, here goes:
new profile1
- trigger: event/date-time/alarm clock: alarm info
- action: set variable %Trigger to %TIMES+120, do math
btw profile2
- trigger: state/variables/values: %TIMES eq %Trigger
- action: do your task

Use Tasker to only get arlo camera notifications at certain times

Is this possible to do through Tasker? If so, how do you code it?
I want my cameras to record but I don't want to get notifications except for after sunset and just after sunrise everyday. So like 6pm to 8am.
Otherwise I want it to record but not notify me.
I posted this on reddit/r/tasker but no one has responded yet.
The time profile is easy. The trigger context is the window of time you want to block notifications.
The task would do the heavy lifting of actually blocking the unwanted notification. You probably could handle that using Notifications Off (Root), assuming of course that you're rooted. Else, AutoNotification can do that for you. Both are tasker integrated.
Get Started With AutoNotification
Use Tasker and AutoNotification to block notifications from certain apps (AutoApps forum)
ktmom said:
The time profile is easy. The trigger context is the window of time you want to block notifications.
The task would do the heavy lifting of actually blocking the unwanted notification. You probably could handle that using Notifications Off (Root), assuming of course that you're rooted. Else, AutoNotification can do that for you. Both are tasker integrated.
Get Started With AutoNotification
Use Tasker and AutoNotification to block notifications from certain apps (AutoApps forum)
Click to expand...
Click to collapse
Unfortunately neither of those are working. I have a pixel that is rooted and an s8+ that is not. So I tried both and I'm still getting notifications. Any ideas?
DudeThatsErin said:
Unfortunately neither of those are working. I have a pixel that is rooted and an s8+ that is not. So I tried both and I'm still getting notifications. Any ideas?
Click to expand...
Click to collapse
I didn't specifically state, but should have, that when using the AutoNotification method, an additional profile trigger needs to be an AutoNotification intercept event.
You could post a export (description) of the profile you've built.
ktmom said:
I didn't specifically state, but should have, that when using the AutoNotification method, an additional profile trigger needs to be an AutoNotification intercept event.
You could post a export (description) of the profile you've built.
Click to expand...
Click to collapse
Stuff (4)
A1: AutoNotification Block [ Configuration:Apps: com.netgear.android
Toggle: Enable Timeout (Seconds):60 ]
I pressed on export and that's what it gave me.
I also took screenshots. Here you go: https://imgur.com/gallery/bAhRY
Lmk if there is anything else you need.
Your profile is currently triggered by the arlo app. So anytime that app opens, your "stuff" task runs. Not what you were shooting for ?
On the left side of that screen, on top of the part that shows an icon and "arlo", do a long press. That will allow you to add a context.
Choose: state -> plugin -> AutoNotification -> Intercept.
Then leave "Event Behaviour" checked.
Tap on "Action type" and select created.
Tapp on "Apps" and check the box next to the Arlo app.
At the top of the screen tap the check mark to accept the configuration. Then on the next screen, the left arrow at the top left to lock in the context.
You will now have two contexts for that one profile.
Long press the original one for the arlo app and select delete.
Again, long press on the context that is remaining (AutoNotification Intercept) and tap add.
Now tap "time" and configure for the window you want this profile to be active.

Block calendar notifications while driving

Hi,
might seem a silly question but it's very annoying while driving that I receive Samsung calendar notifications. While they appear full screen, Waze and music sounds are silenced.
I have to manually dismiss them before all sounds are 'restored'.
I just want to drive without interruptions of the calendar app, anyone know how this can be done? I'm also using Android Auto but don't see any setting that can accomplish this.
thank you
I'm using Tasker and AutoNotifcation for this. I block some notifications and enable the AOD while connected to my cars Bluetooth.
- install both apps
- in Tasker add a task and search for "AutoNotification Block".
- Tap the pen of Configuration and select the apps you want to block the notification for. You can also add the package name manually
- Under "Toggle" set it to "Block"
- go back and set the timeout to none (slide the slider to the most right)
- go back to the task
- go back to the task list
- add a new task, do the same as above but instead of "Block" set the Toggle to "Unblock".
Now you have the needed tasks and you can set the profiles for them.
- In Tasker go to the profile tap and add a new profile, name it whatever you want.
- Tap on "Status" and filter for "Bluetooth connected" (Note: Bluetooth must be enabled while creating the profiles!).
- Name is optional, tap on the magnifying glass for "Address" and select your cars Bluetooth address.
- go back and Tasker will popup a window where you need to assign a task. Assign the "block" task.
- now do the same again but Mark the "Reverse" check mark in the Bluetooth address menu and after this select the "unblock" task.
So, Tasker will tell AutoNotification to block the specific notifications while connected to the Bluetooth device and unblock it if disconnected.
I hope it works for you. I don't know the English menu entries for Tasker since my app is in German, sorry if there's something different.
thanks, great tip : I already bought Tasker a while ago, I'll set it up like that

Trying to make a sleep mode profile for my oneplus 7 pro.....

There is so much do not disturb customization in this version of android or perhaps specific to oneplus. I am not sure which. That I'm not sure how to make this do what I'm used to it doing on my previous device LG G4. During the day I have it more or less as follows I may be forgetting some things:
Only ring if the phone call is from someone in my contacts.
Text messages always sound etc no matter who sent them.
Email always sounds.
Calendar always sounds.
What I need is the profile to silence everything while I sleep. To do this on the LG G4 I had a sleep profile from 12am to 12pm that set all volume controls to zero. And somehow though I can't remember ended that sleep profile early if I had an alarm go off during that time frame so that I could be disturbed because I was no longer sleeping after the alarm went off. The reason for the 12am to 12pm time frame was to give leeway to time going to bed and also time for waking up without an alarm. The idea was so that I didn't forget to silence things before going to be and forget to undo that once I was awake.
So typically DND settings built into android allow at least close to this level of control. I'm not sure how Oxygen OS is configured, but on a Pixel I can configure DND to ring only for starred contacts, but allow text and other notifications through. Or, silence everything.
All of that said, you should be able to manage volume levels through Tasker, reject (send to voicemail) calls that are not in your contacts.
If you import your old profile, doesn't it work on the OnePlus?
ktmom said:
So typically DND settings built into android allow at least close to this level of control. I'm not sure how Oxygen OS is configured, but on a Pixel I can configure DND to ring only for starred contacts, but allow text and other notifications through. Or, silence everything.
All of that said, you should be able to manage volume levels through Tasker, reject (send to voicemail) calls that are not in your contacts.
If you import your old profile, doesn't it work on the OnePlus?
Click to expand...
Click to collapse
Stupid me I forgot to backup my old tasker stuff so I have to start from scratch again.
In the do not disturb setting UI of the settings UI there are the following:
Toggle DND on/off: this is toggled on and is set to stay on all the time.
Behavior heading
Notifications: tapping it opens a new UI giving you some default choices for notifications in general. I have this set to no sound at all. And override DND in specific areas outside of this part of settings regarding notifications from SMS/MMS messages, email, voicemail, calendar alarms. Might be one or two I am forgetting to mention.
Exception heading
Calls: tapping here brings up settings to allow calls from (anyone, contacts only, starred contacts only, none.) I have this set to contacts only.
Messages: same detail as calls. Set same as calls.
Other sounds: toggles to allow alarms, media, and touch sounds. I have these toggled to allow.
As for the other stuff that overrides DND I accessed that setting from within each of the apps settings. Not sure if that was a redirect from the app settings to a system settings area that I'm not aware of how to get to otherwise. So what I need is a profile that will mute everything while I sleep and return to how everything is currently set. On the LG G4 I accomplished this by turning all volumes to zero for sleep and then restored them all to 100% upon either the end time trigger of the sleep profile on upon an alarm I set to get up before the end of the timeframe of the profile.
What I was wondering if this was the way to go or if a more simple toggle one setting would accomplish it. I didn't see any DND setting in the system setting for no interruptions at all despite the overrides set. What I'm thinking is the same approach as before and set media, notification, ringer, and system volumes to zero and restore to 100% at end. The part I can't remember how I did it was ending the sleep profile when an alarm goes off that I set to a time prior to the end of the timeframe of the profile. Any idea how I would have done that?
I think which ever way gets you where you want to be is the way to go [emoji6]
On my Google phone, that's the ability to mute everything except alarms. There is also a toggle to disable DND when an alarm goes off.
As far as using tasker to turn volumes back up when an alarm goes off, my way of doing that is to intercept the notification for the alarm. Again, I'm using Google clock, and the way the notifications work may be different on your device.
Here is a taskernet share of a basic project using a notification intercept of the Google Clock alarm. Because there can be namespace collisions with imported projects, I append a variant of my username into variables, task and project names.
For everything to work the way it did I would need the sleep profile to end when an alarm goes off. The problem is I can't remember how that was done. I don't see an end condition that can be added to the sleep profile. The actual sleep profile is the only part I can remember enough to have replicated at this point. It being a from 12am to 12pm with a start task that turns all the volumes down to zero and an end task that turns them all back up. The alarm part I can't recall how it was done.
What was wrong with the notification intercept I shared?
That particular project was to put a large dismiss/snooze on the screen for a low vision individual, but it intercepts the alarm firing notification (for Google clock) and as I already said, intercepting the notification is the way I would do it.
It looks like it is a nice project, but it is requiring a plug-in. However the toggle was made before didn't require any additional things to be added. Isn't there a native event or state that a profile can trigger when an alarm goes off?
I assumed you tried using the native alarm clock or alarm done events in a profile and those didn't work. If you haven't, then try them. They don't work on my devices.
You could research java functions to get the next alarm and use the native java function action to then set a profile time context.
Remembered that tasker was designed to be a framework into which functionality could be added through plugins.
One of those is probably what was used on my LG G4. Now to figure out if this was a part of the one profile or a separate profile. I assume 2nd profile as I don't see any way of adding a 2nd end condition to the first. I remember when it was originally designed the conversation arriving at a solution to function as wanted was a long one. What bothered me is that the thread it took place in is missing from the forum it took place in. I even attempted to inquire there again about making it but after a week of no response I figured it was no longer a good place to post at.
StoneRyno said:
One of those is probably what was used on my LG G4. Now to figure out if this was a part of the one profile or a separate profile. I assume 2nd profile as I don't see any way of adding a 2nd end condition to the first. I remember when it was originally designed the conversation arriving at a solution to function as wanted was a long one. What bothered me is that the thread it took place in is missing from the forum it took place in. I even attempted to inquire there again about making it but after a week of no response I figured it was no longer a good place to post at.
Click to expand...
Click to collapse
What do you mean "2nd end condition"? A second context (condition) in the profile? Long press the first context.
The sleep profile uses time condition 12am to 12pm. I only need a 2nd condition that ends it but doesn't impact the start. I know for sure I can do that with a second profile now that I know what I needed to use to as event trigger. I can run a task that toggles off the sleep profile and toggles it back on some hours later to trigger again at 12am. I wasn't sure if the alarm event could be an alternative condition for end so that the sleep profile was 12am to alarm done or 12pm.

Categories

Resources