On the portal news on 2016-03-11 (thanks to @MishaalRahman for this).
This profile requires AlarmPad (either free or Pro version) and will activate your own Night Mode by setting an alarm.
You have to go to work the next morning, are sleeping, dreaming of the ones/things you love and then – BEEEEEEP BEEEEEEP BEEEEEEP – getting woken up by some more or less (most likely less) funny message by one of your friends. Awesome, right? No way… But this comes to an end right now.
Use Alarm Pad in combination with Tasker to set up a Night Mode, where you won’t get disturbed by any loud notification anymore. Activating an alarm will automatically set your phone into silence mode during a specific time, only the alarm is allowed to wake you up. When you dismiss the alarm, the Night Mode will turn itself off automatically. Cool, eh?
So, what do we need? First of all, you have to install AlarmPad (which is a great and customizable alarm clock app with native Tasker integration). Download it by following the above inserted Play Store link and continue with Tasker. Let’s start.
1. First, set up a profile called “Alarm set”. This will set a variable %ALARM to true if the alarm has been set. We need this variable to determine whether an alarm is currently set or not.
Use Event -> Plugin -> AlarmPad and select the Edit button. Choose “Alarm set” and confirm it by clicking the check mark on top right (OPTIONAL: you can choose a specific alarm for this by selecting “Restrict alarm” and then choosing the desired alarm).Create a new task and name it (for example) “Set Alarm VAR”. Create a new variable %ALARM and set it to true.Add Audio->Alarm Volume and set it to your desired value (maximum, if you tend to sleep very deep).Now you are done. You can optionally add a toast notification to verify that the task has been executed, for example Alert -> Flash -> Text “Alarm set”.
2. Create a new profile called “Alarm disabled”. This will set %ALARM to false if the alarm gets disabled manually.
Use Event -> Plugin -> AlarmPad and select the Edit button. Choose “Alarm disabled” and confirm it by clicking the check mark on top right.Create a new task and name it (for example) “Reset Alarm VAR”. Set variable %ALARM to false.Add Audio->Alarm Volume and set it to your desired default alarm value when being outside of your house.Now you are done with it. You can optionally add a toast notification to verify that the task has been executed, for example Alert -> Flash -> Text “Alarm disabled”.
3. Create a new profile called “Alarm playing”. This will set %ALARM to false if the alarm is fired and manually disabled.
Use Event -> Plugin -> AlarmPad and select the Edit button. Choose “Alarm triggered” and confirm it by clicking the check mark on top right.Create a new task and name it (for example) “Reset Alarm VAR”. Set variable %ALARM to false.Add Audio->Alarm Volume and set it to your desired default alarm value when being outside of your house.Now you are done with it.
4. Create a new profile “Night Mode”. This will set your device into silent mode during a specific time interval when an alarm is set.
Use State -> Variables -> Variable Value and enter %Alarm ~ true. Return to your profile and select a new task which you call “Night Mode on”.Add Task -> Wait -> 1 minute. Return to the task menu.Add Task -> If and select “%ALARM ~ true”. Return to the task menu.Add Display -> Display Brightness and set it to 0. Return to the task menu.Add Audio -> Notification Volume and set it to 0. Repeat the same for Media Volume and Ringer Volume. Add Audio -> Alarm Volume and set it to your desired value. This will ensure that no other profile which might be triggered between setting the alarm and starting the Night Mode task has reset your alarm volume.At last, add Task -> End If.That’s it.
5. OPTIONAL: Return to the profile screen and add a trigger event to the profile Night Mode: Time.
Here you can define when the Night Mode will start and when it will end, for example, you set your alarm at 8 p.m., but go to bed at 10 p.m. and don’t want to miss messages until 10 p.m. because of reasons. Then select 10 p.m. as start time and whatever end time you want, for example 10 a.m. (don’t worry, if the alarm is triggered before 10 a.m., the Night Mode will automatically being deactivated and you can receive audio notifications again).
6. Create a new exit task for the profile “Night Mode” and call it “Night Mode off”. This will reset your device from silent mode after the alarm is triggered or manually disabled.
Add Task -> Wait -> 1 minute. Return to the task menu.Add Plugin ->AlarmPad and select AlarmPad perform Action” and select “Disable” (OPTIONAL: select the alarm that is to be disabled). Confirm and return to the task menu.Add Display -> Display Brightness and set it to your default brightness. Return to the task menu.Add Audio -> Notification Volume and set it to your default volume value. Repeat the same for Media Volume and Ringer Volume.That’s it.
Now we have set up Tasker to toggle your own Night Mode automatically depending on your alarm’s status.
That’s all, folks. Have a nice dreaming :good:
I' not sure if i understand it very well. How can we set the audio volumes (notifications, ringer and media) in silence mode only at one specifit hore (21:00 pe). When i disable the alarm the volumes are set to the default configuration that we have on the phone? And how do they turn off (silent mode) again?
joguirian said:
I' not sure if i understand it very well. How can we set the audio volumes (notifications, ringer and media) in silence mode only at one specifit hore (21:00 pe). When i disable the alarm the volumes are set to the default configuration that we have on the phone? And how do they turn off (silent mode) again?
Click to expand...
Click to collapse
Setting an alarm will trigger the Night Mode profile (and its related task Night Mode on, which sets all notification/media/ringer volumes to 0). If you have set up a time-trigger (for example between 10 p.m. and 10 a.m.) the task will only being executed within this time frame. For example, if you set your alarm at 8 p.m. and have the given time frame from 10 p.m. to 10 a.m., the Night Mode will only being executed if %ALARM is true and it is past 10 p.m. and before 10 a.m. of the following day.
Disabling the alarm will trigger the exit task (Night Mode off) of the Night Mode profile, thus all volumes are set back to their (pre-defined in exit task Night Mode off)volume level.
If you want to silence your phone at 9 p.m., just use a time trigger for the profile and set 9 p.m. as start and whatever you like as end time.
orville87 said:
Setting an alarm will trigger the Night Mode profile (and its related task Night Mode on, which sets all notification/media/ringer volumes to 0). If you have set up a time-trigger (for example between 10 p.m. and 10 a.m.) the task will only being executed within this time frame. For example, if you set your alarm at 8 p.m. and have the given time frame from 10 p.m. to 10 a.m., the Night Mode will only being executed if %ALARM is true and it is past 10 p.m. and before 10 a.m. of the following day.
Disabling the alarm will trigger the exit task (Night Mode off) of the Night Mode profile, thus all volumes are set back to their (pre-defined in exit task Night Mode off)volume level.
If you want to silence your phone at 9 p.m., just use a time trigger for the profile and set 9 p.m. as start and whatever you like as end time.
Click to expand...
Click to collapse
ok, understood
Thanks
Related
I would like to create a task that silences my phone when it's plugged in between 9pm and 3am (when I go to bed I plug in my phone and it would be nice if the phone automatically silenced itself).
There are two problems with this:
1) While I have the ability to create a time based context or a USB connected context, I do not see how to create an "and" condition in your context such that you want your task to fire when both those conditions are met. How do you create a context that will trigger off multiple conditions?
Edit SOLVED: Tap the profile tab and tap on a profile you have until it shows the arrow view with a trigger on the left, a task on the right, and a green arrow between. Long press the trigger on the left of the green arrow and a plus icon will show up to add more triggers.
2) When I look at creating a task for silent mode, the only values available are to turn silent mode off or vibrate. I do not see an option for turning silent mode on. What am I missing? How do people turn the phone to silent using Tasker?
Turn volumes down with Tasker in the audio Section.
Sent from my SM-G930F using XDA-Developers mobile app
If you want it to act like a true silent mode by using the method mentioned by @Josh Smith10
What you could do is store the current volume levels, such as ring, media, alarm etc. Into a variable, then when it's time to exit the profile, just set your volume to those variables that you created. Then clear your custom variable after it has restored to that volume.
So this will restore the previous volume level before silent mode kicked in
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
Hi,
recently I noticed this strange behavior in Tasker: after a certain profile exits, the volumes are NOT reset back to their old values.
I created a sample profile, which is triggered by a variable %Test. The enter task would set alarm volume to 1 (current volume is at 6). The restoration setting of the profile is on.
When %Test triggered, volume was set correctly. Then when I changed %Test, the profile exited as expected, restoration process kicked in, alarm volume was restored, however not to 6 but 5.
Looking carefully at the log and also the animation on the sound setting screen, I could notice 2 changes made. The volume was set to 6, THEN quicly to 5.
Why?! Enter task set it once, and exit task reset it twice - at you can clearly see at the top of the screenshot.
Anybody can shed some light here?
Thanks.
Hello guys,
I try to set tasker to my new Mate 20 phone. I installed it with all authorizations, and I disabled the automatic save power control.
I set a first task – turn Bluetooth ON at 9AM. The task is running but at 9AM the Bluetooth is steel OFF and on the screen I have a popup “Allow Tasker to enable Bluetooth ?”.
A second task – Put the phone in Vibration mode at 10AM. At 10AM the phone switch to Vibration, but on the screen I have another popup “The vibration mode is activated”.
Why these popups, what I missed ?
Thanks for your help
Sounds like those popups came from another app. Maybe some security app or a preinstalled app from Huawei, which monitors who enables / disables system services. Do you see those popus also when you enable / disable bluetooth in the phone settings?
Try to identify the app / service owner of the popup by pressing long onto the popup. When you see a context menue choose app info.
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.