Is there a way to see what you sunrise/sunset times actually are?

A search only turned up lots of issues and some coding questions about sunrise/sunset. I’m trying to find out where ST pulls the actual times from and is there any place I can actually see the values ST pulled?

I know it’s using my Location settings, but what service is it using (Google?)?

Funny, I just came here to post this exact question. I have some lighting set to come on when I arrive home and it’s between sunset and sunrise. No matter when I come home, the lights come on.

It’s in the account settings for the location.

One) click on community in the top right of this page to go to the first page of the forum

  1. click on “developer tools” at the top right of that page. This will take you to the IDE.

  2. sign into your SmartThings account

  3. click on “my locations” at the top of the screen. this will display a list of your locations.

Five) click on the name of the location that you want to check. This will bring up at details page.

Six) on the location’s details page there will be a “weather” section that lists the sunrise and sunset time associated with the location.

4 Likes

Mine is accurate. Must be something in my logic that’s making it happen but I can’t seem to find it.

Thanks JD, you are always a great help!

1 Like

What is the logic/routine you are using?

In any CoRE piston, on the dashboard, under System Variables, you’ll find the sunset and sunrise date/times listed… rough workaround, but it’s a quick glance…

1 Like

Needs to be quick with only 2% battery left :stuck_out_tongue_winking_eye:

3 Likes

Story of my life… 5% right now…

2 Likes

Oh yeah it does. 11-20% is mine’s sweet spot - it occasionally makes it to 1%…

1 Like

Thanks @JDRoberts, this was a very helpful start. But it still leave a problem:

My global coordinates are correct, but the sunrise time (listed about 7am) is about 30 minutes late and sunset time (listed about 4:50pm) is 2 hours early according to Google. Also this morning the routine activated about an hour before the listed time. How often does the sunrise/sunset refresh in SmartThings? Why does the routine not happen at the time listed in the IDE?

What you are seeing is a completely different problem than the issues discussed in this thread. There’s a platform bug right now where many accounts are running on UTC time rather than their own time zone. This is causing routines and automations to run at the wrong time.:disappointed_relieved:. Typically routines are running early in the US and late from the UK. But if you check the times you’ll see that they are already on UTC time.

Since it’s a bug, it doesn’t matter what your account says about your time zone – – it’s running everything on UTC time.

This issue has been listed on the official status page and there are several threads discussing it today.

.

I realize this is an old thread however I am unable to find the sunset and sunrise times using the method described above. My IDE account location does not show a “weather section” with times. Am I missing something or has the sunset and sunrise times moved somewhere else?

Looks like you need to do this:

Thank you. I have updated my info as per the instructions.

The sunrise and sunset times are made available to legacy apps by the Weather Station app as you’ve seen - the app sends out events at your local sunrise and sunset, and then sends out events updating the times for the next day a little while after sunset.

In the ‘new’ environment other methods are used but the information is certainly available in the API. In Curl speak you can do:

curl --header "Authorization: Bearer ACCESSTOKEN" https://api.smartthings.com/services/coordinate/locations/LOCATIONID/capabilities?name=weather

and that will include:

"sunriseTimeLocal": {
  "value": "2021-02-18T07:07:48.000Z"
},
"sunsetTimeLocal": {
  "value": "2021-02-18T17:21:44.000Z"
},

I’m not suggesting that is in any way an optimal or even an approved way of accessing the information, only making clear that the information is certainly sitting there in the API for apps to use.

I tried following those same instructions and the Weather Station app never shows up. I can’t see when it thinks sunrise and sunset are, but it is off by about 45 minutes. Do you happen to know a more direct way to add the Weather Station app? Since I don’t have it listed I wonder what is actually setting my sunrise/sunset times.

you can install Smart Lighting if it is available in your region. then create a smart lighting rule that includes sunrise/sunset and allow 24 hours to sync the times.

1 Like