Sunrise/sunset profile

830 views
Skip to first unread message

P Schlew

unread,
Jun 18, 2016, 6:08:19 PM6/18/16
to Tasker
Hi,

I've got some issue since few days with the Sunrise/sunset profile (http://tasker.wikidot.com/sunrisesunset).
The value obtained for %SUNRISE is %set.
As some of my tasks are depedent of the %SUNRISE value, they didn't work anymore.
Can someone help me?
Thanks a lot!

P


Svampsson Svampsson

unread,
Jun 18, 2016, 8:03:16 PM6/18/16
to Tasker
Just to give another solution.

The AutoWeb app has several APIs that retrieves Sunrise/Sunset data and returns it as a variable directly in Tasker.

CoolRaoul

unread,
Jun 19, 2016, 4:55:16 AM6/19/16
to Tasker
You may also try that free plug-in, which works perfectly on my two devices, even if the play store descriptions states "The app seems not to be working with Tasker at the moment. We are working on fixing this." : Locale/Tasker Twilight Plug-in

P Schlew

unread,
Jun 19, 2016, 5:14:54 AM6/19/16
to Tasker
Thanks for your answer but seems not downloadable at the moment...

P Schlew

unread,
Jun 19, 2016, 5:17:56 AM6/19/16
to Tasker
Thanks, I try it but how to add the sunset time in a variable?

CoolRaoul

unread,
Jun 19, 2016, 5:24:18 AM6/19/16
to Tasker

Le dimanche 19 juin 2016 11:17:56 UTC+2, P Schlew a écrit :
Thanks, I try it but how to add the sunset time in a variable?

You don't have to: directly use the plugin as a profile state condition. The profile will triggered during the specified interval, defined with relative offsets of your choice to sunset/sunrise at your location and current date
Message has been deleted

Svampsson Svampsson

unread,
Jun 19, 2016, 6:09:13 AM6/19/16
to Tasker
"Thanks for your answer but seems not downloadable at the moment..."

It's a beta app so you have to join the Google+ community before you can download it.

P Schlew

unread,
Jun 19, 2016, 7:45:15 AM6/19/16
to Tasker
This is what I do......

P Schlew

unread,
Jun 19, 2016, 7:51:31 AM6/19/16
to Tasker
Sorry but I have to. Some of my tasks use the sunset time.... Exemple: if time is > sunset time then.... This condition is not the principal condition of my tasks...

CoolRaoul

unread,
Jun 19, 2016, 8:08:08 AM6/19/16
to Tasker
Sorry but I have to. Some of my tasks use the sunset time.... Exemple: if time is > sunset time then.... This condition is not the principal condition of my tasks...

Not a big deal: simply set up a single profile using the given plugin, active from sunrise to sunset.

In this profile startup task, set a global variable %SunriseTime to current time and in the exit task do the same for %SunsetTime
Then in your other tasks, simply refer to that either global variable depending of your needs. And you're done

Here's the profile:

Profile: Day (184)
Notification: no
State: Twilight [ Configuration:From SUNRISE to SUNSET at Device location. ]
Enter: Anon (185)
A1: Variable Set [ Name:%SunriseTime To:%TIMES Do Maths:Off Append:Off ] 
Exit: Anon (187)
A1: Variable Set [ Name:%SunsetTime To:%TIMES Do Maths:Off Append:Off ] 




kirsc...@gmail.com

unread,
Jun 19, 2016, 12:49:41 PM6/19/16
to Tasker

I still hope that the guys of http://tasker.wikidot.com/sunrisesunset will update their script... I am using it since years and everytime there was a bug (like now) they updated it... On the other side the plugin mentioned above was last updated 2013... so I wonder if they update it once there also occor problems...
 

P Schlew

unread,
Jun 19, 2016, 2:31:28 PM6/19/16
to Tasker
Good job!!!! Works great! Thanks.... But I need %TIME and not %TIMES.
Thanks a lot.

kirsc...@gmail.com

unread,
Jun 19, 2016, 3:11:56 PM6/19/16
to Tasker
This is my universal %TIMES 'converter': http://tasker.wikidot.com/getformatteddate

kirsc...@gmail.com

unread,
Jun 19, 2016, 4:00:14 PM6/19/16
to Tasker
For me (Android 4.4.2) the Twilight-Plugin does not work, regardless what I set as 'from-to':

Even after the from-to period the profile stays active (it is green in Tasker).
Only after opening and closing the Profile-condition it gets inactive.

John Doe

unread,
Jun 19, 2016, 4:44:17 PM6/19/16
to Tasker
You can use a MeteoTask event condition

kirsc...@gmail.com

