Can anyone help me out with this alarm profile?
It works pretty good at the moment, except that as I'm testing it with a 10 second snooze the snooze is actually 20 seconds long.
If anyone can spot where I'm going wrong or any simpler methods to what I'm trying to achieve I'd be grateful.
Here's my profiles:
Profile: Alarm On (54)
Day: Mon, Tue, Wed, Thu or Fri
State: Not Calendar Entry
Enter: Alarm On (125)
A1: Notify [ Title:Alarm On
Text:Alarm is set for %ALARMTIME
Icon:<icon> Number:0 Permanent:
A2: Goto Action [ Number:5 ] If
[ %SNOOZE = 1 ]
A3: Wait Until [ MS:0 Seconds:
Minutes:0 Hours:0 Days:0 ] If
[ %TIME = %ALARMTIME ]
A4: Variable Set [ Name:%ALA
To:1 Do Maths:Off Append:Off ]
A5: Media Volume [ Level:1
Display:Off Sound:Off ]
A6: Variable Set [ Name:%ALAR
To:%VOLM Do Maths:Off Append:O
A7: Music Play [ File:music/Pri
Scream/Dirty Hits/05 - primal
scream - rocks.mp3 Start:0 Loop:O
A8: Perform Task [ Name:Alar
up Stop:Off Priority:5 ]
A9: Perform Task [ Name:Alar
Stop:Off Priority:7 ]
Exit: Anon (102)
A1: Notify Cancel [ Title:Alarm
Warn Not Exist:Off ]
Profile: Input Alarm Time (118)
Event: Button Widget Clicked
Enter: Alarm Time Input (119)
A1: Variable Query [ Name:
%ALARMTIME Label:Enter alarm ti
the
format:
HH.MM Input Type:Numeric / Deci
Default: Background Image: Label
Colour: ]
A2: Profile Status [ Name:Alar
Set:Off ]
A3: Flash [ Text:Alarm is set for
%ALARMTIME Long:Off ]
A4: Profile Status [ Name:Alar
Set:On ] If [ %PACTIVE !~ Alarm
On ]
Task: Alarm Pop-up
A1: Popup Task Names
- Task: Alarm Snooze
- Task: Alarm End
Task: Alarm Snooze
A1: Set %SNOOZE to 1
A2: Set %ALARM to 0
A3: Music stop
A4: Wait 10 seconds (snooze durati
A5: Perform task: Alarm On
Task: Alarm End
A1: Set %ALARM to 0
A2: Set %SNOOZE to 0
A3: Music Stop
A4: Profile Status "Alarm On" to OF
A5: Wait until %TIME !~ %ALARMTI
Profile Status "Alarm On" to ON
Task: Alarm Fade
A1: Wait 1 second
A2: Add 1 to %ALARMVOL
A3: Go to action 1 if %ALARMVOL <
A4: Stop if %ALARM = 0
It works pretty good at the moment, except that as I'm testing it with a 10 second snooze the snooze is actually 20 seconds long.
If anyone can spot where I'm going wrong or any simpler methods to what I'm trying to achieve I'd be grateful.
Here's my profiles:
Profile: Alarm On (54)
Day: Mon, Tue, Wed, Thu or Fri
State: Not Calendar Entry
Enter: Alarm On (125)
A1: Notify [ Title:Alarm On
Text:Alarm is set for %ALARMTIME
Icon:<icon> Number:0 Permanent:
A2: Goto Action [ Number:5 ] If
[ %SNOOZE = 1 ]
A3: Wait Until [ MS:0 Seconds:
Minutes:0 Hours:0 Days:0 ] If
[ %TIME = %ALARMTIME ]
A4: Variable Set [ Name:%ALA
To:1 Do Maths:Off Append:Off ]
A5: Media Volume [ Level:1
Display:Off Sound:Off ]
A6: Variable Set [ Name:%ALAR
To:%VOLM Do Maths:Off Append:O
A7: Music Play [ File:music/Pri
Scream/Dirty Hits/05 - primal
scream - rocks.mp3 Start:0 Loop:O
A8: Perform Task [ Name:Alar
up Stop:Off Priority:5 ]
A9: Perform Task [ Name:Alar
Stop:Off Priority:7 ]
Exit: Anon (102)
A1: Notify Cancel [ Title:Alarm
Warn Not Exist:Off ]
Profile: Input Alarm Time (118)
Event: Button Widget Clicked
Enter: Alarm Time Input (119)
A1: Variable Query [ Name:
%ALARMTIME Label:Enter alarm ti
the
format:
HH.MM Input Type:Numeric / Deci
Default: Background Image: Label
Colour: ]
A2: Profile Status [ Name:Alar
Set:Off ]
A3: Flash [ Text:Alarm is set for
%ALARMTIME Long:Off ]
A4: Profile Status [ Name:Alar
Set:On ] If [ %PACTIVE !~ Alarm
On ]
Task: Alarm Pop-up
A1: Popup Task Names
- Task: Alarm Snooze
- Task: Alarm End
Task: Alarm Snooze
A1: Set %SNOOZE to 1
A2: Set %ALARM to 0
A3: Music stop
A4: Wait 10 seconds (snooze durati
A5: Perform task: Alarm On
Task: Alarm End
A1: Set %ALARM to 0
A2: Set %SNOOZE to 0
A3: Music Stop
A4: Profile Status "Alarm On" to OF
A5: Wait until %TIME !~ %ALARMTI
Profile Status "Alarm On" to ON
Task: Alarm Fade
A1: Wait 1 second
A2: Add 1 to %ALARMVOL
A3: Go to action 1 if %ALARMVOL <
A4: Stop if %ALARM = 0