Inspiration

My kids are borderline obsessed with knowing what the weather will be each day. It was great when Alexa came in to our lives so they could ask what the weather was each morning. The problem was, they didn’t understand it and would turn to me for translation as to whether that meant hot or cold. And even if I would say it’s cold, they would still go and put shorts on. We finally had to make a deal that shorts with very tall socks could count as pants. I got tired of the translation and the nagging so I made a skill to do that for me.

What it does

After opening the skill, the kiddo is given a summary of the current weather conditions, using words such as cool or warm instead of degrees. It adds in a random 'current weather appropriate' fun comment then gives a prediction for the weather for the rest of the day. It finishes with a recommendation on what to wear and a lively/ positive 'go get em tiger' kind of sign off. A kid can also ask directly if they should wear a specific item of clothing, such as a coat or about a specific weather condition such as if it's going to snow.

How I built it

I used AWS Lambda to host my javascript. I have a couple different classes that I use to bunch up functionality, with a main index.js that captures launch and intent requests, that then calls in to a weather manager class that utilizes a couple more classes to access country & zip information from the device given a consent token as well as get actual weather information given the location information. If the consent token is not present, a response is generated to the user that they need to enable the appropriate permissions.

Challenges I ran into

Phew… the list. Everything from getting all the api’s to play nicely with each other, to handling different error scenarios, to the biggest one - trying to get the built in weather intents to work correctly. I had originally set up this skill to allow the user to request any location for any time (not just have to use their current location), but I unfortunately had to remove that functionality, because I could only get the functionality to work every other time. I have hopes to add it back in at some point.

Accomplishments that I’m proud of

I’m so excited and happy to get this skill launched and see how it does in the world. There were some dark days when I wasn’t sure this skill would ever make it off the ground and I had to take a lot of deep breaths. My kids have already had a lot of fun with it though.

What I learned

I enjoyed that I learned new technologies with the different api’s I was hooking in to as well as a good amount about weather and different ways to create a weather report. My code looks at things like precipitation chance as well as cloud cover and even if it’s day or night. In regards to the code, there was a lot more code than in past skills I’ve written, so it was important to figure out the best way to break the code apart in to different classes and files.

What’s next for Kids Weather

I’d like to add back the functionality to allow someone to ask about any location/time. And then I have some more ideas… but I’ll start with those two.

Share this project:

Updates