SmartThings Community

Severe Weather Alerts on Echo

project_alerts
project_weather
#21

Alright I think I have it working (minus the lat and lon updates). Trying to figure out a better way to do that (would love a zip to lat/lon automatically), but this new app will let you choose what alerts you want to see in the preferences of the app, rather than having to code it. Simulated it in IDE, but if some people could try it out and let me know how it works, that would be great.

1 Like
#22

is there an instruction guide link somewhere that i missed to see? cant seem to find one.

#23

No. Just update Lat/Lon in the SmartApp IDE and install.

(JIm) #24

If you use getTwcLocation(zipcode) it will return the lat and long. Along with a whole bunch of other stuff.

Here is a way to do it:
def result = getTwcLocation(“65737”)
def latitude = {result.location['latitude']} def longitude = {result.location[‘longitude’]}

EDIT: when I post this it is leaving the dollar sign off. Add that before the {result.

(JIm) #25

Here is @piersm2 version with the zipcode option.

#26

Sweet thanks! This thing has made leaps and bounds over the last couple days haha

Edit: I am getting an error at line 81

(JIm) #27

Found the mistake. I changed the file on github. Try it now.

(JIm) #28

@piersm2, One thing that needs to be done and I’m not sure how to do it.

In reworking the message for Echo to speak I put in those lines to change the day abbreviation to the full day. I also put in something to get rid of ‘cst’. If someone uses this in another time zone that would have to be changed. Is there someway to put all the US time zones in the one replacement line?

I had to do all that cause Echo doesn’t say abbreviations very well and it was confusing.

#29

Is there a way to get the whole weather alert rather than just the headline?

[RELEASE] Echo Speaks
(JIm) #30

yes. Im out of town for a few days . When I get back I can get the details.

#31

Did you get a chance to take a look at this yet? Just getting back to this project.

(JIm) #32

Sorry for the delay. If you look at this page you can see all the info that comes in with the alerts.
https://smartthings-twc-responses.s3.amazonaws.com/alerts.json

I’m not sure where this app stands. I have kinda moved on and haven’t really stayed up to date here.

#33

How did you find this page?

(JIm) #34

There’s another thread on here that talks about the change in the weather api. It was there.

Here’s the link.

(Chris) #35

Is this only activated with the manual trigger or should it announce when an alert becomes active automatically?

(JIm) #36

It will announce automatically. The manual trigger is to get a repeat. I found that I didn’t always catch what was said and needed a repeat.

#37

I am getting an error when trying to pull it this way. What am I doing wrong?

(JIm) #38

I’ve never tried anything using the detail. what error and which line?

#39

131, but it is the line that is defining detail.

(JIm) #40

You need alertID, but i’m not seeing that in the response of alerts. So not sure what is going on.