AutoAlarm "Trigger Task 5 Minutes Before Alarm" stopped working

Discussion in 'AutoApps' started by Leyon, Apr 2, 2018.

  1. Leyon

    Leyon New Member

    Joined:
    Dec 5, 2017
    Messages:
    6
    Likes Received:
    0
    OnePlus One
    Android 8.1.0 Oreo
    Tasker Beta 5.1.5b
    AutoAlarm 1.1.1


    So I used this profile for a long time now and it suddenly stopped working. Normally it would check the alarm time and startet a sunrise with my hue lights 5 minutes prior to the actual alarm time.


    [​IMG]
    Profile 1 (runs every 3 hours)
    A1. Autoalarm
    A2. Variable Set %mins_before To 5
    A3. Variable Set %AlarmTime To %TIMES+%seconds-(%mins_before*60) Do Maths: ON

    This profile works. It sets the %AlarmTime variable to 1.5226700996E9 for example (thats the actual current value btw)
    [​IMG]

    [​IMG]
    Profile 2 (this profile somehow wont get triggered anymore)
    From %AlarmTime till %AlarmTime -> Task
     
    Last edited: Apr 2, 2018
  2. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    Do other time based profiles trigger for you correctly?
     
  3. Leyon

    Leyon New Member

    Joined:
    Dec 5, 2017
    Messages:
    6
    Likes Received:
    0
    Yes, everything else works perfectly. I first thought that Tasker cant deal with the format of the seconds (1.5226700996E9) but I guess thats not the reason?
    Is there maybe another approach to get a task triggered 22 minutes before the next alarm? Is it maybe possible that the variable somehow doesnt show the alarm time in seconds, but in HH:MM format? Because that seems to work, I tested this last night. I put "07:55" manually as the %AlarmTime and the task got triggered correctly.

    Edit:
    Figured it out by myself. Seems like Tasker can't do math properly anymore. So I just splitted the calculation in different tasks. I now just set a %TIMES variable called %Time, than "Variable Add" with %seconds and a "Variable Substract" with a set value of 1320 (1320 seconds = 22 Minutes) and finally set the final value into a new Variable called %Alarm. Now I get a normal value as a result. So instead of something like "1.5226700996E9" I now get a readable time like "1522910280".

    Idk when Tasker stopped being able to do math like I had it working originally but even if this solution is more "messy" it works perfectly.

    [​IMG]
     
    Last edited: Apr 5, 2018
: AutoAlarm

Share This Page