It all started when I was locked out of my apartment, a few months back. I was not in a hurry or in some deep soul searching mode, but still somehow I managed to leave my keys inside. It was only when I was down the stairs, I realized the mistake. Fumbling through all my pockets, I looked stupid and the mistake did cost me heavily as the friend I had given my keys was on a long holiday. I had to pay someone to enter from the apartment window, a risky affair, as I live on 10th floor and open my door. All this time I was only thinking if someone could have just given me a nudge to take my keys just before I left the apartment, all of this would not have happened. Thus I started Forget Me Not just as a playful act to remind of the keys whenever I leave the apartment. When I heard about the Alexa Life Hacks challenge I knew it was not sufficient. So I started a more broad and systematic development.
What it does
Forget Me Not uses a minimalist sound design approach for user input as well as concise output to the user, as the skill is intended to be used at the last minute user leaves home.
Get the List of Items
When user invokes the skill for the first time using the invocation name ‘Forget Me Not’, the skill responds with a very generic reminder “Don’t forget your keys, wallet, ID and cell phone” with a simple prompt as to where he is going? User may or may not respond to the question. If no response from user is heard by the device the skill ends the session. However if user does responds with a place name such as ‘office’, ‘school’, ‘on a date’ or ‘I am leaving for India’ the skill fetches a list of default items to carry along from its database and responds accordingly. User can also invoke the skill with place name. In this case, in line with the minimalist design no further question will be asked by the skill.
User: Alexa, tell forget me not I am leaving for office. Alexa: Please carry along keys, wallet, ID, cell phone and laptop. Session Ends
The place is also added to users’ list of places in dynamo DB. User can add or remove the specific items later when he has spare time. Multiple places can be added to under a user ID.
Editing List of Items
Of course not every user will carry the same items to same place; the items will vary person to person. Default list present in the database is very generic in nature (and not even gender specific). So an option to edit the list of items as per individuals need is available. To edit items _ EditItem _ intent can be invoked during launch by saying ‘open Forget Me Not and edit items’ or in the help mode after _ LaunchRequest _ or when the skill is asking for name of place. Although the skill may be asking “May I know the place you are going to?” _ EditItem _ intent can be invoked by saying “Edit items”. This may sound confusing to user initially, but was done intentionally as per the minimalist approach, to avoid skill reading list of all options after the _ LaunchRequest _. This will save a lot of user’s time by avoiding list of options such as “Do you want to go somewhere?”, “Do you want to edit list of items” being read every time the skill is launched. After entering the _ Edit _ mode, user is prompted for the name of place, if not already provided earlier. If place doesn’t exists under the user ID, the user is prompted to add the place after invoking the skill and session ends. However, if the place does exist the user is prompted to say add/remove followed by item name to modify the list. User can even say multiple item names separated by ‘and’. The items are added / removed accordingly and a suitable response is generated. If the item already exists it shall not be added again and if an item does not exit it cannot be removed.
Launch Request User: Alexa, open Forget Me Not. Alexa: Please carry along keys, wallet, ID, cell phone and laptop. May I know where are you going? _ User: Help. Alexa: Just say the name of place you are going to know the list of items to carry. To add or remove items from your existing list say 'edit item list’. User: Edit item list. Alexa: Where are you going? User: Office. Alexa: Just say the name of items one by one as add 'car key' or you can say the name of all items separated by AND like add 'car key' and 'water bottle'. Similarly say remove followed by item name for removal? User: Add office bag and bike keys. Alexa: OK. You want to add more? User: No. Alexa: Thank you! I have modified the items. Session Ends
Forget Me Not can also be used as packing mate when planning for a tour or vacation. A long list of useful items has been included which shall be read few at a time, so that user has time to review his / her packing. Saying next, previous or repeat shall tell Alexa to read the items accordingly unless all items are complete. Again these list of items are also editable as per user request.
Launch Request User: Alexa, tell Forget Me Not I am leaving for India. Alexa: It is long list, I shall read few items at a time. Please carry along visa, passport, wallet, travel documents, cell phone and laptop. Please say next or repeat. User: Next. Alexa: Light clothing, mosquito repellent, sunscreen, deodorant and caps_ User: Next. Alexa: ... User: Next. Alexa: Finally, you must carry ... Session Ends
How I built it
Forget Me Not uses a minimalist sound design approach for user input as well as output provided to the user as the skill is intended to be used at the last minute user leaves home. It tries to take minimum input from user (sometimes just the invocation word is sufficient) and reads out very specific details expected by the user.
The skill was created using _ alexa-sdk _ with _ node.js _ and uses _ AWS Dynamo DB _ for persistence storage. Intents are structured to capture the place user is going and a corresponding query in database fetches the list of items to be read out. The place is then stored in Dynamo DB against the user ID. The lists of items stored corresponding to a place are editable as per the user request.
Initially a field _ usual Hour _ for a specific place was also captured and stored to database to identify the usual time of a routine place. For example a user may leave for gym everyday at around 5:00 AM. The field _ usual Hour _ was being used to quickly guess the place user is visiting at the Launch request itself. After a lot of search on Alexa forum, it was concluded that the intent request sent to lambda does contain a timestamp but that is the timestamp of server sending the request and not the local time. Intent request also does not contain any information regarding the time zone. So, it was not possible to know the local time of device unless I specifically request _ address permission _ and then using the latitude and longitude, calculate the local time affixed with time zone. Asking for _ address permission _ was kind of a deal breaker in consistence with minimalist approach being followed. The user must not be troubled for permissions even though it might be only for once. May be in future if the intent request do carry time zone information with them, the implementation would be quite straight forward.
Though the idea was not completely negated and a _ guess module _ was created for future implementation. For now it guesses the place only if there is only one place stored against a user ID. In this case user need not name the place every time the skill is invoked.
The output dialogs from skill were kept dynamic enough to change on every invocation.
Challenges I ran into
This was my first fully functional Alexa skill, so I overcame a lot of hurdles and learning curves for it’s creation. Setting up AWS Dynamo DB for local testing especially was one I was stuck into. As a matter of fact setting up Dynamo DB for the actual environment was quite easy but few little glitches in the local Dynamo DB setup ate up a lot of my time. Finally I am more confident than ever over Dynamo DB and local testing environment set up.
The dialog flow of skill was another huge task and which needed fine tuning every now and then. As detailed earlier I was focusing on the minimalist approach for minimum input from user, so a lot of decisions had to be taken which may or may not turn out to be fruitful. The output dialogs were kept as concise as possible except during addition of items because that is the mode when user may be relaxed. The next big hurdle was upgrading the skill for Echo Show and Echo Spot. I studied and applied the same but I was afraid I would not be able to complete the skill before the deadline, so I moved on without the display interfaces and considered the same for future upgrades.
Accomplishments that I'm proud of
This was my first skill with accommodation of AWS Dynamo DB, and completing it felt like an accomplishment in itself. Experimenting with dialog flows though time consuming was very interesting. Finally the creation of database table was a humongous task and consumed 100s of hours though it still feels incomplete.
What I learned
I gained a lot of confidence in development and testing of Alexa skills. Application of Dynamo DB has opened up new avenues for me to experiment on. The challenge gave me a chance to look at many new nooks and corners of Node JS.
What's next for Forget Me Not
The database for user place needs to have a more broad and feedback relevant inputs. The database shall definitely need improvement as more user feedback comes.
The skill shall be upgraded for display interfaces as soon as possible.
The _ guess mode _ for guessing where a user is going at a particular time shall be improved upon with other available resources, if possible.