Morning. I'm in front of the TV, with my breakfast on the table, slowly realizing that another day is starting and I should wake up completely to go to work.
Suddenly, the same question came to my mind: "What should I wear today?". I should check the weather forecast, see if it is hot or it is going to rain, and decide the clothes. Well, Wear Assistant is now available for you: this is an Alexa Custom Skill that check the weather and suggest you what you should wear to feel comfortable.
Wear Assistant is simple as its name: say the city where you are living, and let it do all the rest. It will check the weather forecasts and it will suggest you which clothing you should wear.
The skill structure is composed by:
- Alexa Custom skill defined on developer.amazon.com
- Lambda Function defined on aws.amazon.com
- Java WebApp hosted on https://www.openshift.com/
It has been choosed to use this kind of achitecture in order to speed-up the connection between the skill and the service called (connecting a skill to a Lambda function is really easy and fast) and in order to speed-up the development of the backend service (I have a deeper knowledge in Java compared with Javascript, I already have a domain on Openshift, I would prefer to wrap the service logic in the Java Web Application).
The interaction flow of the skill is the following:
- The user asks to Wear Assistant the city he/she is interested about. I.e. : what should I wear today in London?.
- Alexa sends the request to the skill, that redirect the call to the Lambda function. The function (written in Javascript) calls API on the Java WebApp on Openshift specifing the city (this is the only call to the backend service).
- The backend service calls the OpenWeatherMap APIs to get the weather forecast of the city. Based on these information, the backend elaborates the dress suggestions for the day. The response is then given back to the Lambda function.
- The Lambda function parses the response and says the dress suggestions to the user, through the voice. The information is completed with a card that shows a breafly weather forecast of the day.
Another interaction flow has been investigated. In this flow, the user does not specify the city he/she is interested about, and it is automatically resolved by the address of the device. Unfortunatelly, due the absence of a phisical Amazon Echo device for the tests, this interaction has been left for the moment and for this contest, but it will be included in the future in the skill.
You can find the skill at the following link: https://www.amazon.co.uk/dp/B072KL1S3G
The events are retrieved using the OpenWeatherMap APIs (http://openweathermap.org/api).
Project image has been provided by Pixabay (https://pixabay.com/).
Comments