Shortcuts based on sunrise/sunset don't work

Hi
Please help with some info on how to make working an iOS shortcut if I select either sunrise or sunset.
I tried even with the most simple: Speak text “Hello” but it seems the shortcuts app doesn’t recognize this time of day
I mention I enabled precise location for Shortcuts app.
Please let me know what else to check.
Thanks

Sounds like you have it set up correctly.

  1. Have you tried restarting your device lately? A restart can clear out all sorts of odd behaviour!
  2. Does setting a specific time of day (hh:mm) for your automation work or are your time of day automation triggering issues affecting that too?

Thanks for your answer.
Yes,I did restart and yes all other “time of day” trigger is working. Only this trigger of either sunrise/sunset doesn’t work, unfortunately

Where is the information that it is now Sunrise coming from? Likewise Sunset?

(To state the obvious, the phone can’t look out the window.) :slight_smile:

Seriously, the source of the trigger might not be working for you.

Sorry, but I didn’t know I need a source
I just thought I can make a shortcut automation just following the steps: New automation --> Time of day --> Sunrise, thinking that the location is enough for this. Otherwise why is not mentioned that I need a source.
Anyway, is that a way to create a shortcut in iOS to do some actions based on these triggers sunrise/sunset?
Thanks

1 Like

I don’t know whether you do either…

… I don’t know what the source of dawn/dusk information is. It could be calculated from date/latitude/longitude or it could be from a time source of some sort. (I suspect the former.)

In the (likely) case of it being calculated on the device I would check that the device’s time was correct, as well as where the phone thinks it is on the planet.

Others probably know far more about this than I do.

Could you try on your iPhone just too see if it works?
Just go to Shortcuts, new automation and try to set an action on this trigger: sunrise or sunset. Just add a simple action like “speak text: Hello” and see what happens?
Thank you

Apple’s Weather app (and Siri) has access to sunrise and sunset times based on location. As long as your location can be determined (e.g. location services based on WiFi network SSID mapping, GPS and cell tower IDs) and you have an Internet connection, your device should know the next sunrise and next sunset times. I strongly suspect that Shortcuts is just tapping into this information. After all, why reinvent getting that data if the device already has it?

Indeed, you are right.
Have you tried this, I mean to assign a simple action to one of these triggers?
Thanks

No. I only use messured time triggers and I haven’t tried any simple tests. I’ll set something up for tomorrow’s sunrise and sunset that I know to work on measured time triggers.

Sunrise and sunset have never been of use to me. Honestly, I just don’t have anything to trigger that relies on whether the sun is about to appear or disappear on the horizon :man_shrugging:t2:

1 Like

Thanks. I’m looking forward for your answer

OK. Set up to give me a notification - without prompting - at Sunrise. (UK time so almost 12 hours from now.)

Done on a XS MAX, running 14.3.

I’d set up a notification to trigger at sunrise today.

Local sunrise according to Apple’s Weather app was 08:23. This matches with that listed at timeanddate.comas well as several other sources I checked.

The notification did trigger, but it did so at 08:30,

When I asked an Amazon Echo what time sunrise was, it said 08:29. I thought this might be a variation based on me not living in the heart of the city, but checking the time for my GPS actually gave a slightly earlier sunrise of 08:22.

Takeaways:

  1. The sunrise trigger works (for me).
  2. The sunrise data is taken from a different source to that used in the Weather app or it is lax in it’s frequency of checking - either way, it doesn’t appear to be accurate to the minute. Perhaps accuracy has a tolerance of 5-15 minutes?

Thanks a lot. Mine doesn’t work and I have no idea in the world how / what to enable in order to make it working.
If no other idea will arise on this topic I think I’ll give up
Thanks anyway for your feedback

It worked for me, also. Not sure how accurate it was in its timing.

But what you said @sylumer suggests to me the source of the trigger is not clear and might still be the problem here.

Then maybe I have some services or settings off, but since nobody could help to find them, maybe it’s better to give up.
Thanks Martin

You’ve only posted this less than two days ago, and it obviously takes a while to do testing on a trigger like this. It seems at least a little premature to give up given there are still things to at least consider trying and that we have made for progress today in that we know it isn’t likely to be an OS bug.

A few further suggestions in order of increasing disruptiveness:

  1. Disable location services for Shortcuts and then re-enable them, or even better, reset location services across the board. Maybe there is something that’s stuck that Shortcuts is failing to access and it needs a reset.
  2. iPhones make use of radio signals for location and while I think this is less likely to be a cause of this issue, I think there is still the potential for it to be, so I would suggest considering a reset of network services - it affects more than just cell provider interaction. Just note you’ll need to sign back in to any WiFi networks afterwards.
  3. All I can think of after that is a full on factory reset to try and root out whatever the issue is. Obviously that’s a pretty drastic one, but it is always an option.

I’ll leave it to you to mull over and decide if you wish to take any further action based on these, or any other suggestions that other forum members might propose.

1 Like

Thanks a lot for your extended answer.

It WORKED!!!
I set a simple action 4 hours before sunset an it worked
But the difference you mentioned still it is. I mean weather app says sunset at 16:44 but the action has been performed at 12:39 (5 min difference!)
What I did to make it working it’s the first of your advice to reset all the location settings.
Thanks a lot once again!!

1 Like

Great news. Glad it worked😎