Totally confused about apps (especially the weather station)

Hello all. I am new here, so thanks in advance for helping out a newbie. It’s kind of a long story but hopefully clear.

So I wrote my own lighting smartapp which, without getting into too many details, relies on the sunset notifications and states to work properly. Since I’m a software developer by trade, this wasn’t too difficult for me to develop and install and everything was working fine (hooray!).

Subsequently to this, I tried to install a smart lighting app which randomly turned lights on and off while in “vacation” mode. This seemed to work, except I noticed that the hub was going into night mode automatically at sunset, which of course turned off my random lighting app. I could even see events in the event list saying “entering night mode at your request.” Having no idea where these were coming from, I started scratching my head, looking though all the automations I could see on the mobile app, but could not see anything. So first question is: is there a way to determine exactly what is causing an event?

So not giving up I decided to examine my hub on the smartthings web site. Lo and behold, I saw many many other smartapps listed for my hub which were not reflected in the mobile app (from what I could see). So second question: why are some apps only listed in the web site? Continuing to dig, I tried deleting some of the things I didn’t recognize, figuring I wasn’t using them. So then, the hub stopped going into night node automatically. Success? Nope, because then my smartapp which depended on sunrise and sunset stopped working, it seemed to always think it was after sunrise. Sigh. So I started digging though the event list. And going back a few days I was seeing “it is now sunrise” and “it is now sunset” events which stopped the day I did my smartapp deletion. Then I came here and searched for questions relating to lack of sunset and sunrise events. I saw an answer which suggested "go to the website, find the “Weather Station” app in the list of smartapps, and click update. Then see if you get an event, But, I didn’t have that app anymore since I deleted it! So I started to figure out how to reinstall it. And all I could find in answer to this question were references to “Smart Weather station tile app” which seems to me to actually be a device based on the instructions to install it (“Add new device”). So now I’m really confused - what exactly is the “Smart Weather Station tile app” and how is it different from the regular “Weather Station” app? And how do I get the “Weather Station” app back on my hub?

The main thing I’d like to figure out right now is how to get my sunrise/sunset events working again. I installed the “Smart Weather Station tile app” and it appears to be working (?) however I am not getting the sunset events and my smartapp is still not working correctly.

However I’d also appreciate pointers to more general info about the platform which could also help answer my other questions. I’m not unwilling to spend some time and effort reading and learning.

Again, thanks in advance!

The sunrise and sunset times shouldn’t be affected by smartapps… Well not what i know about.
Have you looked on the IDE to check your hubs getting the right times it will tell you on the location.

Thanks for your help, here’s what I see:

Time Zone America/New_York
Weather
Sunrise 7:13 AM
Sunset 4:37 PM

Which appear to be around 3 days old, so something is not getting updated.

5 days ago I was getting the following in the Notifications list:
3cc38b50-f85b-11e7-9cfc-0a42aa0f7672 2018-01-13 7:14:00.325 AM EST - 5 days ago APP Performing “null” for you at sunrise as requested
3cd95d40-f85b-11e7-9cfc-0a42aa0f7672 2018-01-13 7:14:00.468 AM EST - 5 days ago APP As you requested, I changed mode from Night to Home.

9be5a750-f8a9-11e7-b748-062326c628c4 2018-01-13 4:35:00.677 PM EST - 5 days ago APP Performing “null” for you at sunset as requested
9beef620-f8a9-11e7-b748-062326c628c4 2018-01-13 4:35:00.738 PM EST - 5 days ago APP As you requested, I changed mode from Away to Night.

I’m not seeing these anymore. Which is good because I’m not getting the undesired mode changes, but is bad because I’m not getting the sunrise/sunset events in my smartapp. Who generates these events? An “APP” I guess but which one?

Edit: I drilled down into one of the sunrise/sunset notifications and I see the following:
smartAppId a7a4848a-10bc-4e20-9ddd-4b9ca46f4cb4

I also see this same field value on the mode change notifications.

I believe it’s the hub that deals with the sunrise/senset times.
To me it looks as though your are getting the times as normally they won’t display anything in the times if there’s a problem.
And again even your errors were happening at the correct times.
What is it you’re trying to do?
What device is it and what smartapp are you using to do it?

I created a smartapp to control a night light in my kitchen. It takes two
lights: the main light and the nightlight.

When the main light is turned on, turn off the nightlight
When the main light is turned off
If it is before sunrise or after sunset [i.e. dark outside], turn the
nightlight on
When sunrise occurs, turn the nightlight off
When sunset occurs and the main light is turned off, turn on the nightlight.

This app was working perfectly up to a few days ago. Now the nightlight
does not automatically turn off at sunrise nor on at sunset. The
nightlight does turn off when the main light is turned on. The nightlight
does behave correctly when the main light is turned off, however I suspect
that it is using the three day old sunrise/sunset times - I haven’t tried
it during the ~3 minute window between these times and the correct times.

Can you confirm that you actually wrote the smartapp yourself with groovy code ?
Or do you mean you used one of the installed Smartapps to create it?
It seems like whatever you deleted has affected the times or your smartapp.
Of your sunrise/sunset times were slightly out surely that wouldn’t matter it just means your lights would turn on and off a few mins either way but should still work.
Try creating a very simple rule in one of the built in smartapps to turn on a plug etc at sunset , just to test the basic on and off at sunset.

Yes, I wrote the smartapp myself with groovy code. Not sure if this link
will work or not:

I’m still figuring out github.

I agree about your analysis - if only the times were off then the lights
should still turn on and off just at slightly wrong time, but they are
not. I just created a very simple smart lighting automation to turn a
completely different set of lights on and off at sunset/sunrise, we will
see if it works tonight.

Again, thanks for all your help.

Can’t really help much you know far more than me :slight_smile:
Wouldn’t know how to create my own smartapp :frowning:

any chance did you figure out how to get the original weather station app reinstalled? i recently deleted mine as well by accident.

No. I ended up doing a factory reset on the hub, which reinstalled the weather station, and then adding everything back in. I don’t have that many devices yet so it was no big deal.

Sorry.

gotcha. thanks for the quick response. i guess i’ll follow suit.

so i emailed smartthings and they were quick to reinstall the weather station app. if you ever deleted it again, you don’t have to do a factory reset.

1 Like