Inspiration

I added on to my already existing Food Tracker skill. I was adding recipes myself to the database, and I thought it would be cool for users to add their own recipes for themselves, and perhaps profitable if proven useful for them. I saw this challenge for multimodal, and thought it would be cool to add it to the show as well!

What it does

You can now, on top of what you could do before, do these commands with voice:

  • add a recipe called rice with rice and salt
  • get a recipe called rice
  • remove recipe rice
  • list recipes

You can also do all of that, and all of the food storage options from the website! https://s3.amazonaws.com/food-tracker/index.html You link your skill, then login to my website with your amazon account.

How I built it

I made an html file and used javascript to populate my website. I learned APL and Login with Amazon.

Challenges I ran into

My code is using this.emit for my main code, so using APL was a head-scratcher for a bit, since that is Alexa's older library code. I was trying to convert part of my code to use the new library. I was running into needing to rewrite everything I already wrote. But, before I tried switching I was testing on my website and the echo, using the private method _addDirective and it seemed to be returning the right json, so it didn't make sense that I needed to switch. Turns out it was a simple mistake, after switching back to my old code and the thought popped into my head, "Do I need to enable APL or something? Kindof like linking amazon or using email permisions?". Yep, I needed to enable it under "Interfaces". I felt silly, as I wasted a couple of hours, but at least it was working! But then, my echo stopped responding correctly for the requests I implemented APL for. Turns out, you can't send APL data to a device that doesn't use APL, you have to check if the device supports it.

Mobile devices don't add style to dynamically created elements, so I rewrote the code to create the html elements first normally in html, and add functions in javascript.

I did a lot of googling for the connectivity with the Amazon account.

I was also stuck on calling the ISP for a while, because I was only testing on my website, not using the alexa Test page. It worked fine on the test page, turns out my website was not sending along the current apiAccessToken, but an old one from when I set up the gateway.

I couldn't quite get my ISP recipe subscription done. I feel like I was so close!

Accomplishments that I'm proud of

My website looks very old school, but it's functional and gets stuff get done on iPhones! You can be at the store, and look to see if you have certain food items!

What I learned

APL for multimodal displays and connecting a skill with an Amazon account. Api gateway validation.

What's next for Food Tracker

  • subscription for more than 20 recipes
  • ask food tracker to list recipes I can make
  • pictures when listing food and adding food
  • possible email subscriptions, Friday emails you what you could make for the week
  • conversation mode to removing old food
  • conversation mode to add staple foods, for first time users

Built With

Share this project:

Updates