Shortcuts based on sunrise/sunset don't work

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😎

I had the same problem.
There was one tick in the system preferences location services:
Location-based services must be ticked on.

That cured the whole problem

With greetings from the french mountains

mobamo

1 Like

That makes sense. How else would it know when “4 hours before sunrise” is?

Good morning
I jumped into the string because I have a similar station
I have tried to set up a reminder in my automation to execute one hour before sunset but it doesn’t execute
All my location services are on, including the weather one
If I were to replace that with a specific time, the action executes I’m running 16.5.1. Ios
I would be grateful if you can give some inputs based on your past experience

Hi
I’m sorry but I noticed you had a solution so am jumping in
I have a problem with shortcuts and automation executing at sunrise or sunset, if I replace it with a specific time, it executes if I run it manually it executes
I’ve activated location based services for
Siri
Weather
Shortcuts
Still my sunrise sunset action does not execute

I have an update

The shortcuts are working

Spent the entire morning with the Apple support team

They asked me to reset everything which I did and the shortcuts started to work

Thank you everyone for your help

1 Like