unread,
Jun 20, 2016, 1:41:23 AM6/20/16
to Tasker
I assume the 'not working' has to do with my specific Android 4.4.2 (Wiko Sunset2)... It seems to have some energy saving build in, so that time context profiles are delayed to at least the next 'even 10 minutes'... this morning (sunset = 5:21) the profile was triggered at 5:30 which supports my theory... so I will check today whether sunset (ca. 21:31) will get triggered latest at around 22:00... If this is the case then the Twilight-plugin would work for me (I could set e.g. '10 Minutes before' or so)... I will report here...

Juergen Gruen

unread,
Jun 20, 2016, 10:28:33 AM6/20/16
to Tasker
Hi,

iiuc there is an error in the script function "calcSunriseSet" ("twilightdelta" vs "twilightDelta").

Juergen.

Juergen Gruen

unread,
Jun 20, 2016, 10:53:06 AM6/20/16
to Tasker
Sorry, just figured out that there are different versions of sunrise.js

sunrise.js works fine for me.

Juergen.

Juergen Gruen

unread,
Jun 20, 2016, 10:54:12 AM6/20/16
to Tasker
Sorry again. sunrise3.js works...

kirsc...@gmail.com

unread,
Jun 20, 2016, 11:20:30 AM6/20/16
to Tasker
Uup... yes, Jürgen, sunrise3.js really works...


Am Montag, 20. Juni 2016 16:54:12 UTC+2 schrieb Juergen Gruen:
Sorry again. sunrise3.js works...

Juergen Gruen

unread,
Jun 20, 2016, 11:53:37 AM6/20/16
to Tasker
I tested the wrong version too. Not really clear. The link at the top points to an old version. The latest version is hidden behind the small link at the bottom of the Web page...

Juergen.

kirsc...@gmail.com

unread,
Jun 20, 2016, 12:02:15 PM6/20/16
to Tasker
It's the word 'files' you have to click (not a URL, only java-script... therefor not possible to paste a link here).

kirsc...@gmail.com

unread,
Jun 20, 2016, 4:15:14 PM6/20/16
to Tasker
Yes, my guess was correct... the twilight.apk plug-in works... it is my Android 4.4.2 version that causes delays in (de-)activating the twilight profile... usually up to the next 10-20 minutes... but that's OK for my screen-dimming purposes and the 'finetuning-features' of the twilight-plug-in... so everything OK with twilight...

P Schlew

unread,
Jun 22, 2016, 5:46:30 PM6/22/16
to Tasker
Great Juergen! sunrise3.js works!!!!!!!!! :-)

Le lundi 20 juin 2016 16:54:12 UTC+2, Juergen Gruen a écrit :
Sorry again. sunrise3.js works...

joaomgcd

unread,
Jun 23, 2016, 5:23:17 PM6/23/16
to Tasker
It seems I'm late to the party but here's an alternative using AutoWeb and the Weather Underground API: http://forum.joaoapps.com/index.php?resources/day-night-project-based-on-sunrise-and-sunset-times.131/

Hope this helps somewhat as it's a bit simpler then other solutions :)

Tobias Hau

unread,
Jun 25, 2016, 10:38:29 AM6/25/16
to Tasker
Great! I've loading sunriseset3.js and profile is working again! Thx!

Angela Slaney

unread,
Jun 26, 2016, 5:19:50 AM6/26/16
to Tasker
I had this working on sunrise.js in Tasker. Updating my phone and re-installing it started to complain that "twilightDetla" was an unknown variable. Reading here, today, I changed to sunriseset3.js and still had the issue. Since twilightDelta is passed into functions as a float it should not need globally defining. However, once I do set "var twilightDelta = 0;" at the bottom of the script it all appears to work again. I think this may be a tasker issue rather than sunsrise*.js

Angela Slaney

unread,
Jun 26, 2016, 5:23:48 AM6/26/16
to Tasker
Another bloomin' plugin that clutters my app drawer and someone needs a dollar for. Never impressed by something a few lines of MY code can do.

Dennis A.

unread,
Jun 26, 2016, 5:56:16 AM6/26/16
to Tasker
what version TASKER?

i just upgraded to the newest Tasker and now I'm seeing a weird local/global var problem that i just assumed was a new bug (not in sunrise, but in something else)

Dennis

Jay M

unread,
Jun 26, 2016, 7:05:39 AM6/26/16
to Tasker

Any decent Launcher can hide apps in the drawer and no one is forcing you to use or pay for a plugin they are completely optional. I would really love to see you send your phones notifications to a Android TV or PC without a plugin though. Just using a few lines of YOUR code.


--
You received this message because you are subscribed to the Google Groups "Tasker" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tasker+un...@googlegroups.com.
Visit this group at https://groups.google.com/group/tasker.
For more options, visit https://groups.google.com/d/optout.
--

Jay M ︻芫══一

Reply all
Reply to author
Forward
0 new messages