How to create profile: Flip to snooze

246 views
Skip to first unread message

Ritesh Suratwala

unread,
Feb 6, 2017, 3:18:10 AM2/6/17
to Tasker
Does anyone know how can I create profile to snooze ongoing alarm just by flipping the phone?

"Gesture" and "Shake" event there, but can't detect flip action exactly.

Any tips?

Rich D

unread,
Feb 6, 2017, 4:43:30 AM2/6/17
to Tasker Google Groups Post



flipping the phone?

"Gesture" and "Shake" event there, but can't detect flip action exactly.

Can you describe flipping?

If you mean just to turn the device from face up to face down on the table then context - state - sensor - orientation  should work. 

Ritesh Suratwala

unread,
Feb 6, 2017, 8:29:11 AM2/6/17
to Tasker
Suppose alarm is fired, I want to flip (face down if originally face up and face up if originally face down) the phone so that alarm snoozed.

In your profile, alarm immediately snoozed without any action by me, if I use orientation->face up or face down state, means alarm won't sound at all.

Rich D

unread,
Feb 6, 2017, 10:41:14 AM2/6/17
to Tasker Google Groups Post


> In your profile, alarm immediately snoozed without any action by me, if I use orientation->face up or face down state, means alarm won't sound at all.

I think you can just use a profile with 3 contexts.

Profile: Snooze_P
Context: variable value %Alarm_active ~ active
Context. Face up
Context Not face down
Enter Task: Snooze_T
1. Snooze

Exit task: Snooze_T

Untested and might need some tweaking but that should get you started .

To add contexts long press the original context.

You will need to detect when the alarm goes off and set
       %Alarm_active

Ritesh Suratwala

unread,
Feb 6, 2017, 10:34:49 PM2/6/17
to Tasker
Suppose my phone lying face up and alarm rings,
Context: variable value %Alarm_active ~ active = True
Context. Face up = True
Context Not face down = True

So, snooze task will run immediately without I notice that alarm fired. Hence, this will not work. It should snooze only if I change orientation from face up to face down and reverse.

Rich D

unread,
Feb 7, 2017, 7:41:34 AM2/7/17
to Tasker Google Groups Post

So, snooze task will run immediately without I notice that alarm fired. Hence, this will not work. It should snooze only if I change orientation from face up to face down and reverse.



Sorry, did that one in a rush..  you could still make that approach work by checking at the begining of task if a certain amount of time has gone by and stopping the task, However I think a more reliable approach would be to use 2 profiles

Profile: face up
Context: variable value %Alarm_active ~ active = True
Context: Face up = True

Enter task: 
1. profile status: face down - off  (turn off face down profile)

Exit task: 
1. snooze alarm
2. variable value %Alarm_active ~ active = False
3. profile status: face down - on  (turn on face down profile)

Profile: face down
Context: variable value %Alarm_active ~ active = True
Context: Face down = True
enter task:

Enter task: 
1. profile status: face up - off  (turn off face up profile)

Exit task: 
1. snooze alarm
2. variable value %Alarm_active ~ active = False
3. profile status: face up - on  (turn on face up profile)

Rich D

unread,
Feb 7, 2017, 8:22:21 AM2/7/17
to Tasker Google Groups Post
EDIT....    

Profile: face up
Context: variable value %Alarm_active ~ True
Context: Face up 

Enter task: 
1. profile status: face down - off  (turn off face down profile)

Exit task: 
1. snooze alarm
2. variable set %Alarm_active TO:  False
3. profile status: face down - on  (turn on face down profile)

Profile: face down
Context: variable value %Alarm_active ~ True
Context: Face down 

Enter task: 
1. profile status: face up - off  (turn off face up profile)

Exit task: 
1. snooze alarm
2. variable set:  %Alarm_active TO: False

Ritesh Suratwala

unread,
Feb 7, 2017, 10:34:36 PM2/7/17
to Tasker
I guess what you propose will also work with shake event. That means, moment you pick phone (orientation is not face up/down), it will snooze.
What I am trying is little more challenging.

It should snooze only on detecting complete flip, i.e. face up to face down and reverse...

Rich D

unread,
Feb 8, 2017, 5:44:33 AM2/8/17
to Tasker Google Groups Post
>>>It should snooze only on detecting complete flip, i.e. face up to face down and reverse...

ahh, missed that part. You would need to explain all the rules for a complete answer, such as what happens when
alarm goes off-> pick up device-> put back down in same orientation  
alarm goes off-> pick up device-> device never gets put down face up or face down
Does - Pick up device -> wait x seconds -> put device back down in opposite face. qualify as a flip if so what is the limit of x

However you can  try something like this.. Still may need tweaking depending on your needs. 



Profile: face up
Context: variable value %Alarm_active ~ True
Context: Face up 

Enter task: 

1. If  %TIMES < %Down_flip+5
2. snooze alarm
3. variable set:  %Alarm_active TO: False

Exit task: 
1. variable set %Up_Flip TO:  %TIMES


Profile: face down
Context: variable value %Alarm_active ~ True
Context: Face down 

1. If  %TIMES < %Up_flip+5
2. snooze alarm
3. variable set:  %Alarm_active TO: False

Exit task: 
1. variable set %Down_Flip TO:  %TIMES
Reply all
Reply to author
Forward
0 new messages