Sample Commands for EchoWeather
The intention of this project was to make use of The Weather Network API in a creative fashion. This was done through the use of the developer tools provided with Amazon Alexa. A custom skill set that can be invoked using "Alexa, ask The Weather Network <command>" was created. The inspiration for this project was the necessity for weather information in remote areas when on hiking, skiing, etc. trips. By making use of Amazon Alexa and Twilio, you can now request an SMS to your phone with the next weeks weather information before leaving on your trip. This allows for a greater interactive world while also addressing an issue both of the team members have had to experience in the past.
What it does
The skill set provides basic weather information for the current location currently or on a future date. Additionally the functionality was extended to provide recommendations on the type of transportation to use when travelling to work or school. The system can also send individuals an SMS with relevant weather information with the simple use of a voice command.
- Current Weather Information - Example: What is the weather right now?
- Weather Information by date - Example: What is the weather in Kingston Ontario Canada on Thursday?
- Transportation Method - Example: Should I bike to work today?
- Text Message - Example: Send a text message to Mitchell with weather for Kingston Ontario Canada for tomorrow.
- Champions - Example: What team made the best use of The Weather Network API?
How we built it
- Amazon Developer Console : https://developer.amazon.com/
- Used Amazon Alexa Skills Kit to add new custom skills to Alexa for interacting with Amazon AWS Lambda instance.
- Amazon AWS Lambda : https://console.aws.amazon.com/lambda/
- Used AWS Lambda function to host python code required for backend processing of the Alexa commands.
- The python code is also responsible for calling The Weather Network API and interacting with Twilio.
- Twilio : https://www.twilio.com
- Used Twilio python module for sending text messages to user with weather information.
Challenges we ran into
Originally tried to use STDLIB with NodeJS as our backend, however ran into issues integrating with REST api calls and team's inexperience with node js. Minor functionality was possible but a decision was made to move to Amazon Lambda using the python scripting language for all backend processing. Both team members have previous python experience and it was found that generally more libraries were available for python than node js for external integrations. An additional problem we ran into while trying to incorporate multimedia messages was the use of python libraries in different python versions. The code was successful on our team's local machines but failed when run on the Amazon AWS Lambda server. Due to time constraints multimedia messages were removed from the project as addressing this issue had become very time consuming.
Accomplishments that we're proud of
Being able to integrate 3 platforms (Alexa, Weather Network API, and Twilio) to allow a user to send weather information via SMS with a simple voice command before leaving the house for the day.
What we learned
- Amazon Developer Console
- Amazon AWS Lambda Functions
- REST API calls
- Twilio SMS services
- Python Libraries
What's next for EchoWeather
- MMS Trend Graphs
- Allow users to send trend graphs such as wind speed, min and max temperature, snow accumulation etc. for the next 7 days to a user's cell phone. This expands on the current SMS capability to allow MMS messages. Where valuable statistics can be presented in graphical format.